mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 15:40:45 +01:00
Core: Start cleaning up hungarian notation - Phase1: pCreature -> creature
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user