Scripts: Removed CAST_SUM define
This commit is contained in:
@@ -565,7 +565,7 @@ public:
|
||||
if (!me->isSummon())
|
||||
return;
|
||||
|
||||
if (Unit* pSummon = CAST_SUM(me)->GetSummoner())
|
||||
if (Unit* pSummon = me->ToTempSummon()->GetSummoner())
|
||||
CAST_CRE(pSummon)->AI()->SetData(2, 1);
|
||||
}
|
||||
|
||||
@@ -582,8 +582,9 @@ public:
|
||||
if (!me->isSummon())
|
||||
return;
|
||||
|
||||
if (Unit* pSummon = CAST_SUM(me)->GetSummoner())
|
||||
CAST_CRE(pSummon)->AI()->SetData(2, 2);
|
||||
if (Unit* summoner = me->ToTempSummon()->GetSummoner())
|
||||
if (Creature* summonerCre = summoner->ToCreature())
|
||||
summonerCre->AI()->SetData(2, 2);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ public:
|
||||
{
|
||||
Player *plr = NULL;
|
||||
if (me->isSummon())
|
||||
if (Unit *summoner = CAST_SUM(me)->GetSummoner())
|
||||
if (Unit *summoner = me->ToTempSummon()->GetSummoner())
|
||||
if (summoner->GetTypeId() == TYPEID_PLAYER)
|
||||
plr = CAST_PLR(summoner);
|
||||
|
||||
|
||||
@@ -478,10 +478,10 @@ public:
|
||||
|
||||
if (me->isSummon())
|
||||
{
|
||||
if (Unit* pSummoner = CAST_SUM(me)->GetSummoner())
|
||||
if (Unit* pSummoner = me->ToTempSummon()->GetSummoner())
|
||||
{
|
||||
if (pSummoner && pSummoner->isAlive() && !pSummoner->isInCombat())
|
||||
CAST_CRE(pSummoner)->AI()->AttackStart(pWho);
|
||||
if (pSummoner && pSummoner->GetTypeId() == TYPEID_UNIT && pSummoner->isAlive() && !pSummoner->isInCombat())
|
||||
pSummoner->ToCreature()->AI()->AttackStart(pWho);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -492,10 +492,10 @@ public:
|
||||
|
||||
if (me->isSummon())
|
||||
{
|
||||
if (Unit* pSummoner = CAST_SUM(me)->GetSummoner())
|
||||
if (Unit* pSummoner = me->ToTempSummon()->GetSummoner())
|
||||
{
|
||||
if (pSummoner && pSummoner->isAlive())
|
||||
CAST_CRE(pSummoner)->DisappearAndDie();
|
||||
if (pSummoner && pSummoner->GetTypeId() == TYPEID_UNIT && pSummoner->isAlive())
|
||||
pSummoner->ToCreature()->DisappearAndDie();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -507,10 +507,10 @@ public:
|
||||
|
||||
if (me->isSummon())
|
||||
{
|
||||
if (Unit* pSummoner = CAST_SUM(me)->GetSummoner())
|
||||
if (Unit* pSummoner = me->ToTempSummon()->GetSummoner())
|
||||
{
|
||||
CAST_AI(npc_lord_gregor_lescovar::npc_lord_gregor_lescovarAI, CAST_CRE(pSummoner)->AI())->uiTimer = 2000;
|
||||
CAST_AI(npc_lord_gregor_lescovar::npc_lord_gregor_lescovarAI, CAST_CRE(pSummoner)->AI())->uiPhase = 5;
|
||||
CAST_AI(npc_lord_gregor_lescovar::npc_lord_gregor_lescovarAI, pSummoner->GetAI())->uiTimer = 2000;
|
||||
CAST_AI(npc_lord_gregor_lescovar::npc_lord_gregor_lescovarAI, pSummoner->GetAI())->uiPhase = 5;
|
||||
//me->ChangeOrient(0.0f, pSummoner);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user