Boran Tundra, Quest 11648, The Art of Persuassion: Fix pCaster pointer, by microbius51

Cleanup the script

--HG--
branch : trunk
This commit is contained in:
Tartalo
2010-04-07 10:33:58 +02:00
parent 0ae812b7bd
commit 599ffd8bb9
+3 -5
View File
@@ -1715,6 +1715,7 @@ struct npc_imprisoned_beryl_sorcererAI : public ScriptedAI
{ {
uiStep = 1; uiStep = 1;
uiPhase = 0; uiPhase = 0;
pCaster = NULL;
} }
void EnterCombat(Unit* pWho) void EnterCombat(Unit* pWho)
@@ -1722,12 +1723,12 @@ struct npc_imprisoned_beryl_sorcererAI : public ScriptedAI
return; return;
} }
void SpellHit(Unit* pCaster, const SpellEntry* pSpell) void SpellHit(Unit* pUnit, const SpellEntry* pSpell)
{ {
if (pSpell->Id == SPELL_NEURAL_NEEDLE && pCaster->GetTypeId() == TYPEID_PLAYER) if (pSpell->Id == SPELL_NEURAL_NEEDLE && pCaster->GetTypeId() == TYPEID_PLAYER)
{ {
++uiPhase; ++uiPhase;
pCaster = CAST_PLR(pCaster); pCaster = CAST_PLR(pUnit);
} }
} }
@@ -1804,9 +1805,6 @@ struct npc_imprisoned_beryl_sorcererAI : public ScriptedAI
} }
break; break;
} }
if (!UpdateVictim())
return;
} }
}; };