Merge [SD2]

r1284 Apply SD2 code style to all uint32 arguments in gossip related functions.
r1285 Replace all remains of _GO with proper pointer style.
Aslo some other code style.
Fix typo in world_scripts_full.sql. thx Sundark

--HG--
branch : trunk
This commit is contained in:
Kudlaty
2009-08-15 00:32:04 +02:00
parent ce84190b5c
commit 68c015af44
131 changed files with 1403 additions and 1404 deletions
+97 -97
View File
@@ -687,14 +687,14 @@ void LoadDatabase()
//Get db string from file
std::string dbstring = TScriptConfig.GetStringDefault("WorldDatabaseInfo", "");
if (dbstring.empty() )
if (dbstring.empty())
{
error_log("TSCR: Missing world database info from configuration file. Load database aborted.");
return;
}
//Initialize connection to DB
if (!dbstring.empty() && TScriptDB.Initialize(dbstring.c_str()) )
if (!dbstring.empty() && TScriptDB.Initialize(dbstring.c_str()))
outstring_log("TSCR: TrinityScript database: %s",dbstring.c_str());
else
{
@@ -764,14 +764,14 @@ void LoadDatabase()
if (temp.SoundId)
{
if (!GetSoundEntriesStore()->LookupEntry(temp.SoundId))
error_db_log("TSCR: Entry %i in table `script_texts` has soundId %u but sound does not exist.",i,temp.SoundId);
error_db_log("TSCR: Entry %i in table `script_texts` has soundId %u but sound does not exist.",i, temp.SoundId);
}
if (!GetLanguageDescByID(temp.Language))
error_db_log("TSCR: Entry %i in table `script_texts` using Language %u but Language does not exist.",i,temp.Language);
error_db_log("TSCR: Entry %i in table `script_texts` using Language %u but Language does not exist.",i, temp.Language);
if (temp.Type > CHAT_TYPE_ZONE_YELL)
error_db_log("TSCR: Entry %i in table `script_texts` has Type %u but this Chat Type does not exist.",i,temp.Type);
error_db_log("TSCR: Entry %i in table `script_texts` has Type %u but this Chat Type does not exist.",i, temp.Type);
TextMap[i] = temp;
++count;
@@ -829,14 +829,14 @@ void LoadDatabase()
if (temp.SoundId)
{
if (!GetSoundEntriesStore()->LookupEntry(temp.SoundId))
error_db_log("TSCR: Entry %i in table `custom_texts` has soundId %u but sound does not exist.",i,temp.SoundId);
error_db_log("TSCR: Entry %i in table `custom_texts` has soundId %u but sound does not exist.",i, temp.SoundId);
}
if (!GetLanguageDescByID(temp.Language))
error_db_log("TSCR: Entry %i in table `custom_texts` using Language %u but Language does not exist.",i,temp.Language);
error_db_log("TSCR: Entry %i in table `custom_texts` using Language %u but Language does not exist.",i, temp.Language);
if (temp.Type > CHAT_TYPE_ZONE_YELL)
error_db_log("TSCR: Entry %i in table `custom_texts` has Type %u but this Chat Type does not exist.",i,temp.Type);
error_db_log("TSCR: Entry %i in table `custom_texts` has Type %u but this Chat Type does not exist.",i, temp.Type);
TextMap[i] = temp;
++count;
@@ -1655,7 +1655,7 @@ void DoScriptText(int32 textEntry, WorldObject* pSource, Unit* target)
if((*i).second.SoundId)
{
if( GetSoundEntriesStore()->LookupEntry((*i).second.SoundId) )
if(GetSoundEntriesStore()->LookupEntry((*i).second.SoundId))
{
pSource->SendPlaySound((*i).second.SoundId, false);
}
@@ -1670,7 +1670,7 @@ void DoScriptText(int32 textEntry, WorldObject* pSource, Unit* target)
((Unit*)pSource)->HandleEmoteCommand((*i).second.Emote);
}
else
error_log("TSCR: DoScriptText entry %i tried to process emote for invalid TypeId (%u).",textEntry,pSource->GetTypeId());
error_log("TSCR: DoScriptText entry %i tried to process emote for invalid TypeId (%u).",textEntry, pSource->GetTypeId());
}
switch((*i).second.Type)
@@ -1732,242 +1732,242 @@ char const* ScriptsVersion()
return "Default Trinity scripting library";
}
TRINITY_DLL_EXPORT
bool GossipHello ( Player * player, Creature *_Creature )
bool GossipHello (Player * pPlayer, Creature* pCreature)
{
Script *tmpscript = m_scripts[_Creature->GetScriptId()];
Script *tmpscript = m_scripts[pCreature->GetScriptId()];
if (!tmpscript || !tmpscript->pGossipHello) return false;
player->PlayerTalkClass->ClearMenus();
return tmpscript->pGossipHello(player,_Creature);
pPlayer->PlayerTalkClass->ClearMenus();
return tmpscript->pGossipHello(pPlayer, pCreature);
}
TRINITY_DLL_EXPORT
bool GossipSelect( Player *player, Creature *_Creature, uint32 sender, uint32 action )
bool GossipSelect(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
{
debug_log("TSCR: Gossip selection, sender: %d, action: %d",sender, action);
debug_log("TSCR: Gossip selection, sender: %d, action: %d", uiSender, uiAction);
Script *tmpscript = m_scripts[_Creature->GetScriptId()];
Script *tmpscript = m_scripts[pCreature->GetScriptId()];
if (!tmpscript || !tmpscript->pGossipSelect) return false;
player->PlayerTalkClass->ClearMenus();
return tmpscript->pGossipSelect(player,_Creature,sender,action);
pPlayer->PlayerTalkClass->ClearMenus();
return tmpscript->pGossipSelect(pPlayer, pCreature, uiSender, uiAction);
}
TRINITY_DLL_EXPORT
bool GossipSelectWithCode( Player *player, Creature *_Creature, uint32 sender, uint32 action, const char* sCode )
bool GossipSelectWithCode(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction, const char* sCode)
{
debug_log("TSCR: Gossip selection with code, sender: %d, action: %d",sender, action);
debug_log("TSCR: Gossip selection with code, sender: %d, action: %d", uiSender, uiAction);
Script *tmpscript = m_scripts[_Creature->GetScriptId()];
Script *tmpscript = m_scripts[pCreature->GetScriptId()];
if (!tmpscript || !tmpscript->pGossipSelectWithCode) return false;
player->PlayerTalkClass->ClearMenus();
return tmpscript->pGossipSelectWithCode(player,_Creature,sender,action,sCode);
pPlayer->PlayerTalkClass->ClearMenus();
return tmpscript->pGossipSelectWithCode(pPlayer, pCreature, uiSender, uiAction, sCode);
}
TRINITY_DLL_EXPORT
bool GOSelect( Player *player, GameObject *_GO, uint32 sender, uint32 action )
bool GOSelect(Player* pPlayer, GameObject* pGO, uint32 uiSender, uint32 uiAction)
{
if(!_GO)
if(!pGO)
return false;
debug_log("TSCR: Gossip selection, sender: %d, action: %d",sender, action);
debug_log("TSCR: Gossip selection, sender: %d, action: %d", uiSender, uiAction);
Script *tmpscript = m_scripts[_GO->GetGOInfo()->ScriptId];
Script *tmpscript = m_scripts[pGO->GetGOInfo()->ScriptId];
if(!tmpscript || !tmpscript->pGOSelect) return false;
player->PlayerTalkClass->ClearMenus();
return tmpscript->pGOSelect(player,_GO,sender,action);
pPlayer->PlayerTalkClass->ClearMenus();
return tmpscript->pGOSelect(pPlayer, pGO, uiSender, uiAction);
}
TRINITY_DLL_EXPORT
bool GOSelectWithCode( Player *player, GameObject *_GO, uint32 sender, uint32 action, const char* sCode )
bool GOSelectWithCode(Player* pPlayer, GameObject* pGO, uint32 uiSender, uint32 uiAction, const char* sCode)
{
if(!_GO)
if(!pGO)
return false;
debug_log("TSCR: Gossip selection, sender: %d, action: %d",sender, action);
debug_log("TSCR: Gossip selection, sender: %d, action: %d",uiSender, uiAction);
Script *tmpscript = m_scripts[_GO->GetGOInfo()->ScriptId];
Script *tmpscript = m_scripts[pGO->GetGOInfo()->ScriptId];
if(!tmpscript || !tmpscript->pGOSelectWithCode) return false;
player->PlayerTalkClass->ClearMenus();
return tmpscript->pGOSelectWithCode(player,_GO,sender,action,sCode);
pPlayer->PlayerTalkClass->ClearMenus();
return tmpscript->pGOSelectWithCode(pPlayer, pGO, uiSender ,uiAction, sCode);
}
TRINITY_DLL_EXPORT
bool QuestAccept( Player *player, Creature *_Creature, Quest const *_Quest )
bool QuestAccept(Player* pPlayer, Creature* pCreature, Quest const* pQuest)
{
Script *tmpscript = m_scripts[_Creature->GetScriptId()];
Script *tmpscript = m_scripts[pCreature->GetScriptId()];
if (!tmpscript || !tmpscript->pQuestAccept) return false;
player->PlayerTalkClass->ClearMenus();
return tmpscript->pQuestAccept(player,_Creature,_Quest);
pPlayer->PlayerTalkClass->ClearMenus();
return tmpscript->pQuestAccept(pPlayer, pCreature, pQuest);
}
TRINITY_DLL_EXPORT
bool QuestSelect( Player *player, Creature *_Creature, Quest const *_Quest )
bool QuestSelect(Player* pPlayer, Creature* pCreature, Quest const* pQuest)
{
Script *tmpscript = m_scripts[_Creature->GetScriptId()];
Script *tmpscript = m_scripts[pCreature->GetScriptId()];
if (!tmpscript || !tmpscript->pQuestSelect) return false;
player->PlayerTalkClass->ClearMenus();
return tmpscript->pQuestSelect(player,_Creature,_Quest);
pPlayer->PlayerTalkClass->ClearMenus();
return tmpscript->pQuestSelect(pPlayer, pCreature, pQuest);
}
TRINITY_DLL_EXPORT
bool QuestComplete( Player *player, Creature *_Creature, Quest const *_Quest )
bool QuestComplete(Player* pPlayer, Creature* pCreature, Quest const* pQuest)
{
Script *tmpscript = m_scripts[_Creature->GetScriptId()];
Script *tmpscript = m_scripts[pCreature->GetScriptId()];
if (!tmpscript || !tmpscript->pQuestComplete) return false;
player->PlayerTalkClass->ClearMenus();
return tmpscript->pQuestComplete(player,_Creature,_Quest);
pPlayer->PlayerTalkClass->ClearMenus();
return tmpscript->pQuestComplete(pPlayer, pCreature, pQuest);
}
TRINITY_DLL_EXPORT
bool ChooseReward( Player *player, Creature *_Creature, Quest const *_Quest, uint32 opt )
bool ChooseReward(Player* pPlayer, Creature* pCreature, Quest const* pQuest, uint32 opt)
{
Script *tmpscript = m_scripts[_Creature->GetScriptId()];
Script *tmpscript = m_scripts[pCreature->GetScriptId()];
if (!tmpscript || !tmpscript->pChooseReward) return false;
player->PlayerTalkClass->ClearMenus();
return tmpscript->pChooseReward(player,_Creature,_Quest,opt);
pPlayer->PlayerTalkClass->ClearMenus();
return tmpscript->pChooseReward(pPlayer, pCreature, pQuest, opt);
}
TRINITY_DLL_EXPORT
uint32 NPCDialogStatus( Player *player, Creature *_Creature )
uint32 NPCDialogStatus(Player* pPlayer, Creature* pCreature)
{
Script *tmpscript = m_scripts[_Creature->GetScriptId()];
Script *tmpscript = m_scripts[pCreature->GetScriptId()];
if (!tmpscript || !tmpscript->pNPCDialogStatus) return 100;
player->PlayerTalkClass->ClearMenus();
return tmpscript->pNPCDialogStatus(player,_Creature);
pPlayer->PlayerTalkClass->ClearMenus();
return tmpscript->pNPCDialogStatus(pPlayer, pCreature);
}
TRINITY_DLL_EXPORT
uint32 GODialogStatus( Player *player, GameObject *_GO )
uint32 GODialogStatus(Player* pPlayer, GameObject* pGO)
{
Script *tmpscript = m_scripts[_GO->GetGOInfo()->ScriptId];
Script *tmpscript = m_scripts[pGO->GetGOInfo()->ScriptId];
if (!tmpscript || !tmpscript->pGODialogStatus) return 100;
player->PlayerTalkClass->ClearMenus();
return tmpscript->pGODialogStatus(player,_GO);
pPlayer->PlayerTalkClass->ClearMenus();
return tmpscript->pGODialogStatus(pPlayer, pGO);
}
TRINITY_DLL_EXPORT
bool ItemHello( Player *player, Item *_Item, Quest const *_Quest )
bool ItemHello(Player* pPlayer, Item* pItem, Quest const* pQuest)
{
Script *tmpscript = m_scripts[_Item->GetProto()->ScriptId];
Script *tmpscript = m_scripts[pItem->GetProto()->ScriptId];
if (!tmpscript || !tmpscript->pItemHello) return false;
player->PlayerTalkClass->ClearMenus();
return tmpscript->pItemHello(player,_Item,_Quest);
pPlayer->PlayerTalkClass->ClearMenus();
return tmpscript->pItemHello(pPlayer, pItem, pQuest);
}
TRINITY_DLL_EXPORT
bool ItemQuestAccept( Player *player, Item *_Item, Quest const *_Quest )
bool ItemQuestAccept(Player* pPlayer, Item* pItem, Quest const* pQuest)
{
Script *tmpscript = m_scripts[_Item->GetProto()->ScriptId];
Script *tmpscript = m_scripts[pItem->GetProto()->ScriptId];
if (!tmpscript || !tmpscript->pItemQuestAccept) return false;
player->PlayerTalkClass->ClearMenus();
return tmpscript->pItemQuestAccept(player,_Item,_Quest);
pPlayer->PlayerTalkClass->ClearMenus();
return tmpscript->pItemQuestAccept(pPlayer, pItem, pQuest);
}
TRINITY_DLL_EXPORT
bool GOHello( Player *player, GameObject *_GO )
bool GOHello(Player* pPlayer, GameObject* pGO)
{
Script *tmpscript = m_scripts[_GO->GetGOInfo()->ScriptId];
Script *tmpscript = m_scripts[pGO->GetGOInfo()->ScriptId];
if (!tmpscript || !tmpscript->pGOHello) return false;
player->PlayerTalkClass->ClearMenus();
return tmpscript->pGOHello(player,_GO);
pPlayer->PlayerTalkClass->ClearMenus();
return tmpscript->pGOHello(pPlayer, pGO);
}
TRINITY_DLL_EXPORT
bool GOQuestAccept( Player *player, GameObject *_GO, Quest const *_Quest )
bool GOQuestAccept(Player* pPlayer, GameObject* pGO, Quest const* pQuest)
{
Script *tmpscript = m_scripts[_GO->GetGOInfo()->ScriptId];
Script *tmpscript = m_scripts[pGO->GetGOInfo()->ScriptId];
if (!tmpscript || !tmpscript->pGOQuestAccept) return false;
player->PlayerTalkClass->ClearMenus();
return tmpscript->pGOQuestAccept(player,_GO,_Quest);
pPlayer->PlayerTalkClass->ClearMenus();
return tmpscript->pGOQuestAccept(pPlayer, pGO, pQuest);
}
TRINITY_DLL_EXPORT
bool GOChooseReward( Player *player, GameObject *_GO, Quest const *_Quest, uint32 opt )
bool GOChooseReward(Player* pPlayer, GameObject* pGO, Quest const* pQuest, uint32 opt)
{
Script *tmpscript = m_scripts[_GO->GetGOInfo()->ScriptId];
Script *tmpscript = m_scripts[pGO->GetGOInfo()->ScriptId];
if (!tmpscript || !tmpscript->pGOChooseReward) return false;
player->PlayerTalkClass->ClearMenus();
return tmpscript->pGOChooseReward(player,_GO,_Quest,opt);
pPlayer->PlayerTalkClass->ClearMenus();
return tmpscript->pGOChooseReward(pPlayer, pGO, pQuest, opt);
}
TRINITY_DLL_EXPORT
bool AreaTrigger( Player *player, AreaTriggerEntry * atEntry)
bool AreaTrigger(Player* pPlayer, AreaTriggerEntry * atEntry)
{
Script *tmpscript = m_scripts[GetAreaTriggerScriptId(atEntry->id)];
if (!tmpscript || !tmpscript->pAreaTrigger) return false;
return tmpscript->pAreaTrigger(player, atEntry);
return tmpscript->pAreaTrigger(pPlayer, atEntry);
}
TRINITY_DLL_EXPORT
CreatureAI* GetAI(Creature *_Creature)
CreatureAI* GetAI(Creature* pCreature)
{
Script *tmpscript = m_scripts[_Creature->GetScriptId()];
Script *tmpscript = m_scripts[pCreature->GetScriptId()];
if (!tmpscript || !tmpscript->GetAI) return NULL;
return tmpscript->GetAI(_Creature);
return tmpscript->GetAI(pCreature);
}
TRINITY_DLL_EXPORT
bool ItemUse( Player *player, Item* _Item, SpellCastTargets const& targets)
bool ItemUse(Player* pPlayer, Item* pItem, SpellCastTargets const& targets)
{
Script *tmpscript = m_scripts[_Item->GetProto()->ScriptId];
Script *tmpscript = m_scripts[pItem->GetProto()->ScriptId];
if (!tmpscript || !tmpscript->pItemUse) return false;
return tmpscript->pItemUse(player,_Item,targets);
return tmpscript->pItemUse(pPlayer, pItem, targets);
}
TRINITY_DLL_EXPORT
bool ItemExpire( Player *player, ItemPrototype const * _ItemProto)
bool ItemExpire(Player* pPlayer, ItemPrototype const * pItemProto)
{
Script *tmpscript = m_scripts[_ItemProto->ScriptId];
Script *tmpscript = m_scripts[pItemProto->ScriptId];
if (!tmpscript || !tmpscript->pItemExpire) return true;
return tmpscript->pItemExpire(player,_ItemProto);
return tmpscript->pItemExpire(pPlayer, pItemProto);
}
TRINITY_DLL_EXPORT
bool EffectDummyCreature(Unit *caster, uint32 spellId, uint32 effIndex, Creature *crTarget )
bool EffectDummyCreature(Unit *caster, uint32 spellId, uint32 effIndex, Creature *crTarget)
{
Script *tmpscript = m_scripts[crTarget->GetScriptId()];
if (!tmpscript || !tmpscript->pEffectDummyCreature) return false;
return tmpscript->pEffectDummyCreature(caster, spellId,effIndex,crTarget);
return tmpscript->pEffectDummyCreature(caster, spellId, effIndex, crTarget);
}
TRINITY_DLL_EXPORT
bool EffectDummyGameObj(Unit *caster, uint32 spellId, uint32 effIndex, GameObject *gameObjTarget )
bool EffectDummyGameObj(Unit *caster, uint32 spellId, uint32 effIndex, GameObject *gameObjTarget)
{
Script *tmpscript = m_scripts[gameObjTarget->GetGOInfo()->ScriptId];
if (!tmpscript || !tmpscript->pEffectDummyGameObj) return false;
return tmpscript->pEffectDummyGameObj(caster, spellId,effIndex,gameObjTarget);
return tmpscript->pEffectDummyGameObj(caster, spellId, effIndex, gameObjTarget);
}
TRINITY_DLL_EXPORT
bool EffectDummyItem(Unit *caster, uint32 spellId, uint32 effIndex, Item *itemTarget )
bool EffectDummyItem(Unit *caster, uint32 spellId, uint32 effIndex, Item *itemTarget)
{
Script *tmpscript = m_scripts[itemTarget->GetProto()->ScriptId];
if (!tmpscript || !tmpscript->pEffectDummyItem) return false;
return tmpscript->pEffectDummyItem(caster, spellId,effIndex,itemTarget);
return tmpscript->pEffectDummyItem(caster, spellId, effIndex, itemTarget);
}
TRINITY_DLL_EXPORT
@@ -250,7 +250,7 @@ void SimpleAI::UpdateAI(const uint32 diff)
DoCast(target, Spell[i].Spell_Id);
//Yell and sound use the same number so that you can make
//the creature yell with the correct sound effect attached
//the Creature yell with the correct sound effect attached
uint32 random_text = rand()%3;
//Random yell
@@ -59,7 +59,7 @@ EndScriptData */
struct TRINITY_DLL_DECL custom_exampleAI : public ScriptedAI
{
//*** HANDLED FUNCTION ***
//This is the constructor, called only once when the creature is first created
//This is the constructor, called only once when the Creature is first created
custom_exampleAI(Creature *c) : ScriptedAI(c) {}
//*** CUSTOM VARIABLES ****
@@ -209,16 +209,16 @@ struct TRINITY_DLL_DECL custom_exampleAI : public ScriptedAI
};
//This is the GetAI method used by all scripts that involve AI
//It is called every time a new creature using this script is created
//It is called every time a new Creature using this script is created
CreatureAI* GetAI_custom_example(Creature* pCreature)
{
return new custom_exampleAI (pCreature);
}
//This function is called when the player clicks an option on the gossip menu
void SendDefaultMenu_custom_example(Player* pPlayer, Creature* pCreature, uint32 action)
void SendDefaultMenu_custom_example(Player* pPlayer, Creature* pCreature, uint32 uiAction)
{
if (action == GOSSIP_ACTION_INFO_DEF + 1) //Fight time
if (uiAction == GOSSIP_ACTION_INFO_DEF + 1) //Fight time
{
//Set our faction to hostile twoards all
pCreature->setFaction(24);
@@ -228,10 +228,10 @@ void SendDefaultMenu_custom_example(Player* pPlayer, Creature* pCreature, uint32
}
//This function is called when the player clicks an option on the gossip menu
bool GossipSelect_custom_example(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action)
bool GossipSelect_custom_example(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
{
if (sender == GOSSIP_SENDER_MAIN)
SendDefaultMenu_custom_example(pPlayer, pCreature, action);
if (uiSender == GOSSIP_SENDER_MAIN)
SendDefaultMenu_custom_example(pPlayer, pCreature, uiAction);
return true;
}
@@ -35,9 +35,9 @@ bool GossipHello_custom_gossip_codebox(Player* pPlayer, Creature* pCreature)
}
//This function is called when the player clicks an option on the gossip menubool
bool GossipSelect_custom_gossip_codebox(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action)
bool GossipSelect_custom_gossip_codebox(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
{
if (action == GOSSIP_ACTION_INFO_DEF+2)
if (uiAction == GOSSIP_ACTION_INFO_DEF+2)
{
pCreature->Say("Normal select, guess you're not interested.", LANG_UNIVERSAL, 0);
pPlayer->CLOSE_GOSSIP_MENU();
@@ -45,11 +45,11 @@ bool GossipSelect_custom_gossip_codebox(Player* pPlayer, Creature* pCreature, ui
return true;
}
bool GossipSelectWithCode_custom_gossip_codebox(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action, const char* sCode)
bool GossipSelectWithCode_custom_gossip_codebox(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction, const char* sCode)
{
if (sender == GOSSIP_SENDER_MAIN)
if (uiSender == GOSSIP_SENDER_MAIN)
{
if (action == GOSSIP_ACTION_INFO_DEF+1)
if (uiAction == GOSSIP_ACTION_INFO_DEF+1)
{
if (std::strcmp(sCode, pPlayer->GetName())!=0)
{
@@ -12,9 +12,9 @@ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_FLIGHT, GOSSIP_SENDER_MAIN, GO
return true;
}
bool GossipSelect_npc_acherus_taxi(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action)
bool GossipSelect_npc_acherus_taxi(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
{
if (action == GOSSIP_ACTION_INFO_DEF + 1)
if (uiAction == GOSSIP_ACTION_INFO_DEF + 1)
{
if (pPlayer->GetPositionZ() >=316)
{
@@ -19,15 +19,15 @@ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_DOWN, GOSSIP_SENDER_MAIN, GOSS
return true;
}
bool GossipSelect_npc_wyrmresttempel_middle_taxi(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action)
bool GossipSelect_npc_wyrmresttempel_middle_taxi(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
{
if (action == GOSSIP_ACTION_INFO_DEF + 1)
if (uiAction == GOSSIP_ACTION_INFO_DEF + 1)
{
pPlayer->GetSession()->SendDoFlight(6376, 881);
}
if (action == GOSSIP_ACTION_INFO_DEF + 2)
if (uiAction == GOSSIP_ACTION_INFO_DEF + 2)
{
pPlayer->GetSession()->SendDoFlight(6376, 882);
@@ -48,15 +48,15 @@ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_MIDDLE, GOSSIP_SENDER_MAIN, GO
bool GossipSelect_npc_wyrmresttempel_bottom_taxi(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action)
bool GossipSelect_npc_wyrmresttempel_bottom_taxi(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
{
if (action == GOSSIP_ACTION_INFO_DEF + 4)
if (uiAction == GOSSIP_ACTION_INFO_DEF + 4)
{
pPlayer->GetSession()->SendDoFlight(6376, 878);
}
if (action == GOSSIP_ACTION_INFO_DEF + 3)
if (uiAction == GOSSIP_ACTION_INFO_DEF + 3)
{
pPlayer->GetSession()->SendDoFlight(6376, 883);
@@ -75,14 +75,14 @@ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ONEDOWN, GOSSIP_SENDER_MAIN, G
return true;
}
bool GossipSelect_npc_wyrmresttempel_top_taxi(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action)
bool GossipSelect_npc_wyrmresttempel_top_taxi(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
{
if (action == GOSSIP_ACTION_INFO_DEF + 5)
if (uiAction == GOSSIP_ACTION_INFO_DEF + 5)
{
pPlayer->GetSession()->SendDoFlight(6376, 879);
}
if (action == GOSSIP_ACTION_INFO_DEF + 6)
if (uiAction == GOSSIP_ACTION_INFO_DEF + 6)
{
pPlayer->GetSession()->SendDoFlight(6376, 880);
+4 -4
View File
@@ -160,9 +160,9 @@ bool GossipHello_npc_test(Player* pPlayer, Creature* pCreature)
return true;
}
bool GossipSelect_npc_test(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action)
bool GossipSelect_npc_test(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
{
if (action == GOSSIP_ACTION_INFO_DEF+1)
if (uiAction == GOSSIP_ACTION_INFO_DEF+1)
{
pPlayer->CLOSE_GOSSIP_MENU();
((npc_escortAI*)(pCreature->AI()))->Start(true, true, pPlayer->GetGUID());
@@ -170,7 +170,7 @@ bool GossipSelect_npc_test(Player* pPlayer, Creature* pCreature, uint32 sender,
return true; // prevent Trinity core handling
}
if (action == GOSSIP_ACTION_INFO_DEF+2)
if (uiAction == GOSSIP_ACTION_INFO_DEF+2)
{
pPlayer->CLOSE_GOSSIP_MENU();
((npc_escortAI*)(pCreature->AI()))->Start(false, false, pPlayer->GetGUID());
@@ -178,7 +178,7 @@ bool GossipSelect_npc_test(Player* pPlayer, Creature* pCreature, uint32 sender,
return true; // prevent Trinity core handling
}
if (action == GOSSIP_ACTION_INFO_DEF+3)
if (uiAction == GOSSIP_ACTION_INFO_DEF+3)
{
pPlayer->CLOSE_GOSSIP_MENU();
((npc_escortAI*)(pCreature->AI()))->Start(false, false, pPlayer->GetGUID());
@@ -69,7 +69,7 @@ enum
struct TRINITY_DLL_DECL example_creatureAI : public ScriptedAI
{
//*** HANDLED FUNCTION ***
//This is the constructor, called only once when the creature is first created
//This is the constructor, called only once when the Creature is first created
example_creatureAI(Creature *c) : ScriptedAI(c) {Reset();}
//*** CUSTOM VARIABLES ****
@@ -228,7 +228,7 @@ struct TRINITY_DLL_DECL example_creatureAI : public ScriptedAI
};
//This is the GetAI method used by all scripts that involve AI
//It is called every time a new creature using this script is created
//It is called every time a new Creature using this script is created
CreatureAI* GetAI_example_creature(Creature* pCreature)
{
return new example_creatureAI (pCreature);
@@ -197,7 +197,7 @@ bool GossipHello_example_escort(Player* pPlayer, Creature* pCreature)
return true;
}
bool GossipSelect_example_escort(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 uiAction)
bool GossipSelect_example_escort(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
{
npc_escortAI* pEscortAI = CAST_AI(example_escortAI, pCreature->AI());
+21 -21
View File
@@ -51,7 +51,7 @@ enum
SPELL_SUMMON_GHOST_SABER = 5968,
};
bool GOHello_go_cat_figurine(Player* pPlayer, GameObject* _GO)
bool GOHello_go_cat_figurine(Player* pPlayer, GameObject* pGo)
{
pPlayer->CastSpell(pPlayer,SPELL_SUMMON_GHOST_SABER,true);
return false;
@@ -61,12 +61,12 @@ bool GOHello_go_cat_figurine(Player* pPlayer, GameObject* _GO)
## go_crystal_pylons (3x)
######*/
bool GOHello_go_northern_crystal_pylon(Player* pPlayer, GameObject* _GO)
bool GOHello_go_northern_crystal_pylon(Player* pPlayer, GameObject* pGo)
{
if (_GO->GetGoType() == GAMEOBJECT_TYPE_QUESTGIVER)
if (pGo->GetGoType() == GAMEOBJECT_TYPE_QUESTGIVER)
{
pPlayer->PrepareQuestMenu(_GO->GetGUID());
pPlayer->SendPreparedQuest(_GO->GetGUID());
pPlayer->PrepareQuestMenu(pGo->GetGUID());
pPlayer->SendPreparedQuest(pGo->GetGUID());
}
if (pPlayer->GetQuestStatus(4285) == QUEST_STATUS_INCOMPLETE)
@@ -75,12 +75,12 @@ bool GOHello_go_northern_crystal_pylon(Player* pPlayer, GameObject* _GO)
return true;
}
bool GOHello_go_eastern_crystal_pylon(Player* pPlayer, GameObject* _GO)
bool GOHello_go_eastern_crystal_pylon(Player* pPlayer, GameObject* pGo)
{
if (_GO->GetGoType() == GAMEOBJECT_TYPE_QUESTGIVER)
if (pGo->GetGoType() == GAMEOBJECT_TYPE_QUESTGIVER)
{
pPlayer->PrepareQuestMenu(_GO->GetGUID());
pPlayer->SendPreparedQuest(_GO->GetGUID());
pPlayer->PrepareQuestMenu(pGo->GetGUID());
pPlayer->SendPreparedQuest(pGo->GetGUID());
}
if (pPlayer->GetQuestStatus(4287) == QUEST_STATUS_INCOMPLETE)
@@ -89,12 +89,12 @@ bool GOHello_go_eastern_crystal_pylon(Player* pPlayer, GameObject* _GO)
return true;
}
bool GOHello_go_western_crystal_pylon(Player* pPlayer, GameObject* _GO)
bool GOHello_go_western_crystal_pylon(Player* pPlayer, GameObject* pGo)
{
if (_GO->GetGoType() == GAMEOBJECT_TYPE_QUESTGIVER)
if (pGo->GetGoType() == GAMEOBJECT_TYPE_QUESTGIVER)
{
pPlayer->PrepareQuestMenu(_GO->GetGUID());
pPlayer->SendPreparedQuest(_GO->GetGUID());
pPlayer->PrepareQuestMenu(pGo->GetGUID());
pPlayer->SendPreparedQuest(pGo->GetGUID());
}
if (pPlayer->GetQuestStatus(4288) == QUEST_STATUS_INCOMPLETE)
@@ -107,7 +107,7 @@ bool GOHello_go_western_crystal_pylon(Player* pPlayer, GameObject* _GO)
## go_barov_journal
######*/
bool GOHello_go_barov_journal(Player* pPlayer, GameObject* _GO)
bool GOHello_go_barov_journal(Player* pPlayer, GameObject* pGo)
{
if (pPlayer->HasSkill(SKILL_TAILORING) && pPlayer->GetBaseSkillValue(SKILL_TAILORING) >= 280 && !pPlayer->HasSpell(26086))
{
@@ -120,7 +120,7 @@ bool GOHello_go_barov_journal(Player* pPlayer, GameObject* _GO)
## go_field_repair_bot_74A
######*/
bool GOHello_go_field_repair_bot_74A(Player* pPlayer, GameObject* _GO)
bool GOHello_go_field_repair_bot_74A(Player* pPlayer, GameObject* pGo)
{
if (pPlayer->HasSkill(SKILL_ENGINERING) && pPlayer->GetBaseSkillValue(SKILL_ENGINERING) >= 300 && !pPlayer->HasSpell(22704))
{
@@ -153,7 +153,7 @@ bool GOHello_go_gilded_brazier(Player* pPlayer, GameObject* pGO)
## go_orb_of_command
######*/
bool GOHello_go_orb_of_command(Player* pPlayer, GameObject* _GO)
bool GOHello_go_orb_of_command(Player* pPlayer, GameObject* pGo)
{
if (pPlayer->GetQuestRewardStatus(7761))
pPlayer->CastSpell(pPlayer,23460,true);
@@ -165,7 +165,7 @@ bool GOHello_go_orb_of_command(Player* pPlayer, GameObject* _GO)
## go_tablet_of_madness
######*/
bool GOHello_go_tablet_of_madness(Player* pPlayer, GameObject* _GO)
bool GOHello_go_tablet_of_madness(Player* pPlayer, GameObject* pGo)
{
if (pPlayer->HasSkill(SKILL_ALCHEMY) && pPlayer->GetSkillValue(SKILL_ALCHEMY) >= 300 && !pPlayer->HasSpell(24266))
{
@@ -179,9 +179,9 @@ bool GOHello_go_tablet_of_madness(Player* pPlayer, GameObject* _GO)
######*/
//TODO: use gossip option ("Transcript the Tablet") instead, if Trinity adds support.
bool GOHello_go_tablet_of_the_seven(Player* pPlayer, GameObject* _GO)
bool GOHello_go_tablet_of_the_seven(Player* pPlayer, GameObject* pGo)
{
if (_GO->GetGoType() != GAMEOBJECT_TYPE_QUESTGIVER)
if (pGo->GetGoType() != GAMEOBJECT_TYPE_QUESTGIVER)
return true;
if (pPlayer->GetQuestStatus(4296) == QUEST_STATUS_INCOMPLETE)
@@ -194,7 +194,7 @@ bool GOHello_go_tablet_of_the_seven(Player* pPlayer, GameObject* _GO)
## go_jump_a_tron
######*/
bool GOHello_go_jump_a_tron(Player* pPlayer, GameObject* _GO)
bool GOHello_go_jump_a_tron(Player* pPlayer, GameObject* pGo)
{
if (pPlayer->GetQuestStatus(10111) == QUEST_STATUS_INCOMPLETE)
pPlayer->CastSpell(pPlayer,33382,true);
@@ -249,7 +249,7 @@ bool GOHello_go_ethereum_prison(Player* pPlayer, GameObject* pGo)
if (Spell)
pCreature->CastSpell(pPlayer, Spell, false);
else
error_log("TSCR: go_ethereum_prison summoned creature (entry %u) but faction (%u) are not expected by script.", pCreature->GetEntry(), pCreature->getFaction());
error_log("TSCR: go_ethereum_prison summoned Creature (entry %u) but faction (%u) are not expected by script.", pCreature->GetEntry(), pCreature->getFaction());
}
}
}
File diff suppressed because it is too large Load Diff
@@ -81,9 +81,9 @@ bool GossipHello_npc_innkeeper(Player* pPlayer, Creature* pCreature)
return true;
}
bool GossipSelect_npc_innkeeper(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action)
bool GossipSelect_npc_innkeeper(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
{
if (action == GOSSIP_ACTION_INFO_DEF+HALLOWEEN_EVENTID && isEventActive() && !pPlayer->GetAura(SPELL_TRICK_OR_TREATED, pPlayer->GetGUID()))
if (uiAction == GOSSIP_ACTION_INFO_DEF+HALLOWEEN_EVENTID && isEventActive() && !pPlayer->GetAura(SPELL_TRICK_OR_TREATED, pPlayer->GetGUID()))
{
pPlayer->CLOSE_GOSSIP_MENU();
pPlayer->CastSpell(pPlayer, SPELL_TRICK_OR_TREATED, true);
@@ -393,9 +393,9 @@ bool GossipHello_npc_prof_alchemy(Player* pPlayer, Creature* pCreature)
return true;
}
void SendActionMenu_npc_prof_alchemy(Player* pPlayer, Creature* pCreature, uint32 action)
void SendActionMenu_npc_prof_alchemy(Player* pPlayer, Creature* pCreature, uint32 uiAction)
{
switch(action)
switch(uiAction)
{
case GOSSIP_ACTION_TRADE:
pPlayer->SEND_VENDORLIST(pCreature->GetGUID());
@@ -462,25 +462,25 @@ void SendActionMenu_npc_prof_alchemy(Player* pPlayer, Creature* pCreature, uint3
}
}
void SendConfirmLearn_npc_prof_alchemy(Player* pPlayer, Creature* pCreature, uint32 action)
void SendConfirmLearn_npc_prof_alchemy(Player* pPlayer, Creature* pCreature, uint32 uiAction)
{
if (action)
if (uiAction)
{
uint32 eCreature = pCreature->GetEntry();
switch(eCreature)
{
case 22427:
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LEARN_TRANSMUTE, GOSSIP_SENDER_CHECK, action);
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LEARN_TRANSMUTE, GOSSIP_SENDER_CHECK, uiAction);
//unknown textID ()
pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID());
break;
case 19052:
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LEARN_ELIXIR, GOSSIP_SENDER_CHECK, action);
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LEARN_ELIXIR, GOSSIP_SENDER_CHECK, uiAction);
//unknown textID ()
pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID());
break;
case 17909:
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LEARN_POTION, GOSSIP_SENDER_CHECK, action);
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LEARN_POTION, GOSSIP_SENDER_CHECK, uiAction);
//unknown textID ()
pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID());
break;
@@ -488,25 +488,25 @@ void SendConfirmLearn_npc_prof_alchemy(Player* pPlayer, Creature* pCreature, uin
}
}
void SendConfirmUnlearn_npc_prof_alchemy(Player* pPlayer, Creature* pCreature, uint32 action)
void SendConfirmUnlearn_npc_prof_alchemy(Player* pPlayer, Creature* pCreature, uint32 uiAction)
{
if (action)
if (uiAction)
{
uint32 eCreature = pCreature->GetEntry();
switch(eCreature)
{
case 22427: //Zarevhi
pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_TRANSMUTE, GOSSIP_SENDER_CHECK, action, BOX_UNLEARN_ALCHEMY_SPEC, DoHighUnlearnCost(pPlayer),false);
pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_TRANSMUTE, GOSSIP_SENDER_CHECK, uiAction, BOX_UNLEARN_ALCHEMY_SPEC, DoHighUnlearnCost(pPlayer),false);
//unknown textID ()
pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID());
break;
case 19052: //Lorokeem
pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_ELIXIR, GOSSIP_SENDER_CHECK, action, BOX_UNLEARN_ALCHEMY_SPEC, DoHighUnlearnCost(pPlayer),false);
pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_ELIXIR, GOSSIP_SENDER_CHECK, uiAction, BOX_UNLEARN_ALCHEMY_SPEC, DoHighUnlearnCost(pPlayer),false);
//unknown textID ()
pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID());
break;
case 17909: //Lauranna Thar'well
pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_POTION, GOSSIP_SENDER_CHECK, action, BOX_UNLEARN_ALCHEMY_SPEC, DoHighUnlearnCost(pPlayer),false);
pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_POTION, GOSSIP_SENDER_CHECK, uiAction, BOX_UNLEARN_ALCHEMY_SPEC, DoHighUnlearnCost(pPlayer),false);
//unknown textID ()
pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID());
break;
@@ -514,14 +514,14 @@ void SendConfirmUnlearn_npc_prof_alchemy(Player* pPlayer, Creature* pCreature, u
}
}
bool GossipSelect_npc_prof_alchemy(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action)
bool GossipSelect_npc_prof_alchemy(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
{
switch(sender)
switch(uiSender)
{
case GOSSIP_SENDER_MAIN: SendActionMenu_npc_prof_alchemy(pPlayer, pCreature, action); break;
case GOSSIP_SENDER_LEARN: SendConfirmLearn_npc_prof_alchemy(pPlayer, pCreature, action); break;
case GOSSIP_SENDER_UNLEARN: SendConfirmUnlearn_npc_prof_alchemy(pPlayer, pCreature, action); break;
case GOSSIP_SENDER_CHECK: SendActionMenu_npc_prof_alchemy(pPlayer, pCreature, action); break;
case GOSSIP_SENDER_MAIN: SendActionMenu_npc_prof_alchemy(pPlayer, pCreature, uiAction); break;
case GOSSIP_SENDER_LEARN: SendConfirmLearn_npc_prof_alchemy(pPlayer, pCreature, uiAction); break;
case GOSSIP_SENDER_UNLEARN: SendConfirmUnlearn_npc_prof_alchemy(pPlayer, pCreature, uiAction); break;
case GOSSIP_SENDER_CHECK: SendActionMenu_npc_prof_alchemy(pPlayer, pCreature, uiAction); break;
}
return true;
}
@@ -601,9 +601,9 @@ bool GossipHello_npc_prof_blacksmith(Player* pPlayer, Creature* pCreature)
return true;
}
void SendActionMenu_npc_prof_blacksmith(Player* pPlayer, Creature* pCreature, uint32 action)
void SendActionMenu_npc_prof_blacksmith(Player* pPlayer, Creature* pCreature, uint32 uiAction)
{
switch(action)
switch(uiAction)
{
case GOSSIP_ACTION_TRADE:
pPlayer->SEND_VENDORLIST(pCreature->GetGUID());
@@ -727,25 +727,25 @@ void SendActionMenu_npc_prof_blacksmith(Player* pPlayer, Creature* pCreature, ui
}
}
void SendConfirmLearn_npc_prof_blacksmith(Player* pPlayer, Creature* pCreature, uint32 action)
void SendConfirmLearn_npc_prof_blacksmith(Player* pPlayer, Creature* pCreature, uint32 uiAction)
{
if (action)
if (uiAction)
{
uint32 eCreature = pCreature->GetEntry();
switch(eCreature)
{
case 11191:
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LEARN_HAMMER, GOSSIP_SENDER_CHECK, action);
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LEARN_HAMMER, GOSSIP_SENDER_CHECK, uiAction);
//unknown textID (TALK_HAMMER_LEARN)
pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID());
break;
case 11192:
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LEARN_AXE, GOSSIP_SENDER_CHECK, action);
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LEARN_AXE, GOSSIP_SENDER_CHECK, uiAction);
//unknown textID (TALK_AXE_LEARN)
pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID());
break;
case 11193:
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LEARN_SWORD, GOSSIP_SENDER_CHECK, action);
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LEARN_SWORD, GOSSIP_SENDER_CHECK, uiAction);
//unknown textID (TALK_SWORD_LEARN)
pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID());
break;
@@ -753,9 +753,9 @@ void SendConfirmLearn_npc_prof_blacksmith(Player* pPlayer, Creature* pCreature,
}
}
void SendConfirmUnlearn_npc_prof_blacksmith(Player* pPlayer, Creature* pCreature, uint32 action)
void SendConfirmUnlearn_npc_prof_blacksmith(Player* pPlayer, Creature* pCreature, uint32 uiAction)
{
if (action)
if (uiAction)
{
uint32 eCreature = pCreature->GetEntry();
switch(eCreature)
@@ -764,23 +764,23 @@ void SendConfirmUnlearn_npc_prof_blacksmith(Player* pPlayer, Creature* pCreature
case 11178: //Borgosh Corebender
case 5164: //Grumnus Steelshaper
case 11177: //Okothos Ironrager
pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_SMITH_SPEC, GOSSIP_SENDER_CHECK, action, BOX_UNLEARN_ARMORORWEAPON, DoLowUnlearnCost(pPlayer),false);
pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_SMITH_SPEC, GOSSIP_SENDER_CHECK, uiAction, BOX_UNLEARN_ARMORORWEAPON, DoLowUnlearnCost(pPlayer),false);
//unknown textID (TALK_UNLEARN_AXEORWEAPON)
pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID());
break;
case 11191:
pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_HAMMER, GOSSIP_SENDER_CHECK, action, BOX_UNLEARN_WEAPON_SPEC, DoMedUnlearnCost(pPlayer),false);
pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_HAMMER, GOSSIP_SENDER_CHECK, uiAction, BOX_UNLEARN_WEAPON_SPEC, DoMedUnlearnCost(pPlayer),false);
//unknown textID (TALK_HAMMER_UNLEARN)
pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID());
break;
case 11192:
pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_AXE, GOSSIP_SENDER_CHECK, action, BOX_UNLEARN_WEAPON_SPEC, DoMedUnlearnCost(pPlayer),false);
pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_AXE, GOSSIP_SENDER_CHECK, uiAction, BOX_UNLEARN_WEAPON_SPEC, DoMedUnlearnCost(pPlayer),false);
//unknown textID (TALK_AXE_UNLEARN)
pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID());
break;
case 11193:
pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_SWORD, GOSSIP_SENDER_CHECK, action, BOX_UNLEARN_WEAPON_SPEC, DoMedUnlearnCost(pPlayer),false);
pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_SWORD, GOSSIP_SENDER_CHECK, uiAction, BOX_UNLEARN_WEAPON_SPEC, DoMedUnlearnCost(pPlayer),false);
//unknown textID (TALK_SWORD_UNLEARN)
pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID());
break;
@@ -788,14 +788,14 @@ void SendConfirmUnlearn_npc_prof_blacksmith(Player* pPlayer, Creature* pCreature
}
}
bool GossipSelect_npc_prof_blacksmith(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action)
bool GossipSelect_npc_prof_blacksmith(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
{
switch(sender)
switch(uiSender)
{
case GOSSIP_SENDER_MAIN: SendActionMenu_npc_prof_blacksmith(pPlayer, pCreature, action); break;
case GOSSIP_SENDER_LEARN: SendConfirmLearn_npc_prof_blacksmith(pPlayer, pCreature, action); break;
case GOSSIP_SENDER_UNLEARN: SendConfirmUnlearn_npc_prof_blacksmith(pPlayer, pCreature, action); break;
case GOSSIP_SENDER_CHECK: SendActionMenu_npc_prof_blacksmith(pPlayer, pCreature, action); break;
case GOSSIP_SENDER_MAIN: SendActionMenu_npc_prof_blacksmith(pPlayer, pCreature, uiAction); break;
case GOSSIP_SENDER_LEARN: SendConfirmLearn_npc_prof_blacksmith(pPlayer, pCreature, uiAction); break;
case GOSSIP_SENDER_UNLEARN: SendConfirmUnlearn_npc_prof_blacksmith(pPlayer, pCreature, uiAction); break;
case GOSSIP_SENDER_CHECK: SendActionMenu_npc_prof_blacksmith(pPlayer, pCreature, uiAction); break;
}
return true;
}
@@ -916,15 +916,15 @@ bool GossipHello_npc_engineering_tele_trinket(Player* pPlayer, Creature* pCreatu
return true;
}
bool GossipSelect_npc_engineering_tele_trinket(Player* pPlayer, Creature* pCreature, uint32 Sender, uint32 Action)
bool GossipSelect_npc_engineering_tele_trinket(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
{
if (Action == GOSSIP_ACTION_INFO_DEF+1)
if (uiAction == GOSSIP_ACTION_INFO_DEF+1)
pPlayer->CLOSE_GOSSIP_MENU();
if (Sender != pCreature->GetEntry())
if (uiSender != pCreature->GetEntry())
return true;
switch(Sender)
switch(uiSender)
{
case NPC_ZAP:
pPlayer->CastSpell(pPlayer, SPELL_LEARN_TO_EVERLOOK, false);
@@ -984,9 +984,9 @@ bool GossipHello_npc_prof_leather(Player* pPlayer, Creature* pCreature)
return true;
}
void SendActionMenu_npc_prof_leather(Player* pPlayer, Creature* pCreature, uint32 action)
void SendActionMenu_npc_prof_leather(Player* pPlayer, Creature* pCreature, uint32 uiAction)
{
switch(action)
switch(uiAction)
{
case GOSSIP_ACTION_TRADE:
pPlayer->SEND_VENDORLIST(pCreature->GetGUID());
@@ -1040,28 +1040,28 @@ void SendActionMenu_npc_prof_leather(Player* pPlayer, Creature* pCreature, uint3
}
}
void SendConfirmUnlearn_npc_prof_leather(Player* pPlayer, Creature* pCreature, uint32 action)
void SendConfirmUnlearn_npc_prof_leather(Player* pPlayer, Creature* pCreature, uint32 uiAction)
{
if (action)
if (uiAction)
{
uint32 eCreature = pCreature->GetEntry();
switch(eCreature)
{
case 7866: //Peter Galen
case 7867: //Thorkaf Dragoneye
pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_DRAGON, GOSSIP_SENDER_CHECK, action, BOX_UNLEARN_LEATHER_SPEC, DoMedUnlearnCost(pPlayer),false);
pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_DRAGON, GOSSIP_SENDER_CHECK, uiAction, BOX_UNLEARN_LEATHER_SPEC, DoMedUnlearnCost(pPlayer),false);
//unknown textID ()
pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID());
break;
case 7868: //Sarah Tanner
case 7869: //Brumn Winterhoof
pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_ELEMENTAL, GOSSIP_SENDER_CHECK, action, BOX_UNLEARN_LEATHER_SPEC, DoMedUnlearnCost(pPlayer),false);
pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_ELEMENTAL, GOSSIP_SENDER_CHECK, uiAction, BOX_UNLEARN_LEATHER_SPEC, DoMedUnlearnCost(pPlayer),false);
//unknown textID ()
pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID());
break;
case 7870: //Caryssia Moonhunter
case 7871: //Se'Jib
pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_TRIBAL, GOSSIP_SENDER_CHECK, action, BOX_UNLEARN_LEATHER_SPEC, DoMedUnlearnCost(pPlayer),false);
pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_TRIBAL, GOSSIP_SENDER_CHECK, uiAction, BOX_UNLEARN_LEATHER_SPEC, DoMedUnlearnCost(pPlayer),false);
//unknown textID ()
pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID());
break;
@@ -1069,13 +1069,13 @@ void SendConfirmUnlearn_npc_prof_leather(Player* pPlayer, Creature* pCreature, u
}
}
bool GossipSelect_npc_prof_leather(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action)
bool GossipSelect_npc_prof_leather(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
{
switch(sender)
switch(uiSender)
{
case GOSSIP_SENDER_MAIN: SendActionMenu_npc_prof_leather(pPlayer, pCreature, action); break;
case GOSSIP_SENDER_UNLEARN: SendConfirmUnlearn_npc_prof_leather(pPlayer, pCreature, action); break;
case GOSSIP_SENDER_CHECK: SendActionMenu_npc_prof_leather(pPlayer, pCreature, action); break;
case GOSSIP_SENDER_MAIN: SendActionMenu_npc_prof_leather(pPlayer, pCreature, uiAction); break;
case GOSSIP_SENDER_UNLEARN: SendConfirmUnlearn_npc_prof_leather(pPlayer, pCreature, uiAction); break;
case GOSSIP_SENDER_CHECK: SendActionMenu_npc_prof_leather(pPlayer, pCreature, uiAction); break;
}
return true;
}
@@ -1134,9 +1134,9 @@ bool GossipHello_npc_prof_tailor(Player* pPlayer, Creature* pCreature)
return true;
}
void SendActionMenu_npc_prof_tailor(Player* pPlayer, Creature* pCreature, uint32 action)
void SendActionMenu_npc_prof_tailor(Player* pPlayer, Creature* pCreature, uint32 uiAction)
{
switch(action)
switch(uiAction)
{
case GOSSIP_ACTION_TRADE:
pPlayer->SEND_VENDORLIST(pCreature->GetGUID());
@@ -1218,25 +1218,25 @@ void SendActionMenu_npc_prof_tailor(Player* pPlayer, Creature* pCreature, uint32
}
}
void SendConfirmLearn_npc_prof_tailor(Player* pPlayer, Creature* pCreature, uint32 action)
void SendConfirmLearn_npc_prof_tailor(Player* pPlayer, Creature* pCreature, uint32 uiAction)
{
if (action)
if (uiAction)
{
uint32 eCreature = pCreature->GetEntry();
switch(eCreature)
{
case 22213:
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LEARN_SPELLFIRE, GOSSIP_SENDER_CHECK, action);
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LEARN_SPELLFIRE, GOSSIP_SENDER_CHECK, uiAction);
//unknown textID ()
pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID());
break;
case 22208:
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LEARN_MOONCLOTH, GOSSIP_SENDER_CHECK, action);
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LEARN_MOONCLOTH, GOSSIP_SENDER_CHECK, uiAction);
//unknown textID ()
pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID());
break;
case 22212:
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LEARN_SHADOWEAVE, GOSSIP_SENDER_CHECK, action);
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LEARN_SHADOWEAVE, GOSSIP_SENDER_CHECK, uiAction);
//unknown textID ()
pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID());
break;
@@ -1244,25 +1244,25 @@ void SendConfirmLearn_npc_prof_tailor(Player* pPlayer, Creature* pCreature, uint
}
}
void SendConfirmUnlearn_npc_prof_tailor(Player* pPlayer, Creature* pCreature, uint32 action)
void SendConfirmUnlearn_npc_prof_tailor(Player* pPlayer, Creature* pCreature, uint32 uiAction)
{
if (action)
if (uiAction)
{
uint32 eCreature = pCreature->GetEntry();
switch(eCreature)
{
case 22213: //Gidge Spellweaver
pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_SPELLFIRE, GOSSIP_SENDER_CHECK, action, BOX_UNLEARN_TAILOR_SPEC, DoHighUnlearnCost(pPlayer),false);
pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_SPELLFIRE, GOSSIP_SENDER_CHECK, uiAction, BOX_UNLEARN_TAILOR_SPEC, DoHighUnlearnCost(pPlayer),false);
//unknown textID ()
pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID());
break;
case 22208: //Nasmara Moonsong
pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_MOONCLOTH, GOSSIP_SENDER_CHECK, action, BOX_UNLEARN_TAILOR_SPEC, DoHighUnlearnCost(pPlayer),false);
pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_MOONCLOTH, GOSSIP_SENDER_CHECK, uiAction, BOX_UNLEARN_TAILOR_SPEC, DoHighUnlearnCost(pPlayer),false);
//unknown textID ()
pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID());
break;
case 22212: //Andrion Darkspinner
pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_SHADOWEAVE, GOSSIP_SENDER_CHECK, action,BOX_UNLEARN_TAILOR_SPEC, DoHighUnlearnCost(pPlayer),false);
pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_SHADOWEAVE, GOSSIP_SENDER_CHECK, uiAction,BOX_UNLEARN_TAILOR_SPEC, DoHighUnlearnCost(pPlayer),false);
//unknown textID ()
pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID());
break;
@@ -1270,14 +1270,14 @@ void SendConfirmUnlearn_npc_prof_tailor(Player* pPlayer, Creature* pCreature, ui
}
}
bool GossipSelect_npc_prof_tailor(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action)
bool GossipSelect_npc_prof_tailor(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
{
switch(sender)
switch(uiSender)
{
case GOSSIP_SENDER_MAIN: SendActionMenu_npc_prof_tailor(pPlayer, pCreature, action); break;
case GOSSIP_SENDER_LEARN: SendConfirmLearn_npc_prof_tailor(pPlayer, pCreature, action); break;
case GOSSIP_SENDER_UNLEARN: SendConfirmUnlearn_npc_prof_tailor(pPlayer, pCreature, action); break;
case GOSSIP_SENDER_CHECK: SendActionMenu_npc_prof_tailor(pPlayer, pCreature, action); break;
case GOSSIP_SENDER_MAIN: SendActionMenu_npc_prof_tailor(pPlayer, pCreature, uiAction); break;
case GOSSIP_SENDER_LEARN: SendConfirmLearn_npc_prof_tailor(pPlayer, pCreature, uiAction); break;
case GOSSIP_SENDER_UNLEARN: SendConfirmUnlearn_npc_prof_tailor(pPlayer, pCreature, uiAction); break;
case GOSSIP_SENDER_CHECK: SendActionMenu_npc_prof_tailor(pPlayer, pCreature, uiAction); break;
}
return true;
}
@@ -1286,11 +1286,11 @@ bool GossipSelect_npc_prof_tailor(Player* pPlayer, Creature* pCreature, uint32 s
# start menues for GO (engineering and leatherworking)
###*/
/*bool GOHello_go_soothsaying_for_dummies(Player* pPlayer, GameObject* _GO)
/*bool GOHello_go_soothsaying_for_dummies(Player* pPlayer, GameObject* pGo)
{
pPlayer->PlayerTalkClass->GetGossipMenu()->AddMenuItem(0,GOSSIP_LEARN_DRAGON, GOSSIP_SENDER_INFO, GOSSIP_ACTION_INFO_DEF, "", 0);
pPlayer->SEND_GOSSIP_MENU(5584, _GO->GetGUID());
pPlayer->SEND_GOSSIP_MENU(5584, pGo->GetGUID());
return true;
}*/
@@ -81,7 +81,7 @@ bool GossipHello_npc_taxi(Player* pPlayer, Creature* pCreature)
break;
case 25059: // Isle of Quel'Danas - Ayren Cloudbreaker
if (pPlayer->GetQuestStatus(11532) == QUEST_STATUS_INCOMPLETE || pPlayer->GetQuestStatus(11533) == QUEST_STATUS_INCOMPLETE)
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Speaking of action, I've been ordered to undertake an air strike.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 12);
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Speaking of uiAction, I've been ordered to undertake an air strike.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 12);
if (pPlayer->GetQuestStatus(11542) == QUEST_STATUS_INCOMPLETE || pPlayer->GetQuestStatus(11543) == QUEST_STATUS_INCOMPLETE)
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "I need to intercept the Dawnblade reinforcements.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 13);
@@ -133,9 +133,9 @@ bool GossipHello_npc_taxi(Player* pPlayer, Creature* pCreature)
return true;
}
bool GossipSelect_npc_taxi(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action)
bool GossipSelect_npc_taxi(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
{
switch(action) {
switch(uiAction) {
case GOSSIP_ACTION_INFO_DEF:
//spellId is correct, however it gives flight a somewhat funny effect //TaxiPath 506.
pPlayer->CLOSE_GOSSIP_MENU();
@@ -47,7 +47,7 @@ EndContentData */
enum SpawnType
{
SPAWNTYPE_TRIPWIRE_ROOFTOP, // no warning, summon creature at smaller range
SPAWNTYPE_TRIPWIRE_ROOFTOP, // no warning, summon Creature at smaller range
SPAWNTYPE_ALARMBOT, // cast guards mark and summon npc - if player shows up with that buff duration < 5 seconds attack
};
@@ -145,7 +145,7 @@ struct TRINITY_DLL_DECL npc_air_force_botsAI : public ScriptedAI
m_uiSpawnedGUID = pSummoned->GetGUID();
else
{
error_db_log("TCSR: npc_air_force_bots: wasn't able to spawn creature %u", m_pSpawnAssoc->m_uiSpawnedCreatureEntry);
error_db_log("TCSR: npc_air_force_bots: wasn't able to spawn Creature %u", m_pSpawnAssoc->m_uiSpawnedCreatureEntry);
m_pSpawnAssoc = NULL;
}
@@ -783,10 +783,10 @@ void npc_doctorAI::UpdateAI(const uint32 diff)
}
}
bool QuestAccept_npc_doctor(Player* pPlayer, Creature *creature, Quest const *quest)
bool QuestAccept_npc_doctor(Player* pPlayer, Creature* pCreature, Quest const *quest)
{
if ((quest->GetQuestId() == 6624) || (quest->GetQuestId() == 6622))
CAST_AI(npc_doctorAI, creature->AI())->BeginEvent(pPlayer);
CAST_AI(npc_doctorAI, pCreature->AI())->BeginEvent(pPlayer);
return true;
}
@@ -1167,9 +1167,9 @@ bool GossipHello_npc_mount_vendor(Player* pPlayer, Creature* pCreature)
return true;
}
bool GossipSelect_npc_mount_vendor(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action)
bool GossipSelect_npc_mount_vendor(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
{
if (action == GOSSIP_ACTION_TRADE)
if (uiAction == GOSSIP_ACTION_TRADE)
pPlayer->SEND_VENDORLIST(pCreature->GetGUID());
return true;
@@ -1200,9 +1200,9 @@ bool GossipHello_npc_rogue_trainer(Player* pPlayer, Creature* pCreature)
return true;
}
bool GossipSelect_npc_rogue_trainer(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action)
bool GossipSelect_npc_rogue_trainer(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
{
switch(action)
switch(uiAction)
{
case GOSSIP_ACTION_INFO_DEF+1:
pPlayer->CLOSE_GOSSIP_MENU();
@@ -1256,9 +1256,9 @@ bool GossipHello_npc_sayge(Player* pPlayer, Creature* pCreature)
return true;
}
void SendAction_npc_sayge(Player* pPlayer, Creature* pCreature, uint32 action)
void SendAction_npc_sayge(Player* pPlayer, Creature* pCreature, uint32 uiAction)
{
switch(action)
switch(uiAction)
{
case GOSSIP_ACTION_INFO_DEF+1:
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Slay the Man", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
@@ -1302,52 +1302,52 @@ void SendAction_npc_sayge(Player* pPlayer, Creature* pCreature, uint32 action)
}
}
bool GossipSelect_npc_sayge(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action)
bool GossipSelect_npc_sayge(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
{
switch(sender)
switch(uiSender)
{
case GOSSIP_SENDER_MAIN:
SendAction_npc_sayge(pPlayer, pCreature, action);
SendAction_npc_sayge(pPlayer, pCreature, uiAction);
break;
case GOSSIP_SENDER_MAIN+1:
pCreature->CastSpell(pPlayer, SPELL_DMG, false);
pPlayer->AddSpellCooldown(SPELL_DMG,0,time(NULL) + 7200);
SendAction_npc_sayge(pPlayer, pCreature, action);
SendAction_npc_sayge(pPlayer, pCreature, uiAction);
break;
case GOSSIP_SENDER_MAIN+2:
pCreature->CastSpell(pPlayer, SPELL_RES, false);
pPlayer->AddSpellCooldown(SPELL_RES,0,time(NULL) + 7200);
SendAction_npc_sayge(pPlayer, pCreature, action);
SendAction_npc_sayge(pPlayer, pCreature, uiAction);
break;
case GOSSIP_SENDER_MAIN+3:
pCreature->CastSpell(pPlayer, SPELL_ARM, false);
pPlayer->AddSpellCooldown(SPELL_ARM,0,time(NULL) + 7200);
SendAction_npc_sayge(pPlayer, pCreature, action);
SendAction_npc_sayge(pPlayer, pCreature, uiAction);
break;
case GOSSIP_SENDER_MAIN+4:
pCreature->CastSpell(pPlayer, SPELL_SPI, false);
pPlayer->AddSpellCooldown(SPELL_SPI,0,time(NULL) + 7200);
SendAction_npc_sayge(pPlayer, pCreature, action);
SendAction_npc_sayge(pPlayer, pCreature, uiAction);
break;
case GOSSIP_SENDER_MAIN+5:
pCreature->CastSpell(pPlayer, SPELL_INT, false);
pPlayer->AddSpellCooldown(SPELL_INT,0,time(NULL) + 7200);
SendAction_npc_sayge(pPlayer, pCreature, action);
SendAction_npc_sayge(pPlayer, pCreature, uiAction);
break;
case GOSSIP_SENDER_MAIN+6:
pCreature->CastSpell(pPlayer, SPELL_STM, false);
pPlayer->AddSpellCooldown(SPELL_STM,0,time(NULL) + 7200);
SendAction_npc_sayge(pPlayer, pCreature, action);
SendAction_npc_sayge(pPlayer, pCreature, uiAction);
break;
case GOSSIP_SENDER_MAIN+7:
pCreature->CastSpell(pPlayer, SPELL_STR, false);
pPlayer->AddSpellCooldown(SPELL_STR,0,time(NULL) + 7200);
SendAction_npc_sayge(pPlayer, pCreature, action);
SendAction_npc_sayge(pPlayer, pCreature, uiAction);
break;
case GOSSIP_SENDER_MAIN+8:
pCreature->CastSpell(pPlayer, SPELL_AGI, false);
pPlayer->AddSpellCooldown(SPELL_AGI,0,time(NULL) + 7200);
SendAction_npc_sayge(pPlayer, pCreature, action);
SendAction_npc_sayge(pPlayer, pCreature, uiAction);
break;
}
return true;
@@ -1663,7 +1663,7 @@ struct TRINITY_DLL_DECL npc_mirror_image : SpellCasterAI
owner->CastSpell(me, 45204, false);
}
// Do not reload creature templates on evade mode enter - prevent visual lost
// Do not reload Creature templates on evade mode enter - prevent visual lost
void EnterEvadeMode()
{
if (me->IsInEvadeMode() || !me->isAlive())
@@ -69,15 +69,15 @@ struct TRINITY_DLL_DECL instance_ahnkahet : public ScriptedInstance
}
void OnCreatureCreate(Creature *creature, bool add)
void OnCreatureCreate(Creature* pCreature, bool add)
{
switch(creature->GetEntry())
switch(pCreature->GetEntry())
{
case 29309: Elder_Nadox = creature->GetGUID(); break;
case 29308: Prince_Taldaram = creature->GetGUID(); break;
case 29310: Jedoga_Shadowseeker = creature->GetGUID(); break;
case 29311: Herald_Volazj = creature->GetGUID(); break;
case 30258: Amanitar = creature->GetGUID(); break;
case 29309: Elder_Nadox = pCreature->GetGUID(); break;
case 29308: Prince_Taldaram = pCreature->GetGUID(); break;
case 29310: Jedoga_Shadowseeker = pCreature->GetGUID(); break;
case 29311: Herald_Volazj = pCreature->GetGUID(); break;
case 30258: Amanitar = pCreature->GetGUID(); break;
}
}
@@ -62,13 +62,13 @@ struct TRINITY_DLL_DECL instance_azjol_nerub : public ScriptedInstance
}
void OnCreatureCreate(Creature *creature, bool add)
void OnCreatureCreate(Creature* pCreature, bool add)
{
switch(creature->GetEntry())
switch(pCreature->GetEntry())
{
case 28684: m_uiKrikthir = creature->GetGUID(); break;
case 28921: m_uiHadronox = creature->GetGUID(); break;
case 29120: m_uiAnubarak = creature->GetGUID(); break;
case 28684: m_uiKrikthir = pCreature->GetGUID(); break;
case 28921: m_uiHadronox = pCreature->GetGUID(); break;
case 29120: m_uiAnubarak = pCreature->GetGUID(); break;
}
}
@@ -65,7 +65,7 @@ struct TRINITY_DLL_DECL mobs_spitelashesAI : public ScriptedAI
void UpdateAI(const uint32 diff)
{
// we mustn't remove the creature in the same round in which we cast the summon spell, otherwise there will be no summons
// we mustn't remove the Creature in the same round in which we cast the summon spell, otherwise there will be no summons
if (spellhit && morphtimer>=5000)
{
m_creature->ForcedDespawn();
@@ -113,9 +113,9 @@ bool GossipHello_npc_loramus_thalipedes(Player* pPlayer, Creature* pCreature)
return true;
}
bool GossipSelect_npc_loramus_thalipedes(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action)
bool GossipSelect_npc_loramus_thalipedes(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
{
switch (action)
switch (uiAction)
{
case GOSSIP_ACTION_INFO_DEF+1:
pPlayer->CLOSE_GOSSIP_MENU();
@@ -403,9 +403,9 @@ bool GossipHello_mob_rizzle_sprysprocket(Player* pPlayer, Creature* pCreature)
return true;
}
bool GossipSelect_mob_rizzle_sprysprocket(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action)
bool GossipSelect_mob_rizzle_sprysprocket(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
{
if (action == GOSSIP_ACTION_INFO_DEF + 1 && pPlayer->GetQuestStatus(10994) == QUEST_STATUS_INCOMPLETE)
if (uiAction == GOSSIP_ACTION_INFO_DEF + 1 && pPlayer->GetQuestStatus(10994) == QUEST_STATUS_INCOMPLETE)
{
pPlayer->CLOSE_GOSSIP_MENU();
pCreature->CastSpell(pPlayer, SPELL_GIVE_SOUTHFURY_MOONSTONE, true);
@@ -267,9 +267,9 @@ bool GossipHello_npc_engineer_spark_overgrind(Player* pPlayer, Creature* pCreatu
return true;
}
bool GossipSelect_npc_engineer_spark_overgrind(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action)
bool GossipSelect_npc_engineer_spark_overgrind(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
{
if (action == GOSSIP_ACTION_INFO_DEF)
if (uiAction == GOSSIP_ACTION_INFO_DEF)
{
pPlayer->CLOSE_GOSSIP_MENU();
pCreature->setFaction(FACTION_HOSTILE);
@@ -580,7 +580,7 @@ bool EffectDummyCreature_npc_nestlewood_owlkin(Unit *pCaster, uint32 spellId, ui
pCreatureTarget->UpdateEntry(ENTRY_OWLKIN_INOC);
//set despawn timer, since we want to remove creature after a short time
//set despawn timer, since we want to remove Creature after a short time
CAST_AI(npc_nestlewood_owlkinAI, pCreatureTarget->AI())->DespawnTimer = 15000;
//always return true when we are handling this spell and effect
@@ -53,9 +53,9 @@ bool GossipHello_npc_beaten_corpse(Player* pPlayer, Creature* pCreature)
return true;
}
bool GossipSelect_npc_beaten_corpse(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action)
bool GossipSelect_npc_beaten_corpse(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
{
if (action == GOSSIP_ACTION_INFO_DEF +1)
if (uiAction == GOSSIP_ACTION_INFO_DEF +1)
{
pPlayer->SEND_GOSSIP_MENU(3558, pCreature->GetGUID());
pPlayer->TalkedToCreature(pCreature->GetEntry(), pCreature->GetGUID());
@@ -186,9 +186,9 @@ bool GossipHello_npc_sputtervalve(Player* pPlayer, Creature* pCreature)
return true;
}
bool GossipSelect_npc_sputtervalve(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action)
bool GossipSelect_npc_sputtervalve(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
{
if (action == GOSSIP_ACTION_INFO_DEF)
if (uiAction == GOSSIP_ACTION_INFO_DEF)
{
pPlayer->SEND_GOSSIP_MENU(2013, pCreature->GetGUID());
pPlayer->AreaExploredOrEventHappens(6981);
@@ -46,9 +46,9 @@ bool GossipHello_npc_spirit_of_olum(Player* pPlayer, Creature* pCreature)
return true;
}
bool GossipSelect_npc_spirit_of_olum(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action)
bool GossipSelect_npc_spirit_of_olum(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
{
if (action == GOSSIP_ACTION_INFO_DEF + 1)
if (uiAction == GOSSIP_ACTION_INFO_DEF + 1)
pPlayer->CLOSE_GOSSIP_MENU();
pPlayer->InterruptNonMeleeSpells(false);
@@ -243,7 +243,7 @@ struct Yells
{
uint32 sound;
char* text;
uint32 creature, timer, emote;
uint32 pCreature, timer, emote;
bool Talk;
};
@@ -514,22 +514,22 @@ struct TRINITY_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI
{
Timer[EVENT_TALK_SEQUENCE] = Conversation[count].timer;
Creature* creature = NULL;
if (Conversation[count].creature == ILLIDAN_STORMRAGE)
creature = m_creature;
else if (Conversation[count].creature == AKAMA)
creature = (Unit::GetCreature((*m_creature), AkamaGUID));
else if (Conversation[count].creature == MAIEV_SHADOWSONG)
creature = (Unit::GetCreature((*m_creature), MaievGUID));
Creature* pCreature = NULL;
if (Conversation[count].pCreature == ILLIDAN_STORMRAGE)
pCreature = m_creature;
else if (Conversation[count].pCreature == AKAMA)
pCreature = (Unit::GetCreature((*m_creature), AkamaGUID));
else if (Conversation[count].pCreature == MAIEV_SHADOWSONG)
pCreature = (Unit::GetCreature((*m_creature), MaievGUID));
if (creature)
if (pCreature)
{
if (Conversation[count].emote)
creature->HandleEmoteCommand(Conversation[count].emote); // Make the creature do some animation!
pCreature->HandleEmoteCommand(Conversation[count].emote); // Make the Creature do some animation!
if (Conversation[count].text)
creature->MonsterYell(Conversation[count].text, LANG_UNIVERSAL, 0); // Have the creature yell out some text
pCreature->MonsterYell(Conversation[count].text, LANG_UNIVERSAL, 0); // Have the Creature yell out some text
if (Conversation[count].sound)
DoPlaySoundToSet(creature, Conversation[count].sound); // Play some sound on the creature
DoPlaySoundToSet(pCreature, Conversation[count].sound); // Play some sound on the creature
}
}
@@ -1568,9 +1568,9 @@ struct TRINITY_DLL_DECL boss_maievAI : public ScriptedAI
};
bool GossipSelect_npc_akama_at_illidan(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action)
bool GossipSelect_npc_akama_at_illidan(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
{
if (action == GOSSIP_ACTION_INFO_DEF) // Time to begin the Event
if (uiAction == GOSSIP_ACTION_INFO_DEF) // Time to begin the Event
{
pPlayer->CLOSE_GOSSIP_MENU();
CAST_AI(npc_akama_illidanAI, pCreature->AI())->EnterPhase(PHASE_CHANNEL);
@@ -1655,7 +1655,7 @@ bool GOHello_cage_trap(Player* pPlayer, GameObject* pGo)
float x, y, z;
pPlayer->GetPosition(x, y, z);
// Grid search for nearest live creature of entry 23304 within 10 yards
// Grid search for nearest live Creature of entry 23304 within 10 yards
if (Creature* pTrigger = pGo->FindNearestCreature(23304, 10.0f))
CAST_AI(cage_trap_triggerAI, pTrigger->AI())->Active = true;
pGo->SetGoState(GO_STATE_ACTIVE);
@@ -185,7 +185,7 @@ struct TRINITY_DLL_DECL boss_shade_of_akamaAI : public ScriptedAI
uint32 ReduceHealthTimer;
uint32 SummonTimer;
uint32 ResetTimer;
uint32 DefenderTimer; // They are on a flat 15 second timer, independant of the other summon creature timer.
uint32 DefenderTimer; // They are on a flat 15 second timer, independant of the other summon Creature timer.
bool IsBanished;
bool HasKilledAkama;
@@ -820,9 +820,9 @@ CreatureAI* GetAI_npc_akama_shade(Creature* pCreature)
return new npc_akamaAI (pCreature);
}
bool GossipSelect_npc_akama(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action)
bool GossipSelect_npc_akama(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
{
if (action == GOSSIP_ACTION_INFO_DEF + 1) //Fight time
if (uiAction == GOSSIP_ACTION_INFO_DEF + 1) //Fight time
{
pPlayer->CLOSE_GOSSIP_MENU();
CAST_AI(npc_akamaAI, pCreature->AI())->BeginEvent(pPlayer);
@@ -193,14 +193,14 @@ struct TRINITY_DLL_DECL boss_najentusAI : public ScriptedAI
}
};
bool GOHello_go_najentus_spine(Player* pPlayer, GameObject* _GO)
bool GOHello_go_najentus_spine(Player* pPlayer, GameObject* pGo)
{
if (ScriptedInstance* pInstance = _GO->GetInstanceData())
if (Creature* Najentus = Unit::GetCreature(*_GO, pInstance->GetData64(DATA_HIGHWARLORDNAJENTUS)))
if (ScriptedInstance* pInstance = pGo->GetInstanceData())
if (Creature* Najentus = Unit::GetCreature(*pGo, pInstance->GetData64(DATA_HIGHWARLORDNAJENTUS)))
if (CAST_AI(boss_najentusAI, Najentus->AI())->RemoveImpalingSpine())
{
pPlayer->CastSpell(pPlayer, SPELL_CREATE_NAJENTUS_SPINE, true);
_GO->DeleteObjectWithOwner();
pGo->DeleteObjectWithOwner();
}
return true;
}
@@ -378,8 +378,8 @@ struct TRINITY_DLL_DECL boss_illidari_councilAI : public ScriptedAI
return;
}
DoZoneInCombat();
// Load GUIDs on first aggro because the creature guids are only set as the creatures are created in world-
// this means that for each creature, it will attempt to LoadGUIDs even though some of the other creatures are
// Load GUIDs on first aggro because the Creature guids are only set as the creatures are created in world-
// this means that for each pCreature, it will attempt to LoadGUIDs even though some of the other creatures are
// not in world, and thus have no GUID set in the instance data system. Putting it in aggro ensures that all the creatures
// have been loaded and have their GUIDs set in the instance data system.
if (!LoadedGUIDs)
@@ -128,51 +128,51 @@ struct TRINITY_DLL_DECL instance_black_temple : public ScriptedInstance
return NULL;
}
void OnCreatureCreate(Creature *creature, bool add)
void OnCreatureCreate(Creature* pCreature, bool add)
{
switch(creature->GetEntry())
switch(pCreature->GetEntry())
{
case 22887: Najentus = creature->GetGUID(); break;
case 23089: Akama = creature->GetGUID(); break;
case 22990: Akama_Shade = creature->GetGUID(); break;
case 22841: ShadeOfAkama = creature->GetGUID(); break;
case 22898: Supremus = creature->GetGUID(); break;
case 22917: IllidanStormrage = creature->GetGUID(); break;
case 22949: GathiosTheShatterer = creature->GetGUID(); break;
case 22950: HighNethermancerZerevor = creature->GetGUID(); break;
case 22951: LadyMalande = creature->GetGUID(); break;
case 22952: VerasDarkshadow = creature->GetGUID(); break;
case 23426: IllidariCouncil = creature->GetGUID(); break;
case 23499: BloodElfCouncilVoice = creature->GetGUID(); break;
case 22887: Najentus = pCreature->GetGUID(); break;
case 23089: Akama = pCreature->GetGUID(); break;
case 22990: Akama_Shade = pCreature->GetGUID(); break;
case 22841: ShadeOfAkama = pCreature->GetGUID(); break;
case 22898: Supremus = pCreature->GetGUID(); break;
case 22917: IllidanStormrage = pCreature->GetGUID(); break;
case 22949: GathiosTheShatterer = pCreature->GetGUID(); break;
case 22950: HighNethermancerZerevor = pCreature->GetGUID(); break;
case 22951: LadyMalande = pCreature->GetGUID(); break;
case 22952: VerasDarkshadow = pCreature->GetGUID(); break;
case 23426: IllidariCouncil = pCreature->GetGUID(); break;
case 23499: BloodElfCouncilVoice = pCreature->GetGUID(); break;
}
}
void OnGameObjectCreate(GameObject *go, bool add)
void OnGameObjectCreate(GameObject* pGo, bool add)
{
switch(go->GetEntry())
switch(pGo->GetEntry())
{
case 185483: NajentusGate = go->GetGUID();// Gate past Naj'entus (at the entrance to Supermoose's courtyards)
if (m_auiEncounter[0] == DONE)HandleGameObject(NULL,true,go);break;
case 185882: MainTempleDoors = go->GetGUID();// Main Temple Doors - right past Supermoose (Supremus)
if (m_auiEncounter[1] == DONE)HandleGameObject(NULL,true,go);break;
case 185478: ShadeOfAkamaDoor = go->GetGUID();break;
case 185480: CommonDoor = go->GetGUID();
if (m_auiEncounter[3] == DONE)HandleGameObject(NULL,true,go);;break;
case 186153: TeronDoor = go->GetGUID();
if (m_auiEncounter[3] == DONE)HandleGameObject(NULL,true,go);;break;
case 185892: GuurtogDoor = go->GetGUID();
if (m_auiEncounter[4] == DONE)HandleGameObject(NULL,true,go);break;
case 185479: TempleDoor = go->GetGUID();
if (m_auiEncounter[5] == DONE)HandleGameObject(NULL,true,go);break;
case 185482: MotherDoor = go->GetGUID();
if (m_auiEncounter[6] == DONE)HandleGameObject(NULL,true,go);break;
case 185481: CouncilDoor = go->GetGUID();
if (m_auiEncounter[7] == DONE)HandleGameObject(NULL,true,go);break;
case 186152: SimpleDoor = go->GetGUID();
if (m_auiEncounter[7] == DONE)HandleGameObject(NULL,true,go);break;
case 185905: IllidanGate = go->GetGUID(); break; // Gate leading to Temple Summit
case 186261: IllidanDoor[0] = go->GetGUID(); break; // Right door at Temple Summit
case 186262: IllidanDoor[1] = go->GetGUID(); break; // Left door at Temple Summit
case 185483: NajentusGate = pGo->GetGUID();// Gate past Naj'entus (at the entrance to Supermoose's courtyards)
if (m_auiEncounter[0] == DONE)HandleGameObject(NULL,true,pGo);break;
case 185882: MainTempleDoors = pGo->GetGUID();// Main Temple Doors - right past Supermoose (Supremus)
if (m_auiEncounter[1] == DONE)HandleGameObject(NULL,true,pGo);break;
case 185478: ShadeOfAkamaDoor = pGo->GetGUID();break;
case 185480: CommonDoor = pGo->GetGUID();
if (m_auiEncounter[3] == DONE)HandleGameObject(NULL,true,pGo);;break;
case 186153: TeronDoor = pGo->GetGUID();
if (m_auiEncounter[3] == DONE)HandleGameObject(NULL,true,pGo);;break;
case 185892: GuurtogDoor = pGo->GetGUID();
if (m_auiEncounter[4] == DONE)HandleGameObject(NULL,true,pGo);break;
case 185479: TempleDoor = pGo->GetGUID();
if (m_auiEncounter[5] == DONE)HandleGameObject(NULL,true,pGo);break;
case 185482: MotherDoor = pGo->GetGUID();
if (m_auiEncounter[6] == DONE)HandleGameObject(NULL,true,pGo);break;
case 185481: CouncilDoor = pGo->GetGUID();
if (m_auiEncounter[7] == DONE)HandleGameObject(NULL,true,pGo);break;
case 186152: SimpleDoor = pGo->GetGUID();
if (m_auiEncounter[7] == DONE)HandleGameObject(NULL,true,pGo);break;
case 185905: IllidanGate = pGo->GetGUID(); break; // Gate leading to Temple Summit
case 186261: IllidanDoor[0] = pGo->GetGUID(); break; // Right door at Temple Summit
case 186262: IllidanDoor[1] = pGo->GetGUID(); break; // Left door at Temple Summit
}
}
@@ -436,9 +436,9 @@ bool GossipHello_npc_kharan_mighthammer(Player* pPlayer, Creature* pCreature)
return true;
}
bool GossipSelect_npc_kharan_mighthammer(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action)
bool GossipSelect_npc_kharan_mighthammer(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
{
switch (action)
switch (uiAction)
{
case GOSSIP_ACTION_INFO_DEF+1:
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KHARAN_3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
@@ -519,14 +519,14 @@ bool GossipHello_npc_lokhtos_darkbargainer(Player* pPlayer, Creature* pCreature)
return true;
}
bool GossipSelect_npc_lokhtos_darkbargainer(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action)
bool GossipSelect_npc_lokhtos_darkbargainer(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
{
if (action == GOSSIP_ACTION_INFO_DEF + 1)
if (uiAction == GOSSIP_ACTION_INFO_DEF + 1)
{
pPlayer->CLOSE_GOSSIP_MENU();
pPlayer->CastSpell(pPlayer, SPELL_CREATE_THORIUM_BROTHERHOOD_CONTRACT_DND, false);
}
if (action == GOSSIP_ACTION_TRADE)
if (uiAction == GOSSIP_ACTION_TRADE)
pPlayer->SEND_VENDORLIST(pCreature->GetGUID());
return true;
@@ -612,9 +612,9 @@ bool GossipHello_npc_dughal_stormwing(Player* pPlayer, Creature* pCreature)
return true;
}
bool GossipSelect_npc_dughal_stormwing(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action)
bool GossipSelect_npc_dughal_stormwing(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
{
if (action == GOSSIP_ACTION_INFO_DEF + 1)
if (uiAction == GOSSIP_ACTION_INFO_DEF + 1)
{
pPlayer->CLOSE_GOSSIP_MENU();
CAST_AI(npc_escortAI, (pCreature->AI()))->Start(false, true, pPlayer->GetGUID());
@@ -768,15 +768,15 @@ CreatureAI* GetAI_npc_marshal_windsor(Creature* pCreature)
return marshal_windsorAI;
}
bool QuestAccept_npc_marshal_windsor(Player* pPlayer, Creature *creature, Quest const *quest)
bool QuestAccept_npc_marshal_windsor(Player* pPlayer, Creature* pCreature, Quest const *quest)
{
if (quest->GetQuestId() == 4322)
{PlayerStart = player;
if (pInstance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_NOT_STARTED)
{
CAST_AI(npc_escortAI, (creature->AI()))->Start(true, false, pPlayer->GetGUID());
CAST_AI(npc_escortAI, (pCreature->AI()))->Start(true, false, pPlayer->GetGUID());
pInstance->SetData(DATA_QUEST_JAIL_BREAK,ENCOUNTER_STATE_IN_PROGRESS);
creature->setFaction(11);
pCreature->setFaction(11);
}
}
@@ -1077,9 +1077,9 @@ bool GossipHello_npc_tobias_seecher(Player* pPlayer, Creature* pCreature)
return true;
}
bool GossipSelect_npc_tobias_seecher(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action)
bool GossipSelect_npc_tobias_seecher(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
{
if (action == GOSSIP_ACTION_INFO_DEF + 1)
if (uiAction == GOSSIP_ACTION_INFO_DEF + 1)
{
pPlayer->CLOSE_GOSSIP_MENU();
CAST_AI(npc_escortAI, (pCreature->AI()))->Start(false, true, pPlayer->GetGUID());
@@ -1121,8 +1121,8 @@ struct TRINITY_DLL_DECL npc_rocknotAI : public npc_escortAI
void DoGo(uint32 id, uint32 state)
{
if (GameObject *go = pInstance->instance->GetGameObject(pInstance->GetData64(id)))
go->SetGoState((GOState)state);
if (GameObject* pGo = pInstance->instance->GetGameObject(pInstance->GetData64(id)))
pGo->SetGoState((GOState)state);
}
void WaypointReached(uint32 i)
@@ -48,9 +48,9 @@ bool GossipHello_boss_gloomrel(Player* pPlayer, Creature* pCreature)
return true;
}
bool GossipSelect_boss_gloomrel(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action)
bool GossipSelect_boss_gloomrel(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
{
switch (action)
switch (uiAction)
{
case GOSSIP_ACTION_INFO_DEF+1:
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TEACH_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 11);
@@ -207,9 +207,9 @@ bool GossipHello_boss_doomrel(Player* pPlayer, Creature* pCreature)
return true;
}
bool GossipSelect_boss_doomrel(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action)
bool GossipSelect_boss_doomrel(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
{
switch (action)
switch (uiAction)
{
case GOSSIP_ACTION_INFO_DEF+1:
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "[PH] Continue...", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
@@ -142,50 +142,50 @@ struct TRINITY_DLL_DECL instance_blackrock_depths : public ScriptedInstance
TombBossGUIDs[i] = 0;
}
void OnCreatureCreate(Creature *creature, bool add)
void OnCreatureCreate(Creature* pCreature, bool add)
{
switch(creature->GetEntry())
switch(pCreature->GetEntry())
{
case NPC_EMPEROR: EmperorGUID = creature->GetGUID(); break;
case NPC_PHALANX: PhalanxGUID = creature->GetGUID(); break;
case NPC_DOOMREL: TombBossGUIDs[0] = creature->GetGUID(); break;
case NPC_DOPEREL: TombBossGUIDs[1] = creature->GetGUID(); break;
case NPC_HATEREL: TombBossGUIDs[2] = creature->GetGUID(); break;
case NPC_VILEREL: TombBossGUIDs[3] = creature->GetGUID(); break;
case NPC_SEETHREL: TombBossGUIDs[4] = creature->GetGUID(); break;
case NPC_GLOOMREL: TombBossGUIDs[5] = creature->GetGUID(); break;
case NPC_ANGERREL: TombBossGUIDs[6] = creature->GetGUID(); break;
case NPC_EMPEROR: EmperorGUID = pCreature->GetGUID(); break;
case NPC_PHALANX: PhalanxGUID = pCreature->GetGUID(); break;
case NPC_DOOMREL: TombBossGUIDs[0] = pCreature->GetGUID(); break;
case NPC_DOPEREL: TombBossGUIDs[1] = pCreature->GetGUID(); break;
case NPC_HATEREL: TombBossGUIDs[2] = pCreature->GetGUID(); break;
case NPC_VILEREL: TombBossGUIDs[3] = pCreature->GetGUID(); break;
case NPC_SEETHREL: TombBossGUIDs[4] = pCreature->GetGUID(); break;
case NPC_GLOOMREL: TombBossGUIDs[5] = pCreature->GetGUID(); break;
case NPC_ANGERREL: TombBossGUIDs[6] = pCreature->GetGUID(); break;
}
}
void OnGameObjectCreate(GameObject *go, bool add)
void OnGameObjectCreate(GameObject* pGo, bool add)
{
switch(go->GetEntry())
switch(pGo->GetEntry())
{
case GO_ARENA1: GoArena1GUID = go->GetGUID(); break;
case GO_ARENA2: GoArena2GUID = go->GetGUID(); break;
case GO_ARENA3: GoArena3GUID = go->GetGUID(); break;
case GO_ARENA4: GoArena4GUID = go->GetGUID(); break;
case GO_SHADOW_LOCK: GoShadowLockGUID = go->GetGUID(); break;
case GO_SHADOW_MECHANISM: GoShadowMechGUID = go->GetGUID(); break;
case GO_SHADOW_GIANT_DOOR: GoShadowGiantGUID = go->GetGUID(); break;
case GO_SHADOW_DUMMY: GoShadowDummyGUID = go->GetGUID(); break;
case GO_BAR_KEG_SHOT: GoBarKegGUID = go->GetGUID(); break;
case GO_BAR_KEG_TRAP: GoBarKegTrapGUID = go->GetGUID(); break;
case GO_BAR_DOOR: GoBarDoorGUID = go->GetGUID(); break;
case GO_TOMB_ENTER: GoTombEnterGUID = go->GetGUID(); break;
case GO_ARENA1: GoArena1GUID = pGo->GetGUID(); break;
case GO_ARENA2: GoArena2GUID = pGo->GetGUID(); break;
case GO_ARENA3: GoArena3GUID = pGo->GetGUID(); break;
case GO_ARENA4: GoArena4GUID = pGo->GetGUID(); break;
case GO_SHADOW_LOCK: GoShadowLockGUID = pGo->GetGUID(); break;
case GO_SHADOW_MECHANISM: GoShadowMechGUID = pGo->GetGUID(); break;
case GO_SHADOW_GIANT_DOOR: GoShadowGiantGUID = pGo->GetGUID(); break;
case GO_SHADOW_DUMMY: GoShadowDummyGUID = pGo->GetGUID(); break;
case GO_BAR_KEG_SHOT: GoBarKegGUID = pGo->GetGUID(); break;
case GO_BAR_KEG_TRAP: GoBarKegTrapGUID = pGo->GetGUID(); break;
case GO_BAR_DOOR: GoBarDoorGUID = pGo->GetGUID(); break;
case GO_TOMB_ENTER: GoTombEnterGUID = pGo->GetGUID(); break;
case GO_TOMB_EXIT:
GoTombExitGUID = go->GetGUID();
GoTombExitGUID = pGo->GetGUID();
if (GhostKillCount >= 7)
HandleGameObject(0, true, go);
HandleGameObject(0, true, pGo);
else
HandleGameObject(0, false, go);
HandleGameObject(0, false, pGo);
break;
case GO_LYCEUM: GoLyceumGUID = go->GetGUID(); break;
case GO_GOLEM_ROOM_N: GoGolemNGUID = go->GetGUID(); break;
case GO_GOLEM_ROOM_S: GoGolemSGUID = go->GetGUID(); break;
case GO_THONE_ROOM: GoThoneGUID = go->GetGUID(); break;
case GO_CHEST_SEVEN: GoChestGUID = go->GetGUID(); break;
case GO_LYCEUM: GoLyceumGUID = pGo->GetGUID(); break;
case GO_GOLEM_ROOM_N: GoGolemNGUID = pGo->GetGUID(); break;
case GO_GOLEM_ROOM_S: GoGolemSGUID = pGo->GetGUID(); break;
case GO_THONE_ROOM: GoThoneGUID = pGo->GetGUID(); break;
case GO_CHEST_SEVEN: GoChestGUID = pGo->GetGUID(); break;
}
}
@@ -215,19 +215,19 @@ struct TRINITY_DLL_DECL boss_vaelAI : public ScriptedAI
}
};
void SendDefaultMenu_boss_vael(Player* pPlayer, Creature* pCreature, uint32 action)
void SendDefaultMenu_boss_vael(Player* pPlayer, Creature* pCreature, uint32 uiAction)
{
if (action == GOSSIP_ACTION_INFO_DEF + 1) //Fight time
if (uiAction == GOSSIP_ACTION_INFO_DEF + 1) //Fight time
{
pPlayer->CLOSE_GOSSIP_MENU();
CAST_AI(boss_vaelAI, pCreature->AI())->BeginSpeach(pPlayer);
}
}
bool GossipSelect_boss_vael(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action)
bool GossipSelect_boss_vael(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
{
if (sender == GOSSIP_SENDER_MAIN)
SendDefaultMenu_boss_vael(pPlayer, pCreature, action);
if (uiSender == GOSSIP_SENDER_MAIN)
SendDefaultMenu_boss_vael(pPlayer, pCreature, uiAction);
return true;
}
@@ -263,7 +263,7 @@ struct TRINITY_DLL_DECL boss_victor_nefariusAI : public ScriptedAI
SpawnedAdds++;
//Spawn creature and force it to start attacking a random target
//Spawn Creature and force it to start attacking a random target
Spawned = m_creature->SummonCreature(CreatureID,ADD_X1,ADD_Y1,ADD_Z1,5.000,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,5000);
target = SelectUnit(SELECT_TARGET_RANDOM,0);
if (target && Spawned)
@@ -357,9 +357,9 @@ bool GossipHello_boss_victor_nefarius(Player* pPlayer, Creature* pCreature)
return true;
}
bool GossipSelect_boss_victor_nefarius(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action)
bool GossipSelect_boss_victor_nefarius(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
{
switch (action)
switch (uiAction)
{
case GOSSIP_ACTION_INFO_DEF+1:
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
@@ -45,7 +45,7 @@ bool obelisk_one, obelisk_two, obelisk_three, obelisk_four, obelisk_five;
## mobs_bladespire_ogre
######*/
//TODO: add support for quest 10512 + creature abilities
//TODO: add support for quest 10512 + Creature abilities
struct TRINITY_DLL_DECL mobs_bladespire_ogreAI : public ScriptedAI
{
mobs_bladespire_ogreAI(Creature *c) : ScriptedAI(c) {}
@@ -123,7 +123,7 @@ struct TRINITY_DLL_DECL mobs_nether_drakeAI : public ScriptedAI
ScriptedAI::MoveInLineOfSight(who);
}
//in case creature was not summoned (not expected)
//in case Creature was not summoned (not expected)
void MovementInform(uint32 type, uint32 id)
{
if (type != POINT_MOTION_TYPE)
@@ -291,9 +291,9 @@ bool GossipHello_npc_overseer_nuaar(Player* pPlayer, Creature* pCreature)
return true;
}
bool GossipSelect_npc_overseer_nuaar(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action)
bool GossipSelect_npc_overseer_nuaar(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
{
if (action == GOSSIP_ACTION_INFO_DEF+1)
if (uiAction == GOSSIP_ACTION_INFO_DEF+1)
{
pPlayer->SEND_GOSSIP_MENU(10533, pCreature->GetGUID());
pPlayer->AreaExploredOrEventHappens(10682);
@@ -315,9 +315,9 @@ bool GossipHello_npc_saikkal_the_elder(Player* pPlayer, Creature* pCreature)
return true;
}
bool GossipSelect_npc_saikkal_the_elder(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action)
bool GossipSelect_npc_saikkal_the_elder(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
{
switch (action)
switch (uiAction)
{
case GOSSIP_ACTION_INFO_DEF+1:
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Yes elder. Tell me more of the book.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
@@ -335,11 +335,11 @@ bool GossipSelect_npc_saikkal_the_elder(Player* pPlayer, Creature* pCreature, ui
## go_legion_obelisk
######*/
bool GOHello_go_legion_obelisk(Player* pPlayer, GameObject* _GO)
bool GOHello_go_legion_obelisk(Player* pPlayer, GameObject* pGo)
{
if (pPlayer->GetQuestStatus(10821) == QUEST_STATUS_INCOMPLETE)
{
switch(_GO->GetEntry())
switch(pGo->GetEntry())
{
case LEGION_OBELISK_ONE:
obelisk_one = true;
@@ -360,7 +360,7 @@ bool GOHello_go_legion_obelisk(Player* pPlayer, GameObject* _GO)
if (obelisk_one == true && obelisk_two == true && obelisk_three == true && obelisk_four == true && obelisk_five == true)
{
_GO->SummonCreature(19963,2943.40f,4778.20f,284.49f,0.94f,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,120000);
pGo->SummonCreature(19963,2943.40f,4778.20f,284.49f,0.94f,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,120000);
//reset global var
obelisk_one = false;
obelisk_two = false;
@@ -48,9 +48,9 @@ bool GossipHello_npc_deathly_usher(Player* pPlayer, Creature* pCreature)
return true;
}
bool GossipSelect_npc_deathly_usher(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action)
bool GossipSelect_npc_deathly_usher(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
{
if (action == GOSSIP_ACTION_INFO_DEF)
if (uiAction == GOSSIP_ACTION_INFO_DEF)
{
pPlayer->CLOSE_GOSSIP_MENU();
pCreature->CastSpell(pPlayer, SPELL_TELEPORT_SINGLE, true);
@@ -92,9 +92,9 @@ bool GossipHello_npc_fallen_hero_of_horde(Player* pPlayer, Creature* pCreature)
return true;
}
bool GossipSelect_npc_fallen_hero_of_horde(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action)
bool GossipSelect_npc_fallen_hero_of_horde(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
{
switch (action)
switch (uiAction)
{
case GOSSIP_ACTION_INFO_DEF+1:
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_FALLEN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 11);
@@ -92,9 +92,9 @@ bool GossipHello_npc_captured_sunhawk_agent(Player* pPlayer, Creature* pCreature
return true;
}
bool GossipSelect_npc_captured_sunhawk_agent(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action)
bool GossipSelect_npc_captured_sunhawk_agent(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
{
switch (action)
switch (uiAction)
{
case GOSSIP_ACTION_INFO_DEF+1:
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "[PH] ", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
@@ -84,9 +84,9 @@ bool GossipHello_npc_ragged_john(Player* pPlayer, Creature* pCreature)
return true;
}
bool GossipSelect_npc_ragged_john(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action)
bool GossipSelect_npc_ragged_john(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
{
switch (action)
switch (uiAction)
{
case GOSSIP_ACTION_INFO_DEF:
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
@@ -310,7 +310,7 @@ struct TRINITY_DLL_DECL npc_time_riftAI : public ScriptedAI
mRiftWaveCount = 0;
entry = PortalWaves[mWaveId].PortalMob[mRiftWaveCount];
debug_log("TSCR: npc_time_rift: summoning wave creature (Wave %u, Entry %u).",mRiftWaveCount,entry);
debug_log("TSCR: npc_time_rift: summoning wave Creature (Wave %u, Entry %u).",mRiftWaveCount,entry);
++mRiftWaveCount;
@@ -376,9 +376,9 @@ bool GossipHello_npc_saat(Player* pPlayer, Creature* pCreature)
return true;
}
bool GossipSelect_npc_saat(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action)
bool GossipSelect_npc_saat(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
{
if (action == GOSSIP_ACTION_INFO_DEF+1)
if (uiAction == GOSSIP_ACTION_INFO_DEF+1)
{
pPlayer->CLOSE_GOSSIP_MENU();
pCreature->CastSpell(pPlayer,SPELL_CHRONO_BEACON,false);
@@ -118,10 +118,10 @@ struct TRINITY_DLL_DECL instance_dark_portal : public ScriptedInstance
pPlayer->SendUpdateWorldState(WORLD_STATE_BM,0);
}
void OnCreatureCreate(Creature *creature, bool add)
void OnCreatureCreate(Creature* pCreature, bool add)
{
if (creature->GetEntry() == C_MEDIVH)
MedivhGUID = creature->GetGUID();
if (pCreature->GetEntry() == C_MEDIVH)
MedivhGUID = pCreature->GetGUID();
}
//what other conditions to check?
@@ -41,7 +41,7 @@ struct TRINITY_DLL_DECL boss_anetheronAI : public hyjal_trashAI
boss_anetheronAI(Creature *c) : hyjal_trashAI(c)
{
pInstance = c->GetInstanceData();
go = false;
pGo = false;
pos = 0;
SpellEntry *TempSpell = GET_SPELL(SPELL_SLEEP);
if (TempSpell && TempSpell->EffectImplicitTargetA[0] != 1)
@@ -55,7 +55,7 @@ struct TRINITY_DLL_DECL boss_anetheronAI : public hyjal_trashAI
uint32 SleepTimer;
uint32 AuraTimer;
uint32 InfernoTimer;
bool go;
bool pGo;
uint32 pos;
void Reset()
@@ -123,9 +123,9 @@ struct TRINITY_DLL_DECL boss_anetheronAI : public hyjal_trashAI
{
//Must update npc_escortAI
npc_escortAI::UpdateAI(diff);
if (!go)
if (!pGo)
{
go = true;
pGo = true;
if (pInstance)
{
AddWaypoint(0, 4896.08, -1576.35, 1333.65);
@@ -148,8 +148,7 @@ struct TRINITY_DLL_DECL boss_anetheronAI : public hyjal_trashAI
if (SwarmTimer < diff)
{
Unit* target = SelectTarget(SELECT_TARGET_RANDOM,0,100,true);
if (target)
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM,0,100,true))
DoCast(target,SPELL_CARRION_SWARM);
SwarmTimer = 45000+rand()%15000;
@@ -479,7 +479,7 @@ struct TRINITY_DLL_DECL boss_archimondeAI : public hyjal_trashAI
if (CheckDistanceTimer < diff)
{
// To simplify the check, we simply summon a creature in the location and then check how far we are from the creature
// To simplify the check, we simply summon a Creature in the location and then check how far we are from the creature
Creature* Check = m_creature->SummonCreature(CREATURE_CHANNEL_TARGET, NORDRASSIL_X, NORDRASSIL_Y, NORDRASSIL_Z, 0, TEMPSUMMON_TIMED_DESPAWN, 2000);
if (Check)
{
@@ -32,7 +32,7 @@ struct TRINITY_DLL_DECL boss_azgalorAI : public hyjal_trashAI
boss_azgalorAI(Creature *c) : hyjal_trashAI(c)
{
pInstance = c->GetInstanceData();
go = false;
pGo = false;
pos = 0;
SpellEntry *TempSpell = GET_SPELL(SPELL_HOWL_OF_AZGALOR);
if (TempSpell)
@@ -46,7 +46,7 @@ struct TRINITY_DLL_DECL boss_azgalorAI : public hyjal_trashAI
uint32 EnrageTimer;
bool enraged;
bool go;
bool pGo;
uint32 pos;
void Reset()
@@ -115,9 +115,9 @@ struct TRINITY_DLL_DECL boss_azgalorAI : public hyjal_trashAI
{
//Must update npc_escortAI
npc_escortAI::UpdateAI(diff);
if (!go)
if (!pGo)
{
go = true;
pGo = true;
if (pInstance)
{
AddWaypoint(0, 5492.91, -2404.61, 1462.63);
@@ -29,7 +29,7 @@ struct TRINITY_DLL_DECL boss_kazrogalAI : public hyjal_trashAI
boss_kazrogalAI(Creature *c) : hyjal_trashAI(c)
{
pInstance = c->GetInstanceData();
go = false;
pGo = false;
pos = 0;
SpellEntry *TempSpell = GET_SPELL(SPELL_MARK);
if (TempSpell && TempSpell->EffectImplicitTargetA[0] != 1)
@@ -43,7 +43,7 @@ struct TRINITY_DLL_DECL boss_kazrogalAI : public hyjal_trashAI
uint32 WarStompTimer;
uint32 MarkTimer;
uint32 MarkTimerBase;
bool go;
bool pGo;
uint32 pos;
void Reset()
@@ -110,9 +110,9 @@ struct TRINITY_DLL_DECL boss_kazrogalAI : public hyjal_trashAI
{
//Must update npc_escortAI
npc_escortAI::UpdateAI(diff);
if (!go)
if (!pGo)
{
go = true;
pGo = true;
if (pInstance)
{
AddWaypoint(0, 5492.91, -2404.61, 1462.63);
@@ -35,7 +35,7 @@ struct TRINITY_DLL_DECL boss_rage_winterchillAI : public hyjal_trashAI
boss_rage_winterchillAI(Creature *c) : hyjal_trashAI(c)
{
pInstance = c->GetInstanceData();
go = false;
pGo = false;
pos = 0;
}
@@ -43,7 +43,7 @@ struct TRINITY_DLL_DECL boss_rage_winterchillAI : public hyjal_trashAI
uint32 DecayTimer;
uint32 NovaTimer;
uint32 IceboltTimer;
bool go;
bool pGo;
uint32 pos;
void Reset()
@@ -107,9 +107,9 @@ struct TRINITY_DLL_DECL boss_rage_winterchillAI : public hyjal_trashAI
{
//Must update npc_escortAI
npc_escortAI::UpdateAI(diff);
if (!go)
if (!pGo)
{
go = true;
pGo = true;
if (pInstance)
{
AddWaypoint(0, 4896.08, -1576.35, 1333.65);
@@ -86,10 +86,10 @@ bool GossipHello_npc_jaina_proudmoore(Player* pPlayer, Creature* pCreature)
return true;
}
bool GossipSelect_npc_jaina_proudmoore(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action)
bool GossipSelect_npc_jaina_proudmoore(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
{
hyjalAI* ai = CAST_AI(hyjalAI, pCreature->AI());
switch(action)
switch(uiAction)
{
case GOSSIP_ACTION_INFO_DEF + 1:
ai->StartEvent(pPlayer);
@@ -155,11 +155,11 @@ bool GossipHello_npc_thrall(Player* pPlayer, Creature* pCreature)
return true;
}
bool GossipSelect_npc_thrall(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action)
bool GossipSelect_npc_thrall(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
{
hyjalAI* ai = CAST_AI(hyjalAI, pCreature->AI());
ai->DeSpawnVeins();//despawn the alliance veins
switch(action)
switch(uiAction)
{
case GOSSIP_ACTION_INFO_DEF + 1:
ai->StartEvent(pPlayer);
@@ -200,9 +200,9 @@ bool GossipHello_npc_tyrande_whisperwind(Player* pPlayer, Creature* pCreature)
return true;
}
bool GossipSelect_npc_tyrande_whisperwind(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action)
bool GossipSelect_npc_tyrande_whisperwind(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
{
if (action == GOSSIP_ACTION_INFO_DEF)
if (uiAction == GOSSIP_ACTION_INFO_DEF)
{
ItemPosCountVec dest;
uint8 msg = pPlayer->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, ITEM_TEAR_OF_GODDESS, 1);
@@ -356,7 +356,7 @@ void hyjalAI::Reset()
WaveCount = 0;
EnemyCount = 0;
// Set faction properly based on creature entry
// Set faction properly based on Creature entry
switch(m_creature->GetEntry())
{
case JAINA:
@@ -513,7 +513,7 @@ void hyjalAI::SummonCreature(uint32 entry, float Base[4][3])
if (pInstance->GetData(DATA_RAIDDAMAGE) < MINRAIDDAMAGE)
pCreature->SetDisableReputationGain(true);//no repu for solo farming
}
// Check if creature is a boss.
// Check if Creature is a boss.
if (pCreature->isWorldBoss())
{
if (!FirstBossDead) BossGUID[0] = pCreature->GetGUID();
@@ -382,7 +382,7 @@ struct mob_giant_infernalAI : public hyjal_trashAI
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
m_creature->SetDisplayId(MODEL_INVIS);
go = false;
pGo = false;
pos = 0;
Reset();
}
@@ -390,7 +390,7 @@ struct mob_giant_infernalAI : public hyjal_trashAI
bool meteor;
bool CanMove;
bool WpEnabled;
bool go;
bool pGo;
uint32 pos;
uint32 spawnTimer;
uint32 FlameBuffetTimer;
@@ -468,9 +468,9 @@ struct mob_giant_infernalAI : public hyjal_trashAI
npc_escortAI::UpdateAI(diff);
if (IsEvent)
{
if (!go)
if (!pGo)
{
go = true;
pGo = true;
if (pInstance)
{
AddWaypoint(0, HordeWPs[7][0]+irand(-3,3), HordeWPs[7][1]+irand(-3,3), HordeWPs[7][2]);//HordeWPs[7] infront of thrall
@@ -510,12 +510,12 @@ struct mob_abominationAI : public hyjal_trashAI
mob_abominationAI(Creature* c) : hyjal_trashAI(c)
{
pInstance = c->GetInstanceData();
go = false;
pGo = false;
pos = 0;
Reset();
}
bool go;
bool pGo;
uint32 KnockDownTimer;
uint32 pos;
void Reset()
@@ -558,9 +558,9 @@ struct mob_abominationAI : public hyjal_trashAI
npc_escortAI::UpdateAI(diff);
if (IsEvent)
{
if (!go)
if (!pGo)
{
go = true;
pGo = true;
if (pInstance)
{
if (pInstance->GetData(DATA_ALLIANCE_RETREAT))//2.alliance boss down, use horde WPs
@@ -605,12 +605,12 @@ struct mob_ghoulAI : public hyjal_trashAI
mob_ghoulAI(Creature* c) : hyjal_trashAI(c)
{
pInstance = c->GetInstanceData();
go = false;
pGo = false;
pos = 0;
Reset();
}
bool go;
bool pGo;
uint32 FrenzyTimer;
uint32 pos;
uint32 MoveTimer;
@@ -659,9 +659,9 @@ struct mob_ghoulAI : public hyjal_trashAI
npc_escortAI::UpdateAI(diff);
if (IsEvent)
{
if (!go)
if (!pGo)
{
go = true;
pGo = true;
if (pInstance)
{
if (pInstance->GetData(DATA_ALLIANCE_RETREAT))//2.alliance boss down, use horde WPs
@@ -708,12 +708,12 @@ struct mob_necromancerAI : public hyjal_trashAI
mob_necromancerAI(Creature* c) : hyjal_trashAI(c), summons(m_creature)
{
pInstance = c->GetInstanceData();
go = false;
pGo = false;
pos = 0;
Reset();
}
SummonList summons;
bool go;
bool pGo;
uint32 ShadowBoltTimer;
uint32 pos;
void Reset()
@@ -778,9 +778,9 @@ struct mob_necromancerAI : public hyjal_trashAI
npc_escortAI::UpdateAI(diff);
if (IsEvent)
{
if (!go)
if (!pGo)
{
go = true;
pGo = true;
if (pInstance)
{
if (pInstance->GetData(DATA_ALLIANCE_RETREAT))//2.alliance boss down, use horde WPs
@@ -826,12 +826,12 @@ struct mob_bansheeAI : public hyjal_trashAI
mob_bansheeAI(Creature* c) : hyjal_trashAI(c)
{
pInstance = c->GetInstanceData();
go = false;
pGo = false;
pos = 0;
Reset();
}
bool go;
bool pGo;
uint32 CourseTimer;
uint32 WailTimer;
uint32 ShellTimer;
@@ -870,9 +870,9 @@ struct mob_bansheeAI : public hyjal_trashAI
npc_escortAI::UpdateAI(diff);
if (IsEvent)
{
if (!go)
if (!pGo)
{
go = true;
pGo = true;
if (pInstance)
{
if (pInstance->GetData(DATA_ALLIANCE_RETREAT))//2.alliance boss down, use horde WPs
@@ -925,12 +925,12 @@ struct mob_crypt_fiendAI : public hyjal_trashAI
mob_crypt_fiendAI(Creature* c) : hyjal_trashAI(c)
{
pInstance = c->GetInstanceData();
go = false;
pGo = false;
pos = 0;
Reset();
}
bool go;
bool pGo;
uint32 WebTimer;
uint32 pos;
void Reset()
@@ -965,9 +965,9 @@ struct mob_crypt_fiendAI : public hyjal_trashAI
npc_escortAI::UpdateAI(diff);
if (IsEvent)
{
if (!go)
if (!pGo)
{
go = true;
pGo = true;
if (pInstance)
{
if (pInstance->GetData(DATA_ALLIANCE_RETREAT))//2.alliance boss down, use horde WPs
@@ -1011,12 +1011,12 @@ struct mob_fel_stalkerAI : public hyjal_trashAI
mob_fel_stalkerAI(Creature* c) : hyjal_trashAI(c)
{
pInstance = c->GetInstanceData();
go = false;
pGo = false;
pos = 0;
Reset();
}
bool go;
bool pGo;
uint32 ManaBurnTimer;
uint32 pos;
void Reset()
@@ -1051,9 +1051,9 @@ struct mob_fel_stalkerAI : public hyjal_trashAI
npc_escortAI::UpdateAI(diff);
if (IsEvent)
{
if (!go)
if (!pGo)
{
go = true;
pGo = true;
if (pInstance)
{
if (pInstance->GetData(DATA_ALLIANCE_RETREAT))//2.alliance boss down, use horde WPs
@@ -1097,12 +1097,12 @@ struct mob_frost_wyrmAI : public hyjal_trashAI
mob_frost_wyrmAI(Creature* c) : hyjal_trashAI(c)
{
pInstance = c->GetInstanceData();
go = false;
pGo = false;
pos = 0;
Reset();
}
bool go;
bool pGo;
uint32 FrostBreathTimer;
uint32 pos;
uint32 MoveTimer;
@@ -1152,9 +1152,9 @@ struct mob_frost_wyrmAI : public hyjal_trashAI
}
if (IsEvent)
{
if (!go)
if (!pGo)
{
go = true;
pGo = true;
if (pInstance)
{
if (!useFlyPath)
@@ -1208,13 +1208,13 @@ struct mob_gargoyleAI : public hyjal_trashAI
mob_gargoyleAI(Creature* c) : hyjal_trashAI(c)
{
pInstance = c->GetInstanceData();
go = false;
pGo = false;
pos = 0;
DummyTarget[0] = 0;DummyTarget[1] = 0;DummyTarget[2] = 0;
Reset();
}
bool go;
bool pGo;
uint32 StrikeTimer;
uint32 pos;
uint32 MoveTimer;
@@ -1264,9 +1264,9 @@ struct mob_gargoyleAI : public hyjal_trashAI
}
if (IsEvent)
{
if (!go)
if (!pGo)
{
go = true;
pGo = true;
if (pInstance)
{
if (!useFlyPath)
@@ -101,42 +101,42 @@ struct TRINITY_DLL_DECL instance_mount_hyjal : public ScriptedInstance
return false;
}
void OnGameObjectCreate(GameObject *go, bool add)
void OnGameObjectCreate(GameObject* pGo, bool add)
{
switch(go->GetEntry())
switch(pGo->GetEntry())
{
case 182060:
HordeGate = go->GetGUID();
HordeGate = pGo->GetGUID();
if (allianceRetreat)
HandleGameObject(0, true, go);
HandleGameObject(0, true, pGo);
else
HandleGameObject(0, false, go);
HandleGameObject(0, false, pGo);
break;
case 182061:
ElfGate = go->GetGUID();
ElfGate = pGo->GetGUID();
if (hordeRetreat)
HandleGameObject(0, true, go);
HandleGameObject(0, true, pGo);
else
HandleGameObject(0, false, go);
HandleGameObject(0, false, pGo);
break;
case GO_ANCIENT_GEM:
m_uiAncientGemGUID.push_back(go->GetGUID());
m_uiAncientGemGUID.push_back(pGo->GetGUID());
break;
}
}
void OnCreatureCreate(Creature *creature, bool add)
void OnCreatureCreate(Creature* pCreature, bool add)
{
switch(creature->GetEntry())
switch(pCreature->GetEntry())
{
case 17767: RageWinterchill = creature->GetGUID(); break;
case 17808: Anetheron = creature->GetGUID(); break;
case 17888: Kazrogal = creature->GetGUID(); break;
case 17842: Azgalor = creature->GetGUID(); break;
case 17968: Archimonde = creature->GetGUID(); break;
case 17772: JainaProudmoore = creature->GetGUID(); break;
case 17852: Thrall = creature->GetGUID(); break;
case 17948: TyrandeWhisperwind = creature->GetGUID(); break;
case 17767: RageWinterchill = pCreature->GetGUID(); break;
case 17808: Anetheron = pCreature->GetGUID(); break;
case 17888: Kazrogal = pCreature->GetGUID(); break;
case 17842: Azgalor = pCreature->GetGUID(); break;
case 17968: Archimonde = pCreature->GetGUID(); break;
case 17772: JainaProudmoore = pCreature->GetGUID(); break;
case 17852: Thrall = pCreature->GetGUID(); break;
case 17948: TyrandeWhisperwind = pCreature->GetGUID(); break;
}
}
@@ -89,18 +89,18 @@ struct TRINITY_DLL_DECL instance_old_hillsbrad : public ScriptedInstance
}
}
void OnCreatureCreate(Creature *creature, bool add)
void OnCreatureCreate(Creature* pCreature, bool add)
{
switch(creature->GetEntry())
switch(pCreature->GetEntry())
{
case THRALL_ENTRY:
ThrallGUID = creature->GetGUID();
ThrallGUID = pCreature->GetGUID();
break;
case TARETHA_ENTRY:
TarethaGUID = creature->GetGUID();
TarethaGUID = pCreature->GetGUID();
break;
case EPOCH_ENTRY:
EpochGUID = creature->GetGUID();
EpochGUID = pCreature->GetGUID();
break;
}
}
@@ -58,9 +58,9 @@ bool GossipHello_npc_erozion(Player* pPlayer, Creature* pCreature)
return true;
}
bool GossipSelect_npc_erozion(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action)
bool GossipSelect_npc_erozion(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
{
if (action == GOSSIP_ACTION_INFO_DEF+1)
if (uiAction == GOSSIP_ACTION_INFO_DEF+1)
{
ItemPosCountVec dest;
uint8 msg = pPlayer->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, ITEM_ENTRY_BOMBS, 1);
@@ -70,7 +70,7 @@ bool GossipSelect_npc_erozion(Player* pPlayer, Creature* pCreature, uint32 sende
}
pPlayer->SEND_GOSSIP_MENU(9515, pCreature->GetGUID());
}
if (action == GOSSIP_ACTION_INFO_DEF+2)
if (uiAction == GOSSIP_ACTION_INFO_DEF+2)
{
pPlayer->CLOSE_GOSSIP_MENU();
}
@@ -133,7 +133,7 @@ bool GossipSelect_npc_erozion(Player* pPlayer, Creature* pCreature, uint32 sende
#define THRALL_MODEL_UNEQUIPPED 17292
#define THRALL_MODEL_EQUIPPED 18165
//Misc creature entries
//Misc Creature entries
#define ENTRY_ARMORER 18764
#define ENTRY_SCARLOC 17862
@@ -339,7 +339,7 @@ struct TRINITY_DLL_DECL npc_thrall_old_hillsbradAI : public npc_escortAI
CAST_AI(npc_escortAI, (Taretha->AI()))->Start(false, true, PlayerGUID);
}
//kill credit creature for quest
//kill credit Creature for quest
Map* pMap = m_creature->GetMap();
Map::PlayerList const& players = pMap->GetPlayers();
if (!players.isEmpty() && pMap->IsDungeon())
@@ -522,10 +522,10 @@ bool GossipHello_npc_thrall_old_hillsbrad(Player* pPlayer, Creature* pCreature)
return true;
}
bool GossipSelect_npc_thrall_old_hillsbrad(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action)
bool GossipSelect_npc_thrall_old_hillsbrad(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
{
ScriptedInstance* pInstance = (pCreature->GetInstanceData());
switch(action)
switch(uiAction)
{
case GOSSIP_ACTION_INFO_DEF+1:
pPlayer->CLOSE_GOSSIP_MENU();
@@ -629,15 +629,15 @@ bool GossipHello_npc_taretha(Player* pPlayer, Creature* pCreature)
return true;
}
bool GossipSelect_npc_taretha(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action)
bool GossipSelect_npc_taretha(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
{
ScriptedInstance* pInstance = (pCreature->GetInstanceData());
if (action == GOSSIP_ACTION_INFO_DEF+1)
if (uiAction == GOSSIP_ACTION_INFO_DEF+1)
{
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_EPOCH2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
pPlayer->SEND_GOSSIP_MENU(GOSSIP_ID_EPOCH2, pCreature->GetGUID());
}
if (action == GOSSIP_ACTION_INFO_DEF+2)
if (uiAction == GOSSIP_ACTION_INFO_DEF+2)
{
pPlayer->CLOSE_GOSSIP_MENU();
@@ -135,7 +135,7 @@ struct TRINITY_DLL_DECL boss_lady_vashjAI : public ScriptedAI
pInstance = c->GetInstanceData();
Intro = false;
JustCreated = true;
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); //set it only once on creature create (no need do intro if wiped)
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); //set it only once on Creature create (no need do intro if wiped)
}
ScriptedInstance *pInstance;
@@ -39,7 +39,7 @@ EndScriptData */
#define SPELL_EARTHSHOCK 39076
#define SPELL_MINDBLAST 37531
// --- Spells used by Inner Demons and creature ID
// --- Spells used by Inner Demons and Creature ID
#define INNER_DEMON_ID 21857
#define AURA_DEMONIC_ALIGNMENT 37713
#define SPELL_SHADOWBOLT 39309
@@ -35,9 +35,9 @@ EndScriptData */
5 - Lady Vashj Event
*/
bool GOHello_go_bridge_console(Player* pPlayer, GameObject* go)
bool GOHello_go_bridge_console(Player* pPlayer, GameObject* pGo)
{
ScriptedInstance* pInstance = go->GetInstanceData();
ScriptedInstance* pInstance = pGo->GetInstanceData();
if (!pInstance)
return false;
@@ -103,47 +103,47 @@ struct TRINITY_DLL_DECL instance_serpentshrine_cavern : public ScriptedInstance
return false;
}
void OnGameObjectCreate(GameObject *go, bool add)
void OnGameObjectCreate(GameObject* pGo, bool add)
{
switch(go->GetEntry())
switch(pGo->GetEntry())
{
case 184568:
ControlConsole = go->GetGUID();
go->setActive(true);
ControlConsole = pGo->GetGUID();
pGo->setActive(true);
break;
case 184203:
BridgePart[0] = go->GetGUID();
go->setActive(true);
BridgePart[0] = pGo->GetGUID();
pGo->setActive(true);
break;
case 184204:
BridgePart[1] = go->GetGUID();
go->setActive(true);
BridgePart[1] = pGo->GetGUID();
pGo->setActive(true);
break;
case 184205:
BridgePart[2] = go->GetGUID();
go->setActive(true);
BridgePart[2] = pGo->GetGUID();
pGo->setActive(true);
break;
case 184956:
StrangePool = go->GetGUID();
if (go->isActiveObject())
StrangePool = pGo->GetGUID();
if (pGo->isActiveObject())
SetData(DATA_STRANGE_POOL, DONE);
}
}
void OnCreatureCreate(Creature *creature, bool add)
void OnCreatureCreate(Creature* pCreature, bool add)
{
switch(creature->GetEntry())
switch(pCreature->GetEntry())
{
case 21212: LadyVashj = creature->GetGUID(); break;
case 21214: Karathress = creature->GetGUID(); break;
case 21966: Sharkkis = creature->GetGUID(); break;
case 21217: LurkerBelow = creature->GetGUID(); break;
case 21965: Tidalvess = creature->GetGUID(); break;
case 21964: Caribdis = creature->GetGUID(); break;
case 21215: LeotherasTheBlind = creature->GetGUID(); break;}
case 21212: LadyVashj = pCreature->GetGUID(); break;
case 21214: Karathress = pCreature->GetGUID(); break;
case 21966: Sharkkis = pCreature->GetGUID(); break;
case 21217: LurkerBelow = pCreature->GetGUID(); break;
case 21965: Tidalvess = pCreature->GetGUID(); break;
case 21964: Caribdis = pCreature->GetGUID(); break;
case 21215: LeotherasTheBlind = pCreature->GetGUID(); break;}
}
void SetData64(uint32 type, uint64 data)
@@ -36,17 +36,17 @@ EndScriptData */
3 - Warlord Kalithresh Event
*/
bool GOHello_go_main_chambers_access_panel(Player* pPlayer, GameObject* _GO)
bool GOHello_go_main_chambers_access_panel(Player* pPlayer, GameObject* pGo)
{
ScriptedInstance* pInstance = _GO->GetInstanceData();
ScriptedInstance* pInstance = pGo->GetInstanceData();
if (!pInstance)
return false;
if (_GO->GetEntry() == ACCESS_PANEL_HYDRO && (pInstance->GetData(TYPE_HYDROMANCER_THESPIA) == DONE || pInstance->GetData(TYPE_HYDROMANCER_THESPIA) == SPECIAL))
if (pGo->GetEntry() == ACCESS_PANEL_HYDRO && (pInstance->GetData(TYPE_HYDROMANCER_THESPIA) == DONE || pInstance->GetData(TYPE_HYDROMANCER_THESPIA) == SPECIAL))
pInstance->SetData(TYPE_HYDROMANCER_THESPIA,SPECIAL);
if (_GO->GetEntry() == ACCESS_PANEL_MEK && (pInstance->GetData(TYPE_MEKGINEER_STEAMRIGGER) == DONE || pInstance->GetData(TYPE_MEKGINEER_STEAMRIGGER) == SPECIAL))
if (pGo->GetEntry() == ACCESS_PANEL_MEK && (pInstance->GetData(TYPE_MEKGINEER_STEAMRIGGER) == DONE || pInstance->GetData(TYPE_MEKGINEER_STEAMRIGGER) == SPECIAL))
pInstance->SetData(TYPE_MEKGINEER_STEAMRIGGER,SPECIAL);
return true;
@@ -87,23 +87,23 @@ struct TRINITY_DLL_DECL instance_steam_vault : public ScriptedInstance
return false;
}
void OnCreatureCreate(Creature *creature, bool add)
void OnCreatureCreate(Creature* pCreature, bool add)
{
switch(creature->GetEntry())
switch(pCreature->GetEntry())
{
case 17797: ThespiaGUID = creature->GetGUID(); break;
case 17796: MekgineerGUID = creature->GetGUID(); break;
case 17798: KalithreshGUID = creature->GetGUID(); break;
case 17797: ThespiaGUID = pCreature->GetGUID(); break;
case 17796: MekgineerGUID = pCreature->GetGUID(); break;
case 17798: KalithreshGUID = pCreature->GetGUID(); break;
}
}
void OnGameObjectCreate(GameObject *go, bool add)
void OnGameObjectCreate(GameObject* pGo, bool add)
{
switch(go->GetEntry())
switch(pGo->GetEntry())
{
case MAIN_CHAMBERS_DOOR: MainChambersDoor = go->GetGUID(); break;
case ACCESS_PANEL_HYDRO: AccessPanelHydro = go->GetGUID(); break;
case ACCESS_PANEL_MEK: AccessPanelMek = go->GetGUID(); break;
case MAIN_CHAMBERS_DOOR: MainChambersDoor = pGo->GetGUID(); break;
case ACCESS_PANEL_HYDRO: AccessPanelHydro = pGo->GetGUID(); break;
case ACCESS_PANEL_MEK: AccessPanelMek = pGo->GetGUID(); break;
}
}
@@ -315,9 +315,9 @@ bool GossipHello_npc_threshwackonator(Player* pPlayer, Creature* pCreature)
return true;
}
bool GossipSelect_npc_threshwackonator(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action)
bool GossipSelect_npc_threshwackonator(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
{
if (action == GOSSIP_ACTION_INFO_DEF+1)
if (uiAction == GOSSIP_ACTION_INFO_DEF+1)
{
CAST_AI(npc_threshwackonatorAI, pCreature->AI())->DoStart(pPlayer->GetGUID());
pPlayer->CLOSE_GOSSIP_MENU();
@@ -118,10 +118,10 @@ struct TRINITY_DLL_DECL instance_deadmines : public ScriptedInstance
MoveCreatureInside(DefiasCompanion);
}
void MoveCreatureInside(Creature *creature)
void MoveCreatureInside(Creature* pCreature)
{
creature->RemoveUnitMovementFlag(MOVEMENTFLAG_WALK_MODE);
creature->GetMotionMaster()->MovePoint(0, -102.7,-655.9, creature->GetPositionZ());
pCreature->RemoveUnitMovementFlag(MOVEMENTFLAG_WALK_MODE);
pCreature->GetMotionMaster()->MovePoint(0, -102.7,-655.9, pCreature->GetPositionZ());
}
void ShootCannon()
@@ -141,18 +141,18 @@ struct TRINITY_DLL_DECL instance_deadmines : public ScriptedInstance
DoorLever->SetUInt32Value(GAMEOBJECT_FLAGS, 4);
}
void OnGameObjectCreate(GameObject *go, bool add)
void OnGameObjectCreate(GameObject* pGo, bool add)
{
switch(go->GetEntry())
switch(pGo->GetEntry())
{
case GO_IRONCLAD_DOOR:
IronCladDoor = go;
IronCladDoor = pGo;
break;
case GO_DEFIAS_CANNON:
DefiasCannon = go;
DefiasCannon = pGo;
break;
case GO_DOOR_LEVER:
DoorLever = go;
DoorLever = pGo;
break;
}
}
@@ -70,9 +70,9 @@ bool GossipHello_npc_augustus_the_touched(Player* pPlayer, Creature* pCreature)
return true;
}
bool GossipSelect_npc_augustus_the_touched(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action)
bool GossipSelect_npc_augustus_the_touched(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
{
if (action == GOSSIP_ACTION_TRADE)
if (uiAction == GOSSIP_ACTION_TRADE)
pPlayer->SEND_VENDORLIST(pCreature->GetGUID());
return true;
}
@@ -126,9 +126,9 @@ bool GossipHello_npc_tirion_fordring(Player* pPlayer, Creature* pCreature)
return true;
}
bool GossipSelect_npc_tirion_fordring(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action)
bool GossipSelect_npc_tirion_fordring(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
{
switch (action)
switch (uiAction)
{
case GOSSIP_ACTION_INFO_DEF+1:
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Thank you, Tirion. What of your identity?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
@@ -934,9 +934,9 @@ CreatureAI* GetAI_npc_unworthy_initiate_anchor(Creature* pCreature)
return new npc_unworthy_initiate_anchorAI(pCreature);
}
bool GOHello_go_acherus_soul_prison(Player* pPlayer, GameObject* go)
bool GOHello_go_acherus_soul_prison(Player* pPlayer, GameObject* pGo)
{
if (Creature *anchor = go->FindNearestCreature(29521, 15))
if (Creature *anchor = pGo->FindNearestCreature(29521, 15))
if (uint64 prisonerGUID = anchor->AI()->GetGUID())
if (Creature* prisoner = Creature::GetCreature(*pPlayer, prisonerGUID))
CAST_AI(npc_unworthy_initiateAI, (prisoner->AI()))->EventStart(anchor, pPlayer);
@@ -101,9 +101,9 @@ bool GossipHello_npc_prospector_anvilward(Player* pPlayer, Creature* pCreature)
return true;
}
bool GossipSelect_npc_prospector_anvilward(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action)
bool GossipSelect_npc_prospector_anvilward(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
{
switch(action)
switch(uiAction)
{
case GOSSIP_ACTION_INFO_DEF+1:
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
@@ -415,11 +415,11 @@ bool GossipHello_master_kelerun_bloodmourn(Player* pPlayer, Creature* pCreature)
return true;
}
bool QuestAccept_master_kelerun_bloodmourn(Player* pPlayer, Creature *creature, Quest const *quest)
bool QuestAccept_master_kelerun_bloodmourn(Player* pPlayer, Creature* pCreature, Quest const *quest)
{
// One Player exclusive quest, wait for user go activation
if (quest->GetQuestId() == QUEST_SECOND_TRIAL)
CAST_AI(master_kelerun_bloodmournAI, creature->AI())->questPhase = 1;
CAST_AI(master_kelerun_bloodmournAI, pCreature->AI())->questPhase = 1;
return true;
}
@@ -578,12 +578,12 @@ struct TRINITY_DLL_DECL npc_apprentice_mirvedaAI : public ScriptedAI
}
};
bool QuestAccept_npc_apprentice_mirveda(Player* pPlayer, Creature* creature, Quest const* quest)
bool QuestAccept_npc_apprentice_mirveda(Player* pPlayer, Creature* pCreature, Quest const* quest)
{
if (quest->GetQuestId() == QUEST_UNEXPECTED_RESULT)
{
CAST_AI(npc_apprentice_mirvedaAI, creature->AI())->Summon = true;
CAST_AI(npc_apprentice_mirvedaAI, creature->AI())->PlayerGUID = pPlayer->GetGUID();
CAST_AI(npc_apprentice_mirvedaAI, pCreature->AI())->Summon = true;
CAST_AI(npc_apprentice_mirvedaAI, pCreature->AI())->PlayerGUID = pPlayer->GetGUID();
}
return true;
}
@@ -67,9 +67,9 @@ bool GossipHello_npcs_riverbreeze_and_silversky(Player* pPlayer, Creature* pCrea
return true;
}
bool GossipSelect_npcs_riverbreeze_and_silversky(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action)
bool GossipSelect_npcs_riverbreeze_and_silversky(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
{
if (action==GOSSIP_ACTION_INFO_DEF+1)
if (uiAction ==GOSSIP_ACTION_INFO_DEF+1)
{
pPlayer->CLOSE_GOSSIP_MENU();
pCreature->CastSpell(pPlayer, 15120, false);
@@ -42,14 +42,14 @@ bool GossipHello_npc_gregan_brewspewer(Player* pPlayer, Creature* pCreature)
return true;
}
bool GossipSelect_npc_gregan_brewspewer(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action)
bool GossipSelect_npc_gregan_brewspewer(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
{
if (action == GOSSIP_ACTION_INFO_DEF+1)
if (uiAction == GOSSIP_ACTION_INFO_DEF+1)
{
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE);
pPlayer->SEND_GOSSIP_MENU(2434, pCreature->GetGUID());
}
if (action == GOSSIP_ACTION_TRADE)
if (uiAction == GOSSIP_ACTION_TRADE)
pPlayer->SEND_VENDORLIST(pCreature->GetGUID());
return true;
}
@@ -47,9 +47,9 @@ bool GossipHello_npc_blood_knight_dawnstar(Player* pPlayer, Creature* pCreature)
return true;
}
bool GossipSelect_npc_blood_knight_dawnstar(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action)
bool GossipSelect_npc_blood_knight_dawnstar(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
{
if (action == GOSSIP_ACTION_INFO_DEF+1)
if (uiAction == GOSSIP_ACTION_INFO_DEF+1)
{
ItemPosCountVec dest;
uint8 msg = pPlayer->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, 24226, 1, false);
@@ -80,9 +80,9 @@ bool GossipHello_npc_budd_nedreck(Player* pPlayer, Creature* pCreature)
return true;
}
bool GossipSelect_npc_budd_nedreck(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action)
bool GossipSelect_npc_budd_nedreck(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
{
if (action == GOSSIP_ACTION_INFO_DEF)
if (uiAction == GOSSIP_ACTION_INFO_DEF)
{
pPlayer->CLOSE_GOSSIP_MENU();
pCreature->CastSpell(pPlayer, 42540, false);
@@ -109,9 +109,9 @@ bool GossipHello_npc_rathis_tomber(Player* pPlayer, Creature* pCreature)
return true;
}
bool GossipSelect_npc_rathis_tomber(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action)
bool GossipSelect_npc_rathis_tomber(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
{
if (action == GOSSIP_ACTION_TRADE)
if (uiAction == GOSSIP_ACTION_TRADE)
pPlayer->SEND_VENDORLIST(pCreature->GetGUID());
return true;
}
@@ -120,7 +120,7 @@ bool GossipSelect_npc_rathis_tomber(Player* pPlayer, Creature* pCreature, uint32
## go_gilded_brazier (Paladin First Trail quest (9678))
#####*/
bool GOHello_gilded_brazier(Player* pPlayer, GameObject* _GO)
bool GOHello_gilded_brazier(Player* pPlayer, GameObject* pGo)
{
if (pPlayer->GetQuestStatus(9678) == QUEST_STATUS_INCOMPLETE)
{
@@ -70,27 +70,27 @@ struct TRINITY_DLL_DECL instance_gruuls_lair : public ScriptedInstance
return false;
}
void OnCreatureCreate(Creature *creature, bool add)
void OnCreatureCreate(Creature* pCreature, bool add)
{
switch(creature->GetEntry())
switch(pCreature->GetEntry())
{
case 18835: KigglerTheCrazed = creature->GetGUID(); break;
case 18836: BlindeyeTheSeer = creature->GetGUID(); break;
case 18834: OlmTheSummoner = creature->GetGUID(); break;
case 18832: KroshFirehand = creature->GetGUID(); break;
case 18831: Maulgar = creature->GetGUID(); break;
case 18835: KigglerTheCrazed = pCreature->GetGUID(); break;
case 18836: BlindeyeTheSeer = pCreature->GetGUID(); break;
case 18834: OlmTheSummoner = pCreature->GetGUID(); break;
case 18832: KroshFirehand = pCreature->GetGUID(); break;
case 18831: Maulgar = pCreature->GetGUID(); break;
}
}
void OnGameObjectCreate(GameObject *go, bool add)
void OnGameObjectCreate(GameObject* pGo, bool add)
{
switch(go->GetEntry())
switch(pGo->GetEntry())
{
case 184468:
MaulgarDoor = go->GetGUID();
if (m_auiEncounter[0] == DONE) HandleGameObject(NULL, true, go);
MaulgarDoor = pGo->GetGUID();
if (m_auiEncounter[0] == DONE) HandleGameObject(NULL, true, pGo);
break;
case 184662: GruulDoor = go->GetGUID(); break;
case 184662: GruulDoor = pGo->GetGUID(); break;
}
}
@@ -81,53 +81,53 @@ struct TRINITY_DLL_DECL instance_blood_furnace : public ScriptedInstance
}
void OnCreatureCreate(Creature *creature, bool add)
void OnCreatureCreate(Creature* pCreature, bool add)
{
if (!add)
return;
switch(creature->GetEntry())
switch(pCreature->GetEntry())
{
case 17381: The_MakerGUID = creature->GetGUID(); break;
case 17380: BroggokGUID = creature->GetGUID(); break;
case 17377: Kelidan_The_BreakerGUID = creature->GetGUID(); break;
case 17381: The_MakerGUID = pCreature->GetGUID(); break;
case 17380: BroggokGUID = pCreature->GetGUID(); break;
case 17377: Kelidan_The_BreakerGUID = pCreature->GetGUID(); break;
}
}
void OnGameObjectCreate(GameObject *go, bool add)
void OnGameObjectCreate(GameObject* pGo, bool add)
{
if (!add)
return;
if (go->GetEntry() == 181766) //Final exit door
Door1GUID = go->GetGUID();
if (go->GetEntry() == 181811) //The Maker Front door
Door2GUID = go->GetGUID();
if (go->GetEntry() == 181812) //The Maker Rear door
Door3GUID = go->GetGUID();
if (go->GetEntry() == 181822) //Broggok Front door
Door4GUID = go->GetGUID();
if (go->GetEntry() == 181819) //Broggok Rear door
Door5GUID = go->GetGUID();
if (go->GetEntry() == 181823) //Kelidan exit door
Door6GUID = go->GetGUID();
if (pGo->GetEntry() == 181766) //Final exit door
Door1GUID = pGo->GetGUID();
if (pGo->GetEntry() == 181811) //The Maker Front door
Door2GUID = pGo->GetGUID();
if (pGo->GetEntry() == 181812) //The Maker Rear door
Door3GUID = pGo->GetGUID();
if (pGo->GetEntry() == 181822) //Broggok Front door
Door4GUID = pGo->GetGUID();
if (pGo->GetEntry() == 181819) //Broggok Rear door
Door5GUID = pGo->GetGUID();
if (pGo->GetEntry() == 181823) //Kelidan exit door
Door6GUID = pGo->GetGUID();
if (go->GetEntry() == 181813) //The Maker prison cell front right
PrisonCell1GUID = go->GetGUID();
if (go->GetEntry() == 181814) //The Maker prison cell back right
PrisonCell2GUID = go->GetGUID();
if (go->GetEntry() == 181816) //The Maker prison cell front left
PrisonCell3GUID = go->GetGUID();
if (go->GetEntry() == 181815) //The Maker prison cell back left
PrisonCell4GUID = go->GetGUID();
if (go->GetEntry() == 181821) //Broggok prison cell front right
PrisonCell5GUID = go->GetGUID();
if (go->GetEntry() == 181818) //Broggok prison cell back right
PrisonCell6GUID = go->GetGUID();
if (go->GetEntry() == 181820) //Broggok prison cell front left
PrisonCell7GUID = go->GetGUID();
if (go->GetEntry() == 181817) //Broggok prison cell back left
PrisonCell8GUID = go->GetGUID();
if (pGo->GetEntry() == 181813) //The Maker prison cell front right
PrisonCell1GUID = pGo->GetGUID();
if (pGo->GetEntry() == 181814) //The Maker prison cell back right
PrisonCell2GUID = pGo->GetGUID();
if (pGo->GetEntry() == 181816) //The Maker prison cell front left
PrisonCell3GUID = pGo->GetGUID();
if (pGo->GetEntry() == 181815) //The Maker prison cell back left
PrisonCell4GUID = pGo->GetGUID();
if (pGo->GetEntry() == 181821) //Broggok prison cell front right
PrisonCell5GUID = pGo->GetGUID();
if (pGo->GetEntry() == 181818) //Broggok prison cell back right
PrisonCell6GUID = pGo->GetGUID();
if (pGo->GetEntry() == 181820) //Broggok prison cell front left
PrisonCell7GUID = pGo->GetGUID();
if (pGo->GetEntry() == 181817) //Broggok prison cell back left
PrisonCell8GUID = pGo->GetGUID();
}
uint64 GetData64(uint32 data)
@@ -40,12 +40,12 @@ struct TRINITY_DLL_DECL instance_ramparts : public ScriptedInstance
m_uiChestHGUID = 0;
}
void OnGameObjectCreate(GameObject *go, bool add)
void OnGameObjectCreate(GameObject* pGo, bool add)
{
switch(go->GetEntry())
switch(pGo->GetEntry())
{
case 185168: m_uiChestNGUID = go->GetGUID(); break;
case 185169: m_uiChestHGUID = go->GetGUID(); break;
case 185168: m_uiChestNGUID = pGo->GetGUID(); break;
case 185169: m_uiChestHGUID = pGo->GetGUID(); break;
}
}
@@ -501,12 +501,12 @@ struct TRINITY_DLL_DECL mob_hellfire_channelerAI : public ScriptedAI
};
//Manticron Cube
bool GOHello_go_Manticron_Cube(Player* pPlayer, GameObject* _GO)
bool GOHello_go_Manticron_Cube(Player* pPlayer, GameObject* pGo)
{
ScriptedInstance* pInstance =_GO->GetInstanceData();
ScriptedInstance* pInstance = pGo->GetInstanceData();
if (!pInstance) return true;
if (pInstance->GetData(DATA_MAGTHERIDON_EVENT) != IN_PROGRESS) return true;
Creature *Magtheridon =Unit::GetCreature(*_GO, pInstance->GetData64(DATA_MAGTHERIDON));
Creature *Magtheridon =Unit::GetCreature(*pGo, pInstance->GetData64(DATA_MAGTHERIDON));
if (!Magtheridon || !Magtheridon->isAlive()) return true;
// if exhausted or already channeling return
@@ -516,7 +516,7 @@ bool GOHello_go_Manticron_Cube(Player* pPlayer, GameObject* _GO)
pPlayer->InterruptNonMeleeSpells(false);
pPlayer->CastSpell(pPlayer, SPELL_SHADOW_GRASP, true);
pPlayer->CastSpell(pPlayer, SPELL_SHADOW_GRASP_VISUAL, false);
CAST_AI(boss_magtheridonAI, Magtheridon->AI())->SetClicker(_GO->GetGUID(), pPlayer->GetGUID());
CAST_AI(boss_magtheridonAI, Magtheridon->AI())->SetClicker(pGo->GetGUID(), pPlayer->GetGUID());
return true;
}
@@ -70,28 +70,28 @@ struct TRINITY_DLL_DECL instance_magtheridons_lair : public ScriptedInstance
return false;
}
void OnCreatureCreate(Creature *creature, bool add)
void OnCreatureCreate(Creature* pCreature, bool add)
{
switch(creature->GetEntry())
switch(pCreature->GetEntry())
{
case 17257:
MagtheridonGUID = creature->GetGUID();
MagtheridonGUID = pCreature->GetGUID();
break;
case 17256:
ChannelerGUID.insert(creature->GetGUID());
ChannelerGUID.insert(pCreature->GetGUID());
break;
}
}
void OnGameObjectCreate(GameObject *go, bool add)
void OnGameObjectCreate(GameObject* pGo, bool add)
{
switch(go->GetEntry())
switch(pGo->GetEntry())
{
case 181713:
go->SetUInt32Value(GAMEOBJECT_FLAGS, 0);
pGo->SetUInt32Value(GAMEOBJECT_FLAGS, 0);
break;
case 183847:
DoorGUID = go->GetGUID();
DoorGUID = pGo->GetGUID();
break;
case 184653: // hall
case 184634: // six columns
@@ -100,7 +100,7 @@ struct TRINITY_DLL_DECL instance_magtheridons_lair : public ScriptedInstance
case 184637:
case 184638:
case 184639:
ColumnGUID.insert(go->GetGUID());
ColumnGUID.insert(pGo->GetGUID());
break;
}
}
@@ -364,7 +364,7 @@ struct TRINITY_DLL_DECL mob_fel_orc_convertAI : public ScriptedAI
}
};
//NOTE: this creature are also summoned by other spells, for different creatures
//NOTE: this Creature are also summoned by other spells, for different creatures
struct TRINITY_DLL_DECL mob_lesser_shadow_fissureAI : public ScriptedAI
{
mob_lesser_shadow_fissureAI(Creature *c) : ScriptedAI(c) {}
@@ -44,19 +44,19 @@ struct TRINITY_DLL_DECL instance_shattered_halls : public ScriptedInstance
nethekurseDoorGUID = 0;
}
void OnGameObjectCreate(GameObject *go, bool add)
void OnGameObjectCreate(GameObject* pGo, bool add)
{
switch(go->GetEntry())
switch(pGo->GetEntry())
{
case DOOR_NETHEKURSE: nethekurseDoorGUID = go->GetGUID(); break;
case DOOR_NETHEKURSE: nethekurseDoorGUID = pGo->GetGUID(); break;
}
}
void OnCreatureCreate(Creature *creature, bool add)
void OnCreatureCreate(Creature* pCreature, bool add)
{
switch(creature->GetEntry())
switch(pCreature->GetEntry())
{
case 16807: nethekurseGUID = creature->GetGUID(); break;
case 16807: nethekurseGUID = pCreature->GetGUID(); break;
}
}
@@ -120,9 +120,9 @@ CreatureAI* GetAI_npc_aeranas(Creature* pCreature)
## go_haaleshi_altar
######*/
bool GOHello_go_haaleshi_altar(Player* pPlayer, GameObject* _GO)
bool GOHello_go_haaleshi_altar(Player* pPlayer, GameObject* pGo)
{
_GO->SummonCreature(C_AERANAS,-1321.79, 4043.80, 116.24, 1.25, TEMPSUMMON_TIMED_DESPAWN, 180000);
pGo->SummonCreature(C_AERANAS,-1321.79, 4043.80, 116.24, 1.25, TEMPSUMMON_TIMED_DESPAWN, 180000);
return false;
}
@@ -53,9 +53,9 @@ bool GossipHello_npc_royal_historian_archesonus(Player* pPlayer, Creature* pCrea
return true;
}
bool GossipSelect_npc_royal_historian_archesonus(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action)
bool GossipSelect_npc_royal_historian_archesonus(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
{
switch (action)
switch (uiAction)
{
case GOSSIP_ACTION_INFO_DEF:
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_ROYAL_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
@@ -41,7 +41,7 @@ EndScriptData */
#define MOUNTED_DISPLAYID 16040
//Attumen (TODO: Use the summoning spell instead of creature id. It works , but is not convenient for us)
//Attumen (TODO: Use the summoning spell instead of Creature id. It works , but is not convenient for us)
#define SUMMON_ATTUMEN 15550
struct TRINITY_DLL_DECL boss_midnightAI : public ScriptedAI
@@ -727,9 +727,9 @@ bool GossipHello_npc_grandmother(Player* pPlayer, Creature* pCreature)
return true;
}
bool GossipSelect_npc_grandmother(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action)
bool GossipSelect_npc_grandmother(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
{
if (action == GOSSIP_ACTION_INFO_DEF)
if (uiAction == GOSSIP_ACTION_INFO_DEF)
{
if (Creature* pBigBadWolf = pCreature->SummonCreature(CREATURE_BIG_BAD_WOLF, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, HOUR*2*IN_MILISECONDS))
pBigBadWolf->AI()->AttackStart(pPlayer);
@@ -104,13 +104,13 @@ struct TRINITY_DLL_DECL instance_karazhan : public ScriptedInstance
return false;
}
void OnCreatureCreate(Creature *creature, bool add)
void OnCreatureCreate(Creature* pCreature, bool add)
{
switch (creature->GetEntry())
switch (pCreature->GetEntry())
{
case 17229: m_uiKilrekGUID = creature->GetGUID(); break;
case 15688: m_uiTerestianGUID = creature->GetGUID(); break;
case 15687: m_uiMoroesGUID = creature->GetGUID(); break;
case 17229: m_uiKilrekGUID = pCreature->GetGUID(); break;
case 15688: m_uiTerestianGUID = pCreature->GetGUID(); break;
case 15687: m_uiMoroesGUID = pCreature->GetGUID(); break;
}
}
@@ -174,36 +174,36 @@ struct TRINITY_DLL_DECL instance_karazhan : public ScriptedInstance
}
}
void OnGameObjectCreate(GameObject *go, bool add)
void OnGameObjectCreate(GameObject* pGo, bool add)
{
switch(go->GetEntry())
switch(pGo->GetEntry())
{
case 183932: m_uiCurtainGUID = go->GetGUID(); break;
case 183932: m_uiCurtainGUID = pGo->GetGUID(); break;
case 184278:
m_uiStageDoorLeftGUID = go->GetGUID();
m_uiStageDoorLeftGUID = pGo->GetGUID();
if (m_auiEncounter[4] == DONE)
go->SetGoState(GO_STATE_ACTIVE);
pGo->SetGoState(GO_STATE_ACTIVE);
break;
case 184279:
m_uiStageDoorRightGUID = go->GetGUID();
m_uiStageDoorRightGUID = pGo->GetGUID();
if (m_auiEncounter[4] == DONE)
go->SetGoState(GO_STATE_ACTIVE);
pGo->SetGoState(GO_STATE_ACTIVE);
break;
case 184517: m_uiLibraryDoor = go->GetGUID(); break;
case 185521: m_uiMassiveDoor = go->GetGUID(); break;
case 184276: m_uiGamesmansDoor = go->GetGUID(); break;
case 184277: m_uiGamesmansExitDoor = go->GetGUID(); break;
case 185134: m_uiNetherspaceDoor = go->GetGUID(); break;
case 184274: MastersTerraceDoor[0] = go->GetGUID(); break;
case 184280: MastersTerraceDoor[1] = go->GetGUID(); break;
case 184517: m_uiLibraryDoor = pGo->GetGUID(); break;
case 185521: m_uiMassiveDoor = pGo->GetGUID(); break;
case 184276: m_uiGamesmansDoor = pGo->GetGUID(); break;
case 184277: m_uiGamesmansExitDoor = pGo->GetGUID(); break;
case 185134: m_uiNetherspaceDoor = pGo->GetGUID(); break;
case 184274: MastersTerraceDoor[0] = pGo->GetGUID(); break;
case 184280: MastersTerraceDoor[1] = pGo->GetGUID(); break;
case 184275:
m_uiSideEntranceDoor = go->GetGUID();
m_uiSideEntranceDoor = pGo->GetGUID();
if (m_auiEncounter[4] == DONE)
go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_LOCKED);
pGo->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_LOCKED);
else
go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_LOCKED);
pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_LOCKED);
break;
case 185119: DustCoveredChest = go->GetGUID(); break;
case 185119: DustCoveredChest = pGo->GetGUID(); break;
}
switch(m_uiOperaEvent)
@@ -359,11 +359,11 @@ bool GossipHello_npc_barnes(Player* pPlayer, Creature* pCreature)
return true;
}
bool GossipSelect_npc_barnes(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action)
bool GossipSelect_npc_barnes(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
{
npc_barnesAI* pBarnesAI = CAST_AI(npc_barnesAI, pCreature->AI());
switch(action)
switch(uiAction)
{
case GOSSIP_ACTION_INFO_DEF+1:
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, OZ_GOSSIP2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
@@ -417,9 +417,9 @@ bool GossipHello_npc_berthold(Player* pPlayer, Creature* pCreature)
return true;
}
bool GossipSelect_npc_berthold(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action)
bool GossipSelect_npc_berthold(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
{
if (action == GOSSIP_ACTION_INFO_DEF + 1)
if (uiAction == GOSSIP_ACTION_INFO_DEF + 1)
pPlayer->CastSpell(pPlayer, SPELL_TELEPORT, true);
pPlayer->CLOSE_GOSSIP_MENU();
@@ -53,9 +53,9 @@ bool GossipHello_npc_mountaineer_pebblebitty(Player* pPlayer, Creature* pCreatur
return true;
}
bool GossipSelect_npc_mountaineer_pebblebitty(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action)
bool GossipSelect_npc_mountaineer_pebblebitty(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
{
switch (action)
switch (uiAction)
{
case GOSSIP_ACTION_INFO_DEF+1:
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_MP1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
@@ -153,7 +153,7 @@ struct TRINITY_DLL_DECL boss_priestess_delrissaAI : public ScriptedAI
void InitializeLackeys()
{
//can be called if creature are dead, so avoid
//can be called if Creature are dead, so avoid
if (!m_creature->isAlive())
return;
@@ -165,7 +165,7 @@ struct TRINITY_DLL_DECL boss_priestess_delrissaAI : public ScriptedAI
//pre-allocate size for speed
LackeyEntryList.resize((sizeof(m_auiAddEntries) / sizeof(uint32)));
//fill vector array with entries from creature array
//fill vector array with entries from Creature array
for(uint8 i = 0; i < LackeyEntryList.size(); ++i)
LackeyEntryList[i] = m_auiAddEntries[i];
@@ -333,7 +333,7 @@ struct TRINITY_DLL_DECL mob_fel_crystalAI : public ScriptedAI
{
if (CAST_AI(boss_selin_fireheartAI, Selin->AI())->CrystalGUID == m_creature->GetGUID())
{
// Set this to false if we are the creature that Selin is draining so his AI flows properly
// Set this to false if we are the Creature that Selin is draining so his AI flows properly
CAST_AI(boss_selin_fireheartAI, Selin->AI())->DrainingCrystal = false;
CAST_AI(boss_selin_fireheartAI, Selin->AI())->IsDraining = false;
CAST_AI(boss_selin_fireheartAI, Selin->AI())->EmpowerTimer = 10000;
@@ -125,29 +125,29 @@ struct TRINITY_DLL_DECL instance_magisters_terrace : public ScriptedInstance
}
}
void OnCreatureCreate(Creature *creature, bool add)
void OnCreatureCreate(Creature* pCreature, bool add)
{
switch(creature->GetEntry())
switch(pCreature->GetEntry())
{
case 24723: SelinGUID = creature->GetGUID(); break;
case 24560: DelrissaGUID = creature->GetGUID(); break;
case 24722: FelCrystals.push_back(creature->GetGUID()); break;
case 24723: SelinGUID = pCreature->GetGUID(); break;
case 24560: DelrissaGUID = pCreature->GetGUID(); break;
case 24722: FelCrystals.push_back(pCreature->GetGUID()); break;
}
}
void OnGameObjectCreate(GameObject *go, bool add)
void OnGameObjectCreate(GameObject* pGo, bool add)
{
switch(go->GetEntry())
switch(pGo->GetEntry())
{
case 187896: VexallusDoorGUID = go->GetGUID(); break;
case 187896: VexallusDoorGUID = pGo->GetGUID(); break;
//SunwellRaid Gate 02
case 187979: SelinDoorGUID = go->GetGUID(); break;
case 187979: SelinDoorGUID = pGo->GetGUID(); break;
//Assembly Chamber Door
case 188065: SelinEncounterDoorGUID = go->GetGUID(); break;
case 187770: DelrissaDoorGUID = go->GetGUID(); break;
case 188064: KaelDoorGUID = go->GetGUID(); break;
case 188165: KaelStatue[0] = go->GetGUID(); break;
case 188166: KaelStatue[1] = go->GetGUID(); break;
case 188065: SelinEncounterDoorGUID = pGo->GetGUID(); break;
case 187770: DelrissaDoorGUID = pGo->GetGUID(); break;
case 188064: KaelDoorGUID = pGo->GetGUID(); break;
case 188165: KaelStatue[0] = pGo->GetGUID(); break;
case 188166: KaelStatue[1] = pGo->GetGUID(); break;
}
}
@@ -94,84 +94,84 @@ struct TRINITY_DLL_DECL instance_molten_core : public ScriptedInstance
};
void OnGameObjectCreate(GameObject *go, bool add)
void OnGameObjectCreate(GameObject* pGo, bool add)
{
switch(go->GetEntry())
switch(pGo->GetEntry())
{
case 176951: //Sulfuron
RuneKoro = go->GetGUID();
RuneKoro = pGo->GetGUID();
break;
case 176952: //Geddon
RuneZeth = go->GetGUID();
RuneZeth = pGo->GetGUID();
break;
case 176953: //Shazzrah
RuneMazj = go->GetGUID();
RuneMazj = pGo->GetGUID();
break;
case 176954: //Golemagg
RuneTheri = go->GetGUID();
RuneTheri = pGo->GetGUID();
break;
case 176955: //Garr
RuneBlaz = go->GetGUID();
RuneBlaz = pGo->GetGUID();
break;
case 176956: //Magmadar
RuneKress = go->GetGUID();
RuneKress = pGo->GetGUID();
break;
case 176957: //Gehennas
RuneMohn = go->GetGUID();
RuneMohn = pGo->GetGUID();
break;
case 179703:
m_uiFirelordCacheGUID = go->GetGUID(); //when majordomo event == DONE DoRespawnGameObject(m_uiFirelordCacheGUID,);
m_uiFirelordCacheGUID = pGo->GetGUID(); //when majordomo event == DONE DoRespawnGameObject(m_uiFirelordCacheGUID,);
break;
}
}
void OnCreatureCreate(Creature *creature, bool add)
void OnCreatureCreate(Creature* pCreature, bool add)
{
switch (creature->GetEntry())
switch (pCreature->GetEntry())
{
case ID_LUCIFRON:
Lucifron = creature->GetGUID();
Lucifron = pCreature->GetGUID();
break;
case ID_MAGMADAR:
Magmadar = creature->GetGUID();
Magmadar = pCreature->GetGUID();
break;
case ID_GEHENNAS:
Gehennas = creature->GetGUID();
Gehennas = pCreature->GetGUID();
break;
case ID_GARR:
Garr = creature->GetGUID();
Garr = pCreature->GetGUID();
break;
case ID_GEDDON:
Geddon = creature->GetGUID();
Geddon = pCreature->GetGUID();
break;
case ID_SHAZZRAH:
Shazzrah = creature->GetGUID();
Shazzrah = pCreature->GetGUID();
break;
case ID_SULFURON:
Sulfuron = creature->GetGUID();
Sulfuron = pCreature->GetGUID();
break;
case ID_GOLEMAGG:
Golemagg = creature->GetGUID();
Golemagg = pCreature->GetGUID();
break;
case ID_DOMO:
Domo = creature->GetGUID();
Domo = pCreature->GetGUID();
break;
case ID_RAGNAROS:
Ragnaros = creature->GetGUID();
Ragnaros = pCreature->GetGUID();
break;
case ID_FLAMEWAKERPRIEST:
FlamewakerPriest = creature->GetGUID();
FlamewakerPriest = pCreature->GetGUID();
break;
}
}
@@ -70,9 +70,9 @@ bool GossipHello_npc_bunthen_plainswind(Player* pPlayer, Creature* pCreature)
return true;
}
bool GossipSelect_npc_bunthen_plainswind(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action)
bool GossipSelect_npc_bunthen_plainswind(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
{
switch(action)
switch(uiAction)
{
case GOSSIP_ACTION_INFO_DEF + 1:
pPlayer->CLOSE_GOSSIP_MENU();
@@ -112,9 +112,9 @@ bool GossipHello_npc_great_bear_spirit(Player* pPlayer, Creature* pCreature)
return true;
}
bool GossipSelect_npc_great_bear_spirit(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action)
bool GossipSelect_npc_great_bear_spirit(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
{
switch (action)
switch (uiAction)
{
case GOSSIP_ACTION_INFO_DEF:
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_BEAR2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
@@ -169,9 +169,9 @@ bool GossipHello_npc_silva_filnaveth(Player* pPlayer, Creature* pCreature)
return true;
}
bool GossipSelect_npc_silva_filnaveth(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action)
bool GossipSelect_npc_silva_filnaveth(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
{
switch(action)
switch(uiAction)
{
case GOSSIP_ACTION_INFO_DEF + 1:
pPlayer->CLOSE_GOSSIP_MENU();
@@ -520,11 +520,11 @@ CreatureAI* GetAI_npc_clintar_spirit(Creature* pCreature)
#define CLINTAR_SPIRIT 22916
bool QuestAccept_npc_clintar_dreamwalker(Player* pPlayer, Creature *creature, Quest const *quest)
bool QuestAccept_npc_clintar_dreamwalker(Player* pPlayer, Creature* pCreature, Quest const *quest)
{
if (quest->GetQuestId() == 10965)
{
Creature *clintar_spirit = creature->SummonCreature(CLINTAR_SPIRIT, CLINTAR_SPIRIT_SUMMON_X, CLINTAR_SPIRIT_SUMMON_Y, CLINTAR_SPIRIT_SUMMON_Z, CLINTAR_SPIRIT_SUMMON_O, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 100000);
Creature *clintar_spirit = pCreature->SummonCreature(CLINTAR_SPIRIT, CLINTAR_SPIRIT_SUMMON_X, CLINTAR_SPIRIT_SUMMON_Y, CLINTAR_SPIRIT_SUMMON_Z, CLINTAR_SPIRIT_SUMMON_O, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 100000);
if (clintar_spirit)
CAST_AI(npc_clintar_spiritAI, clintar_spirit->AI())->StartEvent(pPlayer);
}
@@ -49,9 +49,9 @@ bool GossipHello_npc_skorn_whitecloud(Player* pPlayer, Creature* pCreature)
return true;
}
bool GossipSelect_npc_skorn_whitecloud(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action)
bool GossipSelect_npc_skorn_whitecloud(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
{
if (action == GOSSIP_ACTION_INFO_DEF)
if (uiAction == GOSSIP_ACTION_INFO_DEF)
pPlayer->SEND_GOSSIP_MENU(523, pCreature->GetGUID());
return true;
@@ -203,9 +203,9 @@ bool GossipHello_mob_lump(Player* pPlayer, Creature* pCreature)
return true;
}
bool GossipSelect_mob_lump(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action)
bool GossipSelect_mob_lump(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
{
switch (action)
switch (uiAction)
{
case GOSSIP_ACTION_INFO_DEF:
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SL1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
@@ -294,9 +294,9 @@ bool GossipHello_npc_altruis_the_sufferer(Player* pPlayer, Creature* pCreature)
return true;
}
bool GossipSelect_npc_altruis_the_sufferer(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action)
bool GossipSelect_npc_altruis_the_sufferer(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
{
switch (action)
switch (uiAction)
{
case GOSSIP_ACTION_INFO_DEF+10:
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SATS1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 11);
@@ -339,7 +339,7 @@ bool GossipSelect_npc_altruis_the_sufferer(Player* pPlayer, Creature* pCreature,
return true;
}
bool QuestAccept_npc_altruis_the_sufferer(Player* pPlayer, Creature *creature, Quest const *quest)
bool QuestAccept_npc_altruis_the_sufferer(Player* pPlayer, Creature* pCreature, Quest const *quest)
{
if (!pPlayer->GetQuestRewardStatus(9991)) //Survey the Land, q-id 9991
{
@@ -391,9 +391,9 @@ bool GossipHello_npc_greatmother_geyah(Player* pPlayer, Creature* pCreature)
return true;
}
bool GossipSelect_npc_greatmother_geyah(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action)
bool GossipSelect_npc_greatmother_geyah(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
{
switch (action)
switch (uiAction)
{
case GOSSIP_ACTION_INFO_DEF + 1:
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SGG1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
@@ -478,9 +478,9 @@ bool GossipHello_npc_lantresor_of_the_blade(Player* pPlayer, Creature* pCreature
return true;
}
bool GossipSelect_npc_lantresor_of_the_blade(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action)
bool GossipSelect_npc_lantresor_of_the_blade(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
{
switch (action)
switch (uiAction)
{
case GOSSIP_ACTION_INFO_DEF:
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SLB1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
@@ -196,7 +196,7 @@ struct TRINITY_DLL_DECL boss_kelthuzadAI : public BossAI
{
Phase = 3 ;
DoScriptText(SAY_REQUEST_AID, m_creature);
//here Lich King should respond to KelThuzad but I don't know which creature to make talk
//here Lich King should respond to KelThuzad but I don't know which Creature to make talk
//so for now just make Kelthuzad says it.
DoScriptText(SAY_ANSWER_REQUEST, m_creature);
}
@@ -160,8 +160,8 @@ struct TRINITY_DLL_DECL boss_sapphironAI : public BossAI
{
if (Player* pPlayer = Unit::GetPlayer(itr->first))
pPlayer->RemoveAura(SPELL_ICEBOLT);
if (GameObject *go = GameObject::GetGameObject(*me, itr->second))
go->DeleteObjectWithOwner();
if (GameObject* pGo = GameObject::GetGameObject(*me, itr->second))
pGo->DeleteObjectWithOwner();
}
iceblocks.clear();
}
@@ -311,10 +311,10 @@ struct TRINITY_DLL_DECL boss_sapphironAI : public BossAI
for(IceBlockMap::iterator itr = iceblocks.begin(); itr != iceblocks.end(); ++itr)
{
if (GameObject *go = GameObject::GetGameObject(*me, itr->second))
if (GameObject* pGo = GameObject::GetGameObject(*me, itr->second))
{
if (go->IsInBetween(me, target, 2.0f)
&& me->GetExactDistance2d(target->GetPositionX(), target->GetPositionY()) - me->GetExactDistance2d(go->GetPositionX(), go->GetPositionY()) < 5.0f)
if (pGo->IsInBetween(me, target, 2.0f)
&& me->GetExactDistance2d(target->GetPositionX(), target->GetPositionY()) - me->GetExactDistance2d(pGo->GetPositionX(), pGo->GetPositionY()) < 5.0f)
{
target->ApplySpellImmune(0, IMMUNITY_ID, SPELL_FROST_EXPLOSION, true);
targets.push_back(target);
@@ -98,7 +98,7 @@ inline uint32 GetEruptionSection(float x, float y)
struct TRINITY_DLL_DECL instance_naxxramas : public InstanceData
{
instance_naxxramas(Map* pMap) : InstanceData(pMap)
, Sapphiron(NULL), GothikGate(NULL), HorsemenChest(NULL), HorsemenNum(0)
, Sapphiron(NULL), pGothikGate(NULL), HorsemenChest(NULL), HorsemenNum(0)
{
SetBossNumber(MAX_BOSS_NUMBER);
LoadDoorData(doorData);
@@ -106,40 +106,40 @@ struct TRINITY_DLL_DECL instance_naxxramas : public InstanceData
}
std::set<GameObject*> HeiganEruption[4];
GameObject *GothikGate, *HorsemenChest;
Creature *Sapphiron;
GameObject* pGothikGate, *HorsemenChest;
Creature* Sapphiron;
uint32 HorsemenNum;
void OnCreatureCreate(Creature *creature, bool add)
void OnCreatureCreate(Creature* pCreature, bool add)
{
switch(creature->GetEntry())
switch(pCreature->GetEntry())
{
case 15989: Sapphiron = add ? creature : NULL; return;
case 15989: Sapphiron = add ? pCreature : NULL; return;
}
AddMinion(creature, add);
AddMinion(pCreature, add);
}
void OnGameObjectCreate(GameObject* go, bool add)
void OnGameObjectCreate(GameObject* pGo, bool add)
{
if (go->GetGOInfo()->displayId == 6785 || go->GetGOInfo()->displayId == 1287)
if (pGo->GetGOInfo()->displayId == 6785 || pGo->GetGOInfo()->displayId == 1287)
{
uint32 section = GetEruptionSection(go->GetPositionX(), go->GetPositionY());
uint32 section = GetEruptionSection(pGo->GetPositionX(), pGo->GetPositionY());
if (add)
HeiganEruption[section].insert(go);
HeiganEruption[section].insert(pGo);
else
HeiganEruption[section].erase(go);
HeiganEruption[section].erase(pGo);
return;
}
switch(go->GetEntry())
switch(pGo->GetEntry())
{
case GO_BIRTH: if (!add && Sapphiron) Sapphiron->AI()->DoAction(DATA_SAPPHIRON_BIRTH); return;
case GO_GOTHIK_GATE: GothikGate = add ? go : NULL; break;
case GO_HORSEMEN_CHEST: HorsemenChest = add ? go : NULL; break;
case GO_GOTHIK_GATE: pGothikGate = add ? pGo : NULL; break;
case GO_HORSEMEN_CHEST: HorsemenChest = add ? pGo : NULL; break;
}
AddDoor(go, add);
AddDoor(pGo, add);
}
void SetData(uint32 id, uint32 value)
@@ -150,8 +150,8 @@ struct TRINITY_DLL_DECL instance_naxxramas : public InstanceData
HeiganErupt(value);
break;
case DATA_GOTHIK_GATE:
if (GothikGate)
GothikGate->SetGoState(GOState(value));
if (pGothikGate)
pGothikGate->SetGoState(GOState(value));
break;
}
}
@@ -85,7 +85,7 @@ struct TRINITY_DLL_DECL npc_manaforge_control_consoleAI : public ScriptedAI
/*void SpellHit(Unit *caster, const SpellEntry *spell)
{
//we have no way of telling the creature was hit by spell -> got aura applied after 10-12 seconds
//we have no way of telling the Creature was hit by spell -> got aura applied after 10-12 seconds
//then no way for the mobs to actually stop the shutdown as intended.
if (spell->Id == SPELL_INTERRUPT_1)
DoSay("Silence! I kill you!",LANG_UNIVERSAL, NULL);
@@ -124,14 +124,14 @@ struct TRINITY_DLL_DECL npc_manaforge_control_consoleAI : public ScriptedAI
if (goConsole)
{
if (GameObject* go = GameObject::GetGameObject((*m_creature),goConsole))
go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_IN_USE);
if (GameObject* pGo = GameObject::GetGameObject((*m_creature),goConsole))
pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_IN_USE);
}
}
void DoWaveSpawnForCreature(Creature *creature)
void DoWaveSpawnForCreature(Creature* pCreature)
{
switch(creature->GetEntry())
switch(pCreature->GetEntry())
{
case ENTRY_BNAAR_C_CONSOLE:
if (rand()%2)
@@ -183,9 +183,9 @@ struct TRINITY_DLL_DECL npc_manaforge_control_consoleAI : public ScriptedAI
break;
}
}
void DoFinalSpawnForCreature(Creature *creature)
void DoFinalSpawnForCreature(Creature* pCreature)
{
switch(creature->GetEntry())
switch(pCreature->GetEntry())
{
case ENTRY_BNAAR_C_CONSOLE:
add = m_creature->SummonCreature(ENTRY_SUNFURY_TECH,2946.52,4201.42,163.47,3.54,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000);
@@ -260,8 +260,8 @@ struct TRINITY_DLL_DECL npc_manaforge_control_consoleAI : public ScriptedAI
}
if (goConsole)
{
if (GameObject* go = GameObject::GetGameObject((*m_creature),goConsole))
go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_IN_USE);
if (GameObject* pGo = GameObject::GetGameObject((*m_creature),goConsole))
pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_IN_USE);
}
++Phase;
break;
@@ -287,18 +287,18 @@ CreatureAI* GetAI_npc_manaforge_control_console(Creature* pCreature)
######*/
//TODO: clean up this workaround when Trinity adds support to do it properly (with gossip selections instead of instant summon)
bool GOHello_go_manaforge_control_console(Player* pPlayer, GameObject* _GO)
bool GOHello_go_manaforge_control_console(Player* pPlayer, GameObject* pGo)
{
if (_GO->GetGoType() == GAMEOBJECT_TYPE_QUESTGIVER)
if (pGo->GetGoType() == GAMEOBJECT_TYPE_QUESTGIVER)
{
pPlayer->PrepareQuestMenu(_GO->GetGUID());
pPlayer->SendPreparedQuest(_GO->GetGUID());
pPlayer->PrepareQuestMenu(pGo->GetGUID());
pPlayer->SendPreparedQuest(pGo->GetGUID());
}
Creature* manaforge;
manaforge = NULL;
switch(_GO->GetAreaId())
switch(pGo->GetAreaId())
{
case 3726: //b'naar
if ((pPlayer->GetQuestStatus(10299) == QUEST_STATUS_INCOMPLETE || pPlayer->GetQuestStatus(10329) == QUEST_STATUS_INCOMPLETE) &&
@@ -325,8 +325,8 @@ bool GOHello_go_manaforge_control_console(Player* pPlayer, GameObject* _GO)
if (manaforge)
{
CAST_AI(npc_manaforge_control_consoleAI, manaforge->AI())->someplayer = pPlayer->GetGUID();
CAST_AI(npc_manaforge_control_consoleAI, manaforge->AI())->goConsole = _GO->GetGUID();
_GO->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_IN_USE);
CAST_AI(npc_manaforge_control_consoleAI, manaforge->AI())->goConsole = pGo->GetGUID();
pGo->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_IN_USE);
}
return true;
}
@@ -649,9 +649,9 @@ bool GossipHello_npc_professor_dabiri(Player* pPlayer, Creature* pCreature)
return true;
}
bool GossipSelect_npc_professor_dabiri(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action)
bool GossipSelect_npc_professor_dabiri(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
{
if (action == GOSSIP_ACTION_INFO_DEF+1)
if (uiAction == GOSSIP_ACTION_INFO_DEF+1)
{
pCreature->CastSpell(pPlayer, SPELL_PHASE_DISTRUPTOR, false);
pPlayer->CLOSE_GOSSIP_MENU();
@@ -660,10 +660,10 @@ bool GossipSelect_npc_professor_dabiri(Player* pPlayer, Creature* pCreature, uin
return true;
}
bool QuestAccept_npc_professor_dabiri(Player* pPlayer, Creature *creature, Quest const *quest)
bool QuestAccept_npc_professor_dabiri(Player* pPlayer, Creature* pCreature, Quest const *quest)
{
if (quest->GetQuestId() == QUEST_DIMENSIUS)
DoScriptText(WHISPER_DABIRI, creature, pPlayer);
DoScriptText(WHISPER_DABIRI, pCreature, pPlayer);
return true;
}
@@ -870,13 +870,13 @@ struct TRINITY_DLL_DECL npc_bessyAI : public npc_escortAI
};
bool QuestAccept_npc_bessy(Player* pPlayer, Creature* creature, Quest const* quest)
bool QuestAccept_npc_bessy(Player* pPlayer, Creature* pCreature, Quest const* quest)
{
if (quest->GetQuestId() == Q_ALMABTRIEB)
{
creature->setFaction(113);
creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
CAST_AI(npc_escortAI, (creature->AI()))->Start(true, false, pPlayer->GetGUID());
pCreature->setFaction(113);
pCreature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
CAST_AI(npc_escortAI, (pCreature->AI()))->Start(true, false, pPlayer->GetGUID());
}
return true;
}
@@ -107,29 +107,29 @@ struct TRINITY_DLL_DECL instance_nexus : public ScriptedInstance
}
}
void OnGameObjectCreate(GameObject *go, bool add)
void OnGameObjectCreate(GameObject* pGo, bool add)
{
switch(go->GetEntry())
switch(pGo->GetEntry())
{
case 188527:
{
AnomalusContainmentSphere = go->GetGUID();
AnomalusContainmentSphere = pGo->GetGUID();
if (m_auiEncounter[1] == DONE)
go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1);
pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1);
break;
}
case 188528:
{
OrmoroksContainmentSphere = go->GetGUID();
OrmoroksContainmentSphere = pGo->GetGUID();
if (m_auiEncounter[2] == DONE)
go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1);
pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1);
break;
}
case 188526:
{
TelestrasContainmentSphere = go->GetGUID();
TelestrasContainmentSphere = pGo->GetGUID();
if (m_auiEncounter[0] == DONE)
go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1);
pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1);
break;
}
}
@@ -61,7 +61,7 @@ enum
SPELL_TWILIGHT_REVENGE = 60639,
SPELL_PYROBUFFET = 56916, // currently used for hard enrage after 15 minutes
SPELL_PYROBUFFET_RANGE = 58907, // possibly used when player get too far away from dummy creatures (2x creature entry 30494)
SPELL_PYROBUFFET_RANGE = 58907, // possibly used when player get too far away from dummy creatures (2x Creature entry 30494)
SPELL_TWILIGHT_SHIFT_ENTER = 57620, // enter phase. Player get this when click GO
SPELL_TWILIGHT_SHIFT_REMOVAL = 61187, // leave phase
@@ -49,9 +49,9 @@ bool GossipHello_npc_neeru_fireblade(Player* pPlayer, Creature* pCreature)
return true;
}
bool GossipSelect_npc_neeru_fireblade(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action)
bool GossipSelect_npc_neeru_fireblade(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
{
switch (action)
switch (uiAction)
{
case GOSSIP_ACTION_INFO_DEF+1:
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SNF, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
@@ -144,12 +144,12 @@ CreatureAI* GetAI_npc_shenthul(Creature* pCreature)
return new npc_shenthulAI (pCreature);
}
bool QuestAccept_npc_shenthul(Player* pPlayer, Creature* creature, Quest const* quest)
bool QuestAccept_npc_shenthul(Player* pPlayer, Creature* pCreature, Quest const* quest)
{
if (quest->GetQuestId() == QUEST_SHATTERED_SALUTE)
{
CAST_AI(npc_shenthulAI, creature->AI())->CanTalk = true;
CAST_AI(npc_shenthulAI, creature->AI())->PlayerGUID = pPlayer->GetGUID();
CAST_AI(npc_shenthulAI, pCreature->AI())->CanTalk = true;
CAST_AI(npc_shenthulAI, pCreature->AI())->PlayerGUID = pPlayer->GetGUID();
}
return true;
}
@@ -224,9 +224,9 @@ bool GossipHello_npc_thrall_warchief(Player* pPlayer, Creature* pCreature)
return true;
}
bool GossipSelect_npc_thrall_warchief(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action)
bool GossipSelect_npc_thrall_warchief(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
{
switch (action)
switch (uiAction)
{
case GOSSIP_ACTION_INFO_DEF+1:
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_STW1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
@@ -56,15 +56,15 @@ bool GossipHello_npc_henry_stern (Player* pPlayer, Creature* pCreature)
return true;
}
bool GossipSelect_npc_henry_stern (Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action)
bool GossipSelect_npc_henry_stern (Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
{
if (action == GOSSIP_ACTION_INFO_DEF + 1)
if (uiAction == GOSSIP_ACTION_INFO_DEF + 1)
{
pCreature->CastSpell(pPlayer, SPELL_TEACHING_GOLDTHORN_TEA, true);
pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXT_TEA_ANSWER, pCreature->GetGUID());
}
if (action == GOSSIP_ACTION_INFO_DEF + 2)
if (uiAction == GOSSIP_ACTION_INFO_DEF + 2)
{
pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXT_POTION_ANSWER, pCreature->GetGUID());
pCreature->CastSpell(pPlayer, SPELL_TEACHING_MIGHTY_TROLLS_BLOOD_POTION, true);
@@ -58,11 +58,11 @@ struct TRINITY_DLL_DECL instance_razorfen_kraul : public ScriptedInstance
return NULL;
}
void OnGameObjectCreate(GameObject *go, bool apply)
void OnGameObjectCreate(GameObject* pGo, bool apply)
{
switch(go->GetEntry())
switch(pGo->GetEntry())
{
case 21099: DoorWardGUID = go->GetGUID(); break;
case 21099: DoorWardGUID = pGo->GetGUID(); break;
}
}
@@ -127,13 +127,13 @@ struct TRINITY_DLL_DECL npc_willixAI : public npc_escortAI
}
};
bool QuestAccept_npc_willix(Player* pPlayer, Creature* creature, Quest const* quest)
bool QuestAccept_npc_willix(Player* pPlayer, Creature* pCreature, Quest const* quest)
{
if (quest->GetQuestId() == QUEST_WILLIX_THE_IMPORTER)
{
CAST_AI(npc_escortAI, (creature->AI()))->Start(true, false, pPlayer->GetGUID());
DoScriptText(SAY_READY, creature, pPlayer);
creature->setFaction(113);
CAST_AI(npc_escortAI, (pCreature->AI()))->Start(true, false, pPlayer->GetGUID());
DoScriptText(SAY_READY, pCreature, pPlayer);
pCreature->setFaction(113);
}
return true;
@@ -63,25 +63,25 @@ struct TRINITY_DLL_DECL instance_scarlet_monastery : public ScriptedInstance
DoorHighInquisitorGUID = 0;
}
void OnGameObjectCreate(GameObject *go, bool add)
void OnGameObjectCreate(GameObject* pGo, bool add)
{
switch(go->GetEntry())
switch(pGo->GetEntry())
{
case ENTRY_PUMPKIN_SHRINE: PumpkinShrineGUID = go->GetGUID();break;
case 104600: DoorHighInquisitorGUID = go->GetGUID(); break;
case ENTRY_PUMPKIN_SHRINE: PumpkinShrineGUID = pGo->GetGUID();break;
case 104600: DoorHighInquisitorGUID = pGo->GetGUID(); break;
}
}
void OnCreatureCreate(Creature *creature, bool add)
void OnCreatureCreate(Creature* pCreature, bool add)
{
switch(creature->GetEntry())
switch(pCreature->GetEntry())
{
case ENTRY_HORSEMAN: HorsemanGUID = creature->GetGUID(); break;
case ENTRY_HEAD: HeadGUID = creature->GetGUID(); break;
case ENTRY_PUMPKIN: HorsemanAdds.insert(creature->GetGUID());break;
case 3976: MograineGUID = creature->GetGUID(); break;
case 3977: WhitemaneGUID = creature->GetGUID(); break;
case 3981: VorrelGUID = creature->GetGUID(); break;
case ENTRY_HORSEMAN: HorsemanGUID = pCreature->GetGUID(); break;
case ENTRY_HEAD: HeadGUID = pCreature->GetGUID(); break;
case ENTRY_PUMPKIN: HorsemanAdds.insert(pCreature->GetGUID());break;
case 3976: MograineGUID = pCreature->GetGUID(); break;
case 3977: WhitemaneGUID = pCreature->GetGUID(); break;
case 3981: VorrelGUID = pCreature->GetGUID(); break;
}
}
@@ -69,18 +69,18 @@ struct TRINITY_DLL_DECL instance_scholomance : public ScriptedInstance
IsBossDied[i] = false;
}
void OnGameObjectCreate(GameObject *go, bool add)
void OnGameObjectCreate(GameObject* pGo, bool add)
{
switch(go->GetEntry())
switch(pGo->GetEntry())
{
case GO_GATE_KIRTONOS: GateKirtonosGUID = go->GetGUID(); break;
case GO_GATE_GANDLING: GateGandlingGUID = go->GetGUID(); break;
case GO_GATE_MALICIA: GateMiliciaGUID = go->GetGUID(); break;
case GO_GATE_THEOLEN: GateTheolenGUID = go->GetGUID(); break;
case GO_GATE_POLKELT: GatePolkeltGUID = go->GetGUID(); break;
case GO_GATE_RAVENIAN: GateRavenianGUID = go->GetGUID(); break;
case GO_GATE_BAROV: GateBarovGUID = go->GetGUID(); break;
case GO_GATE_ILLUCIA: GateIlluciaGUID = go->GetGUID(); break;
case GO_GATE_KIRTONOS: GateKirtonosGUID = pGo->GetGUID(); break;
case GO_GATE_GANDLING: GateGandlingGUID = pGo->GetGUID(); break;
case GO_GATE_MALICIA: GateMiliciaGUID = pGo->GetGUID(); break;
case GO_GATE_THEOLEN: GateTheolenGUID = pGo->GetGUID(); break;
case GO_GATE_POLKELT: GatePolkeltGUID = pGo->GetGUID(); break;
case GO_GATE_RAVENIAN: GateRavenianGUID = pGo->GetGUID(); break;
case GO_GATE_BAROV: GateBarovGUID = pGo->GetGUID(); break;
case GO_GATE_ILLUCIA: GateIlluciaGUID = pGo->GetGUID(); break;
}
}
@@ -46,9 +46,9 @@ bool GossipHello_npc_kalaran_windblade(Player* pPlayer, Creature* pCreature)
return true;
}
bool GossipSelect_npc_kalaran_windblade(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action)
bool GossipSelect_npc_kalaran_windblade(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
{
switch (action)
switch (uiAction)
{
case GOSSIP_ACTION_INFO_DEF:
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Continue please", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
@@ -83,9 +83,9 @@ bool GossipHello_npc_lothos_riftwaker(Player* pPlayer, Creature* pCreature)
return true;
}
bool GossipSelect_npc_lothos_riftwaker(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action)
bool GossipSelect_npc_lothos_riftwaker(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
{
if (action == GOSSIP_ACTION_INFO_DEF + 1)
if (uiAction == GOSSIP_ACTION_INFO_DEF + 1)
{
pPlayer->CLOSE_GOSSIP_MENU();
pPlayer->TeleportTo(409, 1096, -467, -104.6, 3.64);
@@ -111,9 +111,9 @@ bool GossipHello_npc_zamael_lunthistle(Player* pPlayer, Creature* pCreature)
return true;
}
bool GossipSelect_npc_zamael_lunthistle(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action)
bool GossipSelect_npc_zamael_lunthistle(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
{
switch (action)
switch (uiAction)
{
case GOSSIP_ACTION_INFO_DEF:
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Please continue...", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
@@ -74,22 +74,22 @@ struct TRINITY_DLL_DECL instance_shadowfang_keep : public ScriptedInstance
}
}
void OnGameObjectCreate(GameObject *go, bool add)
void OnGameObjectCreate(GameObject* pGo, bool add)
{
switch(go->GetEntry())
switch(pGo->GetEntry())
{
case GO_COURTYARD_DOOR:
DoorCourtyardGUID = go->GetGUID();
DoorCourtyardGUID = pGo->GetGUID();
if (m_auiEncounter[0] == DONE)
DoUseDoorOrButton(DoorCourtyardGUID);
break;
case GO_SORCERER_DOOR:
DoorSorcererGUID = go->GetGUID();
DoorSorcererGUID = pGo->GetGUID();
if (m_auiEncounter[2] == DONE)
DoUseDoorOrButton(DoorSorcererGUID);
break;
case GO_ARUGAL_DOOR:
DoorArugalGUID = go->GetGUID();
DoorArugalGUID = pGo->GetGUID();
if (m_auiEncounter[3] == DONE)
DoUseDoorOrButton(DoorArugalGUID);
break;
@@ -393,9 +393,9 @@ bool GossipHello_npc_drake_dealer_hurlunk(Player* pPlayer, Creature* pCreature)
return true;
}
bool GossipSelect_npc_drake_dealer_hurlunk(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action)
bool GossipSelect_npc_drake_dealer_hurlunk(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
{
if (action == GOSSIP_ACTION_TRADE)
if (uiAction == GOSSIP_ACTION_TRADE)
pPlayer->SEND_VENDORLIST(pCreature->GetGUID());
return true;
@@ -420,9 +420,9 @@ bool GossipHello_npcs_flanis_swiftwing_and_kagrosh(Player* pPlayer, Creature* pC
return true;
}
bool GossipSelect_npcs_flanis_swiftwing_and_kagrosh(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action)
bool GossipSelect_npcs_flanis_swiftwing_and_kagrosh(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
{
if (action == GOSSIP_ACTION_INFO_DEF+1)
if (uiAction == GOSSIP_ACTION_INFO_DEF+1)
{
ItemPosCountVec dest;
uint8 msg = pPlayer->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, 30658, 1, false);
@@ -432,7 +432,7 @@ bool GossipSelect_npcs_flanis_swiftwing_and_kagrosh(Player* pPlayer, Creature* p
pPlayer->PlayerTalkClass->ClearMenus();
}
}
if (action == GOSSIP_ACTION_INFO_DEF+2)
if (uiAction == GOSSIP_ACTION_INFO_DEF+2)
{
ItemPosCountVec dest;
uint8 msg = pPlayer->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, 30659, 1, false);
@@ -467,9 +467,9 @@ bool GossipHello_npc_murkblood_overseer(Player* pPlayer, Creature* pCreature)
return true;
}
bool GossipSelect_npc_murkblood_overseer(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action)
bool GossipSelect_npc_murkblood_overseer(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
{
switch (action)
switch (uiAction)
{
case GOSSIP_ACTION_INFO_DEF+1:
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SMO1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
@@ -528,9 +528,9 @@ bool GossipHello_npc_neltharaku(Player* pPlayer, Creature* pCreature)
return true;
}
bool GossipSelect_npc_neltharaku(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action)
bool GossipSelect_npc_neltharaku(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
{
switch (action)
switch (uiAction)
{
case GOSSIP_ACTION_INFO_DEF+1:
pPlayer->ADD_GOSSIP_ITEM(0, GOSSIP_SN1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
@@ -581,9 +581,9 @@ bool GossipHello_npc_oronok_tornheart(Player* pPlayer, Creature* pCreature)
return true;
}
bool GossipSelect_npc_oronok_tornheart(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action)
bool GossipSelect_npc_oronok_tornheart(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
{
switch (action)
switch (uiAction)
{
case GOSSIP_ACTION_TRADE:
pPlayer->SEND_VENDORLIST(pCreature->GetGUID());
@@ -631,7 +631,7 @@ enum
TAXI_PATH_ID = 649
};
bool QuestAccept_npc_karynaku(Player* pPlayer, Creature* creature, Quest const* quest)
bool QuestAccept_npc_karynaku(Player* pPlayer, Creature* pCreature, Quest const* quest)
{
if (quest->GetQuestId() == QUEST_ALLY_OF_NETHER)
pPlayer->ActivateTaxiPathTo(TAXI_PATH_ID); //pPlayer->ActivateTaxiPathTo(649);
@@ -1044,7 +1044,7 @@ bool QuestAccept_npc_earthmender_wilda(Player* pPlayer, Creature* pCreature, con
/* ContentData
Battle of the crimson watch - creatures, gameobjects and defines
mob_illidari_spawn : Adds that are summoned in the Crimson Watch battle.
mob_torloth_the_magnificent : Final creature that players have to face before quest is completed
mob_torloth_the_magnificent : Final Creature that players have to face before quest is completed
npc_lord_illidan_stormrage : Creature that controls the event.
go_crystal_prison : GameObject that begins the event and hands out quest
EndContentData */
@@ -1058,7 +1058,7 @@ EndContentData */
struct TorlothCinematic
{
int32 TextId;
uint32 Creature, Timer;
uint32 pCreature, Timer;
};
// Creature 0 - Torloth, 1 - Illidan
@@ -1270,7 +1270,7 @@ struct TRINITY_DLL_DECL mob_torloth_the_magnificentAI : public ScriptedAI
{
Creature* pCreature = m_creature;
if (TorlothAnim[AnimationCount].Creature == 1)
if (TorlothAnim[AnimationCount].pCreature == 1)
{
pCreature = (Unit::GetCreature(*m_creature, LordIllidanGUID));
@@ -96,9 +96,9 @@ bool GossipHello_npc_raliq_the_drunk(Player* pPlayer, Creature* pCreature)
return true;
}
bool GossipSelect_npc_raliq_the_drunk(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action)
bool GossipSelect_npc_raliq_the_drunk(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
{
if (action == GOSSIP_ACTION_INFO_DEF+1)
if (uiAction == GOSSIP_ACTION_INFO_DEF+1)
{
pPlayer->CLOSE_GOSSIP_MENU();
pCreature->setFaction(FACTION_HOSTILE_RD);
@@ -221,9 +221,9 @@ bool GossipHello_npc_shattrathflaskvendors(Player* pPlayer, Creature* pCreature)
return true;
}
bool GossipSelect_npc_shattrathflaskvendors(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action)
bool GossipSelect_npc_shattrathflaskvendors(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
{
if (action == GOSSIP_ACTION_TRADE)
if (uiAction == GOSSIP_ACTION_TRADE)
pPlayer->SEND_VENDORLIST(pCreature->GetGUID());
return true;
@@ -245,9 +245,9 @@ bool GossipHello_npc_zephyr(Player* pPlayer, Creature* pCreature)
return true;
}
bool GossipSelect_npc_zephyr(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action)
bool GossipSelect_npc_zephyr(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
{
if (action == GOSSIP_ACTION_INFO_DEF+1)
if (uiAction == GOSSIP_ACTION_INFO_DEF+1)
pPlayer->CastSpell(pPlayer,37778,false);
return true;
@@ -517,24 +517,24 @@ struct TRINITY_DLL_DECL npc_dirty_larryAI : public ScriptedAI
}
};
bool GossipHello_npc_dirty_larry(Player* pPlayer, Creature *creature)
bool GossipHello_npc_dirty_larry(Player* pPlayer, Creature* pCreature)
{
if (creature->isQuestGiver())
pPlayer->PrepareQuestMenu(creature->GetGUID());
if (pCreature->isQuestGiver())
pPlayer->PrepareQuestMenu(pCreature->GetGUID());
if (pPlayer->GetQuestStatus(QUEST_WBI) == QUEST_STATUS_INCOMPLETE)
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_BOOK, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
pPlayer->SEND_GOSSIP_MENU(creature->GetNpcTextId(), creature->GetGUID());
pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID());
return true;
}
bool GossipSelect_npc_dirty_larry(Player* pPlayer, Creature *creature, uint32 sender, uint32 action)
bool GossipSelect_npc_dirty_larry(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
{
if (action == GOSSIP_ACTION_INFO_DEF+1)
if (uiAction == GOSSIP_ACTION_INFO_DEF+1)
{
CAST_AI(npc_dirty_larryAI, creature->AI())->Event = true;
CAST_AI(npc_dirty_larryAI, creature->AI())->PlayerGUID = pPlayer->GetGUID();
CAST_AI(npc_dirty_larryAI, pCreature->AI())->Event = true;
CAST_AI(npc_dirty_larryAI, pCreature->AI())->PlayerGUID = pPlayer->GetGUID();
pPlayer->CLOSE_GOSSIP_MENU();
}
@@ -566,11 +566,11 @@ bool GossipHello_npc_ishanah(Player* pPlayer, Creature* pCreature)
return true;
}
bool GossipSelect_npc_ishanah(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action)
bool GossipSelect_npc_ishanah(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
{
if (action == GOSSIP_ACTION_INFO_DEF+1)
if (uiAction == GOSSIP_ACTION_INFO_DEF+1)
pPlayer->SEND_GOSSIP_MENU(9458, pCreature->GetGUID());
else if (action == GOSSIP_ACTION_INFO_DEF+2)
else if (uiAction == GOSSIP_ACTION_INFO_DEF+2)
pPlayer->SEND_GOSSIP_MENU(9459, pCreature->GetGUID());
return true;
@@ -587,50 +587,50 @@ bool GossipSelect_npc_ishanah(Player* pPlayer, Creature* pCreature, uint32 sende
#define KHADGAR_GOSSIP_5 "What happened next?"
#define KHADGAR_GOSSIP_7 "There was something else I wanted to ask you."
bool GossipHello_npc_khadgar(Player* pPlayer, Creature *creature)
bool GossipHello_npc_khadgar(Player* pPlayer, Creature* pCreature)
{
if (creature->isQuestGiver())
pPlayer->PrepareQuestMenu(creature->GetGUID());
if (pCreature->isQuestGiver())
pPlayer->PrepareQuestMenu(pCreature->GetGUID());
if (!pPlayer->hasQuest(10211))
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, KHADGAR_GOSSIP_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
pPlayer->SEND_GOSSIP_MENU(9243, creature->GetGUID());
pPlayer->SEND_GOSSIP_MENU(9243, pCreature->GetGUID());
return true;
}
bool GossipSelect_npc_khadgar(Player* pPlayer, Creature *creature, uint32 sender, uint32 action)
bool GossipSelect_npc_khadgar(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
{
switch(action)
switch(uiAction)
{
case GOSSIP_ACTION_INFO_DEF+1:
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, KHADGAR_GOSSIP_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
pPlayer->SEND_GOSSIP_MENU(9876, creature->GetGUID());
pPlayer->SEND_GOSSIP_MENU(9876, pCreature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+2:
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, KHADGAR_GOSSIP_3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3);
pPlayer->SEND_GOSSIP_MENU(9877, creature->GetGUID());
pPlayer->SEND_GOSSIP_MENU(9877, pCreature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+3:
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, KHADGAR_GOSSIP_4, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+4);
pPlayer->SEND_GOSSIP_MENU(9878, creature->GetGUID());
pPlayer->SEND_GOSSIP_MENU(9878, pCreature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+4:
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, KHADGAR_GOSSIP_5, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+5);
pPlayer->SEND_GOSSIP_MENU(9879, creature->GetGUID());
pPlayer->SEND_GOSSIP_MENU(9879, pCreature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+5:
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, KHADGAR_GOSSIP_3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+6);
pPlayer->SEND_GOSSIP_MENU(9880, creature->GetGUID());
pPlayer->SEND_GOSSIP_MENU(9880, pCreature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+6:
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, KHADGAR_GOSSIP_7, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+7);
pPlayer->SEND_GOSSIP_MENU(9881, creature->GetGUID());
pPlayer->SEND_GOSSIP_MENU(9881, pCreature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+7:
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, KHADGAR_GOSSIP_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
pPlayer->SEND_GOSSIP_MENU(9243, creature->GetGUID());
pPlayer->SEND_GOSSIP_MENU(9243, pCreature->GetGUID());
break;
}
return true;
@@ -131,9 +131,9 @@ bool GossipHello_npc_injured_rainspeaker_oracle(Player* pPlayer, Creature* pCrea
return true;
}
bool GossipSelect_npc_injured_rainspeaker_oracle(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action)
bool GossipSelect_npc_injured_rainspeaker_oracle(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
{
if (action == GOSSIP_ACTION_INFO_DEF+1)
if (uiAction == GOSSIP_ACTION_INFO_DEF+1)
{
CAST_AI(npc_escortAI, (pCreature->AI()))->Start(true, false, pPlayer->GetGUID());
CAST_AI(npc_escortAI, (pCreature->AI()))->SetMaxPlayerDistance(35.0f);
@@ -53,9 +53,9 @@ bool GossipHello_npc_highlord_demitrian(Player* pPlayer, Creature* pCreature)
return true;
}
bool GossipSelect_npc_highlord_demitrian(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action)
bool GossipSelect_npc_highlord_demitrian(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
{
switch (action)
switch (uiAction)
{
case GOSSIP_ACTION_INFO_DEF:
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_DEMITRIAN2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
@@ -137,9 +137,9 @@ bool GossipHello_npcs_rutgar_and_frankal(Player* pPlayer, Creature* pCreature)
return true;
}
bool GossipSelect_npcs_rutgar_and_frankal(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action)
bool GossipSelect_npcs_rutgar_and_frankal(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
{
switch (action)
switch (uiAction)
{
case GOSSIP_ACTION_INFO_DEF:
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
@@ -69,9 +69,9 @@ bool GossipHello_npc_astor_hadren(Player* pPlayer, Creature* pCreature)
return true;
}
bool GossipSelect_npc_astor_hadren(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action)
bool GossipSelect_npc_astor_hadren(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
{
switch (action)
switch (uiAction)
{
case GOSSIP_ACTION_INFO_DEF + 1:
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SAH, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);

Some files were not shown because too many files have changed in this diff Show More