Core: Cleaning up hungarian notation - Phase8: pSummon -> summon (also did related hits)

This commit is contained in:
click
2011-07-03 00:28:03 +02:00
parent 354e5e2bbc
commit 1aff85f541
52 changed files with 289 additions and 289 deletions
@@ -232,12 +232,12 @@ public:
if (!SummonList.empty())
for (std::list<uint64>::const_iterator itr = SummonList.begin(); itr != SummonList.end(); ++itr)
{
if (Creature* pSummon = Unit::GetCreature(*me, *itr))
if (Creature* summon = Unit::GetCreature(*me, *itr))
{
if (pSummon->isAlive())
pSummon->DisappearAndDie();
if (summon->isAlive())
summon->DisappearAndDie();
else
pSummon->RemoveCorpse();
summon->RemoveCorpse();
}
}
}
@@ -534,10 +534,10 @@ public:
DoMeleeAttackIfReady();
}
void JustSummoned(Creature* pSummon)
void JustSummoned(Creature* summon)
{
SummonList.push_back(pSummon->GetGUID());
AggroAllPlayers(pSummon);
SummonList.push_back(summon->GetGUID());
AggroAllPlayers(summon);
}
};
@@ -565,8 +565,8 @@ public:
if (!me->isSummon())
return;
if (Unit* pSummon = me->ToTempSummon()->GetSummoner())
CAST_CRE(pSummon)->AI()->SetData(2, 1);
if (Unit* summon = me->ToTempSummon()->GetSummoner())
CAST_CRE(summon)->AI()->SetData(2, 1);
}
void UpdateAI(const uint32 /*diff*/)
@@ -324,14 +324,14 @@ public:
DoScriptText(SAY_AGGRO, me);
}
void JustSummoned(Creature* pSummoned)
void JustSummoned(Creature* summoned)
{
if (pSummoned->GetEntry() == CREATURE_PORTAL)
if (summoned->GetEntry() == CREATURE_PORTAL)
{
PortalGUID[PortalsCount] = pSummoned->GetGUID();
PortalGUID[PortalsCount] = summoned->GetGUID();
++PortalsCount;
if (pSummoned->GetUInt32Value(UNIT_CREATED_BY_SPELL) == SPELL_FIENDISH_PORTAL_1)
if (summoned->GetUInt32Value(UNIT_CREATED_BY_SPELL) == SPELL_FIENDISH_PORTAL_1)
{
DoScriptText(RAND(SAY_SUMMON1, SAY_SUMMON2), me);
SummonedPortals = true;
@@ -1032,9 +1032,9 @@ public:
boss_priestess_lackey_commonAI::Reset();
}
void JustSummoned(Creature* pSummoned)
void JustSummoned(Creature* summoned)
{
m_uiPetGUID = pSummoned->GetGUID();
m_uiPetGUID = summoned->GetGUID();
}
void UpdateAI(const uint32 diff)
@@ -260,8 +260,8 @@ class boss_ragnaros : public CreatureScript
// summon 8 elementals
for (uint8 i = 0; i < 8; ++i)
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
if (Creature* pSummoned = me->SummonCreature(12143, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 900000))
pSummoned->AI()->AttackStart(target);
if (Creature* summoned = me->SummonCreature(12143, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 900000))
summoned->AI()->AttackStart(target);
_hasSubmergedOnce = true;
_isBanished = true;
@@ -275,8 +275,8 @@ class boss_ragnaros : public CreatureScript
for (uint8 i = 0; i < 8; ++i)
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
if (Creature* pSummoned = me->SummonCreature(12143, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 900000))
pSummoned->AI()->AttackStart(target);
if (Creature* summoned = me->SummonCreature(12143, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 900000))
summoned->AI()->AttackStart(target);
_isBanished = true;
//DoCast(me, SPELL_RAGSUBMERGE);
@@ -253,18 +253,18 @@ public:
}
}
void JustSummoned(Creature* pSummoned)
void JustSummoned(Creature* summoned)
{
if (Player* player = GetPlayerForEscort())
{
pSummoned->AI()->AttackStart(player);
summoned->AI()->AttackStart(player);
}
if (pSummoned->GetEntry() == NPC_HIGH_INQUISITOR_VALROTH)
m_uiValrothGUID = pSummoned->GetGUID();
if (summoned->GetEntry() == NPC_HIGH_INQUISITOR_VALROTH)
m_uiValrothGUID = summoned->GetGUID();
pSummoned->AddThreat(me, 0.0f);
pSummoned->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
summoned->AddThreat(me, 0.0f);
summoned->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
}
void SummonAcolyte(uint32 uiAmount)
@@ -239,7 +239,7 @@ public:
return;
Creature* pArchmage = instance->GetCreature(uiArchmageArugalGUID);
Creature* pSummon = NULL;
Creature* summon = NULL;
if (!pArchmage || !pArchmage->isAlive())
return;
@@ -251,11 +251,11 @@ public:
switch(uiPhase)
{
case 1:
pSummon = pArchmage->SummonCreature(pArchmage->GetEntry(), SpawnLocation[4], TEMPSUMMON_TIMED_DESPAWN, 10000);
pSummon->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
pSummon->SetReactState(REACT_DEFENSIVE);
pSummon->CastSpell(pSummon, SPELL_ASHCROMBE_TELEPORT, true);
DoScriptText(SAY_ARCHMAGE, pSummon);
summon = pArchmage->SummonCreature(pArchmage->GetEntry(), SpawnLocation[4], TEMPSUMMON_TIMED_DESPAWN, 10000);
summon->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
summon->SetReactState(REACT_DEFENSIVE);
summon->CastSpell(summon, SPELL_ASHCROMBE_TELEPORT, true);
DoScriptText(SAY_ARCHMAGE, summon);
uiTimer = 2000;
uiPhase = 2;
break;
@@ -137,10 +137,10 @@ class boss_arlokk : public CreatureScript
me->SummonCreature(NPC_ZULIAN_PROWLER, -11532.9970f, -1606.4840f, 41.2979f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
}
void JustSummoned(Creature* pSummoned)
void JustSummoned(Creature* summoned)
{
if (Unit* pMarkedTarget = Unit::GetUnit(*me, MarkedTargetGUID))
pSummoned->AI()->AttackStart(pMarkedTarget);
summoned->AI()->AttackStart(pMarkedTarget);
++m_uiSummonCount;
}
@@ -97,9 +97,9 @@ class npc_professor_phizzlethorpe : public CreatureScript
}
}
void JustSummoned(Creature* pSummoned)
void JustSummoned(Creature* summoned)
{
pSummoned->AI()->AttackStart(me);
summoned->AI()->AttackStart(me);
}
void EnterCombat(Unit* /*who*/)
@@ -456,8 +456,8 @@ public:
{ // no player check, quest can be finished as group, so no complex PlayerGUID/group search code
for (uint8 i = 0; i < 4; ++i)
if (Creature* pSummoned = DoSpawnCreature(PaladinEntry[i], SpawnPosition[i].x, SpawnPosition[i].y, SpawnPosition[i].z, SpawnPosition[i].o, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 180000))
paladinGuid[i] = pSummoned->GetGUID();
if (Creature* summoned = DoSpawnCreature(PaladinEntry[i], SpawnPosition[i].x, SpawnPosition[i].y, SpawnPosition[i].z, SpawnPosition[i].o, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 180000))
paladinGuid[i] = summoned->GetGUID();
timer = OFFSET_NEXT_ATTACK;
questPhase = 2;
@@ -485,8 +485,8 @@ void npc_second_trial_paladin::npc_secondTrialAI::JustDied(Unit* Killer)
{
if (Killer->GetTypeId() == TYPEID_PLAYER)
{
if (Creature* pSummoner = Unit::GetCreature((*me), summonerGuid))
CAST_AI(npc_second_trial_controller::master_kelerun_bloodmournAI, pSummoner->AI())->SecondTrialKill();
if (Creature* summoner = Unit::GetCreature((*me), summonerGuid))
CAST_AI(npc_second_trial_controller::master_kelerun_bloodmournAI, summoner->AI())->SecondTrialKill();
// last kill quest complete for group
if (me->GetEntry() == CHAMPION_SUNSTRIKER)
@@ -141,9 +141,9 @@ public:
DoScriptText(SAY_OOX_AGGRO2, me);
}
void JustSummoned(Creature* pSummoned)
void JustSummoned(Creature* summoned)
{
pSummoned->GetMotionMaster()->MovePoint(0, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ());
summoned->GetMotionMaster()->MovePoint(0, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ());
}
};
@@ -271,10 +271,10 @@ public:
}
}
void JustSummoned(Creature* pSummoned)
void JustSummoned(Creature* summoned)
{
pSummoned->RemoveUnitMovementFlag(MOVEMENTFLAG_WALKING);
pSummoned->GetMotionMaster()->MovePoint(0, m_afAmbushMoveTo[m_iSpawnId].m_fX, m_afAmbushMoveTo[m_iSpawnId].m_fY, m_afAmbushMoveTo[m_iSpawnId].m_fZ);
summoned->RemoveUnitMovementFlag(MOVEMENTFLAG_WALKING);
summoned->GetMotionMaster()->MovePoint(0, m_afAmbushMoveTo[m_iSpawnId].m_fX, m_afAmbushMoveTo[m_iSpawnId].m_fY, m_afAmbushMoveTo[m_iSpawnId].m_fZ);
}
void WaypointReached(uint32 uiPointId)
@@ -273,21 +273,21 @@ public:
void EnterCombat(Unit* /*who*/){}
void JustSummoned(Creature* pSummoned)
void JustSummoned(Creature* summoned)
{
Summons.Summon(pSummoned);
Summons.Summon(summoned);
++KillCount;
}
void SummonedCreatureDespawn(Creature* pSummoned)
void SummonedCreatureDespawn(Creature* summoned)
{
Summons.Despawn(pSummoned);
Summons.Despawn(summoned);
--KillCount;
}
void SummonCreatureWithRandomTarget(uint32 creatureId, int position)
{
if (Creature* pSummoned = me->SummonCreature(creatureId, PyrewoodSpawnPoints[position][0], PyrewoodSpawnPoints[position][1], PyrewoodSpawnPoints[position][2], PyrewoodSpawnPoints[position][3], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 15000))
if (Creature* summoned = me->SummonCreature(creatureId, PyrewoodSpawnPoints[position][0], PyrewoodSpawnPoints[position][1], PyrewoodSpawnPoints[position][2], PyrewoodSpawnPoints[position][3], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 15000))
{
Player* player = NULL;
Unit* target = NULL;
@@ -301,9 +301,9 @@ public:
if (target)
{
pSummoned->setFaction(168);
pSummoned->AddThreat(target, 32.0f);
pSummoned->AI()->AttackStart(target);
summoned->setFaction(168);
summoned->AddThreat(target, 32.0f);
summoned->AI()->AttackStart(target);
}
}
}
@@ -478,10 +478,10 @@ public:
if (me->isSummon())
{
if (Unit* pSummoner = me->ToTempSummon()->GetSummoner())
if (Unit* summoner = me->ToTempSummon()->GetSummoner())
{
if (pSummoner && pSummoner->GetTypeId() == TYPEID_UNIT && pSummoner->isAlive() && !pSummoner->isInCombat())
pSummoner->ToCreature()->AI()->AttackStart(who);
if (summoner && summoner->GetTypeId() == TYPEID_UNIT && summoner->isAlive() && !summoner->isInCombat())
summoner->ToCreature()->AI()->AttackStart(who);
}
}
}
@@ -492,10 +492,10 @@ public:
if (me->isSummon())
{
if (Unit* pSummoner = me->ToTempSummon()->GetSummoner())
if (Unit* summoner = me->ToTempSummon()->GetSummoner())
{
if (pSummoner && pSummoner->GetTypeId() == TYPEID_UNIT && pSummoner->isAlive())
pSummoner->ToCreature()->DisappearAndDie();
if (summoner && summoner->GetTypeId() == TYPEID_UNIT && summoner->isAlive())
summoner->ToCreature()->DisappearAndDie();
}
}
}
@@ -507,17 +507,17 @@ public:
if (me->isSummon())
{
Unit* pSummoner = me->ToTempSummon()->GetSummoner();
if (pSummoner && pSummoner->GetTypeId() == TYPEID_UNIT && pSummoner->IsAIEnabled)
Unit* summoner = me->ToTempSummon()->GetSummoner();
if (summoner && summoner->GetTypeId() == TYPEID_UNIT && summoner->IsAIEnabled)
{
npc_lord_gregor_lescovar::npc_lord_gregor_lescovarAI *ai =
CAST_AI(npc_lord_gregor_lescovar::npc_lord_gregor_lescovarAI, pSummoner->GetAI());
CAST_AI(npc_lord_gregor_lescovar::npc_lord_gregor_lescovarAI, summoner->GetAI());
if (ai)
{
ai->uiTimer = 2000;
ai->uiPhase = 5;
}
//me->ChangeOrient(0.0f, pSummoner);
//me->ChangeOrient(0.0f, summoner);
}
}
}
@@ -324,10 +324,10 @@ public:
m_uiChatTimer = 7000;
}
void JustSummoned(Creature* pSummoned)
void JustSummoned(Creature* summoned)
{
if (pSummoned->GetEntry() == NPC_GHOUL)
pSummoned->AI()->AttackStart(me);
if (summoned->GetEntry() == NPC_GHOUL)
summoned->AI()->AttackStart(me);
}
void WaypointReached(uint32 i)
@@ -164,9 +164,9 @@ public:
}
}
void JustSummoned(Creature* pSummoned)
void JustSummoned(Creature* summoned)
{
pSummoned->AI()->AttackStart(me);
summoned->AI()->AttackStart(me);
}
void Update(const uint32 diff)
@@ -94,10 +94,10 @@ public:
}
}
void JustSummoned(Creature* pSummoned)
void JustSummoned(Creature* summoned)
{
if (Player* player = GetPlayerForEscort())
pSummoned->AI()->AttackStart(player);
summoned->AI()->AttackStart(player);
}
void AttackedBy(Unit* pAttacker)
@@ -69,9 +69,9 @@ class example_escort : public CreatureScript
uint32 m_uiDeathCoilTimer;
uint32 m_uiChatTimer;
void JustSummoned(Creature* pSummoned)
void JustSummoned(Creature* summoned)
{
pSummoned->AI()->AttackStart(me);
summoned->AI()->AttackStart(me);
}
// Pure Virtual Functions (Have to be implemented)
@@ -197,22 +197,22 @@ public:
Summons.DespawnAll();
}
void JustSummoned(Creature* pSummoned)
void JustSummoned(Creature* summoned)
{
pSummoned->SetInCombatWithZone();
summoned->SetInCombatWithZone();
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
pSummoned->AI()->AttackStart(target);
summoned->AI()->AttackStart(target);
switch (pSummoned->GetEntry())
switch (summoned->GetEntry())
{
case NPC_WHELP:
++m_uiSummonWhelpCount;
break;
case NPC_LAIRGUARD:
pSummoned->setActive(true);
summoned->setActive(true);
break;
}
Summons.Summon(pSummoned);
Summons.Summon(summoned);
}
void SummonedCreatureDespawn(Creature* summon)
@@ -162,8 +162,8 @@ public:
{
for (uint8 i = 0; i < uiSummonTimes; ++i)
{
if (Creature* pSummon = go->SummonCreature(uiCreature, 2502.635f + float(irand(-5, 5)), 844.140f + float(irand(-5, 5)), 46.896f, 0.633f))
pSummon->GetMotionMaster()->MovePoint(0, 2533.479f + float(irand(-5, 5)), 870.020f + float(irand(-5, 5)), 47.678f);
if (Creature* summon = go->SummonCreature(uiCreature, 2502.635f + float(irand(-5, 5)), 844.140f + float(irand(-5, 5)), 46.896f, 0.633f))
summon->GetMotionMaster()->MovePoint(0, 2533.479f + float(irand(-5, 5)), 870.020f + float(irand(-5, 5)), 47.678f);
}
}
creature->GetMotionMaster()->MovePoint(0, 2533.479f + float(irand(-5, 5)), 870.020f + float(irand(-5, 5)), 47.678f);
+2 -2
View File
@@ -310,9 +310,9 @@ class npc_muglash : public CreatureScript
uint32 m_uiEventTimer;
bool m_bIsBrazierExtinguished;
void JustSummoned(Creature* pSummoned)
void JustSummoned(Creature* summoned)
{
pSummoned->AI()->AttackStart(me);
summoned->AI()->AttackStart(me);
}
void WaypointReached(uint32 i)
+4 -4
View File
@@ -637,13 +637,13 @@ public:
}
}
void JustSummoned(Creature* pSummoned)
void JustSummoned(Creature* summoned)
{
if (pSummoned->GetEntry() == NPC_PILOT_WIZZ)
if (summoned->GetEntry() == NPC_PILOT_WIZZ)
me->SetStandState(UNIT_STAND_STATE_DEAD);
if (pSummoned->GetEntry() == NPC_MERCENARY)
pSummoned->AI()->AttackStart(me);
if (summoned->GetEntry() == NPC_MERCENARY)
summoned->AI()->AttackStart(me);
}
void UpdateEscortAI(const uint32 uiDiff)
@@ -98,9 +98,9 @@ public:
TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
}
void JustSummoned(Creature* pSummoned)
void JustSummoned(Creature* summoned)
{
pSummoned->AI()->AttackStart(me);
summoned->AI()->AttackStart(me);
}
};
@@ -346,9 +346,9 @@ public:
DoMeleeAttackIfReady();
}
void JustSummoned(Creature* pSummon)
void JustSummoned(Creature* summon)
{
MemoryGUID = pSummon->GetGUID();
MemoryGUID = summon->GetGUID();
}
};
@@ -144,10 +144,10 @@ public:
SummonList.clear();
}
void JustSummoned(Creature* pSummon)
void JustSummoned(Creature* summon)
{
SummonList.push_back(pSummon->GetGUID());
pSummon->AI()->AttackStart(me->getVictim());
SummonList.push_back(summon->GetGUID());
summon->AI()->AttackStart(me->getVictim());
}
void UpdateAI(const uint32 uiDiff)
@@ -180,8 +180,8 @@ public:
if (uiData == IN_PROGRESS)
{
for (std::list<uint64>::const_iterator itr = VehicleList.begin(); itr != VehicleList.end(); ++itr)
if (Creature* pSummon = instance->GetCreature(*itr))
pSummon->RemoveFromWorld();
if (Creature* summon = instance->GetCreature(*itr))
summon->RemoveFromWorld();
}else if (uiData == DONE)
{
++uiGrandChampionsDeaths;
@@ -146,8 +146,8 @@ public:
}
for (std::list<uint64>::const_iterator itr = TempList.begin(); itr != TempList.end(); ++itr)
if (Creature* pSummon = Unit::GetCreature(*me, *itr))
AggroAllPlayers(pSummon);
if (Creature* summon = Unit::GetCreature(*me, *itr))
AggroAllPlayers(summon);
}else if (uiLesserChampions == 9)
StartGrandChampionsAttack();
@@ -420,8 +420,8 @@ public:
if (!Champion1List.empty())
{
for (std::list<uint64>::const_iterator itr = Champion1List.begin(); itr != Champion1List.end(); ++itr)
if (Creature* pSummon = Unit::GetCreature(*me, *itr))
AggroAllPlayers(pSummon);
if (Creature* summon = Unit::GetCreature(*me, *itr))
AggroAllPlayers(summon);
NextStep(0, false);
}
break;
@@ -432,18 +432,18 @@ public:
return;
}
void JustSummoned(Creature* pSummon)
void JustSummoned(Creature* summon)
{
if (pInstance && pInstance->GetData(BOSS_GRAND_CHAMPIONS) == NOT_STARTED)
{
pSummon->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
pSummon->SetReactState(REACT_PASSIVE);
summon->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
summon->SetReactState(REACT_PASSIVE);
}
}
void SummonedCreatureDespawn(Creature* pSummon)
void SummonedCreatureDespawn(Creature* summon)
{
switch(pSummon->GetEntry())
switch(summon->GetEntry())
{
case VEHICLE_DARNASSIA_NIGHTSABER:
case VEHICLE_EXODAR_ELEKK:
@@ -222,27 +222,27 @@ public:
m_pInstance->SetData(TYPE_ANUBARAK, DONE);
}
void JustSummoned(Creature* pSummoned)
void JustSummoned(Creature* summoned)
{
Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 0, true);
switch (pSummoned->GetEntry())
switch (summoned->GetEntry())
{
case NPC_BURROW:
m_vBurrowGUID.push_back(pSummoned->GetGUID());
pSummoned->SetReactState(REACT_PASSIVE);
pSummoned->CastSpell(pSummoned, SPELL_CHURNING_GROUND, false);
m_vBurrowGUID.push_back(summoned->GetGUID());
summoned->SetReactState(REACT_PASSIVE);
summoned->CastSpell(summoned, SPELL_CHURNING_GROUND, false);
break;
case NPC_SPIKE:
pSummoned->CombatStart(target);
summoned->CombatStart(target);
DoScriptText(EMOTE_SPIKE, me, target);
break;
}
Summons.Summon(pSummoned);
Summons.Summon(summoned);
}
void SummonedCreatureDespawn(Creature* pSummoned)
void SummonedCreatureDespawn(Creature* summoned)
{
switch (pSummoned->GetEntry())
switch (summoned->GetEntry())
{
case NPC_SPIKE:
m_uiPursuingSpikeTimer = 2*IN_MILLISECONDS;
@@ -264,8 +264,8 @@ public:
me->SummonCreature(NPC_BURROW, AnubarakLoc[i+2]);
//Spawn Frost Spheres
for (int i=0; i < 6; i++)
if (Unit* pSummoned = me->SummonCreature(NPC_FROST_SPHERE, SphereSpawn[i]))
m_aSphereGUID[i] = pSummoned->GetGUID();
if (Unit* summoned = me->SummonCreature(NPC_FROST_SPHERE, SphereSpawn[i]))
m_aSphereGUID[i] = summoned->GetGUID();
}
void UpdateAI(const uint32 uiDiff)
@@ -377,8 +377,8 @@ public:
{
if (!pSphere->HasAura(SPELL_FROST_SPHERE))
{
if (Creature* pSummon = me->SummonCreature(NPC_FROST_SPHERE, SphereSpawn[i]))
m_aSphereGUID[i] = pSummon->GetGUID();
if (Creature* summon = me->SummonCreature(NPC_FROST_SPHERE, SphereSpawn[i]))
m_aSphereGUID[i] = summon->GetGUID();
break;
}
}
@@ -1737,9 +1737,9 @@ public:
Summons.DespawnAll();
}
void JustSummoned(Creature* pSummoned)
void JustSummoned(Creature* summoned)
{
Summons.Summon(pSummoned);
Summons.Summon(summoned);
}
void SummonedCreatureDespawn(Creature* /*pSummoned*/)
@@ -158,9 +158,9 @@ public:
m_pInstance->SetData(TYPE_JARAXXUS, DONE);
}
void JustSummoned(Creature* pSummoned)
void JustSummoned(Creature* summoned)
{
Summons.Summon(pSummoned);
Summons.Summon(summoned);
}
void EnterCombat(Unit* /*who*/)
@@ -324,10 +324,10 @@ public:
Summons.DespawnAll();
}
void JustSummoned(Creature* pSummoned)
void JustSummoned(Creature* summoned)
{
Summons.Summon(pSummoned);
pSummoned->SetCorpseDelay(0);
Summons.Summon(summoned);
summoned->SetCorpseDelay(0);
}
void JustDied(Unit* /*killer*/)
@@ -453,10 +453,10 @@ public:
Summons.DespawnAll();
}
void JustSummoned(Creature* pSummoned)
void JustSummoned(Creature* summoned)
{
Summons.Summon(pSummoned);
pSummoned->SetCorpseDelay(0);
Summons.Summon(summoned);
summoned->SetCorpseDelay(0);
}
void UpdateAI(const uint32 uiDiff)
@@ -205,21 +205,21 @@ struct boss_twin_baseAI : public ScriptedAI
}
}
void JustSummoned(Creature* pSummoned)
void JustSummoned(Creature* summoned)
{
switch (pSummoned->GetEntry())
switch (summoned->GetEntry())
{
case NPC_UNLEASHED_DARK:
case NPC_UNLEASHED_LIGHT:
pSummoned->SetCorpseDelay(0);
summoned->SetCorpseDelay(0);
break;
}
Summons.Summon(pSummoned);
Summons.Summon(summoned);
}
void SummonedCreatureDespawn(Creature* pSummoned)
void SummonedCreatureDespawn(Creature* summoned)
{
switch (pSummoned->GetEntry())
switch (summoned->GetEntry())
{
case NPC_LIGHT_ESSENCE:
m_pInstance->DoRemoveAurasDueToSpellOnPlayers(SPELL_LIGHT_ESSENCE_HELPER);
@@ -228,7 +228,7 @@ struct boss_twin_baseAI : public ScriptedAI
m_pInstance->DoRemoveAurasDueToSpellOnPlayers(SPELL_DARK_ESSENCE_HELPER);
break;
}
Summons.Despawn(pSummoned);
Summons.Despawn(summoned);
}
void DamageTaken(Unit* pDoneBy, uint32 &uiDamage)
@@ -249,10 +249,10 @@ class boss_lich_king_toc : public CreatureScript
{
m_uiUpdateTimer = 0;
me->SetReactState(REACT_PASSIVE);
if (Creature* pSummoned = me->SummonCreature(NPC_TRIGGER, ToCCommonLoc[2].GetPositionX(), ToCCommonLoc[2].GetPositionY(), ToCCommonLoc[2].GetPositionZ(), 5, TEMPSUMMON_TIMED_DESPAWN, 60000))
if (Creature* summoned = me->SummonCreature(NPC_TRIGGER, ToCCommonLoc[2].GetPositionX(), ToCCommonLoc[2].GetPositionY(), ToCCommonLoc[2].GetPositionZ(), 5, TEMPSUMMON_TIMED_DESPAWN, 60000))
{
pSummoned->CastSpell(pSummoned, 51807, false);
pSummoned->SetDisplayId(11686);
summoned->CastSpell(summoned, 51807, false);
summoned->SetDisplayId(11686);
}
if (m_pInstance) m_pInstance->SetData(TYPE_LICH_KING, IN_PROGRESS);
me->AddUnitMovementFlag(MOVEMENTFLAG_WALKING);
@@ -401,9 +401,9 @@ class npc_fizzlebang_toc : public CreatureScript
}
}
void JustSummoned(Creature* pSummoned)
void JustSummoned(Creature* summoned)
{
Summons.Summon(pSummoned);
Summons.Summon(summoned);
}
void UpdateAI(const uint32 uiDiff)
@@ -148,8 +148,8 @@ public:
case PHASE_1:
if (uiTimer <= diff)
{
Creature* pSummon = me->SummonCreature(RAND(CREATURE_FETID_TROLL_CORPSE, CREATURE_HULKING_CORPSE, CREATURE_RISEN_SHADOWCASTER), AddSpawnPoint, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 20*IN_MILLISECONDS);
pSummon->GetMotionMaster()->MovePoint(0, AddDestinyPoint);
Creature* summon = me->SummonCreature(RAND(CREATURE_FETID_TROLL_CORPSE, CREATURE_HULKING_CORPSE, CREATURE_RISEN_SHADOWCASTER), AddSpawnPoint, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 20*IN_MILLISECONDS);
summon->GetMotionMaster()->MovePoint(0, AddDestinyPoint);
//If spell is casted stops casting arcane field so no spell casting
//DoCast(me, SPELL_SUMMON_MINIONS);
uiTimer = 3*IN_MILLISECONDS;
@@ -122,31 +122,31 @@ struct boss_horAI : ScriptedAI
}
}
void JustSummoned(Creature* pSummoned)
void JustSummoned(Creature* summoned)
{
summons.Summon(pSummoned);
summons.Summon(summoned);
if (Unit* pUnit = pSummoned->SelectNearestTarget())
if (Unit* target = summoned->SelectNearestTarget())
{
if (pSummoned->AI())
pSummoned->AI()->AttackStart(pUnit);
if (summoned->AI())
summoned->AI()->AttackStart(target);
else
{
pSummoned->GetMotionMaster()->MoveChase(pUnit);
pSummoned->Attack(pUnit, true);
summoned->GetMotionMaster()->MoveChase(target);
summoned->Attack(target, true);
}
}
if (pSummoned->AI())
pSummoned->AI()->DoZoneInCombat();
if (summoned->AI())
summoned->AI()->DoZoneInCombat();
}
void SummonedCreatureDespawn(Creature* pSummoned)
void SummonedCreatureDespawn(Creature* summoned)
{
summons.Despawn(pSummoned);
summons.Despawn(summoned);
if (summons.empty())
{
if (pSummoned->isAlive())
if (summoned->isAlive())
pInstance->SetData(DATA_WAVE_COUNT, NOT_STARTED);
else
pInstance->SetData(DATA_WAVE_COUNT, SPECIAL);
@@ -376,28 +376,28 @@ public:
}
// spawn a wave on behalf of the summoner.
void SpawnWave(Creature* pSummoner)
void SpawnWave(Creature* summoner)
{
uint32 index;
pSummoner->SetVisible(true);
summoner->SetVisible(true);
// TODO: do composition at random. # of spawn also depends on uiWaveCount
// As of now, it is just one of each.
index = urand(0, ENCOUNTER_WAVE_MERCENARY-1);
pSummoner->SummonCreature(NPC_WAVE_MERCENARY, MercenarySpawnPos[index], TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 0);
summoner->SummonCreature(NPC_WAVE_MERCENARY, MercenarySpawnPos[index], TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 0);
index = urand(0, ENCOUNTER_WAVE_FOOTMAN-1);
pSummoner->SummonCreature(NPC_WAVE_FOOTMAN, FootmenSpawnPos[index], TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 0);
summoner->SummonCreature(NPC_WAVE_FOOTMAN, FootmenSpawnPos[index], TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 0);
index = urand(0, ENCOUNTER_WAVE_RIFLEMAN-1);
pSummoner->SummonCreature(NPC_WAVE_RIFLEMAN, RiflemanSpawnPos[index], TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 0);
summoner->SummonCreature(NPC_WAVE_RIFLEMAN, RiflemanSpawnPos[index], TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 0);
index = urand(0, ENCOUNTER_WAVE_PRIEST-1);
pSummoner->SummonCreature(NPC_WAVE_PRIEST, PriestSpawnPos[index], TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 0);
summoner->SummonCreature(NPC_WAVE_PRIEST, PriestSpawnPos[index], TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 0);
index = urand(0, ENCOUNTER_WAVE_MAGE-1);
pSummoner->SummonCreature(NPC_WAVE_MAGE, MageSpawnPos[index], TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 0);
summoner->SummonCreature(NPC_WAVE_MAGE, MageSpawnPos[index], TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 0);
}
void Update(uint32 diff)
@@ -265,8 +265,8 @@ public:
case EVENT_BLIZZARD:
{
//DoCastAOE(SPELL_SUMMON_BLIZZARD);
if (Creature* pSummon = DoSummon(MOB_BLIZZARD, me, 0.0f, urand(25000, 30000), TEMPSUMMON_TIMED_DESPAWN))
pSummon->GetMotionMaster()->MoveRandom(40);
if (Creature* summon = DoSummon(MOB_BLIZZARD, me, 0.0f, urand(25000, 30000), TEMPSUMMON_TIMED_DESPAWN))
summon->GetMotionMaster()->MoveRandom(40);
events.ScheduleEvent(EVENT_BLIZZARD, RAID_MODE(20000, 7000), 0, PHASE_GROUND);
break;
}
@@ -191,28 +191,28 @@ public:
uiDamage = 0;
}
void JustSummoned(Creature* pSummoned)
void JustSummoned(Creature* summoned)
{
if (pSummoned->GetEntry() == NPC_SPARK_OF_IONAR)
if (summoned->GetEntry() == NPC_SPARK_OF_IONAR)
{
lSparkList.Summon(pSummoned);
lSparkList.Summon(summoned);
pSummoned->CastSpell(pSummoned, DUNGEON_MODE(SPELL_SPARK_VISUAL_TRIGGER, H_SPELL_SPARK_VISUAL_TRIGGER), true);
summoned->CastSpell(summoned, DUNGEON_MODE(SPELL_SPARK_VISUAL_TRIGGER, H_SPELL_SPARK_VISUAL_TRIGGER), true);
Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0);
if (target)
{
pSummoned->SetInCombatWith(target);
pSummoned->GetMotionMaster()->Clear();
pSummoned->GetMotionMaster()->MoveFollow(target, 0.0f, 0.0f);
summoned->SetInCombatWith(target);
summoned->GetMotionMaster()->Clear();
summoned->GetMotionMaster()->MoveFollow(target, 0.0f, 0.0f);
}
}
}
void SummonedCreatureDespawn(Creature* pSummoned)
void SummonedCreatureDespawn(Creature* summoned)
{
if (pSummoned->GetEntry() == NPC_SPARK_OF_IONAR)
lSparkList.Despawn(pSummoned);
if (summoned->GetEntry() == NPC_SPARK_OF_IONAR)
lSparkList.Despawn(summoned);
}
void UpdateAI(const uint32 uiDiff)
@@ -211,17 +211,17 @@ public:
}
}
void JustSummoned(Creature* pSummoned)
void JustSummoned(Creature* summoned)
{
if (pSummoned->GetEntry() == NPC_MOLTEN_GOLEM)
if (summoned->GetEntry() == NPC_MOLTEN_GOLEM)
{
m_lGolemGUIDList.push_back(pSummoned->GetGUID());
m_lGolemGUIDList.push_back(summoned->GetGUID());
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
pSummoned->GetMotionMaster()->MoveFollow(target, 0.0f, 0.0f);
summoned->GetMotionMaster()->MoveFollow(target, 0.0f, 0.0f);
// Why healing when just summoned?
pSummoned->CastSpell(pSummoned, DUNGEON_MODE(SPELL_HEAT_N, SPELL_HEAT_H), false, NULL, NULL, me->GetGUID());
summoned->CastSpell(summoned, DUNGEON_MODE(SPELL_HEAT_N, SPELL_HEAT_H), false, NULL, NULL, me->GetGUID());
}
}
@@ -232,11 +232,11 @@ public:
{
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
{
if (Creature* pSummon = me->SummonCreature(CREATURE_DARK_MATTER_TARGET, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN, 1000))
if (Creature* summon = me->SummonCreature(CREATURE_DARK_MATTER_TARGET, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN, 1000))
{
pSummon->SetDisplayId(11686);
pSummon->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
pSummon->CastSpell(target, DUNGEON_MODE(SPELL_DARK_MATTER, H_SPELL_DARK_MATTER), true);
summon->SetDisplayId(11686);
summon->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
summon->CastSpell(target, DUNGEON_MODE(SPELL_DARK_MATTER, H_SPELL_DARK_MATTER), true);
}
}
uiMarnakEncounterTimer = 30000 + rand()%1000;
@@ -248,11 +248,11 @@ public:
{
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
{
if (Creature* pSummon = me->SummonCreature(CREATURE_SEARING_GAZE_TARGET, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN, 1000))
if (Creature* summon = me->SummonCreature(CREATURE_SEARING_GAZE_TARGET, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN, 1000))
{
pSummon->SetDisplayId(11686);
pSummon->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
pSummon->CastSpell(target, DUNGEON_MODE(SPELL_SEARING_GAZE, H_SPELL_SEARING_GAZE), true);
summon->SetDisplayId(11686);
summon->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
summon->CastSpell(target, DUNGEON_MODE(SPELL_SEARING_GAZE, H_SPELL_SEARING_GAZE), true);
}
}
uiAbedneumEncounterTimer = 30000 + rand()%1000;
@@ -400,11 +400,11 @@ public:
}
}
void JustSummoned(Creature* pSummoned)
void JustSummoned(Creature* summoned)
{
lDwarfGUIDList.push_back(pSummoned->GetGUID());
pSummoned->AddThreat(me, 0.0f);
pSummoned->AI()->AttackStart(me);
lDwarfGUIDList.push_back(summoned->GetGUID());
summoned->AddThreat(me, 0.0f);
summoned->AI()->AttackStart(me);
}
void JumpToNextStep(uint32 uiTimer)
@@ -174,14 +174,14 @@ public:
m_lCollapsingStarGUIDList.clear();
}
void JustSummoned(Creature* pSummoned)
void JustSummoned(Creature* summoned)
{
if (pSummoned->GetEntry() == CREATURE_COLLAPSING_STAR)
if (summoned->GetEntry() == CREATURE_COLLAPSING_STAR)
{
Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0);
if (me->getVictim())
pSummoned->AI()->AttackStart(target ? target : me->getVictim());
m_lCollapsingStarGUIDList.push_back(pSummoned->GetGUID());
summoned->AI()->AttackStart(target ? target : me->getVictim());
m_lCollapsingStarGUIDList.push_back(summoned->GetGUID());
}
}
@@ -246,34 +246,34 @@ public:
}
}
void JustSummoned(Creature* pSummoned)
void JustSummoned(Creature* summoned)
{
switch (pSummoned->GetEntry())
switch (summoned->GetEntry())
{
case CREATURE_GRAUF:
m_uiGraufGUID = pSummoned->GetGUID();
m_uiGraufGUID = summoned->GetGUID();
break;
case CREATURE_YMIRJAR_WARRIOR:
case CREATURE_YMIRJAR_WITCH_DOCTOR:
case CREATURE_YMIRJAR_HARPOONER:
pSummoned->setActive(true);
pSummoned->SetInCombatWithZone();
summoned->setActive(true);
summoned->SetInCombatWithZone();
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
pSummoned->AI()->AttackStart(target);
summoned->AI()->AttackStart(target);
break;
case CREATURE_TRIGGER:
pSummoned->CastSpell((Unit*)NULL, SPELL_FREEZING_CLOUD, true);
pSummoned->DespawnOrUnsummon(10*IN_MILLISECONDS);
summoned->CastSpell((Unit*)NULL, SPELL_FREEZING_CLOUD, true);
summoned->DespawnOrUnsummon(10*IN_MILLISECONDS);
break;
}
Summons.Summon(pSummoned);
Summons.Summon(summoned);
}
void SummonedCreatureDespawn(Creature* pSummoned)
void SummonedCreatureDespawn(Creature* summoned)
{
if (pSummoned->GetEntry() == CREATURE_GRAUF)
if (summoned->GetEntry() == CREATURE_GRAUF)
m_uiGraufGUID = 0;
Summons.Despawn(pSummoned);
Summons.Despawn(summoned);
}
void SpellHit(Unit* /*caster*/, const SpellEntry *spell)
@@ -358,8 +358,8 @@ public:
pInstance->SetData64(DATA_SACRIFICED_PLAYER, pSacrificeTarget->GetGUID());
for (uint8 i = 0; i < 3; ++i)
if (Creature* pSummon = me->SummonCreature(CREATURE_RITUAL_CHANNELER, RitualChannelerPos[i], TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 360000))
pSummon->AI()->DoAction(0);
if (Creature* summon = me->SummonCreature(CREATURE_RITUAL_CHANNELER, RitualChannelerPos[i], TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 360000))
summon->AI()->DoAction(0);
}
bSacrificed = true;
@@ -301,23 +301,23 @@ public:
}
}
void JustSummoned(Creature* pSummoned)
void JustSummoned(Creature* summoned)
{
if (pSummoned)
if (summoned)
{
pSummoned->SetSpeed(MOVE_RUN, 0.3f);
pSummoned->GetMotionMaster()->MoveFollow(me, 0, 0);
m_waterElements.push_back(pSummoned->GetGUID());
pInstance->SetData64(DATA_ADD_TRASH_MOB, pSummoned->GetGUID());
summoned->SetSpeed(MOVE_RUN, 0.3f);
summoned->GetMotionMaster()->MoveFollow(me, 0, 0);
m_waterElements.push_back(summoned->GetGUID());
pInstance->SetData64(DATA_ADD_TRASH_MOB, summoned->GetGUID());
}
}
void SummonedCreatureDespawn(Creature* pSummoned)
void SummonedCreatureDespawn(Creature* summoned)
{
if (pSummoned)
if (summoned)
{
m_waterElements.remove(pSummoned->GetGUID());
pInstance->SetData64(DATA_DEL_TRASH_MOB, pSummoned->GetGUID());
m_waterElements.remove(summoned->GetGUID());
pInstance->SetData64(DATA_DEL_TRASH_MOB, summoned->GetGUID());
}
}
@@ -111,13 +111,13 @@ public:
}
}
void JustSummoned(Creature* pSummoned)
void JustSummoned(Creature* summoned)
{
pSummoned->SetSpeed(MOVE_RUN, 0.5f);
summoned->SetSpeed(MOVE_RUN, 0.5f);
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
{
pSummoned->AddThreat(target, 0.00f);
pSummoned->AI()->AttackStart(target);
summoned->AddThreat(target, 0.00f);
summoned->AI()->AttackStart(target);
}
}
@@ -656,18 +656,18 @@ public:
pInstance->SetData(DATA_WAVE_COUNT, pInstance->GetData(DATA_WAVE_COUNT)+1);
}
void JustSummoned(Creature* pSummoned)
void JustSummoned(Creature* summoned)
{
listOfMobs.Summon(pSummoned);
if (pSummoned)
pInstance->SetData64(DATA_ADD_TRASH_MOB, pSummoned->GetGUID());
listOfMobs.Summon(summoned);
if (summoned)
pInstance->SetData64(DATA_ADD_TRASH_MOB, summoned->GetGUID());
}
void SummonedMobDied(Creature* pSummoned)
void SummonedMobDied(Creature* summoned)
{
listOfMobs.Despawn(pSummoned);
if (pSummoned)
pInstance->SetData64(DATA_DEL_TRASH_MOB, pSummoned->GetGUID());
listOfMobs.Despawn(summoned);
if (summoned)
pInstance->SetData64(DATA_DEL_TRASH_MOB, summoned->GetGUID());
}
};
+10 -10
View File
@@ -1299,8 +1299,8 @@ public:
return;
if (me->isSummon())
if (Unit* pSummoner = me->ToTempSummon()->GetSummoner())
CAST_AI(npc_thassarian::npc_thassarianAI, CAST_CRE(pSummoner)->AI())->bArthasInPosition = true;
if (Unit* summoner = me->ToTempSummon()->GetSummoner())
CAST_AI(npc_thassarian::npc_thassarianAI, CAST_CRE(summoner)->AI())->bArthasInPosition = true;
}
};
@@ -1331,8 +1331,8 @@ public:
me->AddUnitState(UNIT_STAT_STUNNED);
me->CastSpell(me, SPELL_STUN, true);
if (me->isSummon())
if (Unit* pSummoner = me->ToTempSummon()->GetSummoner())
CAST_AI(npc_thassarian::npc_thassarianAI, CAST_CRE(pSummoner)->AI())->bArlosInPosition = true;
if (Unit* summoner = me->ToTempSummon()->GetSummoner())
CAST_AI(npc_thassarian::npc_thassarianAI, CAST_CRE(summoner)->AI())->bArlosInPosition = true;
}
};
@@ -1388,8 +1388,8 @@ public:
return;
if (me->isSummon())
if (Unit* pSummoner = me->ToTempSummon()->GetSummoner())
CAST_AI(npc_thassarian::npc_thassarianAI, CAST_CRE(pSummoner)->AI())->bTalbotInPosition = true;
if (Unit* summoner = me->ToTempSummon()->GetSummoner())
CAST_AI(npc_thassarian::npc_thassarianAI, CAST_CRE(summoner)->AI())->bTalbotInPosition = true;
}
void UpdateAI(const uint32 uiDiff)
@@ -1499,16 +1499,16 @@ public:
me->CastSpell(me, SPELL_STUN, true);
if (me->isSummon())
if (Unit* pSummoner = me->ToTempSummon()->GetSummoner())
CAST_AI(npc_thassarian::npc_thassarianAI, pSummoner->GetAI())->bLeryssaInPosition = true;
if (Unit* summoner = me->ToTempSummon()->GetSummoner())
CAST_AI(npc_thassarian::npc_thassarianAI, summoner->GetAI())->bLeryssaInPosition = true;
bDone = true;
}
else
{
me->SetStandState(UNIT_STAND_STATE_SIT);
if (me->isSummon())
if (Unit* pSummoner = me->ToTempSummon()->GetSummoner())
pSummoner->SetStandState(UNIT_STAND_STATE_SIT);
if (Unit* summoner = me->ToTempSummon()->GetSummoner())
summoner->SetStandState(UNIT_STAND_STATE_SIT);
uiPhaseTimer = 1500;
Phase = 1;
}
@@ -172,12 +172,12 @@ public:
bool Completed;
void JustSummoned(Creature* pSummoned)
void JustSummoned(Creature* summoned)
{
if (Creature* Mrfloppy = GetClosestCreatureWithEntry(me, NPC_MRFLOPPY, 50.0f))
pSummoned->AI()->AttackStart(Mrfloppy);
summoned->AI()->AttackStart(Mrfloppy);
else
pSummoned->AI()->AttackStart(me->getVictim());
summoned->AI()->AttackStart(me->getVictim());
}
void WaypointReached(uint32 i)
@@ -383,15 +383,15 @@ public:
SummonGladiator(NPC_FIRJUS);
}
void JustSummoned(Creature* pSummon)
void JustSummoned(Creature* summon)
{
if (Player* player = me->GetPlayer(*me, uiPlayerGUID))
{
if (player->isAlive())
{
pSummon->RemoveUnitMovementFlag(MOVEMENTFLAG_WALKING);
pSummon->GetMotionMaster()->MovePoint(0, afCenter[0], afCenter[1], afCenter[2]);
pSummon->AI()->AttackStart(player);
summon->RemoveUnitMovementFlag(MOVEMENTFLAG_WALKING);
summon->GetMotionMaster()->MovePoint(0, afCenter[0], afCenter[1], afCenter[2]);
summon->AI()->AttackStart(player);
return;
}
}
@@ -404,12 +404,12 @@ public:
me->SummonCreature(uiEntry, afSummon[0], afSummon[1], afSummon[2], 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30*IN_MILLISECONDS);
}
void SummonedCreatureDies(Creature* pSummoned, Unit* /*killer*/)
void SummonedCreatureDies(Creature* summoned, Unit* /*killer*/)
{
uint32 uiEntry = 0;
// will eventually reset the event if something goes wrong
switch (pSummoned->GetEntry())
switch (summoned->GetEntry())
{
case NPC_FIRJUS: uiEntry = NPC_JLARBORN; break;
case NPC_JLARBORN: uiEntry = NPC_YOROS; break;
+17 -17
View File
@@ -428,14 +428,14 @@ public:
switch(uiPhase)
{
case 1:
if (Creature* pSummon = me->SummonCreature(NPC_ORINOKO_TUSKBREAKER, SpawnPosition[0], TEMPSUMMON_CORPSE_DESPAWN, 1000))
SummonGUID = pSummon->GetGUID();
if (Creature* summon = me->SummonCreature(NPC_ORINOKO_TUSKBREAKER, SpawnPosition[0], TEMPSUMMON_CORPSE_DESPAWN, 1000))
SummonGUID = summon->GetGUID();
uiPhase = 2;
uiTimer = 4000;
break;
case 2:
if (Creature* pSummon = Unit::GetCreature(*me, SummonGUID))
pSummon->GetMotionMaster()->MoveJump(5776.319824f, -2981.005371f, 273.100037f, 10.0f, 20.0f);
if (Creature* summon = Unit::GetCreature(*me, SummonGUID))
summon->GetMotionMaster()->MoveJump(5776.319824f, -2981.005371f, 273.100037f, 10.0f, 20.0f);
uiPhase = 0;
SummonGUID = 0;
break;
@@ -445,8 +445,8 @@ public:
uiPhase = 4;
break;
case 4:
if (Creature* pSummon = me->SummonCreature(NPC_KORRAK_BLOODRAGER, SpawnPosition[0], TEMPSUMMON_CORPSE_DESPAWN, 1000))
SummonGUID = pSummon->GetGUID();
if (Creature* summon = me->SummonCreature(NPC_KORRAK_BLOODRAGER, SpawnPosition[0], TEMPSUMMON_CORPSE_DESPAWN, 1000))
SummonGUID = summon->GetGUID();
uiTimer = 3000;
uiPhase = 0;
break;
@@ -667,18 +667,18 @@ public:
DoMeleeAttackIfReady();
}
void JustSummoned(Creature* pSummon)
void JustSummoned(Creature* summon)
{
switch(pSummon->GetEntry())
switch(summon->GetEntry())
{
case NPC_WHISKER:
pSummon->AI()->AttackStart(me->getVictim());
summon->AI()->AttackStart(me->getVictim());
break;
case NPC_HUNGRY_PENGUIN:
if (Unit* pAffected = Unit::GetUnit(*me, AffectedGUID))
{
if (pAffected->isAlive())
pSummon->AI()->AttackStart(pAffected);
summon->AI()->AttackStart(pAffected);
}
break;
}
@@ -869,10 +869,10 @@ public:
void JustDied(Unit* killer)
{
if (Unit* pSummoner = me->ToTempSummon()->GetSummoner())
if (Unit* summoner = me->ToTempSummon()->GetSummoner())
{
std::string sText = (std::string(killer->GetName()) + " has defeated Yg.. Yggg-really big worm!");
pSummoner->MonsterYell(sText.c_str(), LANG_UNIVERSAL, 0);
summoner->MonsterYell(sText.c_str(), LANG_UNIVERSAL, 0);
}
if (Player* player = killer->GetCharmerOrOwnerPlayerOrPlayerItself())
@@ -1074,10 +1074,10 @@ public:
for (uint8 uiI = 0; uiI < 16 ; uiI++)
{
if (Creature* pSummon = me->SummonCreature(Boss[uiBossRandom].uiAdd, AddSpawnPosition[uiI]))
if (Creature* summon = me->SummonCreature(Boss[uiBossRandom].uiAdd, AddSpawnPosition[uiI]))
{
pSummon->AI()->SetData(1, uiBossRandom);
SummonList.push_back(pSummon->GetGUID());
summon->AI()->SetData(1, uiBossRandom);
SummonList.push_back(summon->GetGUID());
}
}
@@ -1159,8 +1159,8 @@ public:
std::string sText = (std::string(killer->GetName()) + " is victorious once more!");
if (Unit* pSummoner = me->ToTempSummon()->GetSummoner())
pSummoner->MonsterYell(sText.c_str(), LANG_UNIVERSAL, 0);
if (Unit* summoner = me->ToTempSummon()->GetSummoner())
summoner->MonsterYell(sText.c_str(), LANG_UNIVERSAL, 0);
}
};
@@ -366,22 +366,22 @@ class boss_vazruden_the_herald : public CreatureScript
}
}
void JustSummoned(Creature* pSummoned)
void JustSummoned(Creature* summoned)
{
if (!pSummoned)
if (!summoned)
return;
Unit* victim = me->getVictim();
if (pSummoned->GetEntry() == ENTRY_NAZAN)
if (summoned->GetEntry() == ENTRY_NAZAN)
{
CAST_AI(boss_nazan::boss_nazanAI, pSummoned->AI())->VazrudenGUID = VazrudenGUID;
pSummoned->AddUnitMovementFlag(MOVEMENTFLAG_LEVITATING);
pSummoned->SetSpeed(MOVE_FLIGHT, 2.5f);
CAST_AI(boss_nazan::boss_nazanAI, summoned->AI())->VazrudenGUID = VazrudenGUID;
summoned->AddUnitMovementFlag(MOVEMENTFLAG_LEVITATING);
summoned->SetSpeed(MOVE_FLIGHT, 2.5f);
if (victim)
AttackStartNoMove(victim);
}
else
if (victim)
pSummoned->AI()->AttackStart(victim);
summoned->AI()->AttackStart(victim);
}
void SentryDownBy(Unit* killer)
@@ -434,15 +434,15 @@ class boss_kaelthas : public CreatureScript
DoScriptText(RAND(SAY_SLAY1, SAY_SLAY2, SAY_SLAY3), me);
}
void JustSummoned(Creature* pSummoned)
void JustSummoned(Creature* summoned)
{
// if not phoenix, then it's one of the 7 weapons
if (pSummoned->GetEntry() != NPC_PHOENIX)
if (summoned->GetEntry() != NPC_PHOENIX)
{
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
pSummoned->AI()->AttackStart(target);
summoned->AI()->AttackStart(target);
summons.Summon(pSummoned);
summons.Summon(summoned);
}
}
+7 -7
View File
@@ -676,17 +676,17 @@ public:
}
}
void JustSummoned(Creature* pSummoned)
void JustSummoned(Creature* summoned)
{
if (pSummoned->GetEntry() == NPC_MURK_BRUTE)
DoScriptText(SAY_MAG_NO_ESCAPE, pSummoned);
if (summoned->GetEntry() == NPC_MURK_BRUTE)
DoScriptText(SAY_MAG_NO_ESCAPE, summoned);
if (pSummoned->isTotem())
if (summoned->isTotem())
return;
pSummoned->RemoveUnitMovementFlag(MOVEMENTFLAG_WALKING);
pSummoned->GetMotionMaster()->MovePoint(0, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ());
pSummoned->AI()->AttackStart(me);
summoned->RemoveUnitMovementFlag(MOVEMENTFLAG_WALKING);
summoned->GetMotionMaster()->MovePoint(0, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ());
summoned->AI()->AttackStart(me);
}
@@ -1004,10 +1004,10 @@ public:
}
}
void JustSummoned(Creature* pSummoned)
void JustSummoned(Creature* summoned)
{
if (pSummoned->GetEntry() == NPC_COILSKAR_ASSASSIN)
pSummoned->AI()->AttackStart(me);
if (summoned->GetEntry() == NPC_COILSKAR_ASSASSIN)
summoned->AI()->AttackStart(me);
}
//this is very unclear, random say without no real relevance to script/event
+4 -4
View File
@@ -151,17 +151,17 @@ public:
Creature* SummonGuard()
{
Creature* pSummoned = me->SummonCreature(m_pSpawnAssoc->m_uiSpawnedCreatureEntry, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 300000);
Creature* summoned = me->SummonCreature(m_pSpawnAssoc->m_uiSpawnedCreatureEntry, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 300000);
if (pSummoned)
m_uiSpawnedGUID = pSummoned->GetGUID();
if (summoned)
m_uiSpawnedGUID = summoned->GetGUID();
else
{
sLog->outErrorDb("TCSR: npc_air_force_bots: wasn't able to spawn Creature %u", m_pSpawnAssoc->m_uiSpawnedCreatureEntry);
m_pSpawnAssoc = NULL;
}
return pSummoned;
return summoned;
}
Creature* GetSummonedGuard()