Refactor(Core/Gossip): Replacing old macros with new (#1338)

* Correct support new macro
This commit is contained in:
Kargatum
2019-03-25 21:10:57 +07:00
committed by GitHub
parent 4abe082190
commit b6cb9247ba
99 changed files with 2840 additions and 2775 deletions

View File

@@ -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);

View File

@@ -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;

View File

@@ -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();
}
}

View File

@@ -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();
}
}

View File

@@ -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;
}

View File

@@ -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();

View File

@@ -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();

View File

@@ -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: