Core: Cleaning up hungarian notation - Phase8: pSummon -> summon (also did related hits)
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user