*Fix a crash in spell::cast
--HG-- branch : trunk
This commit is contained in:
1 parent
aaeb7adedd
commit
18f50212b0
1 file changed
+3
-3
+3
-3
@@ -2238,6 +2238,9 @@ void Spell::cancel()
|
||||
|
||||
void Spell::cast(bool skipCheck)
|
||||
{
|
||||
// update pointers base at GUIDs to prevent access to non-existed already object
|
||||
UpdatePointers();
|
||||
|
||||
if(m_targets.getUnitTarget() && m_targets.getUnitTarget()->isAlive() && !m_targets.getUnitTarget()->isVisibleForOrDetect(m_caster, true))
|
||||
{
|
||||
cancel();
|
||||
@@ -2247,9 +2250,6 @@ void Spell::cast(bool skipCheck)
|
||||
SetExecutedCurrently(true);
|
||||
uint8 castResult = 0;
|
||||
|
||||
// update pointers base at GUIDs to prevent access to non-existed already object
|
||||
UpdatePointers();
|
||||
|
||||
// cancel at lost main target unit
|
||||
if(!m_targets.getUnitTarget() && m_targets.getUnitTargetGUID() && m_targets.getUnitTargetGUID() != m_caster->GetGUID())
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user