diff options
author | click <click@gonnamakeyou.com> | 2011-07-02 22:18:03 +0200 |
---|---|---|
committer | click <click@gonnamakeyou.com> | 2011-07-02 22:18:03 +0200 |
commit | f91ee24184dffcd686d60dd07a1d19da3f5da818 (patch) | |
tree | 83d06dd9c18ca0d69c35e0937c14bdd83c3c98d9 /src/server/scripts/Examples | |
parent | 3ddc1cc4c40b757dd42b781552b483a047a6df64 (diff) |
Core: Start cleaning up hungarian notation - Phase1: pCreature -> creature
Diffstat (limited to 'src/server/scripts/Examples')
-rw-r--r-- | src/server/scripts/Examples/example_creature.cpp | 14 | ||||
-rw-r--r-- | src/server/scripts/Examples/example_escort.cpp | 18 | ||||
-rw-r--r-- | src/server/scripts/Examples/example_gossip_codebox.cpp | 18 |
3 files changed, 25 insertions, 25 deletions
diff --git a/src/server/scripts/Examples/example_creature.cpp b/src/server/scripts/Examples/example_creature.cpp index db5034655d8..b32f5f93c27 100644 --- a/src/server/scripts/Examples/example_creature.cpp +++ b/src/server/scripts/Examples/example_creature.cpp @@ -258,28 +258,28 @@ class example_creature : public CreatureScript } }; - CreatureAI* GetAI(Creature* pCreature) const + CreatureAI* GetAI(Creature* creature) const { - return new example_creatureAI(pCreature); + return new example_creatureAI(creature); } - bool OnGossipHello(Player* pPlayer, Creature* pCreature) + bool OnGossipHello(Player* pPlayer, Creature* creature) { pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - pPlayer->SEND_GOSSIP_MENU(907, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(907, creature->GetGUID()); return true; } - bool OnGossipSelect(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction) + bool OnGossipSelect(Player* pPlayer, Creature* creature, uint32 /*uiSender*/, uint32 uiAction) { pPlayer->PlayerTalkClass->ClearMenus(); if (uiAction == GOSSIP_ACTION_INFO_DEF+1) { pPlayer->CLOSE_GOSSIP_MENU(); //Set our faction to hostile towards all - pCreature->setFaction(FACTION_WORGEN); - pCreature->AI()->AttackStart(pPlayer); + creature->setFaction(FACTION_WORGEN); + creature->AI()->AttackStart(pPlayer); } return true; diff --git a/src/server/scripts/Examples/example_escort.cpp b/src/server/scripts/Examples/example_escort.cpp index a4300e1a300..9c173f73b95 100644 --- a/src/server/scripts/Examples/example_escort.cpp +++ b/src/server/scripts/Examples/example_escort.cpp @@ -64,7 +64,7 @@ class example_escort : public CreatureScript struct example_escortAI : public npc_escortAI { // CreatureAI functions - example_escortAI(Creature* pCreature) : npc_escortAI(pCreature) { } + example_escortAI(Creature* creature) : npc_escortAI(creature) { } uint32 m_uiDeathCoilTimer; uint32 m_uiChatTimer; @@ -178,29 +178,29 @@ class example_escort : public CreatureScript } }; - CreatureAI* GetAI(Creature* pCreature) const + CreatureAI* GetAI(Creature* creature) const { - return new example_escortAI(pCreature); + return new example_escortAI(creature); } - bool OnGossipHello(Player* pPlayer, Creature* pCreature) + bool OnGossipHello(Player* pPlayer, Creature* creature) { - pPlayer->TalkedToCreature(pCreature->GetEntry(), pCreature->GetGUID()); - pPlayer->PrepareGossipMenu(pCreature, 0); + pPlayer->TalkedToCreature(creature->GetEntry(), creature->GetGUID()); + pPlayer->PrepareGossipMenu(creature, 0); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3); - pPlayer->SendPreparedGossip(pCreature); + pPlayer->SendPreparedGossip(creature); return true; } - bool OnGossipSelect(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction) + bool OnGossipSelect(Player* pPlayer, Creature* creature, uint32 /*uiSender*/, uint32 uiAction) { pPlayer->PlayerTalkClass->ClearMenus(); - npc_escortAI* pEscortAI = CAST_AI(example_escort::example_escortAI, pCreature->AI()); + npc_escortAI* pEscortAI = CAST_AI(example_escort::example_escortAI, creature->AI()); switch(uiAction) { diff --git a/src/server/scripts/Examples/example_gossip_codebox.cpp b/src/server/scripts/Examples/example_gossip_codebox.cpp index 64e57355bfa..30d9f27f400 100644 --- a/src/server/scripts/Examples/example_gossip_codebox.cpp +++ b/src/server/scripts/Examples/example_gossip_codebox.cpp @@ -48,29 +48,29 @@ class example_gossip_codebox : public CreatureScript { } - bool OnGossipHello(Player* pPlayer, Creature* pCreature) + bool OnGossipHello(Player* pPlayer, Creature* creature) { pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_ITEM_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1, "", 0, true); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); - pPlayer->PlayerTalkClass->SendGossipMenu(907, pCreature->GetGUID()); + pPlayer->PlayerTalkClass->SendGossipMenu(907, creature->GetGUID()); return true; } - bool OnGossipSelect(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction) + bool OnGossipSelect(Player* pPlayer, Creature* creature, uint32 /*uiSender*/, uint32 uiAction) { pPlayer->PlayerTalkClass->ClearMenus(); if (uiAction == GOSSIP_ACTION_INFO_DEF+2) { - DoScriptText(SAY_NOT_INTERESTED, pCreature); + DoScriptText(SAY_NOT_INTERESTED, creature); pPlayer->CLOSE_GOSSIP_MENU(); } return true; } - bool OnGossipSelectCode(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction, const char* code) + bool OnGossipSelectCode(Player* pPlayer, Creature* creature, uint32 uiSender, uint32 uiAction, const char* code) { pPlayer->PlayerTalkClass->ClearMenus(); if (uiSender == GOSSIP_SENDER_MAIN) @@ -80,13 +80,13 @@ class example_gossip_codebox : public CreatureScript case GOSSIP_ACTION_INFO_DEF+1: if (std::strcmp(code, pPlayer->GetName()) != 0) { - DoScriptText(SAY_WRONG, pCreature); - pCreature->CastSpell(pPlayer, SPELL_POLYMORPH, true); + DoScriptText(SAY_WRONG, creature); + creature->CastSpell(pPlayer, SPELL_POLYMORPH, true); } else { - DoScriptText(SAY_CORRECT, pCreature); - pCreature->CastSpell(pPlayer, SPELL_MARK_OF_THE_WILD, true); + DoScriptText(SAY_CORRECT, creature); + creature->CastSpell(pPlayer, SPELL_MARK_OF_THE_WILD, true); } pPlayer->CLOSE_GOSSIP_MENU(); |