REPO: Code-style clean-ups
* Fixed pMap->map * Fixed pInstance->instance * Fixed pInsta->instance * Fixed pQuest->quest * Fixed pWho->who * Fixed pTarget->target * Fixed pGo->go ~DEVNOTES: Handlers/QuestHandler.cpp still needs to be cleaned...
This commit is contained in:
@@ -663,11 +663,11 @@ public:
|
||||
if (player->isGameMaster())
|
||||
return false;
|
||||
|
||||
InstanceScript* pInstance = player->GetInstanceScript();
|
||||
if (!pInstance || pInstance->IsEncounterInProgress() || pInstance->GetBossState(BOSS_KELTHUZAD) == DONE)
|
||||
InstanceScript* instance = player->GetInstanceScript();
|
||||
if (!instance || instance->IsEncounterInProgress() || instance->GetBossState(BOSS_KELTHUZAD) == DONE)
|
||||
return false;
|
||||
|
||||
Creature* pKelthuzad = CAST_CRE(Unit::GetUnit(*player, pInstance->GetData64(DATA_KELTHUZAD)));
|
||||
Creature* pKelthuzad = CAST_CRE(Unit::GetUnit(*player, instance->GetData64(DATA_KELTHUZAD)));
|
||||
if (!pKelthuzad)
|
||||
return false;
|
||||
|
||||
@@ -676,7 +676,7 @@ public:
|
||||
return false;
|
||||
|
||||
pKelthuzadAI->AttackStart(player);
|
||||
if (GameObject* trigger = pInstance->instance->GetGameObject(pInstance->GetData64(DATA_KELTHUZAD_TRIGGER)))
|
||||
if (GameObject* trigger = instance->instance->GetGameObject(instance->GetData64(DATA_KELTHUZAD_TRIGGER)))
|
||||
{
|
||||
if (trigger->getLootState() == GO_READY)
|
||||
trigger->UseDoorOrButton();
|
||||
|
||||
@@ -84,7 +84,7 @@ public:
|
||||
boss_sapphironAI(Creature* c) : BossAI(c, BOSS_SAPPHIRON)
|
||||
, phase(PHASE_NULL)
|
||||
{
|
||||
pMap = me->GetMap();
|
||||
map = me->GetMap();
|
||||
}
|
||||
|
||||
Phases phase;
|
||||
@@ -93,7 +93,7 @@ public:
|
||||
|
||||
bool CanTheHundredClub; // needed for achievement: The Hundred Club(2146, 2147)
|
||||
uint32 CheckFrostResistTimer;
|
||||
Map* pMap;
|
||||
Map* map;
|
||||
|
||||
void InitializeAI()
|
||||
{
|
||||
@@ -156,9 +156,9 @@ public:
|
||||
AchievementEntry const* AchievTheHundredClub = GetAchievementStore()->LookupEntry(ACHIEVEMENT_THE_HUNDRED_CLUB);
|
||||
if (AchievTheHundredClub)
|
||||
{
|
||||
if (pMap && pMap->IsDungeon())
|
||||
if (map && map->IsDungeon())
|
||||
{
|
||||
Map::PlayerList const &players = pMap->GetPlayers();
|
||||
Map::PlayerList const &players = map->GetPlayers();
|
||||
for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
|
||||
itr->getSource()->CompletedAchievement(AchievTheHundredClub);
|
||||
}
|
||||
@@ -183,9 +183,9 @@ public:
|
||||
|
||||
void CheckPlayersFrostResist()
|
||||
{
|
||||
if (CanTheHundredClub && pMap && pMap->IsDungeon())
|
||||
if (CanTheHundredClub && map && map->IsDungeon())
|
||||
{
|
||||
Map::PlayerList const &players = pMap->GetPlayers();
|
||||
Map::PlayerList const &players = map->GetPlayers();
|
||||
for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
|
||||
{
|
||||
if (itr->getSource()->GetResistance(SPELL_SCHOOL_FROST) > MAX_FROST_RESISTANCE)
|
||||
@@ -215,8 +215,8 @@ public:
|
||||
{
|
||||
if (Player* player = Unit::GetPlayer(*me, itr->first))
|
||||
player->RemoveAura(SPELL_ICEBOLT);
|
||||
if (GameObject* pGo = GameObject::GetGameObject(*me, itr->second))
|
||||
pGo->Delete();
|
||||
if (GameObject* go = GameObject::GetGameObject(*me, itr->second))
|
||||
go->Delete();
|
||||
}
|
||||
iceblocks.clear();
|
||||
}
|
||||
@@ -373,10 +373,10 @@ public:
|
||||
|
||||
for (IceBlockMap::const_iterator itr = iceblocks.begin(); itr != iceblocks.end(); ++itr)
|
||||
{
|
||||
if (GameObject* pGo = GameObject::GetGameObject(*me, itr->second))
|
||||
if (GameObject* go = GameObject::GetGameObject(*me, itr->second))
|
||||
{
|
||||
if (pGo->IsInBetween(me, target, 2.0f)
|
||||
&& me->GetExactDist2d(target->GetPositionX(), target->GetPositionY()) - me->GetExactDist2d(pGo->GetPositionX(), pGo->GetPositionY()) < 5.0f)
|
||||
if (go->IsInBetween(me, target, 2.0f)
|
||||
&& me->GetExactDist2d(target->GetPositionX(), target->GetPositionY()) - me->GetExactDist2d(go->GetPositionX(), go->GetPositionY()) < 5.0f)
|
||||
{
|
||||
target->ApplySpellImmune(0, IMMUNITY_ID, SPELL_FROST_EXPLOSION, true);
|
||||
targets.push_back(target);
|
||||
|
||||
@@ -268,18 +268,18 @@ public:
|
||||
{
|
||||
mob_stalaggAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
instance = c->GetInstanceScript();
|
||||
}
|
||||
|
||||
InstanceScript* pInstance;
|
||||
InstanceScript* instance;
|
||||
|
||||
uint32 powerSurgeTimer;
|
||||
uint32 magneticPullTimer;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
if (pInstance)
|
||||
if (Creature* pThaddius = me->GetCreature(*me, pInstance->GetData64(DATA_THADDIUS)))
|
||||
if (instance)
|
||||
if (Creature* pThaddius = me->GetCreature(*me, instance->GetData64(DATA_THADDIUS)))
|
||||
if (pThaddius->AI())
|
||||
pThaddius->AI()->DoAction(ACTION_STALAGG_RESET);
|
||||
powerSurgeTimer = urand(20000, 25000);
|
||||
@@ -293,8 +293,8 @@ public:
|
||||
|
||||
void JustDied(Unit* /*killer*/)
|
||||
{
|
||||
if (pInstance)
|
||||
if (Creature* pThaddius = me->GetCreature(*me, pInstance->GetData64(DATA_THADDIUS)))
|
||||
if (instance)
|
||||
if (Creature* pThaddius = me->GetCreature(*me, instance->GetData64(DATA_THADDIUS)))
|
||||
if (pThaddius->AI())
|
||||
pThaddius->AI()->DoAction(ACTION_STALAGG_DIED);
|
||||
}
|
||||
@@ -306,7 +306,7 @@ public:
|
||||
|
||||
if (magneticPullTimer <= uiDiff)
|
||||
{
|
||||
if (Creature* pFeugen = me->GetCreature(*me, pInstance->GetData64(DATA_FEUGEN)))
|
||||
if (Creature* pFeugen = me->GetCreature(*me, instance->GetData64(DATA_FEUGEN)))
|
||||
{
|
||||
Unit* pStalaggVictim = me->getVictim();
|
||||
Unit* pFeugenVictim = pFeugen->getVictim();
|
||||
@@ -354,17 +354,17 @@ public:
|
||||
{
|
||||
mob_feugenAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
instance = c->GetInstanceScript();
|
||||
}
|
||||
|
||||
InstanceScript* pInstance;
|
||||
InstanceScript* instance;
|
||||
|
||||
uint32 staticFieldTimer;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
if (pInstance)
|
||||
if (Creature* pThaddius = me->GetCreature(*me, pInstance->GetData64(DATA_THADDIUS)))
|
||||
if (instance)
|
||||
if (Creature* pThaddius = me->GetCreature(*me, instance->GetData64(DATA_THADDIUS)))
|
||||
if (pThaddius->AI())
|
||||
pThaddius->AI()->DoAction(ACTION_FEUGEN_RESET);
|
||||
staticFieldTimer = 5000;
|
||||
@@ -377,8 +377,8 @@ public:
|
||||
|
||||
void JustDied(Unit* /*killer*/)
|
||||
{
|
||||
if (pInstance)
|
||||
if (Creature* pThaddius = me->GetCreature(*me, pInstance->GetData64(DATA_THADDIUS)))
|
||||
if (instance)
|
||||
if (Creature* pThaddius = me->GetCreature(*me, instance->GetData64(DATA_THADDIUS)))
|
||||
if (pThaddius->AI())
|
||||
pThaddius->AI()->DoAction(ACTION_FEUGEN_DIED);
|
||||
}
|
||||
|
||||
@@ -107,14 +107,14 @@ class instance_naxxramas : public InstanceMapScript
|
||||
public:
|
||||
instance_naxxramas() : InstanceMapScript("instance_naxxramas", 533) { }
|
||||
|
||||
InstanceScript* GetInstanceScript(InstanceMap* pMap) const
|
||||
InstanceScript* GetInstanceScript(InstanceMap* map) const
|
||||
{
|
||||
return new instance_naxxramas_InstanceMapScript(pMap);
|
||||
return new instance_naxxramas_InstanceMapScript(map);
|
||||
}
|
||||
|
||||
struct instance_naxxramas_InstanceMapScript : public InstanceScript
|
||||
{
|
||||
instance_naxxramas_InstanceMapScript(Map* pMap) : InstanceScript(pMap)
|
||||
instance_naxxramas_InstanceMapScript(Map* map) : InstanceScript(map)
|
||||
{
|
||||
SetBossNumber(MAX_BOSS_NUMBER);
|
||||
LoadDoorData(doorData);
|
||||
|
||||
Reference in New Issue
Block a user