From 5b4c7783c2a28e420cb4aaf4f2967083db8f6787 Mon Sep 17 00:00:00 2001 From: Bootz Date: Fri, 7 Oct 2011 19:45:43 -0500 Subject: 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... --- src/server/scripts/World/areatrigger_scripts.cpp | 6 +++--- src/server/scripts/World/go_scripts.cpp | 4 ++-- src/server/scripts/World/item_scripts.cpp | 16 ++++++++-------- 3 files changed, 13 insertions(+), 13 deletions(-) (limited to 'src/server/scripts/World') diff --git a/src/server/scripts/World/areatrigger_scripts.cpp b/src/server/scripts/World/areatrigger_scripts.cpp index 6c54d130e53..a9ed794ab45 100644 --- a/src/server/scripts/World/areatrigger_scripts.cpp +++ b/src/server/scripts/World/areatrigger_scripts.cpp @@ -99,9 +99,9 @@ class AreaTrigger_at_coilfang_waterfall : public AreaTriggerScript bool OnTrigger(Player* player, AreaTriggerEntry const* /*trigger*/) { - if (GameObject* pGo = GetClosestGameObjectWithEntry(player, GO_COILFANG_WATERFALL, 35.0f)) - if (pGo->getLootState() == GO_READY) - pGo->UseDoorOrButton(); + if (GameObject* go = GetClosestGameObjectWithEntry(player, GO_COILFANG_WATERFALL, 35.0f)) + if (go->getLootState() == GO_READY) + go->UseDoorOrButton(); return false; } diff --git a/src/server/scripts/World/go_scripts.cpp b/src/server/scripts/World/go_scripts.cpp index aa272d8157b..cdeac03d76e 100644 --- a/src/server/scripts/World/go_scripts.cpp +++ b/src/server/scripts/World/go_scripts.cpp @@ -1179,9 +1179,9 @@ class go_massive_seaforium_charge : public GameObjectScript public: go_massive_seaforium_charge() : GameObjectScript("go_massive_seaforium_charge") { } - bool OnGossipHello(Player* /*player*/, GameObject* pGo) + bool OnGossipHello(Player* /*player*/, GameObject* go) { - pGo->SetLootState(GO_JUST_DEACTIVATED); + go->SetLootState(GO_JUST_DEACTIVATED); return true; } }; diff --git a/src/server/scripts/World/item_scripts.cpp b/src/server/scripts/World/item_scripts.cpp index c7dfd6355ef..4099c03384c 100644 --- a/src/server/scripts/World/item_scripts.cpp +++ b/src/server/scripts/World/item_scripts.cpp @@ -261,24 +261,24 @@ public: bool OnUse(Player* player, Item* /*pItem*/, SpellCastTargets const & /*targets*/) { - GameObject* pGo = NULL; + GameObject* go = NULL; for (uint8 i = 0; i < CaribouTrapsNum; ++i) { - pGo = player->FindNearestGameObject(CaribouTraps[i], 5.0f); - if (pGo) + go = player->FindNearestGameObject(CaribouTraps[i], 5.0f); + if (go) break; } - if (!pGo) + if (!go) return false; - if (pGo->FindNearestCreature(NPC_NESINGWARY_TRAPPER, 10.0f, true) || pGo->FindNearestCreature(NPC_NESINGWARY_TRAPPER, 10.0f, false) || pGo->FindNearestGameObject(GO_HIGH_QUALITY_FUR, 2.0f)) + if (go->FindNearestCreature(NPC_NESINGWARY_TRAPPER, 10.0f, true) || go->FindNearestCreature(NPC_NESINGWARY_TRAPPER, 10.0f, false) || go->FindNearestGameObject(GO_HIGH_QUALITY_FUR, 2.0f)) return true; float x, y, z; - pGo->GetClosePoint(x, y, z, pGo->GetObjectSize() / 3, 7.0f); - pGo->SummonGameObject(GO_HIGH_QUALITY_FUR, pGo->GetPositionX(), pGo->GetPositionY(), pGo->GetPositionZ(), 0, 0, 0, 0, 0, 1000); - if (TempSummon* summon = player->SummonCreature(NPC_NESINGWARY_TRAPPER, x, y, z, pGo->GetOrientation(), TEMPSUMMON_DEAD_DESPAWN, 1000)) + go->GetClosePoint(x, y, z, go->GetObjectSize() / 3, 7.0f); + go->SummonGameObject(GO_HIGH_QUALITY_FUR, go->GetPositionX(), go->GetPositionY(), go->GetPositionZ(), 0, 0, 0, 0, 0, 1000); + if (TempSummon* summon = player->SummonCreature(NPC_NESINGWARY_TRAPPER, x, y, z, go->GetOrientation(), TEMPSUMMON_DEAD_DESPAWN, 1000)) { summon->SetVisible(false); summon->SetReactState(REACT_PASSIVE); -- cgit v1.2.3