Core: Cleaning up hungarian notation - Phase2: pPlayer -> player
This commit is contained in:
@@ -974,18 +974,18 @@ class item_tainted_core : public ItemScript
|
||||
public:
|
||||
item_tainted_core() : ItemScript("item_tainted_core") { }
|
||||
|
||||
bool OnUse(Player* pPlayer, Item* /*_Item*/, SpellCastTargets const& targets)
|
||||
bool OnUse(Player* player, Item* /*_Item*/, SpellCastTargets const& targets)
|
||||
{
|
||||
InstanceScript *pInstance = pPlayer->GetInstanceScript();
|
||||
InstanceScript *pInstance = player->GetInstanceScript();
|
||||
|
||||
if (!pInstance)
|
||||
{
|
||||
pPlayer->GetSession()->SendNotification(TEXT_NOT_INITIALIZED);
|
||||
player->GetSession()->SendNotification(TEXT_NOT_INITIALIZED);
|
||||
return true;
|
||||
}
|
||||
|
||||
Creature* Vashj = NULL;
|
||||
Vashj = (Unit::GetCreature((*pPlayer), pInstance->GetData64(DATA_LADYVASHJ)));
|
||||
Vashj = (Unit::GetCreature((*player), pInstance->GetData64(DATA_LADYVASHJ)));
|
||||
if (Vashj && (CAST_AI(boss_lady_vashj::boss_lady_vashjAI, Vashj->AI())->Phase == 2))
|
||||
{
|
||||
if (GameObject* gObj = targets.GetGOTarget())
|
||||
@@ -1016,7 +1016,7 @@ public:
|
||||
|
||||
if (pInstance->GetData(identifier))
|
||||
{
|
||||
pPlayer->GetSession()->SendNotification(TEXT_ALREADY_DEACTIVATED);
|
||||
player->GetSession()->SendNotification(TEXT_ALREADY_DEACTIVATED);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1032,15 +1032,15 @@ public:
|
||||
pInstance->SetData(identifier, 1);
|
||||
|
||||
//remove this item
|
||||
pPlayer->DestroyItemCount(31088, 1, true);
|
||||
player->DestroyItemCount(31088, 1, true);
|
||||
return true;
|
||||
}
|
||||
else if (targets.GetUnitTarget()->GetTypeId() == TYPEID_UNIT)
|
||||
return false;
|
||||
else if (targets.GetUnitTarget()->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
pPlayer->DestroyItemCount(31088, 1, true);
|
||||
pPlayer->CastSpell(targets.GetUnitTarget(), 38134, true);
|
||||
player->DestroyItemCount(31088, 1, true);
|
||||
player->CastSpell(targets.GetUnitTarget(), 38134, true);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
+5
-5
@@ -155,14 +155,14 @@ public:
|
||||
StartEvent();
|
||||
}
|
||||
|
||||
void ApplyWateryGrave(Unit* pPlayer, uint8 i)
|
||||
void ApplyWateryGrave(Unit* player, uint8 i)
|
||||
{
|
||||
switch(i)
|
||||
{
|
||||
case 0: pPlayer->CastSpell(pPlayer, SPELL_WATERY_GRAVE_1, true); break;
|
||||
case 1: pPlayer->CastSpell(pPlayer, SPELL_WATERY_GRAVE_2, true); break;
|
||||
case 2: pPlayer->CastSpell(pPlayer, SPELL_WATERY_GRAVE_3, true); break;
|
||||
case 3: pPlayer->CastSpell(pPlayer, SPELL_WATERY_GRAVE_4, true); break;
|
||||
case 0: player->CastSpell(player, SPELL_WATERY_GRAVE_1, true); break;
|
||||
case 1: player->CastSpell(player, SPELL_WATERY_GRAVE_2, true); break;
|
||||
case 2: player->CastSpell(player, SPELL_WATERY_GRAVE_3, true); break;
|
||||
case 3: player->CastSpell(player, SPELL_WATERY_GRAVE_4, true); break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+9
-9
@@ -52,7 +52,7 @@ class go_bridge_console : public GameObjectScript
|
||||
public:
|
||||
go_bridge_console() : GameObjectScript("go_bridge_console") { }
|
||||
|
||||
bool OnGossipHello(Player* /*pPlayer*/, GameObject* go)
|
||||
bool OnGossipHello(Player* /*player*/, GameObject* go)
|
||||
{
|
||||
InstanceScript* pInstance = go->GetInstanceScript();
|
||||
|
||||
@@ -134,33 +134,33 @@ class instance_serpent_shrine : public InstanceMapScript
|
||||
return;
|
||||
for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
|
||||
{
|
||||
if (Player* pPlayer = i->getSource())
|
||||
if (Player* player = i->getSource())
|
||||
{
|
||||
if (pPlayer->isAlive() && /*i->getSource()->GetPositionZ() <= -21.434931f*/pPlayer->IsInWater())
|
||||
if (player->isAlive() && /*i->getSource()->GetPositionZ() <= -21.434931f*/player->IsInWater())
|
||||
{
|
||||
if (Water == WATERSTATE_SCALDING)
|
||||
{
|
||||
|
||||
if (!pPlayer->HasAura(SPELL_SCALDINGWATER))
|
||||
if (!player->HasAura(SPELL_SCALDINGWATER))
|
||||
{
|
||||
pPlayer->CastSpell(pPlayer, SPELL_SCALDINGWATER, true);
|
||||
player->CastSpell(player, SPELL_SCALDINGWATER, true);
|
||||
}
|
||||
} else if (Water == WATERSTATE_FRENZY)
|
||||
{
|
||||
//spawn frenzy
|
||||
if (DoSpawnFrenzy)
|
||||
{
|
||||
if (Creature* frenzy = pPlayer->SummonCreature(MOB_COILFANG_FRENZY, pPlayer->GetPositionX(), pPlayer->GetPositionY(), pPlayer->GetPositionZ(), pPlayer->GetOrientation(), TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 2000))
|
||||
if (Creature* frenzy = player->SummonCreature(MOB_COILFANG_FRENZY, player->GetPositionX(), player->GetPositionY(), player->GetPositionZ(), player->GetOrientation(), TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 2000))
|
||||
{
|
||||
frenzy->Attack(pPlayer, false);
|
||||
frenzy->Attack(player, false);
|
||||
frenzy->AddUnitMovementFlag(MOVEMENTFLAG_SWIMMING | MOVEMENTFLAG_LEVITATING);
|
||||
}
|
||||
DoSpawnFrenzy = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!pPlayer->IsInWater())
|
||||
pPlayer->RemoveAurasDueToSpell(SPELL_SCALDINGWATER);
|
||||
if (!player->IsInWater())
|
||||
player->RemoveAurasDueToSpell(SPELL_SCALDINGWATER);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ class go_main_chambers_access_panel : public GameObjectScript
|
||||
public:
|
||||
go_main_chambers_access_panel() : GameObjectScript("go_main_chambers_access_panel") { }
|
||||
|
||||
bool OnGossipHello(Player* /*pPlayer*/, GameObject* go)
|
||||
bool OnGossipHello(Player* /*player*/, GameObject* go)
|
||||
{
|
||||
InstanceScript* pInstance = go->GetInstanceScript();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user