Core/Scripts: Removed CAST_CRE define
This commit is contained in:
1 parent
355029fb4f
commit
156fb824a4
16 files changed
+65
-59
No files matched your search
@@ -569,7 +569,8 @@ public:
|
||||
return;
|
||||
|
||||
if (Unit* summon = me->ToTempSummon()->GetSummoner())
|
||||
CAST_CRE(summon)->AI()->SetData(2, 1);
|
||||
if (Creature* creature = summon->ToCreature())
|
||||
creature->AI()->SetData(2, 1);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 /*diff*/)
|
||||
@@ -586,8 +587,8 @@ public:
|
||||
return;
|
||||
|
||||
if (Unit* summoner = me->ToTempSummon()->GetSummoner())
|
||||
if (Creature* summonerCre = summoner->ToCreature())
|
||||
summonerCre->AI()->SetData(2, 2);
|
||||
if (Creature* creature = summoner->ToCreature())
|
||||
creature->AI()->SetData(2, 2);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -145,9 +145,9 @@ public:
|
||||
|
||||
void KilledUnit(Unit* who)
|
||||
{
|
||||
Unit* pMalchezaar = Unit::GetUnit(*me, malchezaar);
|
||||
if (pMalchezaar)
|
||||
CAST_CRE(pMalchezaar)->AI()->KilledUnit(who);
|
||||
if (Unit* unit = Unit::GetUnit(*me, malchezaar))
|
||||
if (Creature* creature = unit->ToCreature())
|
||||
creature->AI()->KilledUnit(who);
|
||||
}
|
||||
|
||||
void SpellHit(Unit* /*who*/, const SpellInfo* spell)
|
||||
|
||||
@@ -274,9 +274,9 @@ class boss_hexlord_malacrass : public CreatureScript
|
||||
|
||||
for (uint8 i = 0; i < 4; ++i)
|
||||
{
|
||||
Unit* Temp = Unit::GetUnit(*me, AddGUID[i]);
|
||||
if (Temp && Temp->isAlive())
|
||||
CAST_CRE(Temp)->AI()->AttackStart(me->getVictim());
|
||||
Creature* creature = Unit::GetCreature(*me, AddGUID[i]);
|
||||
if (creature && creature->isAlive())
|
||||
creature->AI()->AttackStart(me->getVictim());
|
||||
else
|
||||
{
|
||||
EnterEvadeMode();
|
||||
|
||||
Reference in new issue
Block a user