mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-18 03:15:41 +00:00
Refactor(Core/Gossip): Replacing old macros with new (#1338)
* Correct support new macro
This commit is contained in:
@@ -113,7 +113,7 @@ public:
|
||||
{
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_PRINCE_TALDARAM_EVENT, IN_PROGRESS);
|
||||
|
||||
|
||||
Talk(SAY_AGGRO);
|
||||
ScheduleEvents();
|
||||
|
||||
@@ -253,7 +253,7 @@ public:
|
||||
|
||||
if (vanishTarget && victim->GetGUID() == vanishTarget)
|
||||
ScheduleEvents();
|
||||
|
||||
|
||||
Talk(SAY_SLAY);
|
||||
}
|
||||
};
|
||||
@@ -331,17 +331,17 @@ class go_prince_taldaram_sphere : public GameObjectScript
|
||||
public:
|
||||
go_prince_taldaram_sphere() : GameObjectScript("go_prince_taldaram_sphere") { }
|
||||
|
||||
bool OnGossipHello(Player * /*pPlayer*/, GameObject *pGO)
|
||||
bool OnGossipHello(Player * /*pPlayer*/, GameObject *go) override
|
||||
{
|
||||
InstanceScript *pInstance = pGO->GetInstanceScript();
|
||||
InstanceScript *pInstance = go->GetInstanceScript();
|
||||
if (!pInstance)
|
||||
return false;
|
||||
|
||||
Creature *pPrinceTaldaram = ObjectAccessor::GetCreature(*pGO, pInstance->GetData64(DATA_PRINCE_TALDARAM));
|
||||
Creature *pPrinceTaldaram = ObjectAccessor::GetCreature(*go, pInstance->GetData64(DATA_PRINCE_TALDARAM));
|
||||
if (pPrinceTaldaram && pPrinceTaldaram->IsAlive())
|
||||
{
|
||||
pGO->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
pGO->SetGoState(GO_STATE_ACTIVE);
|
||||
go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
go->SetGoState(GO_STATE_ACTIVE);
|
||||
|
||||
if (pInstance->GetData(DATA_SPHERE_EVENT) == NOT_STARTED)
|
||||
{
|
||||
|
||||
@@ -18,12 +18,12 @@ class npc_announcer_toc5 : public CreatureScript
|
||||
public:
|
||||
npc_announcer_toc5() : CreatureScript("npc_announcer_toc5") {}
|
||||
|
||||
bool OnGossipHello(Player* pPlayer, Creature* pCreature)
|
||||
bool OnGossipHello(Player* player, Creature* creature) override
|
||||
{
|
||||
if (!pCreature->HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP))
|
||||
if (!creature->HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP))
|
||||
return true;
|
||||
|
||||
InstanceScript* pInstance = pCreature->GetInstanceScript();
|
||||
InstanceScript* pInstance = creature->GetInstanceScript();
|
||||
if (!pInstance)
|
||||
return true;
|
||||
|
||||
@@ -31,7 +31,7 @@ public:
|
||||
switch (pInstance->GetData(DATA_INSTANCE_PROGRESS))
|
||||
{
|
||||
case INSTANCE_PROGRESS_INITIAL:
|
||||
if (!pPlayer->GetVehicle())
|
||||
if (!player->GetVehicle())
|
||||
{
|
||||
if (pInstance->GetData(DATA_TEAMID_IN_INSTANCE) == TEAM_HORDE)
|
||||
gossipTextId = 15043; //Horde text
|
||||
@@ -41,55 +41,55 @@ public:
|
||||
else
|
||||
{
|
||||
gossipTextId = 14688;
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_START_EVENT1a, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1338);
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_START_EVENT1b, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1341);
|
||||
AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_START_EVENT1a, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1338);
|
||||
AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_START_EVENT1b, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1341);
|
||||
}
|
||||
break;
|
||||
case INSTANCE_PROGRESS_CHAMPIONS_DEAD:
|
||||
gossipTextId = 14737;
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_START_EVENT2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1339);
|
||||
AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_START_EVENT2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1339);
|
||||
break;
|
||||
case INSTANCE_PROGRESS_ARGENT_CHALLENGE_DIED:
|
||||
gossipTextId = 14738;
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_START_EVENT3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1340);
|
||||
AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_START_EVENT3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1340);
|
||||
break;
|
||||
default:
|
||||
return true;
|
||||
}
|
||||
|
||||
pPlayer->SEND_GOSSIP_MENU(gossipTextId, pCreature->GetGUID());
|
||||
SendGossipMenuFor(player, gossipTextId, creature->GetGUID());
|
||||
return true;
|
||||
}
|
||||
|
||||
bool OnGossipSelect(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction)
|
||||
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*uiSender*/, uint32 uiAction) override
|
||||
{
|
||||
if( !pCreature->HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP) )
|
||||
if(!creature->HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP))
|
||||
return true;
|
||||
|
||||
InstanceScript* pInstance = pCreature->GetInstanceScript();
|
||||
if( !pInstance )
|
||||
InstanceScript* pInstance = creature->GetInstanceScript();
|
||||
if(!pInstance)
|
||||
return true;
|
||||
|
||||
if( uiAction == GOSSIP_ACTION_INFO_DEF+1338 || uiAction == GOSSIP_ACTION_INFO_DEF+1341 || uiAction == GOSSIP_ACTION_INFO_DEF+1339 || uiAction == GOSSIP_ACTION_INFO_DEF+1340 )
|
||||
if(uiAction == GOSSIP_ACTION_INFO_DEF+1338 || uiAction == GOSSIP_ACTION_INFO_DEF+1341 || uiAction == GOSSIP_ACTION_INFO_DEF+1339 || uiAction == GOSSIP_ACTION_INFO_DEF+1340)
|
||||
{
|
||||
pInstance->SetData(DATA_ANNOUNCER_GOSSIP_SELECT, (uiAction == GOSSIP_ACTION_INFO_DEF+1341 ? 1 : 0));
|
||||
pCreature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
||||
creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
||||
}
|
||||
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
CloseGossipMenuFor(player);
|
||||
return true;
|
||||
}
|
||||
|
||||
CreatureAI* GetAI(Creature* pCreature) const
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return new npc_announcer_toc5AI(pCreature);
|
||||
return new npc_announcer_toc5AI(creature);
|
||||
}
|
||||
|
||||
struct npc_announcer_toc5AI : public CreatureAI
|
||||
{
|
||||
npc_announcer_toc5AI(Creature *pCreature) : CreatureAI(pCreature) {}
|
||||
npc_announcer_toc5AI(Creature *creature) : CreatureAI(creature) {}
|
||||
|
||||
void Reset()
|
||||
void Reset() override
|
||||
{
|
||||
InstanceScript* pInstance = me->GetInstanceScript();
|
||||
if( !pInstance )
|
||||
@@ -99,13 +99,13 @@ public:
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); // removed during black knight scene
|
||||
}
|
||||
|
||||
void DamageTaken(Unit*, uint32& damage, DamageEffectType, SpellSchoolMask)
|
||||
void DamageTaken(Unit*, uint32& damage, DamageEffectType, SpellSchoolMask) override
|
||||
{
|
||||
if (damage >= me->GetHealth()) // for bk scene so strangulate doesn't kill him
|
||||
damage = me->GetHealth()-1;
|
||||
}
|
||||
|
||||
void MovementInform(uint32 type, uint32 /*id*/)
|
||||
void MovementInform(uint32 type, uint32 /*id*/) override
|
||||
{
|
||||
if (type != EFFECT_MOTION_TYPE)
|
||||
return;
|
||||
@@ -118,7 +118,7 @@ public:
|
||||
Unit::Kill(me, me); // for bk scene, die after knockback
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 /*diff*/) {}
|
||||
void UpdateAI(uint32 /*diff*/) override { }
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -2436,17 +2436,17 @@ class go_toc_champions_cache : public GameObjectScript
|
||||
public:
|
||||
go_toc_champions_cache() : GameObjectScript("go_toc_champions_cache") { }
|
||||
|
||||
bool OnGossipHello(Player* plr, GameObject* go)
|
||||
bool OnGossipHello(Player* player, GameObject* go) override
|
||||
{
|
||||
if (plr->IsGameMaster())
|
||||
if (player->IsGameMaster())
|
||||
return false;
|
||||
|
||||
if (!go->loot.items.size())
|
||||
return false;
|
||||
|
||||
for( std::vector<LootItem>::iterator itr = go->loot.items.begin(); itr != go->loot.items.end(); ++itr )
|
||||
for(std::vector<LootItem>::iterator itr = go->loot.items.begin(); itr != go->loot.items.end(); ++itr)
|
||||
if( ItemTemplate const *iProto = sObjectMgr->GetItemTemplate((*itr).itemid) )
|
||||
if( ((iProto->Flags2 & ITEM_FLAGS_EXTRA_HORDE_ONLY) && plr->GetTeamId() != TEAM_HORDE) || ((iProto->Flags2 & ITEM_FLAGS_EXTRA_ALLIANCE_ONLY) && plr->GetTeamId() != TEAM_ALLIANCE) )
|
||||
if( ((iProto->Flags2 & ITEM_FLAGS_EXTRA_HORDE_ONLY) && player->GetTeamId() != TEAM_HORDE) || ((iProto->Flags2 & ITEM_FLAGS_EXTRA_ALLIANCE_ONLY) && player->GetTeamId() != TEAM_ALLIANCE) )
|
||||
if (!((*itr).is_looted))
|
||||
{
|
||||
(*itr).count = 0;
|
||||
|
||||
@@ -556,7 +556,7 @@ class npc_essence_of_twin : public CreatureScript
|
||||
public:
|
||||
npc_essence_of_twin() : CreatureScript("npc_essence_of_twin") { }
|
||||
|
||||
bool OnGossipHello(Player* player, Creature* creature)
|
||||
bool OnGossipHello(Player* player, Creature* creature) override
|
||||
{
|
||||
switch( creature->GetEntry() )
|
||||
{
|
||||
@@ -655,7 +655,7 @@ public:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
CloseGossipMenuFor(player);
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -21,17 +21,17 @@ class npc_announcer_toc10 : public CreatureScript
|
||||
public:
|
||||
npc_announcer_toc10() : CreatureScript("npc_announcer_toc10") { }
|
||||
|
||||
bool OnGossipHello(Player* pPlayer, Creature* pCreature)
|
||||
bool OnGossipHello(Player* player, Creature* creature) override
|
||||
{
|
||||
if( !pCreature->HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP) )
|
||||
if(!creature->HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP))
|
||||
return true;
|
||||
|
||||
InstanceScript* pInstance = pCreature->GetInstanceScript();
|
||||
if( !pInstance )
|
||||
InstanceScript* pInstance = creature->GetInstanceScript();
|
||||
if(!pInstance)
|
||||
return true;
|
||||
|
||||
uint32 gossipTextId = 0;
|
||||
switch( pInstance->GetData(TYPE_INSTANCE_PROGRESS) )
|
||||
switch(pInstance->GetData(TYPE_INSTANCE_PROGRESS))
|
||||
{
|
||||
case INSTANCE_PROGRESS_INITIAL:
|
||||
gossipTextId = MSG_TESTED;
|
||||
@@ -46,33 +46,33 @@ public:
|
||||
gossipTextId = MSG_CRUSADERS;
|
||||
break;
|
||||
case INSTANCE_PROGRESS_DONE:
|
||||
pCreature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
||||
creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
||||
return true;
|
||||
default:
|
||||
return true;
|
||||
}
|
||||
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "We are ready!", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1337);
|
||||
pPlayer->SEND_GOSSIP_MENU(gossipTextId, pCreature->GetGUID());
|
||||
AddGossipItemFor(player, GOSSIP_ICON_CHAT, "We are ready!", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1337);
|
||||
SendGossipMenuFor(player, gossipTextId, creature->GetGUID());
|
||||
return true;
|
||||
}
|
||||
|
||||
bool OnGossipSelect(Player* pPlayer, Creature* pCreature, uint32 /*sender*/, uint32 uiAction)
|
||||
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 uiAction) override
|
||||
{
|
||||
if( !pCreature->HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP) )
|
||||
if( !creature->HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP) )
|
||||
return true;
|
||||
|
||||
InstanceScript* pInstance = pCreature->GetInstanceScript();
|
||||
InstanceScript* pInstance = creature->GetInstanceScript();
|
||||
if( !pInstance )
|
||||
return true;
|
||||
|
||||
if( uiAction == GOSSIP_ACTION_INFO_DEF+1337 )
|
||||
{
|
||||
pInstance->SetData(TYPE_ANNOUNCER_GOSSIP_SELECT, 0);
|
||||
pCreature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
||||
creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
||||
}
|
||||
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
CloseGossipMenuFor(player);
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -42,12 +42,12 @@ public:
|
||||
|
||||
EventMap events;
|
||||
|
||||
void Reset()
|
||||
void Reset() override
|
||||
{
|
||||
events.Reset();
|
||||
}
|
||||
|
||||
void DoAction(int32 a)
|
||||
void DoAction(int32 a) override
|
||||
{
|
||||
if (a == 1)
|
||||
if (me->HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP))
|
||||
@@ -58,7 +58,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff)
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
events.Update(diff);
|
||||
switch(events.GetEvent())
|
||||
@@ -166,7 +166,7 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
bool OnGossipHello(Player* player, Creature* creature)
|
||||
bool OnGossipHello(Player* player, Creature* creature) override
|
||||
{
|
||||
if (creature->IsQuestGiver())
|
||||
player->PrepareQuestMenu(creature->GetGUID());
|
||||
@@ -174,22 +174,22 @@ public:
|
||||
if (creature->HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP))
|
||||
{
|
||||
if (creature->GetEntry() == NPC_JAINA_PART1)
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "What would you have of me, my lady?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
||||
AddGossipItemFor(player, GOSSIP_ICON_CHAT, "What would you have of me, my lady?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
||||
else
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "What would you have of me, Banshee Queen?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
||||
AddGossipItemFor(player, GOSSIP_ICON_CHAT, "What would you have of me, Banshee Queen?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
||||
}
|
||||
|
||||
player->SEND_GOSSIP_MENU(15207, creature->GetGUID());
|
||||
SendGossipMenuFor(player, 15207, creature->GetGUID());
|
||||
return true;
|
||||
}
|
||||
|
||||
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*uiSender*/, uint32 uiAction)
|
||||
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*uiSender*/, uint32 uiAction) override
|
||||
{
|
||||
player->PlayerTalkClass->ClearMenus();
|
||||
ClearGossipMenuFor(player);
|
||||
switch(uiAction)
|
||||
{
|
||||
case GOSSIP_ACTION_INFO_DEF+1:
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
CloseGossipMenuFor(player);
|
||||
if (creature->AI())
|
||||
creature->AI()->DoAction(1);
|
||||
break;
|
||||
@@ -198,7 +198,7 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
CreatureAI *GetAI(Creature* creature) const
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return new npc_fos_leaderAI(creature);
|
||||
}
|
||||
|
||||
@@ -76,7 +76,7 @@ class npc_hor_leader : public CreatureScript
|
||||
public:
|
||||
npc_hor_leader() : CreatureScript("npc_hor_leader") { }
|
||||
|
||||
bool OnGossipHello(Player* player, Creature* creature)
|
||||
bool OnGossipHello(Player* player, Creature* creature) override
|
||||
{
|
||||
if (!creature->HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP))
|
||||
return true;
|
||||
@@ -94,24 +94,24 @@ public:
|
||||
{
|
||||
QuestStatus status = player->GetQuestStatus(creature->GetEntry() == NPC_SYLVANAS_PART1 ? QUEST_DELIVRANCE_FROM_THE_PIT_H2 : QUEST_DELIVRANCE_FROM_THE_PIT_A2);
|
||||
if (status == QUEST_STATUS_COMPLETE || status == QUEST_STATUS_REWARDED)
|
||||
player->ADD_GOSSIP_ITEM(0, "Can you remove the sword?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
||||
AddGossipItemFor(player, 0, "Can you remove the sword?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
||||
|
||||
// once last quest is completed, she offers this shortcut of the starting event
|
||||
status = player->GetQuestStatus(creature->GetEntry() == NPC_SYLVANAS_PART1 ? QUEST_WRATH_OF_THE_LICH_KING_H2 : QUEST_WRATH_OF_THE_LICH_KING_A2);
|
||||
if (status == QUEST_STATUS_COMPLETE || status == QUEST_STATUS_REWARDED)
|
||||
{
|
||||
if (creature->GetEntry() == NPC_SYLVANAS_PART1)
|
||||
player->ADD_GOSSIP_ITEM(0, "Dark Lady, I think I hear Arthas coming. Whatever you're going to do, do it quickly.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
|
||||
AddGossipItemFor(player, 0, "Dark Lady, I think I hear Arthas coming. Whatever you're going to do, do it quickly.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
|
||||
else
|
||||
player->ADD_GOSSIP_ITEM(0, "My Lady, I think I hear Arthas coming. Whatever you're going to do, do it quickly.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
|
||||
AddGossipItemFor(player, 0, "My Lady, I think I hear Arthas coming. Whatever you're going to do, do it quickly.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
|
||||
}
|
||||
}
|
||||
|
||||
player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE, creature->GetGUID());
|
||||
SendGossipMenuFor(player, DEFAULT_GOSSIP_MESSAGE, creature->GetGUID());
|
||||
return true;
|
||||
}
|
||||
|
||||
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*uiSender*/, uint32 uiAction)
|
||||
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*uiSender*/, uint32 uiAction) override
|
||||
{
|
||||
if (!creature->HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP))
|
||||
return true;
|
||||
@@ -126,17 +126,17 @@ public:
|
||||
|
||||
instance->SetData(DATA_BATTERED_HILT, 1);
|
||||
|
||||
player->PlayerTalkClass->ClearMenus();
|
||||
ClearGossipMenuFor(player);
|
||||
switch (uiAction)
|
||||
{
|
||||
case GOSSIP_ACTION_INFO_DEF+1:
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
CloseGossipMenuFor(player);
|
||||
if (creature->AI())
|
||||
creature->AI()->DoAction(ACTION_START_INTRO);
|
||||
creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP | UNIT_NPC_FLAG_QUESTGIVER);
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+2:
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
CloseGossipMenuFor(player);
|
||||
if (creature->AI())
|
||||
creature->AI()->DoAction(ACTION_SKIP_INTRO);
|
||||
creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP | UNIT_NPC_FLAG_QUESTGIVER);
|
||||
@@ -146,7 +146,7 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return new npc_hor_leaderAI(creature);
|
||||
}
|
||||
@@ -166,7 +166,7 @@ public:
|
||||
bool first;
|
||||
bool shortver;
|
||||
|
||||
void Reset()
|
||||
void Reset() override
|
||||
{
|
||||
shortver = false;
|
||||
events.Reset();
|
||||
@@ -180,7 +180,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void DoAction(int32 actionId)
|
||||
void DoAction(int32 actionId) override
|
||||
{
|
||||
switch(actionId)
|
||||
{
|
||||
@@ -193,7 +193,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff)
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
events.Update(diff);
|
||||
switch(events.ExecuteEvent())
|
||||
@@ -1452,7 +1452,7 @@ public:
|
||||
me->SetHealth(me->GetMaxHealth()*3/4);
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
|
||||
if (me->IsNonMeleeSpellCast(false, true, true))
|
||||
return;
|
||||
|
||||
@@ -1597,12 +1597,12 @@ class npc_hor_leader_second : public CreatureScript
|
||||
public:
|
||||
npc_hor_leader_second() : CreatureScript("npc_hor_leader_second") { }
|
||||
|
||||
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*uiSender*/, uint32 /*uiAction*/)
|
||||
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*uiSender*/, uint32 /*uiAction*/) override
|
||||
{
|
||||
if (!creature->HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP))
|
||||
return true;
|
||||
|
||||
player->PlayerTalkClass->ClearMenus();
|
||||
ClearGossipMenuFor(player);
|
||||
|
||||
if (InstanceScript* pInstance = creature->GetInstanceScript())
|
||||
if (!pInstance->GetData(DATA_LICH_KING))
|
||||
@@ -1615,7 +1615,7 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return new npc_hor_leader_secondAI(creature);
|
||||
}
|
||||
@@ -1633,13 +1633,13 @@ public:
|
||||
EventMap events;
|
||||
uint8 currentStopPoint;
|
||||
|
||||
void Reset()
|
||||
void Reset() override
|
||||
{
|
||||
currentStopPoint = 0;
|
||||
events.Reset();
|
||||
}
|
||||
|
||||
void DoAction(int32 actionId)
|
||||
void DoAction(int32 actionId) override
|
||||
{
|
||||
switch(actionId)
|
||||
{
|
||||
@@ -1657,7 +1657,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void DamageTaken(Unit*, uint32& dmg, DamageEffectType, SpellSchoolMask)
|
||||
void DamageTaken(Unit*, uint32& dmg, DamageEffectType, SpellSchoolMask) override
|
||||
{
|
||||
if (dmg >= me->GetHealth())
|
||||
dmg = me->GetHealth()-1;
|
||||
@@ -1674,13 +1674,13 @@ public:
|
||||
me->GetMotionMaster()->MoveSplinePath(&path);
|
||||
}
|
||||
|
||||
void MovementInform(uint32 type, uint32 /*id*/)
|
||||
void MovementInform(uint32 type, uint32 /*id*/) override
|
||||
{
|
||||
if (type == ESCORT_MOTION_TYPE && me->movespline->Finalized())
|
||||
events.ScheduleEvent(EVENT_SAY_LEADER_STOP_TEXT, 1000);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff)
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
events.Update(diff);
|
||||
switch(events.ExecuteEvent())
|
||||
|
||||
@@ -515,14 +515,14 @@ class npc_high_overlord_saurfang_icc : public CreatureScript
|
||||
_instance = me->GetInstanceScript();
|
||||
}
|
||||
|
||||
void Reset()
|
||||
void Reset() override
|
||||
{
|
||||
_events.Reset();
|
||||
me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
}
|
||||
|
||||
void DoAction(int32 action)
|
||||
void DoAction(int32 action) override
|
||||
{
|
||||
switch (action)
|
||||
{
|
||||
@@ -551,7 +551,7 @@ class npc_high_overlord_saurfang_icc : public CreatureScript
|
||||
_events.ScheduleEvent(EVENT_INTRO_HORDE_2, 5000, 0, PHASE_INTRO_H);
|
||||
_events.ScheduleEvent(EVENT_INTRO_HORDE_3, 18500, 0, PHASE_INTRO_H);
|
||||
_instance->HandleGameObject(_instance->GetData64(GO_SAURFANG_S_DOOR), true);
|
||||
|
||||
|
||||
if (GameObject* teleporter = ObjectAccessor::GetGameObject(*me, _instance->GetData64(GO_SCOURGE_TRANSPORTER_SAURFANG)))
|
||||
{
|
||||
_instance->HandleGameObject(0, false, teleporter);
|
||||
@@ -575,7 +575,7 @@ class npc_high_overlord_saurfang_icc : public CreatureScript
|
||||
_events.ScheduleEvent(EVENT_OUTRO_HORDE_1, 10000);
|
||||
_events.ScheduleEvent(EVENT_OUTRO_HORDE_2, 18000);
|
||||
_events.ScheduleEvent(EVENT_OUTRO_HORDE_3, 24000);*/
|
||||
|
||||
|
||||
}
|
||||
break;
|
||||
case ACTION_EVADE:
|
||||
@@ -603,7 +603,7 @@ class npc_high_overlord_saurfang_icc : public CreatureScript
|
||||
}
|
||||
}
|
||||
|
||||
void SpellHit(Unit* /*caster*/, SpellInfo const* spell)
|
||||
void SpellHit(Unit* /*caster*/, SpellInfo const* spell) override
|
||||
{
|
||||
if (spell->Id == SPELL_GRIP_OF_AGONY)
|
||||
{
|
||||
@@ -612,7 +612,7 @@ class npc_high_overlord_saurfang_icc : public CreatureScript
|
||||
}
|
||||
}
|
||||
|
||||
void MovementInform(uint32 type, uint32 id)
|
||||
void MovementInform(uint32 type, uint32 id) override
|
||||
{
|
||||
if (type == POINT_MOTION_TYPE)
|
||||
{
|
||||
@@ -650,7 +650,7 @@ class npc_high_overlord_saurfang_icc : public CreatureScript
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff)
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
_events.Update(diff);
|
||||
switch (_events.ExecuteEvent())
|
||||
@@ -733,25 +733,25 @@ class npc_high_overlord_saurfang_icc : public CreatureScript
|
||||
std::list<Creature*> _guardList;
|
||||
};
|
||||
|
||||
bool OnGossipHello(Player* player, Creature* creature)
|
||||
bool OnGossipHello(Player* player, Creature* creature) override
|
||||
{
|
||||
InstanceScript* instance = creature->GetInstanceScript();
|
||||
if (instance && instance->GetBossState(DATA_DEATHBRINGER_SAURFANG) != DONE && instance->GetBossState(DATA_DEATHBRINGER_SAURFANG) != IN_PROGRESS)
|
||||
{
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "We are ready to go, High Overlord. The Lich King must fall!", 631, -ACTION_START_EVENT);
|
||||
player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE, creature->GetGUID());
|
||||
AddGossipItemFor(player, GOSSIP_ICON_CHAT, "We are ready to go, High Overlord. The Lich King must fall!", 631, -ACTION_START_EVENT);
|
||||
SendGossipMenuFor(player, DEFAULT_GOSSIP_MESSAGE, creature->GetGUID());
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action)
|
||||
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) override
|
||||
{
|
||||
InstanceScript* instance = creature->GetInstanceScript();
|
||||
if (instance && instance->GetBossState(DATA_DEATHBRINGER_SAURFANG) != DONE && instance->GetBossState(DATA_DEATHBRINGER_SAURFANG) != IN_PROGRESS)
|
||||
{
|
||||
player->PlayerTalkClass->ClearMenus();
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
ClearGossipMenuFor(player);
|
||||
CloseGossipMenuFor(player);
|
||||
if (action == -ACTION_START_EVENT)
|
||||
creature->AI()->DoAction(ACTION_START_EVENT);
|
||||
}
|
||||
@@ -759,7 +759,7 @@ class npc_high_overlord_saurfang_icc : public CreatureScript
|
||||
return true;
|
||||
}
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return GetIcecrownCitadelAI<npc_high_overlord_saurfangAI>(creature);
|
||||
}
|
||||
@@ -777,14 +777,14 @@ class npc_muradin_bronzebeard_icc : public CreatureScript
|
||||
_instance = me->GetInstanceScript();
|
||||
}
|
||||
|
||||
void Reset()
|
||||
void Reset() override
|
||||
{
|
||||
_events.Reset();
|
||||
me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
}
|
||||
|
||||
void DoAction(int32 action)
|
||||
void DoAction(int32 action) override
|
||||
{
|
||||
switch (action)
|
||||
{
|
||||
@@ -862,7 +862,7 @@ class npc_muradin_bronzebeard_icc : public CreatureScript
|
||||
}
|
||||
}
|
||||
|
||||
void SpellHit(Unit* /*caster*/, SpellInfo const* spell)
|
||||
void SpellHit(Unit* /*caster*/, SpellInfo const* spell) override
|
||||
{
|
||||
if (spell->Id == SPELL_GRIP_OF_AGONY)
|
||||
{
|
||||
@@ -871,7 +871,7 @@ class npc_muradin_bronzebeard_icc : public CreatureScript
|
||||
}
|
||||
}
|
||||
|
||||
void MovementInform(uint32 type, uint32 id)
|
||||
void MovementInform(uint32 type, uint32 id) override
|
||||
{
|
||||
if (type == POINT_MOTION_TYPE)
|
||||
{
|
||||
@@ -891,7 +891,7 @@ class npc_muradin_bronzebeard_icc : public CreatureScript
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff)
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
_events.Update(diff);
|
||||
switch (_events.ExecuteEvent())
|
||||
@@ -947,25 +947,25 @@ class npc_muradin_bronzebeard_icc : public CreatureScript
|
||||
std::list<Creature*> _guardList;
|
||||
};
|
||||
|
||||
bool OnGossipHello(Player* player, Creature* creature)
|
||||
bool OnGossipHello(Player* player, Creature* creature) override
|
||||
{
|
||||
InstanceScript* instance = creature->GetInstanceScript();
|
||||
if (instance && instance->GetBossState(DATA_DEATHBRINGER_SAURFANG) != DONE && instance->GetBossState(DATA_DEATHBRINGER_SAURFANG) != IN_PROGRESS)
|
||||
{
|
||||
player->ADD_GOSSIP_ITEM(0, "Let it begin...", 631, -ACTION_START_EVENT + 1);
|
||||
player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE, creature->GetGUID());
|
||||
AddGossipItemFor(player, 0, "Let it begin...", 631, -ACTION_START_EVENT + 1);
|
||||
SendGossipMenuFor(player, DEFAULT_GOSSIP_MESSAGE, creature->GetGUID());
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action)
|
||||
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) override
|
||||
{
|
||||
InstanceScript* instance = creature->GetInstanceScript();
|
||||
if (instance && instance->GetBossState(DATA_DEATHBRINGER_SAURFANG) != DONE && instance->GetBossState(DATA_DEATHBRINGER_SAURFANG) != IN_PROGRESS)
|
||||
{
|
||||
player->PlayerTalkClass->ClearMenus();
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
ClearGossipMenuFor(player);
|
||||
CloseGossipMenuFor(player);
|
||||
if (action == -ACTION_START_EVENT + 1)
|
||||
creature->AI()->DoAction(ACTION_START_EVENT);
|
||||
}
|
||||
@@ -973,7 +973,7 @@ class npc_muradin_bronzebeard_icc : public CreatureScript
|
||||
return true;
|
||||
}
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return GetIcecrownCitadelAI<npc_muradin_bronzebeard_iccAI>(creature);
|
||||
}
|
||||
|
||||
@@ -1826,7 +1826,7 @@ class npc_alchemist_adrianna : public CreatureScript
|
||||
public:
|
||||
npc_alchemist_adrianna() : CreatureScript("npc_alchemist_adrianna") { }
|
||||
|
||||
bool OnGossipHello(Player* player, Creature* creature)
|
||||
bool OnGossipHello(Player* player, Creature* creature) override
|
||||
{
|
||||
if (InstanceScript* instance = creature->GetInstanceScript())
|
||||
if (instance->GetBossState(DATA_ROTFACE) == DONE && instance->GetBossState(DATA_FESTERGUT) == DONE && !creature->FindCurrentSpellBySpellId(SPELL_HARVEST_BLIGHT_SPECIMEN) && !creature->FindCurrentSpellBySpellId(SPELL_HARVEST_BLIGHT_SPECIMEN25))
|
||||
@@ -2569,7 +2569,7 @@ public:
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
@@ -2634,7 +2634,7 @@ public:
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
@@ -2689,7 +2689,7 @@ public:
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
@@ -2751,7 +2751,7 @@ public:
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
@@ -2870,7 +2870,7 @@ public:
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
@@ -2916,7 +2916,7 @@ public:
|
||||
SeveredEssenceSpellInfo sesi_spells[] =
|
||||
{
|
||||
{CLASS_SHAMAN, 71938, 5000, 1, 0.0f},
|
||||
{CLASS_PALADIN, 57767, 8000, 2, 30.0f},
|
||||
{CLASS_PALADIN, 57767, 8000, 2, 30.0f},
|
||||
{CLASS_WARLOCK, 71937, 10000, 1, 0.0f},
|
||||
{CLASS_DEATH_KNIGHT, 49576, 15000, 1, 30.0f},
|
||||
{CLASS_ROGUE, 71933, 8000, 1, 0.0f},
|
||||
@@ -2993,7 +2993,7 @@ public:
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
@@ -3092,7 +3092,7 @@ public:
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
@@ -3241,7 +3241,7 @@ public:
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
@@ -3273,13 +3273,13 @@ class npc_icc_buff_switcher : public CreatureScript
|
||||
public:
|
||||
npc_icc_buff_switcher() : CreatureScript("npc_icc_buff_switcher") { }
|
||||
|
||||
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 /*action*/)
|
||||
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 /*action*/) override
|
||||
{
|
||||
if ((creature->GetEntry() == NPC_GARROSH_HELLSCREAM && player->PlayerTalkClass->GetGossipMenu().GetMenuId() == 11206) || (creature->GetEntry() == NPC_KING_VARIAN_WRYNN && player->PlayerTalkClass->GetGossipMenu().GetMenuId() == 11204))
|
||||
{
|
||||
if (!player->GetGroup() || !player->GetGroup()->isRaidGroup() || !player->GetGroup()->IsLeader(player->GetGUID()))
|
||||
{
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
CloseGossipMenuFor(player);
|
||||
ChatHandler(player->GetSession()).PSendSysMessage("Only the raid leader can turn off the buff.");
|
||||
return true;
|
||||
}
|
||||
@@ -3288,7 +3288,7 @@ public:
|
||||
inst->SetData(DATA_BUFF_AVAILABLE, 0);
|
||||
if (creature->GetEntry() == NPC_GARROSH_HELLSCREAM)
|
||||
{
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
CloseGossipMenuFor(player);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -3382,7 +3382,7 @@ public:
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
@@ -3571,7 +3571,7 @@ class npc_icc_gauntlet_controller : public CreatureScript
|
||||
{
|
||||
if (me->GetDistance(itr->GetSource()) > 100.0f || !itr->GetSource()->IsAlive() || itr->GetSource()->IsGameMaster())
|
||||
continue;
|
||||
|
||||
|
||||
events.ScheduleEvent(EVENT_CHECK_FIGHT, 1000);
|
||||
return;
|
||||
}
|
||||
@@ -3673,7 +3673,7 @@ class npc_icc_putricades_trap : public CreatureScript
|
||||
{
|
||||
if (me->GetDistance(itr->GetSource()) > 100.0f || !itr->GetSource()->IsAlive() || itr->GetSource()->IsGameMaster())
|
||||
continue;
|
||||
|
||||
|
||||
events.ScheduleEvent(EVENT_CHECK_FIGHT, 1000);
|
||||
return;
|
||||
}
|
||||
@@ -3726,7 +3726,7 @@ class at_icc_putricide_trap : public AreaTriggerScript
|
||||
at_icc_putricide_trap() : AreaTriggerScript("at_icc_putricide_trap") { }
|
||||
|
||||
bool OnTrigger(Player* player, AreaTrigger const* /*areaTrigger*/)
|
||||
{
|
||||
{
|
||||
if (InstanceScript* instance = player->GetInstanceScript())
|
||||
if (instance->GetData(DATA_PUTRICIDE_TRAP_STATE) == NOT_STARTED && !player->IsGameMaster())
|
||||
if (Creature* trap = ObjectAccessor::GetCreature(*player, instance->GetData64(NPC_PUTRICADES_TRAP)))
|
||||
|
||||
@@ -16,32 +16,33 @@ class icecrown_citadel_teleport : public GameObjectScript
|
||||
public:
|
||||
icecrown_citadel_teleport() : GameObjectScript("icecrown_citadel_teleport") { }
|
||||
|
||||
bool OnGossipHello(Player* player, GameObject* go)
|
||||
bool OnGossipHello(Player* player, GameObject* go) override
|
||||
{
|
||||
if (go->GetEntry() != GO_SCOURGE_TRANSPORTER_FIRST)
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Teleport to Light's Hammer.", GOSSIP_SENDER_ICC_PORT, LIGHT_S_HAMMER_TELEPORT); // M_PI + M_PI/6
|
||||
AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Teleport to Light's Hammer.", GOSSIP_SENDER_ICC_PORT, LIGHT_S_HAMMER_TELEPORT); // M_PI + M_PI/6
|
||||
|
||||
if (InstanceScript* instance = go->GetInstanceScript())
|
||||
{
|
||||
if (instance->GetBossState(DATA_LORD_MARROWGAR) == DONE && go->GetEntry() != 202245)
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Teleport to the Oratory of the Damned.", GOSSIP_SENDER_ICC_PORT, ORATORY_OF_THE_DAMNED_TELEPORT); // M_PI + M_PI/6
|
||||
AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Teleport to the Oratory of the Damned.", GOSSIP_SENDER_ICC_PORT, ORATORY_OF_THE_DAMNED_TELEPORT); // M_PI + M_PI/6
|
||||
if (instance->GetBossState(DATA_LADY_DEATHWHISPER) == DONE && go->GetEntry() != 202243)
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Teleport to the Rampart of Skulls.", GOSSIP_SENDER_ICC_PORT, RAMPART_OF_SKULLS_TELEPORT); // M_PI/6
|
||||
AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Teleport to the Rampart of Skulls.", GOSSIP_SENDER_ICC_PORT, RAMPART_OF_SKULLS_TELEPORT); // M_PI/6
|
||||
if (instance->GetBossState(DATA_ICECROWN_GUNSHIP_BATTLE) == DONE && go->GetEntry() != 202244)
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Teleport to the Deathbringer's Rise.", GOSSIP_SENDER_ICC_PORT, DEATHBRINGER_S_RISE_TELEPORT); // M_PI/6
|
||||
AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Teleport to the Deathbringer's Rise.", GOSSIP_SENDER_ICC_PORT, DEATHBRINGER_S_RISE_TELEPORT); // M_PI/6
|
||||
if (instance->GetData(DATA_COLDFLAME_JETS) == DONE && go->GetEntry() != 202235)
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Teleport to the Upper Spire.", GOSSIP_SENDER_ICC_PORT, UPPER_SPIRE_TELEPORT); // M_PI/6
|
||||
AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Teleport to the Upper Spire.", GOSSIP_SENDER_ICC_PORT, UPPER_SPIRE_TELEPORT); // M_PI/6
|
||||
if (instance->GetBossState(DATA_VALITHRIA_DREAMWALKER) == DONE && instance->GetBossState(DATA_SINDRAGOSA_GAUNTLET) == DONE && go->GetEntry() != 202246)
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Teleport to Sindragosa's Lair", GOSSIP_SENDER_ICC_PORT, SINDRAGOSA_S_LAIR_TELEPORT); // M_PI*3/2 + M_PI/6
|
||||
AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Teleport to Sindragosa's Lair", GOSSIP_SENDER_ICC_PORT, SINDRAGOSA_S_LAIR_TELEPORT); // M_PI*3/2 + M_PI/6
|
||||
}
|
||||
|
||||
player->SEND_GOSSIP_MENU(player->GetGossipTextId(go), go->GetGUID());
|
||||
SendGossipMenuFor(player, player->GetGossipTextId(go), go->GetGUID());
|
||||
return true;
|
||||
}
|
||||
|
||||
bool OnGossipSelect(Player* player, GameObject* /*go*/, uint32 sender, uint32 action)
|
||||
bool OnGossipSelect(Player* player, GameObject* /*go*/, uint32 sender, uint32 action) override
|
||||
{
|
||||
player->PlayerTalkClass->ClearMenus();
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
ClearGossipMenuFor(player);
|
||||
CloseGossipMenuFor(player);
|
||||
SpellInfo const* spell = sSpellMgr->GetSpellInfo(action);
|
||||
if (!spell)
|
||||
return false;
|
||||
|
||||
@@ -159,7 +159,7 @@ public:
|
||||
{
|
||||
pInstance = me->GetInstanceScript();
|
||||
}
|
||||
|
||||
|
||||
InstanceScript* pInstance;
|
||||
EventMap events;
|
||||
SummonList summons;
|
||||
@@ -262,7 +262,7 @@ public:
|
||||
|
||||
void SpellHit(Unit * /*caster*/, const SpellInfo *spell)
|
||||
{
|
||||
if (spell->Id == SPELL_POWER_SPARK_MALYGOS_BUFF)
|
||||
if (spell->Id == SPELL_POWER_SPARK_MALYGOS_BUFF)
|
||||
{
|
||||
if (!bLockHealthCheck)
|
||||
{
|
||||
@@ -552,7 +552,7 @@ public:
|
||||
events.RescheduleEvent(EVENT_SPELL_ARCANE_OVERLOAD, 8000, 1);
|
||||
events.RescheduleEvent(EVENT_MOVE_TO_SURGE_OF_POWER, 55000, 1);
|
||||
events.RescheduleEvent(EVENT_CHECK_TRASH_DEAD, 3000, 1);
|
||||
|
||||
|
||||
for (int i=0; i<MAX_NEXUS_LORDS; i++)
|
||||
{
|
||||
float dist = 22.0f;
|
||||
@@ -937,7 +937,7 @@ public:
|
||||
CheckTimer = 1000;
|
||||
MoveTimer = 0;
|
||||
}
|
||||
|
||||
|
||||
InstanceScript* pInstance;
|
||||
uint16 CheckTimer;
|
||||
uint16 MoveTimer;
|
||||
@@ -1435,15 +1435,15 @@ public:
|
||||
|
||||
|
||||
class go_the_focusing_iris : public GameObjectScript
|
||||
{
|
||||
public:
|
||||
{
|
||||
public:
|
||||
go_the_focusing_iris() : GameObjectScript("go_the_focusing_iris") { }
|
||||
|
||||
bool OnGossipHello(Player* user, GameObject* go)
|
||||
bool OnGossipHello(Player* user, GameObject* go) override
|
||||
{
|
||||
if (!user || !go)
|
||||
return true;
|
||||
|
||||
|
||||
if (InstanceScript* pInstance = go->GetInstanceScript())
|
||||
pInstance->SetData(DATA_IRIS_ACTIVATED, 0);
|
||||
|
||||
@@ -1527,4 +1527,4 @@ void AddSC_boss_malygos()
|
||||
new npc_eoe_wyrmrest_skytalon();
|
||||
|
||||
new spell_eoe_ph3_surge_of_power();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,54 +72,54 @@ class npc_oculus_drakegiver : public CreatureScript
|
||||
public:
|
||||
npc_oculus_drakegiver() : CreatureScript("npc_oculus_drakegiver") { }
|
||||
|
||||
bool OnGossipHello(Player* pPlayer, Creature* pCreature)
|
||||
bool OnGossipHello(Player* player, Creature* creature) override
|
||||
{
|
||||
if( pCreature->IsQuestGiver() )
|
||||
pPlayer->PrepareQuestMenu(pCreature->GetGUID());
|
||||
if(creature->IsQuestGiver())
|
||||
player->PrepareQuestMenu(creature->GetGUID());
|
||||
|
||||
if( pCreature->GetInstanceScript()->GetData(DATA_DRAKOS) == DONE )
|
||||
if(creature->GetInstanceScript()->GetData(DATA_DRAKOS) == DONE)
|
||||
{
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_DRAKES, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
|
||||
pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_DRAKES, pCreature->GetGUID());
|
||||
AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_ITEM_DRAKES, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
|
||||
SendGossipMenuFor(player, GOSSIP_TEXTID_DRAKES, creature->GetGUID());
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool OnGossipSelect(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction)
|
||||
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*uiSender*/, uint32 uiAction) override
|
||||
{
|
||||
pPlayer->PlayerTalkClass->GetGossipMenu().ClearMenu();
|
||||
switch(pCreature->GetEntry())
|
||||
player->PlayerTalkClass->GetGossipMenu().ClearMenu();
|
||||
switch(creature->GetEntry())
|
||||
{
|
||||
case NPC_VERDISA:
|
||||
switch(uiAction)
|
||||
{
|
||||
case GOSSIP_ACTION_INFO_DEF + 1:
|
||||
if (!HAS_ESSENCE(pPlayer))
|
||||
if (!HAS_ESSENCE(player))
|
||||
{
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_VERDISA1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_VERDISA2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
|
||||
pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_VERDISA1, pCreature->GetGUID());
|
||||
AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_ITEM_VERDISA1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
|
||||
AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_ITEM_VERDISA2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
|
||||
SendGossipMenuFor(player, GOSSIP_TEXTID_VERDISA1, creature->GetGUID());
|
||||
}
|
||||
else
|
||||
{
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_VERDISA2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
|
||||
pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_VERDISA2, pCreature->GetGUID());
|
||||
AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_ITEM_VERDISA2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
|
||||
SendGossipMenuFor(player, GOSSIP_TEXTID_VERDISA2, creature->GetGUID());
|
||||
}
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF + 2:
|
||||
{
|
||||
ItemPosCountVec dest;
|
||||
uint8 msg = pPlayer->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, ITEM_EMERALD_ESSENCE, 1);
|
||||
uint8 msg = player->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, ITEM_EMERALD_ESSENCE, 1);
|
||||
if (msg == EQUIP_ERR_OK)
|
||||
pPlayer->StoreNewItem(dest, ITEM_EMERALD_ESSENCE, true);
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
player->StoreNewItem(dest, ITEM_EMERALD_ESSENCE, true);
|
||||
CloseGossipMenuFor(player);
|
||||
break;
|
||||
}
|
||||
case GOSSIP_ACTION_INFO_DEF + 3:
|
||||
if (!HAS_ESSENCE(pPlayer))
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_VERDISA1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
|
||||
pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_VERDISA3, pCreature->GetGUID());
|
||||
if (!HAS_ESSENCE(player))
|
||||
AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_ITEM_VERDISA1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
|
||||
SendGossipMenuFor(player, GOSSIP_TEXTID_VERDISA3, creature->GetGUID());
|
||||
break;
|
||||
}
|
||||
break;
|
||||
@@ -127,31 +127,31 @@ public:
|
||||
switch(uiAction)
|
||||
{
|
||||
case GOSSIP_ACTION_INFO_DEF + 1:
|
||||
if (!HAS_ESSENCE(pPlayer))
|
||||
if (!HAS_ESSENCE(player))
|
||||
{
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_BELGARISTRASZ1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_BELGARISTRASZ2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
|
||||
pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_BELGARISTRASZ1, pCreature->GetGUID());
|
||||
AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_ITEM_BELGARISTRASZ1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
|
||||
AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_ITEM_BELGARISTRASZ2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
|
||||
SendGossipMenuFor(player, GOSSIP_TEXTID_BELGARISTRASZ1, creature->GetGUID());
|
||||
}
|
||||
else
|
||||
{
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_BELGARISTRASZ2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
|
||||
pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_BELGARISTRASZ2, pCreature->GetGUID());
|
||||
AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_ITEM_BELGARISTRASZ2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
|
||||
SendGossipMenuFor(player, GOSSIP_TEXTID_BELGARISTRASZ2, creature->GetGUID());
|
||||
}
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF + 2:
|
||||
{
|
||||
ItemPosCountVec dest;
|
||||
uint8 msg = pPlayer->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, ITEM_RUBY_ESSENCE, 1);
|
||||
uint8 msg = player->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, ITEM_RUBY_ESSENCE, 1);
|
||||
if (msg == EQUIP_ERR_OK)
|
||||
pPlayer->StoreNewItem(dest, ITEM_RUBY_ESSENCE, true);
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
player->StoreNewItem(dest, ITEM_RUBY_ESSENCE, true);
|
||||
CloseGossipMenuFor(player);
|
||||
break;
|
||||
}
|
||||
case GOSSIP_ACTION_INFO_DEF + 3:
|
||||
if (!HAS_ESSENCE(pPlayer))
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_BELGARISTRASZ1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
|
||||
pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_BELGARISTRASZ3, pCreature->GetGUID());
|
||||
if (!HAS_ESSENCE(player))
|
||||
AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_ITEM_BELGARISTRASZ1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
|
||||
SendGossipMenuFor(player, GOSSIP_TEXTID_BELGARISTRASZ3, creature->GetGUID());
|
||||
break;
|
||||
}
|
||||
break;
|
||||
@@ -159,31 +159,33 @@ public:
|
||||
switch(uiAction)
|
||||
{
|
||||
case GOSSIP_ACTION_INFO_DEF + 1:
|
||||
if (!HAS_ESSENCE(pPlayer))
|
||||
if (!HAS_ESSENCE(player))
|
||||
{
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_ETERNOS1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_ETERNOS2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
|
||||
pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_ETERNOS1, pCreature->GetGUID());
|
||||
AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_ITEM_ETERNOS1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
|
||||
AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_ITEM_ETERNOS2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
|
||||
SendGossipMenuFor(player, GOSSIP_TEXTID_ETERNOS1, creature->GetGUID());
|
||||
}
|
||||
else
|
||||
{
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_ETERNOS2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
|
||||
pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_ETERNOS2, pCreature->GetGUID());
|
||||
AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_ITEM_ETERNOS2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
|
||||
SendGossipMenuFor(player, GOSSIP_TEXTID_ETERNOS2, creature->GetGUID());
|
||||
}
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF + 2:
|
||||
{
|
||||
ItemPosCountVec dest;
|
||||
uint8 msg = pPlayer->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, ITEM_AMBER_ESSENCE, 1);
|
||||
uint8 msg = player->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, ITEM_AMBER_ESSENCE, 1);
|
||||
if (msg == EQUIP_ERR_OK)
|
||||
pPlayer->StoreNewItem(dest, ITEM_AMBER_ESSENCE, true);
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
player->StoreNewItem(dest, ITEM_AMBER_ESSENCE, true);
|
||||
|
||||
CloseGossipMenuFor(player);
|
||||
break;
|
||||
}
|
||||
case GOSSIP_ACTION_INFO_DEF + 3:
|
||||
if (!HAS_ESSENCE(pPlayer))
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_ETERNOS1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
|
||||
pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_ETERNOS3, pCreature->GetGUID());
|
||||
if (!HAS_ESSENCE(player))
|
||||
AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_ITEM_ETERNOS1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
|
||||
|
||||
SendGossipMenuFor(player, GOSSIP_TEXTID_ETERNOS3, creature->GetGUID());
|
||||
break;
|
||||
}
|
||||
break;
|
||||
@@ -198,14 +200,14 @@ class npc_oculus_drake : public CreatureScript
|
||||
public:
|
||||
npc_oculus_drake() : CreatureScript("npc_oculus_drake") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* pCreature) const
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new npc_oculus_drakeAI (pCreature);
|
||||
return new npc_oculus_drakeAI (creature);
|
||||
}
|
||||
|
||||
struct npc_oculus_drakeAI : public VehicleAI
|
||||
{
|
||||
npc_oculus_drakeAI(Creature *pCreature) : VehicleAI(pCreature)
|
||||
npc_oculus_drakeAI(Creature *creature) : VehicleAI(creature)
|
||||
{
|
||||
m_pInstance = me->GetInstanceScript();
|
||||
JustSummoned = true;
|
||||
|
||||
@@ -116,7 +116,7 @@ static Yells Conversation[]=
|
||||
{14253, "So that was the problem? Now I'm makin' progress...", NPC_BRANN, 195000},
|
||||
{13767, "Critical threat index. Void analysis diverted. Initiating sanitization protocol.", NPC_ABEDNEUM, 205000},
|
||||
{14254, "Hang on! Nobody's gonna' be sanitized as long as I have a say in it!", NPC_BRANN, 215000},
|
||||
{14255, "Ha! The old magic fingers finally won through! Now let's get down to--", NPC_BRANN, 295000},
|
||||
{14255, "Ha! The old magic fingers finally won through! Now let's get down to--", NPC_BRANN, 295000},
|
||||
{13768, "Alert: security fail-safes deactivated. Beginning memory purge and... ", NPC_ABEDNEUM, 303000},
|
||||
//The fight is completed at this point.
|
||||
{14256, "Purge? No no no no no.. where did I-- Aha, this should do the trick...", NPC_BRANN, 310000},
|
||||
@@ -150,81 +150,81 @@ class brann_bronzebeard : public CreatureScript
|
||||
public:
|
||||
brann_bronzebeard() : CreatureScript("brann_bronzebeard") { }
|
||||
|
||||
bool OnGossipHello(Player *player, Creature *pCreature)
|
||||
bool OnGossipHello(Player* player, Creature* creature) override
|
||||
{
|
||||
InstanceScript* pInstance = (pCreature->GetInstanceScript());
|
||||
InstanceScript* pInstance = (creature->GetInstanceScript());
|
||||
|
||||
player->TalkedToCreature(pCreature->GetEntry(), pCreature->GetGUID());
|
||||
player->PrepareGossipMenu(pCreature, 0, true);
|
||||
player->TalkedToCreature(creature->GetEntry(), creature->GetGUID());
|
||||
player->PrepareGossipMenu(creature, 0, true);
|
||||
if (pInstance)
|
||||
{
|
||||
uint32 brann = pInstance->GetData(BRANN_BRONZEBEARD);
|
||||
switch (brann)
|
||||
{
|
||||
case 1:
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
||||
AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_ITEM_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
||||
break;
|
||||
case 2:
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
|
||||
AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_ITEM_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
|
||||
break;
|
||||
case 3:
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3);
|
||||
AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_ITEM_3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3);
|
||||
break;
|
||||
case 4:
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+4);
|
||||
AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_ITEM_3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+4);
|
||||
break;
|
||||
case 5:
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_4, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5);
|
||||
AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_ITEM_4, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5);
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
|
||||
}
|
||||
player->SEND_GOSSIP_MENU(TEXT_ID_START, pCreature->GetGUID());
|
||||
SendGossipMenuFor(player, TEXT_ID_START, creature->GetGUID());
|
||||
return true;
|
||||
}
|
||||
|
||||
bool OnGossipSelect(Player *player, Creature *pCreature, uint32 /*sender*/, uint32 action )
|
||||
bool OnGossipSelect(Player *player, Creature *creature, uint32 /*sender*/, uint32 action) override
|
||||
{
|
||||
if (action)
|
||||
{
|
||||
switch (action)
|
||||
{
|
||||
case GOSSIP_ACTION_INFO_DEF+1:
|
||||
pCreature->AI()->DoAction(ACTION_START_EVENT);
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
creature->AI()->DoAction(ACTION_START_EVENT);
|
||||
CloseGossipMenuFor(player);
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+2:
|
||||
pCreature->AI()->DoAction(ACTION_START_TRIBUNAL);
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
creature->AI()->DoAction(ACTION_START_TRIBUNAL);
|
||||
CloseGossipMenuFor(player);
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+3:
|
||||
pCreature->AI()->DoAction(ACTION_GO_TO_SJONNIR);
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
creature->AI()->DoAction(ACTION_GO_TO_SJONNIR);
|
||||
CloseGossipMenuFor(player);
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+4:
|
||||
pCreature->AI()->DoAction(ACTION_WIPE_START);
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
creature->AI()->DoAction(ACTION_WIPE_START);
|
||||
CloseGossipMenuFor(player);
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+5:
|
||||
pCreature->AI()->DoAction(ACTION_OPEN_DOOR);
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
creature->AI()->DoAction(ACTION_OPEN_DOOR);
|
||||
CloseGossipMenuFor(player);
|
||||
break;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
CreatureAI* GetAI(Creature* pCreature) const
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return new brann_bronzebeardAI (pCreature);
|
||||
return new brann_bronzebeardAI (creature);
|
||||
}
|
||||
|
||||
struct brann_bronzebeardAI : public npc_escortAI
|
||||
{
|
||||
|
||||
brann_bronzebeardAI(Creature *c) : npc_escortAI(c), summons(me)
|
||||
{
|
||||
{
|
||||
AbedneumGUID = MarnakGUID = KaddrakGUID = 0;
|
||||
pInstance = c->GetInstanceScript();
|
||||
}
|
||||
@@ -245,7 +245,7 @@ public:
|
||||
Creature *cr;
|
||||
if ((cr = GetAbedneum())) cr->DespawnOrUnsummon();
|
||||
if ((cr = GetMarnak())) cr->DespawnOrUnsummon();
|
||||
if ((cr = GetKaddrak())) cr->DespawnOrUnsummon();
|
||||
if ((cr = GetKaddrak())) cr->DespawnOrUnsummon();
|
||||
SwitchHeadVisaul(0x7, false);
|
||||
}
|
||||
|
||||
@@ -283,21 +283,21 @@ public:
|
||||
TalkEvent = false;
|
||||
}
|
||||
|
||||
void WaypointReached(uint32 id);
|
||||
void WaypointReached(uint32 id) override;
|
||||
void InitializeEvent();
|
||||
|
||||
Creature* GetAbedneum() { return ObjectAccessor::GetCreature(*me, AbedneumGUID); }
|
||||
Creature* GetMarnak() { return ObjectAccessor::GetCreature(*me, MarnakGUID); }
|
||||
Creature* GetKaddrak() { return ObjectAccessor::GetCreature(*me, KaddrakGUID); }
|
||||
|
||||
void MoveInLineOfSight(Unit* /*pWho*/) { }
|
||||
void DamageTaken(Unit*, uint32 &damage, DamageEffectType, SpellSchoolMask)
|
||||
{
|
||||
void MoveInLineOfSight(Unit* /*pWho*/) override { }
|
||||
void DamageTaken(Unit*, uint32 &damage, DamageEffectType, SpellSchoolMask) override
|
||||
{
|
||||
if (damage && pInstance)
|
||||
pInstance->SetData(DATA_BRANN_ACHIEVEMENT, false);
|
||||
}
|
||||
|
||||
void Reset()
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
RemoveEscortState(0x7); // all states
|
||||
SetDespawnAtFar(false);
|
||||
@@ -312,13 +312,13 @@ public:
|
||||
{
|
||||
pInstance->SetData(BRANN_BRONZEBEARD, 1);
|
||||
pInstance->SetData(DATA_BRANN_ACHIEVEMENT, true);
|
||||
|
||||
|
||||
if (pInstance->GetData(BOSS_TRIBUNAL_OF_AGES) == DONE)
|
||||
pInstance->SetData(BRANN_BRONZEBEARD, (pInstance->GetData(BOSS_SJONNIR) == DONE) ? 5 : 4);
|
||||
}
|
||||
}
|
||||
|
||||
void DoAction(int32 action)
|
||||
void DoAction(int32 action) override
|
||||
{
|
||||
switch (action)
|
||||
{
|
||||
@@ -334,7 +334,7 @@ public:
|
||||
me->setFaction(i->GetSource()->getFaction());
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
SetEscortPaused(false);
|
||||
InitializeEvent();
|
||||
me->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_NONE);
|
||||
@@ -378,7 +378,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void JustSummoned(Creature* cr)
|
||||
void JustSummoned(Creature* cr) override
|
||||
{
|
||||
if (cr->GetEntry() == NPC_ABEDNEUM || cr->GetEntry() == NPC_KADDRAK || cr->GetEntry() == NPC_MARNAK)
|
||||
cr->SetCanFly(true);
|
||||
@@ -386,7 +386,7 @@ public:
|
||||
summons.Summon(cr);
|
||||
}
|
||||
|
||||
void UpdateEscortAI(uint32 diff)
|
||||
void UpdateEscortAI(uint32 diff) override
|
||||
{
|
||||
events.Update(diff);
|
||||
switch (events.GetEvent())
|
||||
@@ -499,7 +499,7 @@ public:
|
||||
}
|
||||
|
||||
me->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP | UNIT_NPC_FLAG_QUESTGIVER);
|
||||
|
||||
|
||||
|
||||
// Spawn Chest and quest credit
|
||||
if (Player *plr = SelectTargetFromPlayerList(200.0f))
|
||||
@@ -513,7 +513,7 @@ public:
|
||||
|
||||
plr->GroupEventHappens(QUEST_HALLS_OF_STONE, me);
|
||||
}
|
||||
|
||||
|
||||
events.ScheduleEvent(EVENT_GO_TO_SJONNIR, 279000);
|
||||
break;
|
||||
}
|
||||
@@ -530,7 +530,7 @@ public:
|
||||
case EVENT_END:
|
||||
{
|
||||
events.Reset();
|
||||
if (pInstance)
|
||||
if (pInstance)
|
||||
pInstance->SetData(BRANN_BRONZEBEARD, 6);
|
||||
|
||||
me->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP | UNIT_NPC_FLAG_QUESTGIVER);
|
||||
@@ -560,13 +560,14 @@ public:
|
||||
cs->PlayDirectSound(Conversation[SpeechCount].sound);
|
||||
}
|
||||
|
||||
if (SpeechCount < 38)
|
||||
if (SpeechCount < 38)
|
||||
SpeechPause = Conversation[SpeechCount++].timer;
|
||||
else
|
||||
TalkEvent = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void SummonCreatures(uint32 entry, uint8 count)
|
||||
{
|
||||
for (int i = 0; i < count; ++i)
|
||||
@@ -581,12 +582,12 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/)
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
{
|
||||
ResetEvent();
|
||||
if(pInstance)
|
||||
{
|
||||
if (pInstance->GetData(BOSS_TRIBUNAL_OF_AGES) != DONE)
|
||||
if (pInstance->GetData(BOSS_TRIBUNAL_OF_AGES) != DONE)
|
||||
pInstance->SetData(BOSS_TRIBUNAL_OF_AGES, NOT_STARTED);
|
||||
}
|
||||
}
|
||||
@@ -632,10 +633,10 @@ void brann_bronzebeard::brann_bronzebeardAI::WaypointReached(uint32 id)
|
||||
switch (id)
|
||||
{
|
||||
// Stop before stairs and ask to start
|
||||
case 9:
|
||||
case 9:
|
||||
SetEscortPaused(true);
|
||||
me->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP | UNIT_NPC_FLAG_QUESTGIVER);
|
||||
if (pInstance)
|
||||
if (pInstance)
|
||||
pInstance->SetData(BRANN_BRONZEBEARD, 2);
|
||||
|
||||
break;
|
||||
@@ -681,9 +682,9 @@ class dark_rune_protectors : public CreatureScript
|
||||
public:
|
||||
dark_rune_protectors() : CreatureScript("dark_rune_protectors") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* pCreature) const
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new dark_rune_protectorsAI (pCreature);
|
||||
return new dark_rune_protectorsAI (creature);
|
||||
}
|
||||
|
||||
struct dark_rune_protectorsAI : public ScriptedAI
|
||||
@@ -691,7 +692,7 @@ public:
|
||||
dark_rune_protectorsAI(Creature *c) : ScriptedAI(c) { }
|
||||
|
||||
EventMap events;
|
||||
void Reset()
|
||||
void Reset()
|
||||
{
|
||||
events.Reset();
|
||||
}
|
||||
@@ -705,7 +706,7 @@ public:
|
||||
void UpdateAI(uint32 diff)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
@@ -739,9 +740,9 @@ class dark_rune_stormcaller : public CreatureScript
|
||||
public:
|
||||
dark_rune_stormcaller() : CreatureScript("dark_rune_stormcaller") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* pCreature) const
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new dark_rune_stormcallerAI (pCreature);
|
||||
return new dark_rune_stormcallerAI (creature);
|
||||
}
|
||||
|
||||
struct dark_rune_stormcallerAI : public ScriptedAI
|
||||
@@ -749,7 +750,7 @@ public:
|
||||
dark_rune_stormcallerAI(Creature *c) : ScriptedAI(c) { }
|
||||
|
||||
EventMap events;
|
||||
void Reset()
|
||||
void Reset()
|
||||
{
|
||||
events.Reset();
|
||||
}
|
||||
@@ -795,20 +796,20 @@ class iron_golem_custodian : public CreatureScript
|
||||
public:
|
||||
iron_golem_custodian() : CreatureScript("iron_golem_custodian") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* pCreature) const
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new iron_golem_custodianAI (pCreature);
|
||||
return new iron_golem_custodianAI (creature);
|
||||
}
|
||||
|
||||
struct iron_golem_custodianAI : public ScriptedAI
|
||||
{
|
||||
iron_golem_custodianAI(Creature *c) : ScriptedAI(c) { }
|
||||
EventMap events;
|
||||
void Reset()
|
||||
void Reset()
|
||||
{
|
||||
events.Reset();
|
||||
}
|
||||
|
||||
|
||||
void EnterCombat(Unit *)
|
||||
{
|
||||
events.ScheduleEvent(EVENT_IGC_CRUSH, 6000);
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
#include "Player.h"
|
||||
#include "Opcodes.h"
|
||||
|
||||
enum LeviathanSpells
|
||||
enum LeviathanSpells
|
||||
{
|
||||
// Leviathan basic
|
||||
SPELL_PURSUED = 62374,
|
||||
@@ -514,19 +514,19 @@ void boss_flame_leviathan::boss_flame_leviathanAI::ActivateTowers()
|
||||
me->AddLootMode(1<<_towersCount);
|
||||
switch (i)
|
||||
{
|
||||
case EVENT_TOWER_OF_LIFE_DESTROYED:
|
||||
case EVENT_TOWER_OF_LIFE_DESTROYED:
|
||||
me->AddAura(SPELL_TOWER_OF_LIFE, me);
|
||||
events.RescheduleEvent(EVENT_FREYA, 30000);
|
||||
break;
|
||||
case EVENT_TOWER_OF_STORM_DESTROYED:
|
||||
case EVENT_TOWER_OF_STORM_DESTROYED:
|
||||
me->AddAura(SPELL_TOWER_OF_STORMS, me);
|
||||
events.RescheduleEvent(EVENT_THORIMS_HAMMER, 60000);
|
||||
break;
|
||||
case EVENT_TOWER_OF_FROST_DESTROYED:
|
||||
case EVENT_TOWER_OF_FROST_DESTROYED:
|
||||
me->AddAura(SPELL_TOWER_OF_FROST, me);
|
||||
events.RescheduleEvent(EVENT_HODIRS_FURY, 20000);
|
||||
break;
|
||||
case EVENT_TOWER_OF_FLAMES_DESTROYED:
|
||||
case EVENT_TOWER_OF_FLAMES_DESTROYED:
|
||||
me->AddAura(SPELL_TOWER_OF_FLAMES, me);
|
||||
events.RescheduleEvent(EVENT_MIMIRONS_INFERNO, 42000);
|
||||
break;
|
||||
@@ -895,7 +895,7 @@ public:
|
||||
struct npc_freya_wardAI : public NullCreatureAI
|
||||
{
|
||||
npc_freya_wardAI(Creature *c) : NullCreatureAI(c), summons(c)
|
||||
{
|
||||
{
|
||||
}
|
||||
|
||||
SummonList summons;
|
||||
@@ -975,7 +975,7 @@ public:
|
||||
struct npc_hodirs_furyAI : public NullCreatureAI
|
||||
{
|
||||
npc_hodirs_furyAI(Creature *c) : NullCreatureAI(c)
|
||||
{
|
||||
{
|
||||
}
|
||||
|
||||
uint32 _timeToHit;
|
||||
@@ -1035,7 +1035,7 @@ public:
|
||||
_switchTargetTimer = 0;
|
||||
}
|
||||
else
|
||||
_switchTargetTimer = 25000;
|
||||
_switchTargetTimer = 25000;
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -1117,7 +1117,7 @@ public:
|
||||
struct npc_thorims_hammerAI : public NullCreatureAI
|
||||
{
|
||||
npc_thorims_hammerAI(Creature *c) : NullCreatureAI(c)
|
||||
{
|
||||
{
|
||||
}
|
||||
|
||||
uint32 _beamTimer;
|
||||
@@ -1216,9 +1216,9 @@ public:
|
||||
bool OnGossipHello(Player* player, Creature* creature) override
|
||||
{
|
||||
if (creature->GetInstanceScript() && creature->GetInstanceScript()->GetData(TYPE_LEVIATHAN) == NOT_STARTED && !creature->AI()->GetData(DATA_EVENT_STARTED))
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Activate secondary defensive systems.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
||||
AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Activate secondary defensive systems.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
||||
|
||||
player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE, creature->GetGUID());
|
||||
SendGossipMenuFor(player, DEFAULT_GOSSIP_MESSAGE, creature->GetGUID());
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1228,15 +1228,15 @@ public:
|
||||
{
|
||||
case GOSSIP_ACTION_INFO_DEF+1:
|
||||
creature->MonsterSay("Activating secondary defensive systems will result in the extermination of unauthorized life forms via orbital emplacements. You are an unauthorized life form.", LANG_UNIVERSAL, 0);
|
||||
player->PlayerTalkClass->ClearMenus();
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Confirmed.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
|
||||
player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE, creature->GetGUID());
|
||||
ClearGossipMenuFor(player);
|
||||
AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Confirmed.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
|
||||
SendGossipMenuFor(player, DEFAULT_GOSSIP_MESSAGE, creature->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+2:
|
||||
creature->MonsterSay("Security override permitted. Secondary defensive systems activated. Backup deactivation for secondary systems can be accessed via individual generators located on the concourse. ", LANG_UNIVERSAL, 0);
|
||||
creature->AI()->DoAction(ACTION_START_NORGANNON_EVENT);
|
||||
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
CloseGossipMenuFor(player);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -1427,7 +1427,7 @@ public:
|
||||
void Say(std::string text, bool self)
|
||||
{
|
||||
WorldPacket data;
|
||||
|
||||
|
||||
if (self)
|
||||
ChatHandler::BuildChatPacket(data, CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, me, nullptr, text);
|
||||
else if (Creature* c = ObjectAccessor::GetCreature(*me, _pentarusGUID))
|
||||
@@ -1524,9 +1524,9 @@ public:
|
||||
{
|
||||
npc_brann_radioAI(Creature* c) : NullCreatureAI(c)
|
||||
{
|
||||
_lock = (me->GetInstanceScript() && me->GetInstanceScript()->GetData(TYPE_LEVIATHAN) > NOT_STARTED);
|
||||
_lock = (me->GetInstanceScript() && me->GetInstanceScript()->GetData(TYPE_LEVIATHAN) > NOT_STARTED);
|
||||
_helpLock = _lock;
|
||||
}
|
||||
}
|
||||
|
||||
bool _lock;
|
||||
bool _helpLock;
|
||||
@@ -1549,7 +1549,7 @@ public:
|
||||
{
|
||||
if (who->GetTypeId() != TYPEID_PLAYER && !who->IsVehicle())
|
||||
return;
|
||||
|
||||
|
||||
// ENGAGE
|
||||
if (!_helpLock && me->GetDistance2d(-508.898f, -32.9631f) < 5.0f)
|
||||
{
|
||||
@@ -1637,7 +1637,7 @@ public:
|
||||
|
||||
struct npc_storm_beacon_spawnAI : public NullCreatureAI
|
||||
{
|
||||
npc_storm_beacon_spawnAI(Creature* c) : NullCreatureAI(c)
|
||||
npc_storm_beacon_spawnAI(Creature* c) : NullCreatureAI(c)
|
||||
{
|
||||
_amount = 0;
|
||||
_checkTimer = 0;
|
||||
@@ -1678,7 +1678,7 @@ public:
|
||||
|
||||
struct boss_flame_leviathan_safety_containerAI : public NullCreatureAI
|
||||
{
|
||||
boss_flame_leviathan_safety_containerAI(Creature *c) : NullCreatureAI(c)
|
||||
boss_flame_leviathan_safety_containerAI(Creature *c) : NullCreatureAI(c)
|
||||
{
|
||||
_allowTimer = 0;
|
||||
}
|
||||
@@ -1694,7 +1694,7 @@ public:
|
||||
liquid->CastSpell(liquid, SPELL_LIQUID_PYRITE, true);
|
||||
liquid->CastSpell(liquid, SPELL_DUST_CLOUD_IMPACT, true);
|
||||
}
|
||||
|
||||
|
||||
me->DespawnOrUnsummon(1);
|
||||
}
|
||||
}
|
||||
@@ -1726,8 +1726,8 @@ public:
|
||||
|
||||
struct npc_mechanoliftAI : public NullCreatureAI
|
||||
{
|
||||
npc_mechanoliftAI(Creature *c) : NullCreatureAI(c)
|
||||
{
|
||||
npc_mechanoliftAI(Creature *c) : NullCreatureAI(c)
|
||||
{
|
||||
me->SetSpeed(MOVE_RUN, rand_norm()+0.5f);
|
||||
}
|
||||
|
||||
@@ -2341,7 +2341,7 @@ class achievement_flame_leviathan_towers : public AchievementCriteriaScript
|
||||
{
|
||||
return target && _towerCount <= target->GetAI()->GetData(DATA_GET_TOWER_COUNT);
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
uint32 const _towerCount;
|
||||
};
|
||||
@@ -2375,7 +2375,7 @@ class achievement_flame_leviathan_garage : public AchievementCriteriaScript
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
uint32 const _entry1;
|
||||
uint32 const _entry2;
|
||||
|
||||
@@ -204,7 +204,7 @@ public:
|
||||
|
||||
if( me->HasUnitState(UNIT_STATE_CASTING) )
|
||||
return;
|
||||
|
||||
|
||||
switch( events.GetEvent() )
|
||||
{
|
||||
case 0:
|
||||
@@ -463,7 +463,7 @@ public:
|
||||
void UpdateAI(uint32 diff)
|
||||
{
|
||||
UpdateVictim();
|
||||
|
||||
|
||||
timer += diff;
|
||||
if (timer >= 2000)
|
||||
{
|
||||
@@ -673,7 +673,7 @@ class go_ulduar_pure_saronite_deposit : public GameObjectScript
|
||||
public:
|
||||
go_ulduar_pure_saronite_deposit() : GameObjectScript("go_ulduar_pure_saronite_deposit") { }
|
||||
|
||||
bool OnGossipHello(Player* plr, GameObject* go)
|
||||
bool OnGossipHello(Player* plr, GameObject* go) override
|
||||
{
|
||||
if (plr->IsGameMaster())
|
||||
return false;
|
||||
@@ -707,4 +707,4 @@ void AddSC_boss_vezax()
|
||||
new achievement_shadowdodger();
|
||||
|
||||
new go_ulduar_pure_saronite_deposit();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -775,7 +775,7 @@ public:
|
||||
Creature* LMK2 = GetLMK2();
|
||||
Creature* VX001 = GetVX001();
|
||||
Creature* ACU = GetACU();
|
||||
|
||||
|
||||
if (!VX001 || !LMK2 || !ACU)
|
||||
return;
|
||||
|
||||
@@ -1113,7 +1113,7 @@ public:
|
||||
cannon->ExitVehicle();
|
||||
me->GetMotionMaster()->MoveCharge(2795.076f, 2598.616f, 364.32f, 21.0f);
|
||||
if (Creature* c = GetMimiron())
|
||||
c->AI()->SetData(0, 1);
|
||||
c->AI()->SetData(0, 1);
|
||||
}
|
||||
}
|
||||
else if (Phase == 4)
|
||||
@@ -1752,7 +1752,7 @@ public:
|
||||
me->UpdatePosition(2744.65f, 2569.46f, 381.34f, M_PI, false);
|
||||
|
||||
if (Creature* c = GetMimiron())
|
||||
c->AI()->SetData(0, 3);
|
||||
c->AI()->SetData(0, 3);
|
||||
}
|
||||
}
|
||||
else if (Phase == 4)
|
||||
@@ -2164,7 +2164,7 @@ public:
|
||||
me->CastSpell(me, SPELL_BEAM_BLUE, true);
|
||||
option = 3;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff)
|
||||
@@ -2276,25 +2276,24 @@ public:
|
||||
};
|
||||
|
||||
class go_ulduar_do_not_push_this_button : public GameObjectScript
|
||||
{
|
||||
public:
|
||||
go_ulduar_do_not_push_this_button() : GameObjectScript("go_ulduar_do_not_push_this_button") { }
|
||||
{
|
||||
public:
|
||||
go_ulduar_do_not_push_this_button() : GameObjectScript("go_ulduar_do_not_push_this_button") { }
|
||||
|
||||
bool OnGossipHello(Player* Player, GameObject* GO)
|
||||
bool OnGossipHello(Player* player, GameObject* go) override
|
||||
{
|
||||
if( !Player || !GO )
|
||||
if(!player || !go)
|
||||
return true;
|
||||
|
||||
InstanceScript* pInstance = GO->GetInstanceScript();
|
||||
if (pInstance)
|
||||
if (InstanceScript* instance = go->GetInstanceScript())
|
||||
{
|
||||
if( pInstance->GetData(TYPE_MIMIRON) != NOT_STARTED )
|
||||
if(instance->GetData(TYPE_MIMIRON) != NOT_STARTED)
|
||||
return false;
|
||||
|
||||
if (Creature* c = ObjectAccessor::GetCreature(*GO, pInstance->GetData64(TYPE_MIMIRON)))
|
||||
if (Creature* c = ObjectAccessor::GetCreature(*go, instance->GetData64(TYPE_MIMIRON)))
|
||||
{
|
||||
c->AI()->SetData(0, 7);
|
||||
c->AI()->AttackStart(Player);
|
||||
c->AI()->AttackStart(player);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2621,4 +2620,4 @@ void AddSC_boss_mimiron()
|
||||
new achievement_mimiron_set_up_us_the_bomb_11();
|
||||
new achievement_mimiron_set_up_us_the_bomb_12();
|
||||
new achievement_mimiron_set_up_us_the_bomb_13();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -457,7 +457,7 @@ public:
|
||||
me->RemoveAura(SPELL_CHAIN_4);
|
||||
}
|
||||
me->CastSpell(me, SPELL_WINGBUFFET, true);
|
||||
|
||||
|
||||
if( (me->GetHealth()*100) / me->GetMaxHealth() < 50 ) // start phase 3
|
||||
{
|
||||
me->SetControlled(false, UNIT_STATE_ROOT);
|
||||
@@ -583,7 +583,7 @@ class npc_ulduar_expedition_commander : public CreatureScript
|
||||
public:
|
||||
npc_ulduar_expedition_commander() : CreatureScript("npc_ulduar_expedition_commander") { }
|
||||
|
||||
bool OnGossipHello(Player* player, Creature* creature)
|
||||
bool OnGossipHello(Player* player, Creature* creature) override
|
||||
{
|
||||
if (!player || !creature)
|
||||
return true;
|
||||
@@ -599,12 +599,12 @@ class npc_ulduar_expedition_commander : public CreatureScript
|
||||
if (!razorscale || razorscale->IsInCombat())
|
||||
return true;
|
||||
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, TEXT_GOSSIP_ACTION, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
||||
player->PlayerTalkClass->SendGossipMenu(40100, creature->GetGUID());
|
||||
AddGossipItemFor(player, GOSSIP_ICON_CHAT, TEXT_GOSSIP_ACTION, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
||||
SendGossipMenuFor(player, 40100, creature);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*uiSender*/, uint32 uiAction)
|
||||
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*uiSender*/, uint32 uiAction) override
|
||||
{
|
||||
if (!player || !creature)
|
||||
return true;
|
||||
@@ -636,7 +636,7 @@ class npc_ulduar_expedition_commander : public CreatureScript
|
||||
return true;
|
||||
}
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return GetInstanceAI<npc_ulduar_expedition_commanderAI>(creature);
|
||||
}
|
||||
@@ -650,7 +650,7 @@ class npc_ulduar_expedition_commander : public CreatureScript
|
||||
me->SetReactState(REACT_AGGRESSIVE);
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit* who)
|
||||
void MoveInLineOfSight(Unit* who) override
|
||||
{
|
||||
if (_introSpoken)
|
||||
return;
|
||||
@@ -687,7 +687,7 @@ public:
|
||||
|
||||
InstanceScript* pInstance;
|
||||
uint8 repairPoints;
|
||||
|
||||
|
||||
void Reset()
|
||||
{
|
||||
repairPoints = 0;
|
||||
@@ -877,11 +877,11 @@ public:
|
||||
};
|
||||
|
||||
class go_ulduar_working_harpoon : public GameObjectScript
|
||||
{
|
||||
public:
|
||||
go_ulduar_working_harpoon() : GameObjectScript("go_ulduar_working_harpoon") { }
|
||||
{
|
||||
public:
|
||||
go_ulduar_working_harpoon() : GameObjectScript("go_ulduar_working_harpoon") { }
|
||||
|
||||
bool OnGossipHello(Player* user, GameObject* go)
|
||||
bool OnGossipHello(Player* user, GameObject* go) override
|
||||
{
|
||||
if( !user || !go )
|
||||
return true;
|
||||
@@ -926,7 +926,7 @@ public:
|
||||
if( uint64 g = pInstance->GetData64(npc) )
|
||||
if( Creature* hfs = ObjectAccessor::GetCreature(*go, g) )
|
||||
hfs->AI()->SetData(3, spell);
|
||||
|
||||
|
||||
go->SetLootState(GO_JUST_DEACTIVATED);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ enum ThorimSpells
|
||||
SPELL_LIGHTNING_CHARGE_BUFF = 62279,
|
||||
SPELL_LIGHTNING_PILLAR_P2 = 62976,
|
||||
SPELL_LIGHTNING_ORB_CHARGER = 62278,
|
||||
|
||||
|
||||
// SIF
|
||||
SPELL_TOUCH_OF_DOMINION = 62507,
|
||||
SPELL_SIF_TRANSFORM = 64778,
|
||||
@@ -328,7 +328,7 @@ public:
|
||||
bool _hardMode;
|
||||
bool _isHitAllowed;
|
||||
bool _isAlly;
|
||||
uint8 _trashCounter;
|
||||
uint8 _trashCounter;
|
||||
|
||||
InstanceScript* m_pInstance;
|
||||
EventMap events;
|
||||
@@ -371,10 +371,10 @@ public:
|
||||
me->SummonCreature(_isAlly ? NPC_CAPTURED_MERCENARY_SOLDIER_ALLY : NPC_CAPTURED_MERCENARY_SOLDIER_HORDE, 2127.24f, -251.309f, 419.793f, 5.89921f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 5000);
|
||||
me->SummonCreature(_isAlly ? NPC_CAPTURED_MERCENARY_SOLDIER_ALLY : NPC_CAPTURED_MERCENARY_SOLDIER_HORDE, 2120.1f, -258.99f, 419.764f, 6.24828f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 5000);
|
||||
me->SummonCreature(_isAlly ? NPC_CAPTURED_MERCENARY_SOLDIER_ALLY : NPC_CAPTURED_MERCENARY_SOLDIER_HORDE, 2123.32f, -254.771f, 419.789f, 6.17846f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 5000);
|
||||
|
||||
|
||||
// Captured Mercenary Captain 32908
|
||||
me->SummonCreature(_isAlly ? NPC_CAPTURED_MERCENARY_CAPTAIN_ALLY : NPC_CAPTURED_MERCENARY_CAPTAIN_HORDE, 2131.31f, -259.182f, 419.974f, 5.91667f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 5000);
|
||||
|
||||
|
||||
// Dark Rune Acolyte (arena) 32886
|
||||
me->SummonCreature(NPC_DARK_RUNE_ACOLYTE_I, 2129.09f, -277.142f, 419.756f, 1.22173f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 5000);
|
||||
|
||||
@@ -395,7 +395,7 @@ public:
|
||||
|
||||
// Runic Colossus 32872
|
||||
me->SummonCreature(NPC_RUNIC_COLOSSUS, 2227.5f, -396.179f, 412.176f, 1.79769f);
|
||||
|
||||
|
||||
// Ancient Rune Giant 32873
|
||||
me->SummonCreature(NPC_ANCIENT_RUNE_GIANT, 2134.57f, -440.318f, 438.331f, 0.226893f);
|
||||
|
||||
@@ -540,7 +540,7 @@ public:
|
||||
{
|
||||
if (m_pInstance)
|
||||
m_pInstance->DoUpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET, 64980 /*SIFFED ACHIEVEMENT*/);
|
||||
|
||||
|
||||
_hardMode = true;
|
||||
EntryCheckPredicate pred(NPC_SIF);
|
||||
summons.DoAction(ACTION_SIF_JOIN_FIGHT, pred);
|
||||
@@ -567,7 +567,7 @@ public:
|
||||
|
||||
me->MonsterYell("Stay your arms! I yield!", LANG_UNIVERSAL, 0);
|
||||
me->PlayDirectSound(SOUND_DEFEATED);
|
||||
|
||||
|
||||
events.SetPhase(EVENT_PHASE_OUTRO);
|
||||
events.ScheduleEvent(EVENT_THORIM_OUTRO1, 2000, 0, EVENT_PHASE_OUTRO);
|
||||
|
||||
@@ -950,7 +950,7 @@ public:
|
||||
struct boss_thorim_lightning_orbAI : public npc_escortAI
|
||||
{
|
||||
boss_thorim_lightning_orbAI(Creature* pCreature) : npc_escortAI(pCreature)
|
||||
{
|
||||
{
|
||||
InitWaypoint();
|
||||
Reset();
|
||||
Start(false, true, 0);
|
||||
@@ -1036,7 +1036,7 @@ public:
|
||||
struct boss_thorim_sif_blizzardAI : public npc_escortAI
|
||||
{
|
||||
boss_thorim_sif_blizzardAI(Creature* pCreature) : npc_escortAI(pCreature)
|
||||
{
|
||||
{
|
||||
InitWaypoint();
|
||||
Reset();
|
||||
Start(false, true, 0);
|
||||
@@ -1088,8 +1088,8 @@ public:
|
||||
|
||||
uint32 _resetTimer;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
void Reset()
|
||||
{
|
||||
_resetTimer = 0;
|
||||
me->SetControlled(true, UNIT_STATE_STUNNED);
|
||||
me->SetDisableGravity(true);
|
||||
@@ -1242,7 +1242,7 @@ public:
|
||||
case EVENT_CM_SOLDIER_S:
|
||||
if (me->GetDistance(me->GetVictim()) > 8)
|
||||
me->CastSpell(me->GetVictim(), SPELL_SHOOT, false);
|
||||
|
||||
|
||||
events.RepeatEvent(1500);
|
||||
break;
|
||||
case EVENT_CM_CAPTAIN_D:
|
||||
@@ -1310,7 +1310,7 @@ public:
|
||||
events.ScheduleEvent(EVENT_IH_GUARD_CLEAVE, 6000);
|
||||
events.ScheduleEvent(EVENT_IH_GUARD_HAMSTRING, 9000);
|
||||
events.ScheduleEvent(EVENT_IH_GUARD_SHIELD_SMASH, 15000);
|
||||
|
||||
|
||||
if (Creature* runeGiant = me->FindNearestCreature(NPC_ANCIENT_RUNE_GIANT, 200.0f))
|
||||
runeGiant->AI()->DoAction(ACTION_IRON_HONOR_DIED);
|
||||
}
|
||||
@@ -1476,7 +1476,7 @@ public:
|
||||
_nextTriggerPos += 16.0f;
|
||||
if (_nextTriggerPos > -260.0f)
|
||||
events.PopEvent();
|
||||
else
|
||||
else
|
||||
events.RescheduleEvent(EVENT_RC_RUNIC_SMASH_TRIGGER, 500);
|
||||
|
||||
RunRunicSmash(true);
|
||||
@@ -1744,16 +1744,16 @@ public:
|
||||
};
|
||||
|
||||
class go_thorim_lever : public GameObjectScript
|
||||
{
|
||||
public:
|
||||
go_thorim_lever() : GameObjectScript("go_thorim_lever") { }
|
||||
{
|
||||
public:
|
||||
go_thorim_lever() : GameObjectScript("go_thorim_lever") { }
|
||||
|
||||
bool OnGossipHello(Player* pPlayer, GameObject* pGo)
|
||||
bool OnGossipHello(Player* pPlayer, GameObject* go) override
|
||||
{
|
||||
if (GameObject *g = pPlayer->FindNearestGameObject(GO_ARENA_LEVER_GATE, 50))
|
||||
g->UseDoorOrButton();
|
||||
|
||||
pGo->UseDoorOrButton();
|
||||
go->UseDoorOrButton();
|
||||
return true;
|
||||
}
|
||||
};
|
||||
@@ -1824,7 +1824,7 @@ class achievement_thorim_stand_in_the_lightning : public AchievementCriteriaScri
|
||||
if (InstanceScript* instance = player->GetInstanceScript())
|
||||
if (Creature* cr = ObjectAccessor::GetCreature(*player, instance->GetData64(TYPE_THORIM)))
|
||||
return cr->AI()->GetData(DATA_HIT_BY_LIGHTNING);
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
};
|
||||
@@ -1839,7 +1839,7 @@ class achievement_thorim_lose_your_illusion : public AchievementCriteriaScript
|
||||
if (InstanceScript* instance = player->GetInstanceScript())
|
||||
if (Creature* cr = ObjectAccessor::GetCreature(*player, instance->GetData64(TYPE_THORIM)))
|
||||
return cr->AI()->GetData(DATA_LOSE_YOUR_ILLUSION);
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
};
|
||||
@@ -1862,7 +1862,7 @@ void AddSC_boss_thorim()
|
||||
// Mini bosses
|
||||
new boss_thorim_runic_colossus();
|
||||
new boss_thorim_ancient_rune_giant();
|
||||
|
||||
|
||||
// GOs
|
||||
new go_thorim_lever();
|
||||
|
||||
|
||||
@@ -218,7 +218,7 @@ enum YoggSaronSounds
|
||||
SARA_P1_CAST2 = 15774,
|
||||
SARA_P1_KILL1 = 15778,
|
||||
SARA_P1_KILL2 = 15779,
|
||||
|
||||
|
||||
SARA_P2_START = 15754,
|
||||
SARA_P2_CAST1 = 15776,
|
||||
SARA_P2_CAST2 = 15777,
|
||||
@@ -403,7 +403,7 @@ public:
|
||||
me->SetVisible(true);
|
||||
me->SetDisplayId(me->GetNativeDisplayId());
|
||||
me->SetDisableGravity(true);
|
||||
EnableSara(false);
|
||||
EnableSara(false);
|
||||
SpawnClouds();
|
||||
|
||||
_initFight = 1;
|
||||
@@ -558,7 +558,7 @@ public:
|
||||
me->PlayDirectSound(_secondPhase ? SARA_P2_CAST1 : SARA_P1_CAST2);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void KilledUnit(Unit* who)
|
||||
{
|
||||
if (who->GetTypeId() != TYPEID_PLAYER)
|
||||
@@ -611,7 +611,7 @@ public:
|
||||
|
||||
EntryCheckPredicate pred3(NPC_THORIM_KEEPER);
|
||||
summons.DoAction(ACTION_THORIM_START_STORM, pred3);
|
||||
|
||||
|
||||
if (!(_keepersGUID[0] && _keepersGUID[1] && _keepersGUID[2] && _keepersGUID[3]) && me->GetMap()->Is25ManRaid())
|
||||
summons.DoAction(ACTION_YOGG_SARON_HARD_MODE, pred2);
|
||||
|
||||
@@ -724,7 +724,7 @@ public:
|
||||
else if (_p2TalkTimer >= 44500 && _p2TalkTimer < 60000)
|
||||
{
|
||||
me->MonsterYell("Cower before my true form.", LANG_UNIVERSAL, 0);
|
||||
_p2TalkTimer = 60000;
|
||||
_p2TalkTimer = 60000;
|
||||
}
|
||||
else if (_p2TalkTimer >= 64000)
|
||||
{
|
||||
@@ -772,7 +772,7 @@ public:
|
||||
EntryCheckPredicate pred(NPC_YOGG_SARON);
|
||||
summons.DoAction(ACTION_YOGG_SARON_APPEAR, pred);
|
||||
events.RescheduleEvent(EVENT_SARA_P2_SPAWN_START_TENTACLES, 500, 0, EVENT_PHASE_TWO);
|
||||
|
||||
|
||||
// Spawn Brain!
|
||||
me->SummonCreature(NPC_BRAIN_OF_YOGG_SARON, 1981.3f, -25.43f, 265);
|
||||
break;
|
||||
@@ -838,8 +838,8 @@ public:
|
||||
events.ScheduleEvent(EVENT_SARA_P2_MALADY, 7000, 0, EVENT_PHASE_TWO);
|
||||
events.ScheduleEvent(EVENT_SARA_P2_PSYCHOSIS, 3000, 0, EVENT_PHASE_TWO);
|
||||
events.ScheduleEvent(EVENT_SARA_P2_DEATH_RAY, 15000, 0, EVENT_PHASE_TWO);
|
||||
events.ScheduleEvent(EVENT_SARA_P2_SUMMON_T1, 50000+urand(0,10000), 0, EVENT_PHASE_TWO);
|
||||
events.ScheduleEvent(EVENT_SARA_P2_SUMMON_T2, 15000+urand(0,5000) , 0, EVENT_PHASE_TWO);
|
||||
events.ScheduleEvent(EVENT_SARA_P2_SUMMON_T1, 50000+urand(0,10000), 0, EVENT_PHASE_TWO);
|
||||
events.ScheduleEvent(EVENT_SARA_P2_SUMMON_T2, 15000+urand(0,5000) , 0, EVENT_PHASE_TWO);
|
||||
events.ScheduleEvent(EVENT_SARA_P2_SUMMON_T3, 30000+urand(0,10000), 0, EVENT_PHASE_TWO);
|
||||
events.ScheduleEvent(EVENT_SARA_P2_BRAIN_LINK, 0, 0, EVENT_PHASE_TWO);
|
||||
events.ScheduleEvent(EVENT_SARA_P2_OPEN_PORTALS, 60000, 0, EVENT_PHASE_TWO);
|
||||
@@ -1012,7 +1012,7 @@ public:
|
||||
_usedInsane = false;
|
||||
summons.DespawnAll();
|
||||
events.Reset();
|
||||
|
||||
|
||||
uint8 _count = 4;
|
||||
me->SetLootMode(31); // 1 + 2 + 4 + 8 + 16, remove with watchers addition
|
||||
if (m_pInstance)
|
||||
@@ -1048,13 +1048,13 @@ public:
|
||||
{
|
||||
summons.DespawnAll();
|
||||
events.Reset();
|
||||
|
||||
|
||||
me->MonsterYell("Your fate is sealed. The end of days is finally upon you and ALL who inhabit this miserable little seedling. Uulwi ifis halahs gag erh'ongg w'ssh.", LANG_UNIVERSAL, 0);
|
||||
me->PlayDirectSound(YS_P3_DEATH);
|
||||
|
||||
if (m_pInstance)
|
||||
{
|
||||
m_pInstance->SetData(TYPE_YOGGSARON, DONE);
|
||||
m_pInstance->SetData(TYPE_YOGGSARON, DONE);
|
||||
if (Creature* sara = ObjectAccessor::GetCreature(*me, m_pInstance->GetData64(NPC_SARA)))
|
||||
sara->AI()->DoAction(ACTION_YOGG_SARON_DEATH);
|
||||
if (GameObject* go = ObjectAccessor::GetGameObject(*me, m_pInstance->GetData64(GO_YOGG_SARON_DOORS)))
|
||||
@@ -1250,7 +1250,7 @@ public:
|
||||
|
||||
me->SummonCreature(NPC_LAUGHING_SKULL, 2133.09f, 15.341f, 239.72f, 4.0724f);
|
||||
me->SummonCreature(NPC_LAUGHING_SKULL, 2065.83f, 12.3772f, 239.792f, 5.49789f);
|
||||
|
||||
|
||||
// Aspects
|
||||
me->SummonCreature(NPC_ALEXTRASZA, 2091.92f, -25.8f, 242.647f, 0);
|
||||
me->SummonCreature(NPC_YSERA, 2116, -25.8f, 242.647f, 3.14f);
|
||||
@@ -1435,7 +1435,7 @@ public:
|
||||
{
|
||||
me->CastSpell(me, SPELL_DEATH_RAY_DAMAGE_VISUAL, true);
|
||||
me->CastSpell(me, SPELL_DEATH_RAY_DAMAGE, true);
|
||||
|
||||
|
||||
_startTimer = 0;
|
||||
me->SetSpeed(MOVE_WALK, 2);
|
||||
me->SetSpeed(MOVE_RUN, 2);
|
||||
@@ -1697,7 +1697,7 @@ class boss_yoggsaron_descend_portal : public CreatureScript
|
||||
public:
|
||||
boss_yoggsaron_descend_portal() : CreatureScript("boss_yoggsaron_descend_portal") { }
|
||||
|
||||
bool OnGossipHello(Player* player, Creature* creature)
|
||||
bool OnGossipHello(Player* player, Creature* creature) override
|
||||
{
|
||||
if (!creature->GetUInt32Value(UNIT_NPC_FLAGS))
|
||||
return true;
|
||||
@@ -1707,7 +1707,7 @@ public:
|
||||
case ACTION_ILLUSION_ICECROWN: player->CastSpell(player, SPELL_TELEPORT_TO_ICECROWN, true); break;
|
||||
case ACTION_ILLUSION_STORMWIND: player->CastSpell(player, SPELL_TELEPORT_TO_STORMWIND, true); break;
|
||||
}
|
||||
|
||||
|
||||
creature->SetUInt32Value(UNIT_NPC_FLAGS, 0);
|
||||
creature->DespawnOrUnsummon(1000);
|
||||
return true;
|
||||
@@ -2546,7 +2546,7 @@ class spell_yogg_saron_empowered : public SpellScriptLoader
|
||||
{
|
||||
Unit* target = GetUnitOwner();
|
||||
uint8 stack = std::min(uint8(target->GetHealthPct()/10), (uint8)9);
|
||||
|
||||
|
||||
if (!stack)
|
||||
{
|
||||
target->RemoveAura(SPELL_EMPOWERED);
|
||||
@@ -2892,10 +2892,10 @@ class achievement_yogg_saron_darkness : public AchievementCriteriaScript
|
||||
if (player->GetInstanceScript())
|
||||
if (Creature* sara = ObjectAccessor::GetCreature(*player, player->GetInstanceScript()->GetData64(NPC_SARA)))
|
||||
return sara->GetAI()->GetData(DATA_GET_KEEPERS_COUNT) <= _keepersCount;
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
uint32 const _keepersCount;
|
||||
};
|
||||
@@ -2913,10 +2913,10 @@ class achievement_yogg_saron_he_waits_dreaming : public AchievementCriteriaScrip
|
||||
if (player->GetInstanceScript())
|
||||
if (Creature* sara = ObjectAccessor::GetCreature(*player, player->GetInstanceScript()->GetData64(NPC_BRAIN_OF_YOGG_SARON)))
|
||||
return sara->GetAI()->GetData(DATA_GET_CURRENT_ILLUSION) == _requiredIllusion;
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
uint8 const _requiredIllusion;
|
||||
};
|
||||
@@ -2947,7 +2947,7 @@ void AddSC_boss_yoggsaron()
|
||||
new boss_yoggsaron_keeper();
|
||||
new boss_yoggsaron_descend_portal();
|
||||
new boss_yoggsaron_influence_tentacle();
|
||||
new boss_yoggsaron_immortal_guardian();
|
||||
new boss_yoggsaron_immortal_guardian();
|
||||
new boss_yoggsaron_lich_king();
|
||||
new boss_yoggsaron_llane();
|
||||
new boss_yoggsaron_neltharion();
|
||||
|
||||
@@ -25,44 +25,44 @@ class go_ulduar_teleporter : public GameObjectScript
|
||||
public:
|
||||
go_ulduar_teleporter() : GameObjectScript("ulduar_teleporter") { }
|
||||
|
||||
bool OnGossipHello(Player* player, GameObject* go)
|
||||
bool OnGossipHello(Player* player, GameObject* go) override
|
||||
{
|
||||
InstanceScript* pInstance = go->GetInstanceScript();
|
||||
if (!pInstance)
|
||||
return true;
|
||||
|
||||
player->ADD_GOSSIP_ITEM(0, "Teleport to the Expedition Base Camp.", GOSSIP_SENDER_MAIN, BASE_CAMP);
|
||||
AddGossipItemFor(player, 0, "Teleport to the Expedition Base Camp.", GOSSIP_SENDER_MAIN, BASE_CAMP);
|
||||
if (pInstance->GetData(TYPE_LEVIATHAN) >= DONE) // count special
|
||||
{
|
||||
player->ADD_GOSSIP_ITEM(0, "Teleport to the Formation Grounds.", GOSSIP_SENDER_MAIN, GROUNDS);
|
||||
AddGossipItemFor(player, 0, "Teleport to the Formation Grounds.", GOSSIP_SENDER_MAIN, GROUNDS);
|
||||
if (pInstance->GetData(TYPE_LEVIATHAN) == DONE)
|
||||
{
|
||||
player->ADD_GOSSIP_ITEM(0, "Teleport to the Colossal Forge.", GOSSIP_SENDER_MAIN, FORGE);
|
||||
AddGossipItemFor(player, 0, "Teleport to the Colossal Forge.", GOSSIP_SENDER_MAIN, FORGE);
|
||||
if (pInstance->GetData(TYPE_XT002) == DONE)
|
||||
{
|
||||
player->ADD_GOSSIP_ITEM(0, "Teleport to the Scrapyard.", GOSSIP_SENDER_MAIN, SCRAPYARD);
|
||||
player->ADD_GOSSIP_ITEM(0, "Teleport to the Antechamber of Ulduar.", GOSSIP_SENDER_MAIN, ANTECHAMBER);
|
||||
AddGossipItemFor(player, 0, "Teleport to the Scrapyard.", GOSSIP_SENDER_MAIN, SCRAPYARD);
|
||||
AddGossipItemFor(player, 0, "Teleport to the Antechamber of Ulduar.", GOSSIP_SENDER_MAIN, ANTECHAMBER);
|
||||
if (pInstance->GetData(TYPE_KOLOGARN) == DONE)
|
||||
{
|
||||
player->ADD_GOSSIP_ITEM(0, "Teleport to the Shattered Walkway.", GOSSIP_SENDER_MAIN, WALKWAY);
|
||||
AddGossipItemFor(player, 0, "Teleport to the Shattered Walkway.", GOSSIP_SENDER_MAIN, WALKWAY);
|
||||
if (pInstance->GetData(TYPE_AURIAYA) == DONE)
|
||||
{
|
||||
player->ADD_GOSSIP_ITEM(0, "Teleport to the Conservatory of Life.", GOSSIP_SENDER_MAIN, CONSERVATORY);
|
||||
AddGossipItemFor(player, 0, "Teleport to the Conservatory of Life.", GOSSIP_SENDER_MAIN, CONSERVATORY);
|
||||
if (pInstance->GetData(DATA_CALL_TRAM))
|
||||
player->ADD_GOSSIP_ITEM(0, "Teleport to the Spark of Imagination.", GOSSIP_SENDER_MAIN, SPARK);
|
||||
AddGossipItemFor(player, 0, "Teleport to the Spark of Imagination.", GOSSIP_SENDER_MAIN, SPARK);
|
||||
if (pInstance->GetData(TYPE_VEZAX) == DONE)
|
||||
player->ADD_GOSSIP_ITEM(0, "Teleport to the Prison of Yogg-Saron.", GOSSIP_SENDER_MAIN, MADNESS);
|
||||
AddGossipItemFor(player, 0, "Teleport to the Prison of Yogg-Saron.", GOSSIP_SENDER_MAIN, MADNESS);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
player->SEND_GOSSIP_MENU(14424, go->GetGUID());
|
||||
SendGossipMenuFor(player, 14424, go->GetGUID());
|
||||
return true;
|
||||
}
|
||||
|
||||
bool OnGossipSelect(Player* player, GameObject* /*go*/, uint32 sender, uint32 action)
|
||||
bool OnGossipSelect(Player* player, GameObject* /*go*/, uint32 sender, uint32 action) override
|
||||
{
|
||||
if (sender != GOSSIP_SENDER_MAIN || !player->getAttackers().empty())
|
||||
return true;
|
||||
@@ -71,31 +71,31 @@ public:
|
||||
{
|
||||
case BASE_CAMP:
|
||||
player->TeleportTo(603, -706.122f, -92.6024f, 429.876f, 0);
|
||||
player->CLOSE_GOSSIP_MENU(); break;
|
||||
CloseGossipMenuFor(player); break;
|
||||
case GROUNDS:
|
||||
player->TeleportTo(603, 131.248f, -35.3802f, 409.804f, 0);
|
||||
player->CLOSE_GOSSIP_MENU(); break;
|
||||
CloseGossipMenuFor(player); break;
|
||||
case FORGE:
|
||||
player->TeleportTo(603, 553.233f, -12.3247f, 409.679f, 0);
|
||||
player->CLOSE_GOSSIP_MENU(); break;
|
||||
CloseGossipMenuFor(player); break;
|
||||
case SCRAPYARD:
|
||||
player->TeleportTo(603, 926.292f, -11.4635f, 418.595f, 0);
|
||||
player->CLOSE_GOSSIP_MENU(); break;
|
||||
CloseGossipMenuFor(player); break;
|
||||
case ANTECHAMBER:
|
||||
player->TeleportTo(603, 1498.09f, -24.246f, 420.967f, 0);
|
||||
player->CLOSE_GOSSIP_MENU(); break;
|
||||
CloseGossipMenuFor(player); break;
|
||||
case WALKWAY:
|
||||
player->TeleportTo(603, 1859.45f, -24.1f, 448.9f, 0);
|
||||
player->CLOSE_GOSSIP_MENU(); break;
|
||||
CloseGossipMenuFor(player); break;
|
||||
case CONSERVATORY:
|
||||
player->TeleportTo(603, 2086.27f, -24.3134f, 421.239f, 0);
|
||||
player->CLOSE_GOSSIP_MENU(); break;
|
||||
CloseGossipMenuFor(player); break;
|
||||
case MADNESS:
|
||||
player->TeleportTo(603, 1854.8f, -11.46f, 334.57f, 4.8f);
|
||||
player->CLOSE_GOSSIP_MENU(); break;
|
||||
CloseGossipMenuFor(player); break;
|
||||
case SPARK:
|
||||
player->TeleportTo(603, 2517.9f, 2568.9f, 412.7f, 0);
|
||||
player->CLOSE_GOSSIP_MENU(); break;
|
||||
CloseGossipMenuFor(player); break;
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -107,14 +107,14 @@ class npc_ulduar_keeper : public CreatureScript
|
||||
public:
|
||||
npc_ulduar_keeper() : CreatureScript("npc_ulduar_keeper_gossip") { }
|
||||
|
||||
bool OnGossipHello(Player* pPlayer, Creature* pCreature)
|
||||
bool OnGossipHello(Player* player, Creature* creature) override
|
||||
{
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Lend us your aid, keeper. Together we shall defeat Yogg-Saron.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
||||
pPlayer->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE, pCreature->GetGUID());
|
||||
AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Lend us your aid, keeper. Together we shall defeat Yogg-Saron.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
||||
SendGossipMenuFor(player, DEFAULT_GOSSIP_MESSAGE, creature->GetGUID());
|
||||
return true;
|
||||
}
|
||||
|
||||
bool OnGossipSelect(Player* /*player*/, Creature* creature, uint32 /*uiSender*/, uint32 /*uiAction*/)
|
||||
bool OnGossipSelect(Player* /*player*/, Creature* creature, uint32 /*uiSender*/, uint32 /*uiAction*/) override
|
||||
{
|
||||
creature->SetUInt32Value(UNIT_NPC_FLAGS, 0);
|
||||
uint8 _keeper = 0;
|
||||
@@ -184,14 +184,14 @@ class npc_ulduar_snow_mound : public CreatureScript
|
||||
public:
|
||||
npc_ulduar_snow_mound() : CreatureScript("npc_ulduar_snow_mound") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* pCreature) const
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new npc_ulduar_snow_moundAI(pCreature);
|
||||
return new npc_ulduar_snow_moundAI(creature);
|
||||
}
|
||||
|
||||
struct npc_ulduar_snow_moundAI : public ScriptedAI
|
||||
{
|
||||
npc_ulduar_snow_moundAI(Creature* pCreature) : ScriptedAI(pCreature)
|
||||
npc_ulduar_snow_moundAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
activated = false;
|
||||
me->CastSpell(me, 64615, true);
|
||||
@@ -230,14 +230,14 @@ class npc_ulduar_storm_tempered_keeper : public CreatureScript
|
||||
public:
|
||||
npc_ulduar_storm_tempered_keeper() : CreatureScript("npc_ulduar_storm_tempered_keeper") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* pCreature) const
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new npc_ulduar_storm_tempered_keeperAI(pCreature);
|
||||
return new npc_ulduar_storm_tempered_keeperAI(creature);
|
||||
}
|
||||
|
||||
struct npc_ulduar_storm_tempered_keeperAI : public ScriptedAI
|
||||
{
|
||||
npc_ulduar_storm_tempered_keeperAI(Creature* pCreature) : ScriptedAI(pCreature)
|
||||
npc_ulduar_storm_tempered_keeperAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
otherGUID = 0;
|
||||
}
|
||||
@@ -319,14 +319,14 @@ class npc_ulduar_arachnopod_destroyer : public CreatureScript
|
||||
public:
|
||||
npc_ulduar_arachnopod_destroyer() : CreatureScript("npc_ulduar_arachnopod_destroyer") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* pCreature) const
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new npc_ulduar_arachnopod_destroyerAI(pCreature);
|
||||
return new npc_ulduar_arachnopod_destroyerAI(creature);
|
||||
}
|
||||
|
||||
struct npc_ulduar_arachnopod_destroyerAI : public ScriptedAI
|
||||
{
|
||||
npc_ulduar_arachnopod_destroyerAI(Creature* pCreature) : ScriptedAI(pCreature)
|
||||
npc_ulduar_arachnopod_destroyerAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
_spawnedMechanic = false;
|
||||
me->ApplySpellImmune(0, IMMUNITY_ID, 64919, true); // Ice Nova from Ice Turret
|
||||
@@ -480,14 +480,14 @@ class go_call_tram : public GameObjectScript
|
||||
public:
|
||||
go_call_tram() : GameObjectScript("go_call_tram") { }
|
||||
|
||||
bool OnGossipHello(Player* /*pPlayer*/, GameObject* pGo)
|
||||
bool OnGossipHello(Player* /*player*/, GameObject* go) override
|
||||
{
|
||||
InstanceScript* pInstance = pGo->GetInstanceScript();
|
||||
InstanceScript* pInstance = go->GetInstanceScript();
|
||||
|
||||
if (!pInstance)
|
||||
return false;
|
||||
|
||||
switch(pGo->GetEntry())
|
||||
switch(go->GetEntry())
|
||||
{
|
||||
case 194914:
|
||||
case 194438:
|
||||
|
||||
@@ -118,7 +118,7 @@ public:
|
||||
uint8 Counter;
|
||||
uint8 RandomUnfreeze[4];
|
||||
|
||||
void Reset()
|
||||
void Reset()
|
||||
{
|
||||
for (uint8 i = 0; i < 4; ++i)
|
||||
{
|
||||
@@ -137,7 +137,7 @@ public:
|
||||
}
|
||||
while (!good);
|
||||
}
|
||||
|
||||
|
||||
events.Reset();
|
||||
summons.DoAction(ACTION_DESPAWN_ADDS);
|
||||
summons.DespawnAll();
|
||||
@@ -306,7 +306,7 @@ public:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
@@ -352,7 +352,7 @@ public:
|
||||
EventMap events;
|
||||
SummonList summons;
|
||||
|
||||
void Reset()
|
||||
void Reset()
|
||||
{
|
||||
summons.DespawnAll();
|
||||
events.Reset();
|
||||
@@ -444,9 +444,9 @@ public:
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*pKiller*/)
|
||||
void JustDied(Unit* /*pKiller*/)
|
||||
{
|
||||
if (m_pInstance)
|
||||
if (m_pInstance)
|
||||
{
|
||||
if (Creature *palehoof = ObjectAccessor::GetCreature(*me, m_pInstance->GetData64(DATA_GORTOK_PALEHOOF)))
|
||||
palehoof->AI()->DoAction(ACTION_MINIBOSS_DIED);
|
||||
@@ -479,7 +479,7 @@ public:
|
||||
InstanceScript *m_pInstance;
|
||||
EventMap events;
|
||||
|
||||
void Reset()
|
||||
void Reset()
|
||||
{
|
||||
events.Reset();
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE|UNIT_FLAG_NOT_SELECTABLE);
|
||||
@@ -554,9 +554,9 @@ public:
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*pKiller*/)
|
||||
void JustDied(Unit* /*pKiller*/)
|
||||
{
|
||||
if (m_pInstance)
|
||||
if (m_pInstance)
|
||||
{
|
||||
if (Creature *palehoof = ObjectAccessor::GetCreature(*me, m_pInstance->GetData64(DATA_GORTOK_PALEHOOF)))
|
||||
palehoof->AI()->DoAction(ACTION_MINIBOSS_DIED);
|
||||
@@ -581,7 +581,7 @@ public:
|
||||
|
||||
struct npc_ravenous_furbolgAI : public ScriptedAI
|
||||
{
|
||||
npc_ravenous_furbolgAI(Creature* pCreature) : ScriptedAI(pCreature)
|
||||
npc_ravenous_furbolgAI(Creature* pCreature) : ScriptedAI(pCreature)
|
||||
{
|
||||
m_pInstance = pCreature->GetInstanceScript();
|
||||
}
|
||||
@@ -589,7 +589,7 @@ public:
|
||||
InstanceScript *m_pInstance;
|
||||
EventMap events;
|
||||
|
||||
void Reset()
|
||||
void Reset()
|
||||
{
|
||||
events.Reset();
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE|UNIT_FLAG_NOT_SELECTABLE);
|
||||
@@ -662,9 +662,9 @@ public:
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*pKiller*/)
|
||||
void JustDied(Unit* /*pKiller*/)
|
||||
{
|
||||
if (m_pInstance)
|
||||
if (m_pInstance)
|
||||
{
|
||||
if (Creature *palehoof = ObjectAccessor::GetCreature(*me, m_pInstance->GetData64(DATA_GORTOK_PALEHOOF)))
|
||||
palehoof->AI()->DoAction(ACTION_MINIBOSS_DIED);
|
||||
@@ -689,7 +689,7 @@ public:
|
||||
|
||||
struct npc_frenzied_worgenAI : public ScriptedAI
|
||||
{
|
||||
npc_frenzied_worgenAI(Creature* pCreature) : ScriptedAI(pCreature)
|
||||
npc_frenzied_worgenAI(Creature* pCreature) : ScriptedAI(pCreature)
|
||||
{
|
||||
m_pInstance = pCreature->GetInstanceScript();
|
||||
}
|
||||
@@ -697,7 +697,7 @@ public:
|
||||
InstanceScript *m_pInstance;
|
||||
EventMap events;
|
||||
|
||||
void Reset()
|
||||
void Reset()
|
||||
{
|
||||
events.Reset();
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE|UNIT_FLAG_NOT_SELECTABLE);
|
||||
@@ -770,9 +770,9 @@ public:
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*pKiller*/)
|
||||
void JustDied(Unit* /*pKiller*/)
|
||||
{
|
||||
if (m_pInstance)
|
||||
if (m_pInstance)
|
||||
{
|
||||
if (Creature *palehoof = ObjectAccessor::GetCreature(*me, m_pInstance->GetData64(DATA_GORTOK_PALEHOOF)))
|
||||
palehoof->AI()->DoAction(ACTION_MINIBOSS_DIED);
|
||||
@@ -782,20 +782,20 @@ public:
|
||||
};
|
||||
|
||||
class go_palehoof_sphere : public GameObjectScript
|
||||
{
|
||||
public:
|
||||
go_palehoof_sphere() : GameObjectScript("go_palehoof_sphere") { }
|
||||
{
|
||||
public:
|
||||
go_palehoof_sphere() : GameObjectScript("go_palehoof_sphere") { }
|
||||
|
||||
bool OnGossipHello(Player * /*pPlayer*/, GameObject *pGO)
|
||||
bool OnGossipHello(Player * /*pPlayer*/, GameObject *go) override
|
||||
{
|
||||
InstanceScript *pInstance = pGO->GetInstanceScript();
|
||||
InstanceScript *pInstance = go->GetInstanceScript();
|
||||
|
||||
Creature *pPalehoof = ObjectAccessor::GetCreature(*pGO, pInstance ? pInstance->GetData64(DATA_GORTOK_PALEHOOF) : 0);
|
||||
Creature *pPalehoof = ObjectAccessor::GetCreature(*go, pInstance ? pInstance->GetData64(DATA_GORTOK_PALEHOOF) : 0);
|
||||
if (pPalehoof && pPalehoof->IsAlive())
|
||||
{
|
||||
// maybe these are hacks :(
|
||||
pGO->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
pGO->SetGoState(GO_STATE_ACTIVE);
|
||||
go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
go->SetGoState(GO_STATE_ACTIVE);
|
||||
|
||||
pPalehoof->AI()->DoAction(ACTION_START_EVENT);
|
||||
}
|
||||
|
||||
@@ -156,7 +156,7 @@ public:
|
||||
{
|
||||
if (IsHeroic())
|
||||
m_pInstance->DoStartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_TIMED_LODI_DODI);
|
||||
|
||||
|
||||
m_pInstance->SetData(DATA_SKADI_THE_RUTHLESS, IN_PROGRESS);
|
||||
}
|
||||
|
||||
@@ -168,7 +168,7 @@ public:
|
||||
|
||||
void DoAction(int32 param)
|
||||
{
|
||||
|
||||
|
||||
if (param == ACTION_PHASE2)
|
||||
{
|
||||
SecondPhase = true;
|
||||
@@ -306,7 +306,7 @@ public:
|
||||
AchievementHitCount++;
|
||||
if (AchievementHitCount >= 3 && m_pInstance)
|
||||
m_pInstance->SetData(DATA_SKADI_ACHIEVEMENT, true);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -333,7 +333,7 @@ public:
|
||||
cr->CastSpell(cr, cr->GetMap()->IsHeroic() ? SPELL_FLAME_BREATH_H : SPELL_FLAME_BREATH_N, true);
|
||||
if ((cr = me->SummonCreature(NPC_BREATH_TRIGGER, 471.0f, -484.7f, 105, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 30000)))
|
||||
cr->CastSpell(cr, cr->GetMap()->IsHeroic() ? SPELL_FLAME_BREATH_H : SPELL_FLAME_BREATH_N, true);
|
||||
|
||||
|
||||
for (uint8 j = 0; j < 7; j++)
|
||||
if ((cr = me->SummonCreature(NPC_BREATH_TRIGGER, 477.0f, -507.0f+(j*3), 105.0f, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 30000)))
|
||||
cr->CastSpell(cr, cr->GetMap()->IsHeroic() ? SPELL_FLAME_BREATH_H : SPELL_FLAME_BREATH_N, true);
|
||||
@@ -351,7 +351,7 @@ public:
|
||||
break;
|
||||
case 2:
|
||||
case 3:
|
||||
if (m_pInstance)
|
||||
if (m_pInstance)
|
||||
m_pInstance->SetData(SKADI_IN_RANGE, 1);
|
||||
|
||||
me->MonsterTextEmote(EMOTE_IN_RANGE, 0, true);
|
||||
@@ -408,7 +408,7 @@ public:
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
RemoveSkadi(true);
|
||||
}
|
||||
|
||||
@@ -460,7 +460,7 @@ public:
|
||||
me->CastSpell(me, SPELL_FLAME_VISUAL, false);
|
||||
}
|
||||
|
||||
if (m_pInstance)
|
||||
if (m_pInstance)
|
||||
m_pInstance->SetData(SKADI_IN_RANGE, 0);
|
||||
|
||||
currentPos = targetPoint;
|
||||
@@ -486,13 +486,13 @@ public:
|
||||
};
|
||||
|
||||
class go_harpoon_canon : public GameObjectScript
|
||||
{
|
||||
public:
|
||||
go_harpoon_canon() : GameObjectScript("go_harpoon_canon") { }
|
||||
{
|
||||
public:
|
||||
go_harpoon_canon() : GameObjectScript("go_harpoon_canon") { }
|
||||
|
||||
bool OnGossipHello(Player* pPlayer, GameObject* pGO)
|
||||
bool OnGossipHello(Player* pPlayer, GameObject* go) override
|
||||
{
|
||||
InstanceScript *m_pInstance = pGO->GetInstanceScript();
|
||||
InstanceScript *m_pInstance = go->GetInstanceScript();
|
||||
if (m_pInstance && m_pInstance->GetData(DATA_SKADI_THE_RUTHLESS) == IN_PROGRESS)
|
||||
if (m_pInstance->GetData(SKADI_IN_RANGE) == 1)
|
||||
{
|
||||
@@ -509,7 +509,7 @@ public:
|
||||
|
||||
grauf->AI()->DoAction(ACTION_MYGIRL_ACHIEVEMENT);
|
||||
}
|
||||
pGO->CastSpell((Unit*)NULL, SPELL_LAUNCH_HARPOON);
|
||||
go->CastSpell((Unit*)NULL, SPELL_LAUNCH_HARPOON);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
@@ -20,9 +20,9 @@ class go_vh_activation_crystal : public GameObjectScript
|
||||
public:
|
||||
go_vh_activation_crystal() : GameObjectScript("go_vh_activation_crystal") { }
|
||||
|
||||
bool OnGossipHello(Player* /*pPlayer*/, GameObject* pGo)
|
||||
bool OnGossipHello(Player* /*player*/, GameObject* go) override
|
||||
{
|
||||
if (InstanceScript* pInstance = pGo->GetInstanceScript())
|
||||
if (InstanceScript* pInstance = go->GetInstanceScript())
|
||||
pInstance->SetData(DATA_ACTIVATE_DEFENSE_SYSTEM, 1);
|
||||
return true;
|
||||
}
|
||||
@@ -41,42 +41,43 @@ class npc_vh_sinclari : public CreatureScript
|
||||
public:
|
||||
npc_vh_sinclari() : CreatureScript("npc_vh_sinclari") { }
|
||||
|
||||
bool OnGossipHello(Player* pPlayer, Creature* pCreature)
|
||||
bool OnGossipHello(Player* player, Creature* creature) override
|
||||
{
|
||||
if (InstanceScript* pInstance = pCreature->GetInstanceScript())
|
||||
if (InstanceScript* pInstance = creature->GetInstanceScript())
|
||||
switch (pInstance->GetData(DATA_ENCOUNTER_STATUS))
|
||||
{
|
||||
case NOT_STARTED:
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_START_EVENT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
||||
pPlayer->SEND_GOSSIP_MENU(13853, pCreature->GetGUID());
|
||||
AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_ITEM_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
|
||||
AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_START_EVENT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
||||
SendGossipMenuFor(player, 13853, creature->GetGUID());
|
||||
break;
|
||||
case IN_PROGRESS:
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_I_WANT_IN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3);
|
||||
pPlayer->SEND_GOSSIP_MENU(13853, pCreature->GetGUID());
|
||||
AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_I_WANT_IN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3);
|
||||
SendGossipMenuFor(player, 13853, creature->GetGUID());
|
||||
break;
|
||||
default: // DONE or invalid
|
||||
pPlayer->SEND_GOSSIP_MENU(13910, pCreature->GetGUID());
|
||||
SendGossipMenuFor(player, 13910, creature->GetGUID());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool OnGossipSelect(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction)
|
||||
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*uiSender*/, uint32 uiAction) override
|
||||
{
|
||||
pPlayer->PlayerTalkClass->ClearMenus();
|
||||
ClearGossipMenuFor(player);
|
||||
|
||||
switch(uiAction)
|
||||
{
|
||||
case GOSSIP_ACTION_INFO_DEF+1:
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
if (InstanceScript *pInstance = pCreature->GetInstanceScript())
|
||||
CloseGossipMenuFor(player);
|
||||
if (InstanceScript *pInstance = creature->GetInstanceScript())
|
||||
pInstance->SetData(DATA_START_INSTANCE, 1);
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+2:
|
||||
pPlayer->SEND_GOSSIP_MENU(13854, pCreature->GetGUID());
|
||||
SendGossipMenuFor(player, 13854, creature->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+3:
|
||||
pPlayer->NearTeleportTo(playerTeleportPosition.GetPositionX(), playerTeleportPosition.GetPositionY(), playerTeleportPosition.GetPositionZ(), playerTeleportPosition.GetOrientation(), true);
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
player->NearTeleportTo(playerTeleportPosition.GetPositionX(), playerTeleportPosition.GetPositionY(), playerTeleportPosition.GetPositionZ(), playerTeleportPosition.GetOrientation(), true);
|
||||
CloseGossipMenuFor(player);
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
@@ -101,9 +102,9 @@ class npc_vh_teleportation_portal : public CreatureScript
|
||||
public:
|
||||
npc_vh_teleportation_portal() : CreatureScript("npc_vh_teleportation_portal") { }
|
||||
|
||||
CreatureAI* GetAI(Creature *pCreature) const
|
||||
CreatureAI* GetAI(Creature *creature) const
|
||||
{
|
||||
return new npc_vh_teleportation_portalAI(pCreature);
|
||||
return new npc_vh_teleportation_portalAI(creature);
|
||||
}
|
||||
|
||||
struct npc_vh_teleportation_portalAI : public NullCreatureAI
|
||||
@@ -390,7 +391,7 @@ struct violet_hold_trashAI : public npc_escortAI
|
||||
***********/
|
||||
|
||||
enum AzureInvaderSpells
|
||||
{
|
||||
{
|
||||
SPELL_CLEAVE = 15496,
|
||||
SPELL_IMPALE_N = 58459,
|
||||
SPELL_IMPALE_H = 59256,
|
||||
@@ -470,9 +471,9 @@ class npc_azure_invader : public CreatureScript
|
||||
public:
|
||||
npc_azure_invader() : CreatureScript("npc_azure_invader") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* pCreature) const
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new npc_azure_invaderAI (pCreature);
|
||||
return new npc_azure_invaderAI (creature);
|
||||
}
|
||||
|
||||
struct npc_azure_invaderAI : public violet_hold_trashAI
|
||||
@@ -543,9 +544,9 @@ class npc_azure_binder : public CreatureScript
|
||||
public:
|
||||
npc_azure_binder() : CreatureScript("npc_azure_binder") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* pCreature) const
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new npc_azure_binderAI (pCreature);
|
||||
return new npc_azure_binderAI (creature);
|
||||
}
|
||||
|
||||
struct npc_azure_binderAI : public violet_hold_trashAI
|
||||
@@ -616,9 +617,9 @@ class npc_azure_mage_slayer : public CreatureScript
|
||||
public:
|
||||
npc_azure_mage_slayer() : CreatureScript("npc_azure_mage_slayer") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* pCreature) const
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new npc_azure_mage_slayerAI (pCreature);
|
||||
return new npc_azure_mage_slayerAI (creature);
|
||||
}
|
||||
|
||||
struct npc_azure_mage_slayerAI : public violet_hold_trashAI
|
||||
@@ -671,9 +672,9 @@ class npc_azure_raider : public CreatureScript
|
||||
public:
|
||||
npc_azure_raider() : CreatureScript("npc_azure_raider") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* pCreature) const
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new npc_azure_raiderAI (pCreature);
|
||||
return new npc_azure_raiderAI (creature);
|
||||
}
|
||||
|
||||
struct npc_azure_raiderAI : public violet_hold_trashAI
|
||||
@@ -718,9 +719,9 @@ class npc_azure_stalker : public CreatureScript
|
||||
public:
|
||||
npc_azure_stalker() : CreatureScript("npc_azure_stalker") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* pCreature) const
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new npc_azure_stalkerAI (pCreature);
|
||||
return new npc_azure_stalkerAI (creature);
|
||||
}
|
||||
|
||||
struct npc_azure_stalkerAI : public violet_hold_trashAI
|
||||
@@ -779,9 +780,9 @@ class npc_azure_spellbreaker : public CreatureScript
|
||||
public:
|
||||
npc_azure_spellbreaker() : CreatureScript("npc_azure_spellbreaker") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* pCreature) const
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new npc_azure_spellbreakerAI (pCreature);
|
||||
return new npc_azure_spellbreakerAI (creature);
|
||||
}
|
||||
|
||||
struct npc_azure_spellbreakerAI : public violet_hold_trashAI
|
||||
@@ -854,9 +855,9 @@ class npc_azure_captain : public CreatureScript
|
||||
public:
|
||||
npc_azure_captain() : CreatureScript("npc_azure_captain") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* pCreature) const
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new npc_azure_captainAI (pCreature);
|
||||
return new npc_azure_captainAI (creature);
|
||||
}
|
||||
|
||||
struct npc_azure_captainAI : public violet_hold_trashAI
|
||||
@@ -901,9 +902,9 @@ class npc_azure_sorceror : public CreatureScript
|
||||
public:
|
||||
npc_azure_sorceror() : CreatureScript("npc_azure_sorceror") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* pCreature) const
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new npc_azure_sorcerorAI (pCreature);
|
||||
return new npc_azure_sorcerorAI (creature);
|
||||
}
|
||||
|
||||
struct npc_azure_sorcerorAI : public violet_hold_trashAI
|
||||
@@ -964,9 +965,9 @@ class npc_azure_saboteur : public CreatureScript
|
||||
public:
|
||||
npc_azure_saboteur() : CreatureScript("npc_azure_saboteur") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* pCreature) const
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new npc_azure_saboteurAI (pCreature);
|
||||
return new npc_azure_saboteurAI (creature);
|
||||
}
|
||||
|
||||
struct npc_azure_saboteurAI : public npc_escortAI
|
||||
@@ -1145,11 +1146,12 @@ class go_violet_hold_gate_lever : public GameObjectScript
|
||||
public:
|
||||
go_violet_hold_gate_lever() : GameObjectScript("go_violet_hold_gate_lever") { }
|
||||
|
||||
bool OnGossipHello(Player* plr, GameObject* go)
|
||||
bool OnGossipHello(Player* player, GameObject* go) override
|
||||
{
|
||||
if (GameObject* gate = go->GetMap()->GetGameObject(MAKE_NEW_GUID(61606, 193019, HIGHGUID_GAMEOBJECT)))
|
||||
if (gate->getLootState() == GO_READY)
|
||||
gate->UseDoorOrButton(0, false, plr);
|
||||
gate->UseDoorOrButton(0, false, player);
|
||||
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -275,24 +275,24 @@ class npc_corastrasza : public CreatureScript
|
||||
public:
|
||||
npc_corastrasza() : CreatureScript("npc_corastrasza") { }
|
||||
|
||||
bool OnGossipHello(Player* player, Creature* creature)
|
||||
bool OnGossipHello(Player* player, Creature* creature) override
|
||||
{
|
||||
if (creature->IsQuestGiver())
|
||||
player->PrepareQuestMenu(creature->GetGUID());
|
||||
|
||||
if (player->GetQuestStatus(QUEST_ACES_HIGH) == QUEST_STATUS_INCOMPLETE || player->GetQuestStatus(QUEST_ACES_HIGH_DAILY) == QUEST_STATUS_INCOMPLETE) //It's the same dragon for both quests.
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_C_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
||||
AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_ITEM_C_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
||||
|
||||
player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID());
|
||||
SendGossipMenuFor(player, player->GetGossipTextId(creature), creature->GetGUID());
|
||||
return true;
|
||||
}
|
||||
|
||||
bool OnGossipSelect(Player* player, Creature* /*creature*/, uint32 /*sender*/, uint32 action)
|
||||
bool OnGossipSelect(Player* player, Creature* /*creature*/, uint32 /*sender*/, uint32 action) override
|
||||
{
|
||||
player->PlayerTalkClass->ClearMenus();
|
||||
ClearGossipMenuFor(player);
|
||||
if (action == GOSSIP_ACTION_INFO_DEF+1)
|
||||
{
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
CloseGossipMenuFor(player);
|
||||
|
||||
player->CastSpell(player, SPELL_SUMMON_WYRMREST_SKYTALON, true);
|
||||
player->CastSpell(player, SPELL_WYRMREST_SKYTALON_RIDE_PERIODIC, true);
|
||||
@@ -321,23 +321,23 @@ class npc_iruk : public CreatureScript
|
||||
public:
|
||||
npc_iruk() : CreatureScript("npc_iruk") { }
|
||||
|
||||
bool OnGossipHello(Player* player, Creature* creature)
|
||||
bool OnGossipHello(Player* player, Creature* creature) override
|
||||
{
|
||||
if (player->GetQuestStatus(QUEST_SPIRITS_WATCH_OVER_US) == QUEST_STATUS_INCOMPLETE)
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_I, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
||||
AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_ITEM_I, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
||||
|
||||
player->PlayerTalkClass->SendGossipMenu(GOSSIP_TEXT_I, creature->GetGUID());
|
||||
SendGossipMenuFor(player, GOSSIP_TEXT_I, creature);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool OnGossipSelect(Player* player, Creature* /*creature*/, uint32 /*sender*/, uint32 action)
|
||||
bool OnGossipSelect(Player* player, Creature* /*creature*/, uint32 /*sender*/, uint32 action) override
|
||||
{
|
||||
player->PlayerTalkClass->ClearMenus();
|
||||
ClearGossipMenuFor(player);
|
||||
switch (action)
|
||||
{
|
||||
case GOSSIP_ACTION_INFO_DEF+1:
|
||||
player->CastSpell(player, SPELL_CREATURE_TOTEM_OF_ISSLIRUK, true);
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
CloseGossipMenuFor(player);
|
||||
break;
|
||||
|
||||
}
|
||||
@@ -1106,7 +1106,7 @@ public:
|
||||
|
||||
uint64 uiPlayerGUID;
|
||||
|
||||
void Reset()
|
||||
void Reset() override
|
||||
{
|
||||
if (uiEmoteState)
|
||||
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, uiEmoteState);
|
||||
@@ -1124,7 +1124,7 @@ public:
|
||||
me->RestoreFaction();
|
||||
}
|
||||
|
||||
void DoAction(int32 /*iParam*/)
|
||||
void DoAction(int32 /*iParam*/) override
|
||||
{
|
||||
me->StopMoving();
|
||||
me->SetUInt32Value(UNIT_NPC_FLAGS, 0);
|
||||
@@ -1134,7 +1134,7 @@ public:
|
||||
uiEventPhase = 1;
|
||||
}
|
||||
|
||||
void SetGUID(uint64 uiGuid, int32 /*iId*/)
|
||||
void SetGUID(uint64 uiGuid, int32 /*iId*/) override
|
||||
{
|
||||
uiPlayerGUID = uiGuid;
|
||||
}
|
||||
@@ -1146,7 +1146,7 @@ public:
|
||||
AttackStart(player);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 uiDiff)
|
||||
void UpdateAI(uint32 uiDiff) override
|
||||
{
|
||||
if (uiEventTimer && uiEventTimer <= uiDiff)
|
||||
{
|
||||
@@ -1207,12 +1207,12 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return new npc_hidden_cultistAI(creature);
|
||||
}
|
||||
|
||||
bool OnGossipHello(Player* player, Creature* creature)
|
||||
bool OnGossipHello(Player* player, Creature* creature) override
|
||||
{
|
||||
uint32 uiGossipText = 0;
|
||||
const char* charGossipItem;
|
||||
@@ -1237,23 +1237,23 @@ public:
|
||||
}
|
||||
|
||||
if (player->HasAura(SPELL_RIGHTEOUS_VISION) && player->GetQuestStatus(QUEST_THE_HUNT_IS_ON) == QUEST_STATUS_INCOMPLETE)
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, charGossipItem, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
||||
AddGossipItemFor(player, GOSSIP_ICON_CHAT, charGossipItem, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
||||
|
||||
if (creature->IsVendor())
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE);
|
||||
AddGossipItemFor(player, GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE);
|
||||
|
||||
player->SEND_GOSSIP_MENU(uiGossipText, creature->GetGUID());
|
||||
SendGossipMenuFor(player, uiGossipText, creature->GetGUID());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action)
|
||||
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) override
|
||||
{
|
||||
player->PlayerTalkClass->ClearMenus();
|
||||
ClearGossipMenuFor(player);
|
||||
|
||||
if (action == GOSSIP_ACTION_INFO_DEF+1)
|
||||
{
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
CloseGossipMenuFor(player);
|
||||
creature->AI()->SetGUID(player->GetGUID());
|
||||
creature->AI()->DoAction(1);
|
||||
}
|
||||
|
||||
@@ -80,7 +80,7 @@ enum DisguiseEvent
|
||||
ACTION_SHIRTS = 2,
|
||||
ACTION_PANTS = 3,
|
||||
ACTION_UNMENTIONABLES = 4,
|
||||
|
||||
|
||||
EVENT_INTRO_DH1 = 1,
|
||||
EVENT_INTRO_DH2 = 2,
|
||||
EVENT_INTRO_DH3 = 3,
|
||||
@@ -133,13 +133,13 @@ public:
|
||||
{
|
||||
npc_shandy_dalaranAI(Creature* creature) : ScriptedAI(creature) { }
|
||||
|
||||
void Reset()
|
||||
void Reset() override
|
||||
{
|
||||
_events.Reset();
|
||||
_aquanosGUID = 0;
|
||||
}
|
||||
|
||||
void SetData(uint32 type, uint32 /*data*/)
|
||||
}
|
||||
|
||||
void SetData(uint32 type, uint32 /*data*/) override
|
||||
{
|
||||
switch(type)
|
||||
{
|
||||
@@ -177,8 +177,8 @@ public:
|
||||
Talk(SAY_SHANDY_WATER + _lSource - 1);
|
||||
_canWash = true;
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff)
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
_events.Update(diff);
|
||||
switch (_events.GetEvent())
|
||||
@@ -193,7 +193,7 @@ public:
|
||||
_events.ScheduleEvent(EVENT_INTRO_DH3, 6000);
|
||||
else
|
||||
RollTask();
|
||||
|
||||
|
||||
_events.PopEvent();
|
||||
break;
|
||||
case EVENT_INTRO_DH3:
|
||||
@@ -202,7 +202,7 @@ public:
|
||||
_events.PopEvent();
|
||||
break;
|
||||
case EVENT_INTRO_DH4:
|
||||
Talk(SAY_SHANDY5);
|
||||
Talk(SAY_SHANDY5);
|
||||
_events.ScheduleEvent(EVENT_INTRO_DH5, 3000);
|
||||
_events.PopEvent();
|
||||
break;
|
||||
@@ -234,30 +234,30 @@ public:
|
||||
bool _canWash;
|
||||
};
|
||||
|
||||
bool OnGossipHello(Player* player, Creature* creature)
|
||||
bool OnGossipHello(Player* player, Creature* creature) override
|
||||
{
|
||||
if (creature->IsQuestGiver())
|
||||
player->PrepareQuestMenu(creature->GetGUID());
|
||||
|
||||
if (player->GetQuestStatus(QUEST_SUITABLE_DISGUISE_A) == QUEST_STATUS_INCOMPLETE ||
|
||||
if (player->GetQuestStatus(QUEST_SUITABLE_DISGUISE_A) == QUEST_STATUS_INCOMPLETE ||
|
||||
player->GetQuestStatus(QUEST_SUITABLE_DISGUISE_H) == QUEST_STATUS_INCOMPLETE)
|
||||
{
|
||||
if(player->GetTeamId() == TEAM_ALLIANCE)
|
||||
player->ADD_GOSSIP_ITEM(0, "Arcanist Tybalin said you might be able to lend me a certain tabard.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
|
||||
AddGossipItemFor(player, 0, "Arcanist Tybalin said you might be able to lend me a certain tabard.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
|
||||
else
|
||||
player->ADD_GOSSIP_ITEM(0, "Magister Hathorel said you might be able to lend me a certain tabard.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
|
||||
AddGossipItemFor(player, 0, "Magister Hathorel said you might be able to lend me a certain tabard.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
|
||||
}
|
||||
|
||||
player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID());
|
||||
SendGossipMenuFor(player, player->GetGossipTextId(creature), creature->GetGUID());
|
||||
return true;
|
||||
}
|
||||
|
||||
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action)
|
||||
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) override
|
||||
{
|
||||
switch (action)
|
||||
{
|
||||
case GOSSIP_ACTION_INFO_DEF:
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
CloseGossipMenuFor(player);
|
||||
creature->SetUInt32Value(UNIT_NPC_FLAGS, 0);
|
||||
creature->AI()->SetData(ACTION_SHANDY_INTRO, 0);
|
||||
break;
|
||||
@@ -265,7 +265,7 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return new npc_shandy_dalaranAI(creature);
|
||||
}
|
||||
@@ -760,7 +760,7 @@ public:
|
||||
}
|
||||
void UpdateAI(uint32 diff)
|
||||
{
|
||||
|
||||
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
|
||||
@@ -247,15 +247,15 @@ class go_the_pearl_of_the_depths : public GameObjectScript
|
||||
public:
|
||||
go_the_pearl_of_the_depths() : GameObjectScript("go_the_pearl_of_the_depths") { }
|
||||
|
||||
bool OnGossipHello(Player* pPlayer, GameObject* pGo)
|
||||
bool OnGossipHello(Player* player, GameObject* go) override
|
||||
{
|
||||
if( !pPlayer || !pGo )
|
||||
if(!player || !go)
|
||||
return true;
|
||||
|
||||
Creature* t = pPlayer->FindNearestCreature(NPC_CONVERSING_WITH_THE_DEPTHS_TRIGGER, 10.0f, true);
|
||||
if( t && t->AI() && CAST_AI(npc_conversing_with_the_depths_trigger::npc_conversing_with_the_depths_triggerAI, t->AI()) )
|
||||
if( !CAST_AI(npc_conversing_with_the_depths_trigger::npc_conversing_with_the_depths_triggerAI, t->AI())->running )
|
||||
CAST_AI(npc_conversing_with_the_depths_trigger::npc_conversing_with_the_depths_triggerAI, t->AI())->Start(pPlayer->GetGUID());
|
||||
Creature* t = player->FindNearestCreature(NPC_CONVERSING_WITH_THE_DEPTHS_TRIGGER, 10.0f, true);
|
||||
if(t && t->AI() && CAST_AI(npc_conversing_with_the_depths_trigger::npc_conversing_with_the_depths_triggerAI, t->AI()))
|
||||
if(!CAST_AI(npc_conversing_with_the_depths_trigger::npc_conversing_with_the_depths_triggerAI, t->AI())->running)
|
||||
CAST_AI(npc_conversing_with_the_depths_trigger::npc_conversing_with_the_depths_triggerAI, t->AI())->Start(player->GetGUID());
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -343,7 +343,7 @@ public:
|
||||
{
|
||||
return NPC_INFINITE_ASSAILANT+urand(0,2);
|
||||
}
|
||||
|
||||
|
||||
void UpdateAI(uint32 diff)
|
||||
{
|
||||
events.Update(diff);
|
||||
@@ -462,15 +462,15 @@ public:
|
||||
struct npc_future_youAI : public ScriptedAI
|
||||
{
|
||||
npc_future_youAI(Creature* c) : ScriptedAI(c) {}
|
||||
|
||||
void EnterEvadeMode()
|
||||
|
||||
void EnterEvadeMode()
|
||||
{
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IN_COMBAT);
|
||||
me->ClearUnitState(UNIT_STATE_EVADE);
|
||||
}
|
||||
|
||||
void Reset()
|
||||
{
|
||||
void Reset()
|
||||
{
|
||||
if (me->ToTempSummon() && me->ToTempSummon()->GetSummoner())
|
||||
me->setFaction(me->ToTempSummon()->GetSummoner()->getFaction());
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ public:
|
||||
owner->CastSpell(owner, 44463, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void SpellHit(Unit* caster, const SpellInfo* spellInfo)
|
||||
{
|
||||
if (caster && spellInfo->Id == 44454)
|
||||
@@ -93,9 +93,9 @@ public:
|
||||
setphase(phase);
|
||||
timer = 0;
|
||||
}
|
||||
|
||||
|
||||
timer += diff;
|
||||
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
@@ -326,7 +326,7 @@ class npc_razael_and_lyana : public CreatureScript
|
||||
public:
|
||||
npc_razael_and_lyana() : CreatureScript("npc_razael_and_lyana") { }
|
||||
|
||||
bool OnGossipHello(Player* player, Creature* creature)
|
||||
bool OnGossipHello(Player* player, Creature* creature) override
|
||||
{
|
||||
if (creature->IsQuestGiver())
|
||||
player->PrepareQuestMenu(creature->GetGUID());
|
||||
@@ -337,35 +337,35 @@ public:
|
||||
case NPC_RAZAEL:
|
||||
if (!player->GetReqKillOrCastCurrentCount(QUEST_REPORTS_FROM_THE_FIELD, NPC_RAZAEL))
|
||||
{
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_RAZAEL_REPORT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
|
||||
player->SEND_GOSSIP_MENU(GOSSIP_TEXTID_RAZAEL1, creature->GetGUID());
|
||||
AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_RAZAEL_REPORT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
|
||||
SendGossipMenuFor(player, GOSSIP_TEXTID_RAZAEL1, creature->GetGUID());
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
case NPC_LYANA:
|
||||
if (!player->GetReqKillOrCastCurrentCount(QUEST_REPORTS_FROM_THE_FIELD, NPC_LYANA))
|
||||
{
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LYANA_REPORT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
|
||||
player->SEND_GOSSIP_MENU(GOSSIP_TEXTID_LYANA1, creature->GetGUID());
|
||||
AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_LYANA_REPORT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
|
||||
SendGossipMenuFor(player, GOSSIP_TEXTID_LYANA1, creature->GetGUID());
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID());
|
||||
SendGossipMenuFor(player, player->GetGossipTextId(creature), creature->GetGUID());
|
||||
return true;
|
||||
}
|
||||
|
||||
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action)
|
||||
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) override
|
||||
{
|
||||
player->PlayerTalkClass->ClearMenus();
|
||||
ClearGossipMenuFor(player);
|
||||
switch (action)
|
||||
{
|
||||
case GOSSIP_ACTION_INFO_DEF + 1:
|
||||
player->SEND_GOSSIP_MENU(GOSSIP_TEXTID_RAZAEL2, creature->GetGUID());
|
||||
SendGossipMenuFor(player, GOSSIP_TEXTID_RAZAEL2, creature->GetGUID());
|
||||
player->TalkedToCreature(NPC_RAZAEL, creature->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF + 2:
|
||||
player->SEND_GOSSIP_MENU(GOSSIP_TEXTID_LYANA2, creature->GetGUID());
|
||||
SendGossipMenuFor(player, GOSSIP_TEXTID_LYANA2, creature->GetGUID());
|
||||
player->TalkedToCreature(NPC_LYANA, creature->GetGUID());
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -123,8 +123,8 @@ public:
|
||||
me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER);
|
||||
}
|
||||
|
||||
void JustSummoned(Creature* creature)
|
||||
{
|
||||
void JustSummoned(Creature* creature)
|
||||
{
|
||||
summons.Summon(creature);
|
||||
if (creature->GetEntry() != NPC_PRINCE)
|
||||
if (Player* player = ObjectAccessor::GetPlayer(*me, playerGUID))
|
||||
@@ -191,7 +191,7 @@ public:
|
||||
me->MonsterYell("Khit'rix the Dark Master has been defeated by $N and his band of companions. Let the next challenge be issued!", LANG_UNIVERSAL, ObjectAccessor::GetPlayer(*me, playerGUID));
|
||||
break;
|
||||
case QUEST_BFV_SIGRID:
|
||||
me->MonsterYell("$N has defeated Sigrid Iceborn for a second time. Well, this time he did it with the help of his friends, but a win is a win!", LANG_UNIVERSAL, ObjectAccessor::GetPlayer(*me, playerGUID));
|
||||
me->MonsterYell("$N has defeated Sigrid Iceborn for a second time. Well, this time he did it with the help of his friends, but a win is a win!", LANG_UNIVERSAL, ObjectAccessor::GetPlayer(*me, playerGUID));
|
||||
break;
|
||||
case QUEST_BFV_CARNAGE:
|
||||
me->MonsterYell("The horror known as Carnage is no more. Could it be that $N is truly worthy of battle in Valhalas? We shall see.", LANG_UNIVERSAL, ObjectAccessor::GetPlayer(*me, playerGUID));
|
||||
@@ -368,7 +368,7 @@ public:
|
||||
CombatAI::Reset();
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff)
|
||||
void UpdateAI(uint32 diff)
|
||||
{
|
||||
attackTimer += diff;
|
||||
if (attackTimer >= 1500)
|
||||
@@ -459,7 +459,7 @@ class npc_lord_arete : public CreatureScript
|
||||
{
|
||||
_landgrenGUID = 0;
|
||||
_landgrenSoulGUID = 0;
|
||||
|
||||
|
||||
events.Reset();
|
||||
events.RescheduleEvent(EVENT_START, 1000);
|
||||
me->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_NONE);
|
||||
@@ -617,7 +617,7 @@ class npc_boneguard_footman : public CreatureScript
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
ScriptedAI::UpdateAI(diff);
|
||||
}
|
||||
};
|
||||
@@ -666,9 +666,9 @@ class npc_tirions_gambit_tirion : public CreatureScript
|
||||
public:
|
||||
npc_tirions_gambit_tirion(): CreatureScript("npc_tirions_gambit_tirion"){}
|
||||
|
||||
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 /*action*/)
|
||||
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 /*action*/) override
|
||||
{
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
CloseGossipMenuFor(player);
|
||||
creature->AI()->DoAction(ACTION_START_EVENT);
|
||||
return true;
|
||||
}
|
||||
@@ -682,20 +682,19 @@ class npc_tirions_gambit_tirion : public CreatureScript
|
||||
EventMap events;
|
||||
SummonList summons;
|
||||
|
||||
void Reset()
|
||||
void Reset() override
|
||||
{
|
||||
me->setActive(false);
|
||||
me->SetStandState(UNIT_STAND_STATE_STAND);
|
||||
}
|
||||
|
||||
void SetData(uint32 type, uint32 data)
|
||||
void SetData(uint32 type, uint32 data) override
|
||||
{
|
||||
if (type == 1 && data == 1)
|
||||
events.ScheduleEvent(EVENT_SCENE_0+30, 10000);
|
||||
}
|
||||
|
||||
|
||||
void DoAction(int32 param)
|
||||
void DoAction(int32 param) override
|
||||
{
|
||||
if (param == ACTION_START_EVENT)
|
||||
{
|
||||
@@ -718,7 +717,7 @@ class npc_tirions_gambit_tirion : public CreatureScript
|
||||
}
|
||||
}
|
||||
|
||||
void JustSummoned(Creature* summon)
|
||||
void JustSummoned(Creature* summon) override
|
||||
{
|
||||
summons.Summon(summon);
|
||||
if (summon->GetEntry() == NPC_CHOSEN_ZEALOT || summon->GetEntry() == NPC_TIRION_LICH_KING)
|
||||
@@ -731,12 +730,12 @@ class npc_tirions_gambit_tirion : public CreatureScript
|
||||
}
|
||||
}
|
||||
|
||||
void SummonedCreatureDespawn(Creature* summon)
|
||||
void SummonedCreatureDespawn(Creature* summon) override
|
||||
{
|
||||
summons.Despawn(summon);
|
||||
}
|
||||
|
||||
void WaypointReached(uint32 pointId)
|
||||
void WaypointReached(uint32 pointId) override
|
||||
{
|
||||
switch (pointId)
|
||||
{
|
||||
@@ -797,7 +796,7 @@ class npc_tirions_gambit_tirion : public CreatureScript
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateEscortAI(uint32 diff)
|
||||
void UpdateEscortAI(uint32 diff) override
|
||||
{
|
||||
events.Update(diff);
|
||||
switch (events.ExecuteEvent())
|
||||
@@ -1016,7 +1015,7 @@ class npc_tirions_gambit_tirion : public CreatureScript
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return new npc_tirions_gambit_tirionAI(creature);
|
||||
}
|
||||
@@ -1123,7 +1122,7 @@ class spell_charge_shield_bomber : public SpellScriptLoader
|
||||
Aura* aura = ship->GetAura(SPELL_INFRA_GREEN_SHIELD);
|
||||
if (!aura)
|
||||
return;
|
||||
|
||||
|
||||
aura->ModStackAmount(GetEffectValue() - 1);
|
||||
}
|
||||
|
||||
@@ -1304,7 +1303,7 @@ class npc_infra_green_bomber_generic : public CreatureScript
|
||||
me->MonsterTextEmote("Your Vehicle is burning!", GetSummoner(), true);
|
||||
passenger->AddAura(SPELL_BURNING, passenger);
|
||||
}
|
||||
|
||||
|
||||
for (uint8 seat = 3; seat <= 5; ++seat)
|
||||
if (Unit* banner = kit->GetPassenger(seat))
|
||||
if (!banner->HasAura(SPELL_COSMETIC_FIRE))
|
||||
@@ -1373,7 +1372,7 @@ class npc_infra_green_bomber_generic : public CreatureScript
|
||||
if (Unit* banner = kit->GetPassenger(seat))
|
||||
if (banner->HasAura(SPELL_COSMETIC_FIRE))
|
||||
fireCount++;
|
||||
|
||||
|
||||
if (fireCount)
|
||||
Unit::DealDamage(me, me, 3000*fireCount, NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_FIRE);
|
||||
else // Heal
|
||||
|
||||
@@ -155,7 +155,7 @@ public:
|
||||
events.RescheduleEvent(EVENT_ARTRUIS_HP_CHECK, 1000);
|
||||
events.RescheduleEvent(EVENT_ARTRUIS_TALK1, 6000);
|
||||
}
|
||||
|
||||
|
||||
void JustDied(Unit* /*killer*/)
|
||||
{
|
||||
if (GameObject* go = me->SummonGameObject(GO_ARTRUIS_PHYLACTERY, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 600000))
|
||||
@@ -312,7 +312,7 @@ public:
|
||||
uint8 playeraction;
|
||||
|
||||
npc_still_at_it_triggerAI(Creature* pCreature) : NullCreatureAI(pCreature) {}
|
||||
|
||||
|
||||
void Reset()
|
||||
{
|
||||
running = false;
|
||||
@@ -357,7 +357,7 @@ public:
|
||||
{
|
||||
currentstep++;
|
||||
uint8 s = urand(0,2);
|
||||
|
||||
|
||||
if (Creature* th = ObjectAccessor::GetCreature(*me, thunderbrewGUID))
|
||||
th->HandleEmoteCommand(EMOTE_ONESHOT_CHEER_NO_SHEATHE);
|
||||
|
||||
@@ -447,7 +447,7 @@ class npc_mcmanus : public CreatureScript
|
||||
public:
|
||||
npc_mcmanus() : CreatureScript("npc_mcmanus") {}
|
||||
|
||||
bool OnGossipHello(Player* player, Creature* creature)
|
||||
bool OnGossipHello(Player* player, Creature* creature) override
|
||||
{
|
||||
if (!player)
|
||||
return true;
|
||||
@@ -456,13 +456,13 @@ public:
|
||||
player->PrepareQuestMenu(creature->GetGUID());
|
||||
|
||||
if (player->GetQuestStatus(12644) == QUEST_STATUS_INCOMPLETE)
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "I'm ready to start the distillation, uh, Tipsy.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
||||
AddGossipItemFor(player, GOSSIP_ICON_CHAT, "I'm ready to start the distillation, uh, Tipsy.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
||||
|
||||
player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID());
|
||||
SendGossipMenuFor(player, player->GetGossipTextId(creature), creature->GetGUID());
|
||||
return true;
|
||||
}
|
||||
|
||||
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*uiSender*/, uint32 uiAction)
|
||||
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*uiSender*/, uint32 uiAction) override
|
||||
{
|
||||
if (!player)
|
||||
return true;
|
||||
@@ -479,7 +479,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
CloseGossipMenuFor(player);
|
||||
return true;
|
||||
}
|
||||
};
|
||||
@@ -489,7 +489,7 @@ class go_pressure_valve : public GameObjectScript
|
||||
public:
|
||||
go_pressure_valve() : GameObjectScript("go_pressure_valve") { }
|
||||
|
||||
bool OnGossipHello(Player* player, GameObject* go)
|
||||
bool OnGossipHello(Player* player, GameObject* go) override
|
||||
{
|
||||
if (!player)
|
||||
return true;
|
||||
@@ -508,7 +508,7 @@ class go_brazier : public GameObjectScript
|
||||
public:
|
||||
go_brazier() : GameObjectScript("go_brazier") { }
|
||||
|
||||
bool OnGossipHello(Player* player, GameObject* go)
|
||||
bool OnGossipHello(Player* player, GameObject* go) override
|
||||
{
|
||||
if (!player)
|
||||
return true;
|
||||
@@ -585,33 +585,33 @@ class npc_vekjik : public CreatureScript
|
||||
public:
|
||||
npc_vekjik() : CreatureScript("npc_vekjik") { }
|
||||
|
||||
bool OnGossipHello(Player* player, Creature* creature)
|
||||
bool OnGossipHello(Player* player, Creature* creature) override
|
||||
{
|
||||
if (creature->IsQuestGiver())
|
||||
player->PrepareQuestMenu(creature->GetGUID());
|
||||
|
||||
if (player->GetQuestStatus(QUEST_MAKING_PEACE) == QUEST_STATUS_INCOMPLETE)
|
||||
{
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_VEKJIK_ITEM1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
||||
player->SEND_GOSSIP_MENU(GOSSIP_TEXTID_VEKJIK1, creature->GetGUID());
|
||||
AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_VEKJIK_ITEM1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
||||
SendGossipMenuFor(player, GOSSIP_TEXTID_VEKJIK1, creature->GetGUID());
|
||||
return true;
|
||||
}
|
||||
|
||||
player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID());
|
||||
SendGossipMenuFor(player, player->GetGossipTextId(creature), creature->GetGUID());
|
||||
return true;
|
||||
}
|
||||
|
||||
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action)
|
||||
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) override
|
||||
{
|
||||
player->PlayerTalkClass->ClearMenus();
|
||||
ClearGossipMenuFor(player);
|
||||
switch (action)
|
||||
{
|
||||
case GOSSIP_ACTION_INFO_DEF+1:
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_VEKJIK_ITEM2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
|
||||
player->SEND_GOSSIP_MENU(GOSSIP_TEXTID_VEKJIK2, creature->GetGUID());
|
||||
AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_VEKJIK_ITEM2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
|
||||
SendGossipMenuFor(player, GOSSIP_TEXTID_VEKJIK2, creature->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+2:
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
CloseGossipMenuFor(player);
|
||||
creature->AI()->Talk(SAY_TEXTID_VEKJIK1, player);
|
||||
player->AreaExploredOrEventHappens(QUEST_MAKING_PEACE);
|
||||
//creature->CastSpell(player, SPELL_FREANZYHEARTS_FURY, true);
|
||||
@@ -647,34 +647,34 @@ class npc_avatar_of_freya : public CreatureScript
|
||||
public:
|
||||
npc_avatar_of_freya() : CreatureScript("npc_avatar_of_freya") { }
|
||||
|
||||
bool OnGossipHello(Player* player, Creature* creature)
|
||||
bool OnGossipHello(Player* player, Creature* creature) override
|
||||
{
|
||||
if (creature->IsQuestGiver())
|
||||
player->PrepareQuestMenu(creature->GetGUID());
|
||||
|
||||
if (player->GetQuestStatus(QUEST_FREYA_PACT) == QUEST_STATUS_INCOMPLETE)
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_AOF1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
||||
AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_ITEM_AOF1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
||||
|
||||
player->PlayerTalkClass->SendGossipMenu(GOSSIP_TEXTID_AVATAR1, creature->GetGUID());
|
||||
SendGossipMenuFor(player, GOSSIP_TEXTID_AVATAR1, creature);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action)
|
||||
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) override
|
||||
{
|
||||
player->PlayerTalkClass->ClearMenus();
|
||||
ClearGossipMenuFor(player);
|
||||
switch (action)
|
||||
{
|
||||
case GOSSIP_ACTION_INFO_DEF+1:
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_AOF2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
|
||||
player->PlayerTalkClass->SendGossipMenu(GOSSIP_TEXTID_AVATAR2, creature->GetGUID());
|
||||
AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_ITEM_AOF2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
|
||||
SendGossipMenuFor(player, GOSSIP_TEXTID_AVATAR2, creature);
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+2:
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_AOF3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3);
|
||||
player->PlayerTalkClass->SendGossipMenu(GOSSIP_TEXTID_AVATAR3, creature->GetGUID());
|
||||
AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_ITEM_AOF3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3);
|
||||
SendGossipMenuFor(player, GOSSIP_TEXTID_AVATAR3, creature);
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+3:
|
||||
player->CastSpell(player, SPELL_FREYA_CONVERSATION, true);
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
CloseGossipMenuFor(player);
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
@@ -1074,32 +1074,32 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return new npc_adventurous_dwarfAI(creature);
|
||||
}
|
||||
|
||||
bool OnGossipHello(Player* player, Creature* creature)
|
||||
bool OnGossipHello(Player* player, Creature* creature) override
|
||||
{
|
||||
if (player->GetQuestStatus(QUEST_12634) != QUEST_STATUS_INCOMPLETE)
|
||||
return false;
|
||||
|
||||
if (player->GetItemCount(ITEM_ORANGE) < 1)
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_OPTION_ORANGE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
|
||||
AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_OPTION_ORANGE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
|
||||
|
||||
if (player->GetItemCount(ITEM_BANANAS) < 2)
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_OPTION_BANANAS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
|
||||
AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_OPTION_BANANAS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
|
||||
|
||||
if (player->GetItemCount(ITEM_PAPAYA) < 1)
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_OPTION_PAPAYA, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
|
||||
AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_OPTION_PAPAYA, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
|
||||
|
||||
player->PlayerTalkClass->SendGossipMenu(GOSSIP_MENU_DWARF, creature->GetGUID());
|
||||
SendGossipMenuFor(player, GOSSIP_MENU_DWARF, creature);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action)
|
||||
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) override
|
||||
{
|
||||
player->PlayerTalkClass->ClearMenus();
|
||||
ClearGossipMenuFor(player);
|
||||
uint32 spellId = 0;
|
||||
|
||||
switch (action)
|
||||
|
||||
@@ -122,7 +122,7 @@ public:
|
||||
uint32 hpTimer;
|
||||
bool charging;
|
||||
|
||||
void Reset()
|
||||
void Reset()
|
||||
{
|
||||
spellTimer = 0;
|
||||
hpTimer = 0;
|
||||
@@ -244,12 +244,12 @@ public:
|
||||
{
|
||||
events.Reset();
|
||||
if (me->GetEntry() == NPC_TIME_LOST_PROTO_DRAKE)
|
||||
{
|
||||
{
|
||||
events.ScheduleEvent(SPELL_TIME_SHIFT, 10000);
|
||||
events.ScheduleEvent(SPELL_TIME_LAPSE, 5000);
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
events.ScheduleEvent(SPELL_FROST_BREATH, 8000);
|
||||
events.ScheduleEvent(SPELL_FROST_CLEAVE, 5000);
|
||||
}
|
||||
@@ -344,7 +344,7 @@ public:
|
||||
ScriptedAI::EnterEvadeMode();
|
||||
}
|
||||
|
||||
void Reset()
|
||||
void Reset()
|
||||
{
|
||||
me->SetRegeneratingHealth(true);
|
||||
me->SetSpeed(MOVE_RUN, 1.14f, true); // ZOMG!
|
||||
@@ -470,7 +470,7 @@ public:
|
||||
if (setCharm)
|
||||
{
|
||||
setCharm = false;
|
||||
|
||||
|
||||
if (Player* charmer = GetValidPlayer())
|
||||
{
|
||||
me->setFaction(16);
|
||||
@@ -747,7 +747,7 @@ public:
|
||||
{
|
||||
if (sender == GOSSIP_ID && action == GOSSIP_OPTION_ID)
|
||||
{
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
CloseGossipMenuFor(player);
|
||||
me->setFaction(113);
|
||||
npc_escortAI::Start(true, true, player->GetGUID());
|
||||
}
|
||||
@@ -783,7 +783,7 @@ class npc_roxi_ramrocket : public CreatureScript
|
||||
public:
|
||||
npc_roxi_ramrocket() : CreatureScript("npc_roxi_ramrocket") { }
|
||||
|
||||
bool OnGossipHello(Player* player, Creature* creature)
|
||||
bool OnGossipHello(Player* player, Creature* creature) override
|
||||
{
|
||||
//Quest Menu
|
||||
if (creature->IsQuestGiver())
|
||||
@@ -791,20 +791,20 @@ public:
|
||||
|
||||
//Trainer Menu
|
||||
if ( creature->IsTrainer() )
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TRAINER, GOSSIP_TEXT_TRAIN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRAIN);
|
||||
AddGossipItemFor(player, GOSSIP_ICON_TRAINER, GOSSIP_TEXT_TRAIN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRAIN);
|
||||
|
||||
//Vendor Menu
|
||||
if ( creature->IsVendor() )
|
||||
if (player->HasSpell(SPELL_MECHANO_HOG) || player->HasSpell(SPELL_MEKGINEERS_CHOPPER))
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE);
|
||||
AddGossipItemFor(player, GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE);
|
||||
|
||||
player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID());
|
||||
SendGossipMenuFor(player, player->GetGossipTextId(creature), creature->GetGUID());
|
||||
return true;
|
||||
}
|
||||
|
||||
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action)
|
||||
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) override
|
||||
{
|
||||
player->PlayerTalkClass->ClearMenus();
|
||||
ClearGossipMenuFor(player);
|
||||
switch (action)
|
||||
{
|
||||
case GOSSIP_ACTION_TRAIN:
|
||||
|
||||
@@ -130,7 +130,7 @@ class npc_wg_demolisher_engineer : public CreatureScript
|
||||
public:
|
||||
npc_wg_demolisher_engineer() : CreatureScript("npc_wg_demolisher_engineer") { }
|
||||
|
||||
bool OnGossipHello(Player* player, Creature* creature)
|
||||
bool OnGossipHello(Player* player, Creature* creature) override
|
||||
{
|
||||
if (creature->IsQuestGiver())
|
||||
player->PrepareQuestMenu(creature->GetGUID());
|
||||
@@ -138,24 +138,24 @@ class npc_wg_demolisher_engineer : public CreatureScript
|
||||
if (canBuild(creature))
|
||||
{
|
||||
if (player->HasAura(SPELL_CORPORAL))
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_HELLO_DEMO1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
|
||||
AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_HELLO_DEMO1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
|
||||
else if (player->HasAura(SPELL_LIEUTENANT))
|
||||
{
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_HELLO_DEMO1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_HELLO_DEMO2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_HELLO_DEMO3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
|
||||
AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_HELLO_DEMO1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
|
||||
AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_HELLO_DEMO2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
|
||||
AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_HELLO_DEMO3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
|
||||
}
|
||||
}
|
||||
else
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_HELLO_DEMO4, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 9);
|
||||
AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_HELLO_DEMO4, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 9);
|
||||
|
||||
player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID());
|
||||
SendGossipMenuFor(player, player->GetGossipTextId(creature), creature->GetGUID());
|
||||
return true;
|
||||
}
|
||||
|
||||
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender */ , uint32 action)
|
||||
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender */ , uint32 action) override
|
||||
{
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
CloseGossipMenuFor(player);
|
||||
|
||||
if (canBuild(creature))
|
||||
{
|
||||
@@ -200,7 +200,7 @@ class npc_wg_spirit_guide : public CreatureScript
|
||||
public:
|
||||
npc_wg_spirit_guide() : CreatureScript("npc_wg_spirit_guide") { }
|
||||
|
||||
bool OnGossipHello(Player* player, Creature* creature)
|
||||
bool OnGossipHello(Player* player, Creature* creature) override
|
||||
{
|
||||
if (creature->IsQuestGiver())
|
||||
player->PrepareQuestMenu(creature->GetGUID());
|
||||
@@ -212,15 +212,15 @@ class npc_wg_spirit_guide : public CreatureScript
|
||||
GraveyardVect graveyard = wintergrasp->GetGraveyardVector();
|
||||
for (uint8 i = 0; i < graveyard.size(); i++)
|
||||
if (graveyard[i]->GetControlTeamId() == player->GetTeamId())
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, sObjectMgr->GetTrinityStringForDBCLocale(((BfGraveyardWG*)graveyard[i])->GetTextId()), GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + i);
|
||||
AddGossipItemFor(player, GOSSIP_ICON_CHAT, sObjectMgr->GetTrinityStringForDBCLocale(((BfGraveyardWG*)graveyard[i])->GetTextId()), GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + i);
|
||||
|
||||
player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID());
|
||||
SendGossipMenuFor(player, player->GetGossipTextId(creature), creature->GetGUID());
|
||||
return true;
|
||||
}
|
||||
|
||||
bool OnGossipSelect(Player* player, Creature* /*creature */ , uint32 /*sender */ , uint32 action)
|
||||
bool OnGossipSelect(Player* player, Creature* /*creature */ , uint32 /*sender */ , uint32 action) override
|
||||
{
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
CloseGossipMenuFor(player);
|
||||
|
||||
Battlefield* wintergrasp = sBattlefieldMgr->GetBattlefieldByBattleId(BATTLEFIELD_BATTLEID_WG);
|
||||
if (wintergrasp)
|
||||
@@ -241,14 +241,14 @@ class npc_wg_spirit_guide : public CreatureScript
|
||||
me->setActive(true);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 /* diff */)
|
||||
void UpdateAI(uint32 /*diff*/) override
|
||||
{
|
||||
if (!me->HasUnitState(UNIT_STATE_CASTING))
|
||||
DoCast(me, SPELL_CHANNEL_SPIRIT_HEAL);
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI *GetAI(Creature* creature) const
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return new npc_wg_spirit_guideAI(creature);
|
||||
}
|
||||
@@ -274,7 +274,7 @@ class npc_wg_queue : public CreatureScript
|
||||
public:
|
||||
npc_wg_queue() : CreatureScript("npc_wg_queue") { }
|
||||
|
||||
bool OnGossipHello(Player* player, Creature* creature)
|
||||
bool OnGossipHello(Player* player, Creature* creature) override
|
||||
{
|
||||
if (!sWorld->getBoolConfig(CONFIG_MINIGOB_MANABONK))
|
||||
return false;
|
||||
@@ -288,8 +288,8 @@ class npc_wg_queue : public CreatureScript
|
||||
|
||||
if (wintergrasp->IsWarTime())
|
||||
{
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT_19, "Queue for Wintergrasp.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
|
||||
player->SEND_GOSSIP_MENU(wintergrasp->GetDefenderTeam()? WG_NPCQUEUE_TEXT_H_WAR : WG_NPCQUEUE_TEXT_A_WAR, creature->GetGUID());
|
||||
AddGossipItemFor(player, GOSSIP_ICON_CHAT_19, "Queue for Wintergrasp.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
|
||||
SendGossipMenuFor(player, wintergrasp->GetDefenderTeam()? WG_NPCQUEUE_TEXT_H_WAR : WG_NPCQUEUE_TEXT_A_WAR, creature->GetGUID());
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -297,18 +297,18 @@ class npc_wg_queue : public CreatureScript
|
||||
player->SendUpdateWorldState(4354, time(NULL) + timer);
|
||||
if (timer < 15 * MINUTE)
|
||||
{
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Queue for Wintergrasp.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
|
||||
player->SEND_GOSSIP_MENU(wintergrasp->GetDefenderTeam() ? WG_NPCQUEUE_TEXT_H_QUEUE : WG_NPCQUEUE_TEXT_A_QUEUE, creature->GetGUID());
|
||||
AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Queue for Wintergrasp.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
|
||||
SendGossipMenuFor(player, wintergrasp->GetDefenderTeam() ? WG_NPCQUEUE_TEXT_H_QUEUE : WG_NPCQUEUE_TEXT_A_QUEUE, creature->GetGUID());
|
||||
}
|
||||
else
|
||||
player->SEND_GOSSIP_MENU(wintergrasp->GetDefenderTeam() ? WG_NPCQUEUE_TEXT_H_NOWAR : WG_NPCQUEUE_TEXT_A_NOWAR, creature->GetGUID());
|
||||
SendGossipMenuFor(player, wintergrasp->GetDefenderTeam() ? WG_NPCQUEUE_TEXT_H_NOWAR : WG_NPCQUEUE_TEXT_A_NOWAR, creature->GetGUID());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool OnGossipSelect(Player* player, Creature* /*creature */ , uint32 /*sender */ , uint32 /*action*/)
|
||||
bool OnGossipSelect(Player* player, Creature* /*creature */ , uint32 /*sender */ , uint32 /*action*/) override
|
||||
{
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
CloseGossipMenuFor(player);
|
||||
|
||||
Battlefield* wintergrasp = sBattlefieldMgr->GetBattlefieldByBattleId(BATTLEFIELD_BATTLEID_WG);
|
||||
if (!wintergrasp)
|
||||
@@ -339,7 +339,7 @@ class npc_wg_queue : public CreatureScript
|
||||
|
||||
EventMap events;
|
||||
|
||||
void UpdateAI(uint32 diff)
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if (CONFIG_WINTERGRASP_ENABLE == false)
|
||||
return;
|
||||
@@ -382,7 +382,7 @@ class npc_wg_queue : public CreatureScript
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return new npc_wg_queueAI(creature);
|
||||
}
|
||||
@@ -393,7 +393,7 @@ class npc_wg_quest_giver : public CreatureScript
|
||||
public:
|
||||
npc_wg_quest_giver() : CreatureScript("npc_wg_quest_giver") { }
|
||||
|
||||
bool OnGossipHello(Player* player, Creature* creature)
|
||||
bool OnGossipHello(Player* player, Creature* creature) override
|
||||
{
|
||||
if (creature->IsQuestGiver())
|
||||
player->PrepareQuestMenu(creature->GetGUID());
|
||||
@@ -566,12 +566,12 @@ class npc_wg_quest_giver : public CreatureScript
|
||||
}
|
||||
}
|
||||
}
|
||||
player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID());
|
||||
SendGossipMenuFor(player, player->GetGossipTextId(creature), creature->GetGUID());
|
||||
return true;
|
||||
}
|
||||
|
||||
uint32 GetDialogStatus(Player* player, Creature* creature)
|
||||
{
|
||||
uint32 GetDialogStatus(Player* player, Creature* creature) override
|
||||
{
|
||||
QuestRelationBounds qr = sObjectMgr->GetCreatureQuestRelationBounds(creature->GetEntry());
|
||||
QuestRelationBounds qir = sObjectMgr->GetCreatureQuestInvolvedRelationBounds(creature->GetEntry());
|
||||
QuestGiverStatus result = DIALOG_STATUS_NONE;
|
||||
@@ -768,7 +768,7 @@ class go_wg_vehicle_teleporter : public GameObjectScript
|
||||
if (IsFriendly(passenger))
|
||||
if (Creature* teleportTrigger = passenger->SummonTrigger(go->GetPositionX()-60.0f, go->GetPositionY(), go->GetPositionZ()+1.0f, cVeh->GetOrientation(), 1000))
|
||||
return teleportTrigger;
|
||||
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
@@ -162,7 +162,7 @@ public:
|
||||
|
||||
};
|
||||
|
||||
bool OnQuestAccept(Player* player, Creature* creature, Quest const* quest)
|
||||
bool OnQuestAccept(Player* player, Creature* creature, Quest const* quest) override
|
||||
{
|
||||
if (quest->GetQuestId() == QUEST_ALCHEMIST_APPRENTICE)
|
||||
if (creature->AI() && CAST_AI(npc_finklestein::npc_finklesteinAI, creature->AI()))
|
||||
@@ -171,31 +171,31 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
bool OnGossipHello(Player* player, Creature* creature)
|
||||
bool OnGossipHello(Player* player, Creature* creature) override
|
||||
{
|
||||
if (creature->IsQuestGiver())
|
||||
player->PrepareQuestMenu(creature->GetGUID());
|
||||
|
||||
player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID());
|
||||
SendGossipMenuFor(player, player->GetGossipTextId(creature), creature->GetGUID());
|
||||
|
||||
if (player->GetQuestStatus(QUEST_ALCHEMIST_APPRENTICE) == QUEST_STATUS_INCOMPLETE)
|
||||
{
|
||||
if (creature->AI() && CAST_AI(npc_finklestein::npc_finklesteinAI, creature->AI()))
|
||||
if (!CAST_AI(npc_finklestein::npc_finklesteinAI, creature->AI())->IsPlayerOnTask(player->GetGUID()))
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "I'm ready to begin. What is the first ingredient you require?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
||||
AddGossipItemFor(player, GOSSIP_ICON_CHAT, "I'm ready to begin. What is the first ingredient you require?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
||||
|
||||
player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID());
|
||||
SendGossipMenuFor(player, player->GetGossipTextId(creature), creature->GetGUID());
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*uiSender*/, uint32 uiAction)
|
||||
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*uiSender*/, uint32 uiAction) override
|
||||
{
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
CloseGossipMenuFor(player);
|
||||
if (uiAction == GOSSIP_ACTION_INFO_DEF+1)
|
||||
{
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
CloseGossipMenuFor(player);
|
||||
if (creature->AI() && CAST_AI(npc_finklestein::npc_finklesteinAI, creature->AI()))
|
||||
CAST_AI(npc_finklestein::npc_finklesteinAI, creature->AI())->StartNextTask(player->GetGUID(), 1);
|
||||
}
|
||||
@@ -203,7 +203,7 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
CreatureAI *GetAI(Creature* creature) const
|
||||
CreatureAI *GetAI(Creature* creature) const override
|
||||
{
|
||||
return new npc_finklesteinAI(creature);
|
||||
}
|
||||
@@ -214,7 +214,7 @@ class go_finklestein_cauldron : public GameObjectScript
|
||||
public:
|
||||
go_finklestein_cauldron() : GameObjectScript("go_finklestein_cauldron") { }
|
||||
|
||||
bool OnGossipHello(Player* player, GameObject* go)
|
||||
bool OnGossipHello(Player* player, GameObject* go) override
|
||||
{
|
||||
Creature* finklestein = go->FindNearestCreature(NPC_FINKLESTEIN, 30.0f, true);
|
||||
if (finklestein && finklestein->AI())
|
||||
@@ -580,7 +580,7 @@ public:
|
||||
playerGUID = 0;
|
||||
EnterEvadeMode();
|
||||
break;
|
||||
|
||||
|
||||
}
|
||||
|
||||
if (me->getFaction() == 35 || me->HasUnitState(UNIT_STATE_CASTING|UNIT_STATE_STUNNED))
|
||||
@@ -856,7 +856,7 @@ public:
|
||||
void sGossipSelect(Player* player, uint32 /*sender*/, uint32 /*action*/)
|
||||
{
|
||||
_events.ScheduleEvent(EVENT_RECRUIT_1, 100);
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
CloseGossipMenuFor(player);
|
||||
me->CastSpell(player, SPELL_QUEST_CREDIT, true);
|
||||
me->SetFacingToObject(player);
|
||||
}
|
||||
@@ -889,7 +889,7 @@ class go_scourge_enclosure : public GameObjectScript
|
||||
public:
|
||||
go_scourge_enclosure() : GameObjectScript("go_scourge_enclosure") { }
|
||||
|
||||
bool OnGossipHello(Player* player, GameObject* go)
|
||||
bool OnGossipHello(Player* player, GameObject* go) override
|
||||
{
|
||||
go->UseDoorOrButton();
|
||||
if (player->GetQuestStatus(QUEST_OUR_ONLY_HOPE) == QUEST_STATUS_INCOMPLETE)
|
||||
|
||||
Reference in New Issue
Block a user