mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-16 00:36:07 +00:00
Refactor(Core/Gossip): Replacing old macros with new (#1338)
* Correct support new macro
This commit is contained in:
@@ -793,7 +793,7 @@ class npc_akama_illidan : public CreatureScript
|
||||
|
||||
void sGossipSelect(Player* player, uint32 /*sender*/, uint32 /*action*/)
|
||||
{
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
CloseGossipMenuFor(player);
|
||||
me->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_NONE);
|
||||
me->setActive(true);
|
||||
|
||||
|
||||
@@ -411,7 +411,7 @@ class npc_akama_shade : public CreatureScript
|
||||
{
|
||||
if (action == 0)
|
||||
{
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
CloseGossipMenuFor(player);
|
||||
me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
||||
events2.ScheduleEvent(EVENT_AKAMA_START_ENCOUNTER, 0);
|
||||
}
|
||||
|
||||
@@ -184,7 +184,7 @@ class boss_the_lurker_below : public CreatureScript
|
||||
}
|
||||
}
|
||||
|
||||
if (target)
|
||||
if (target)
|
||||
me->AttackerStateUpdate(target);
|
||||
else if ((target = SelectTarget(SELECT_TARGET_RANDOM, 0)))
|
||||
me->CastSpell(target, SPELL_WATER_BOLT, false);
|
||||
@@ -199,7 +199,7 @@ class go_strange_pool : public GameObjectScript
|
||||
public:
|
||||
go_strange_pool() : GameObjectScript("go_strange_pool") { }
|
||||
|
||||
bool OnGossipHello(Player* player, GameObject* go)
|
||||
bool OnGossipHello(Player* player, GameObject* go) override
|
||||
{
|
||||
if (InstanceScript* instance = go->GetInstanceScript())
|
||||
if (roll_chance_i(instance->GetBossState(DATA_THE_LURKER_BELOW) != DONE ? 25 : 0) && !instance->IsEncounterInProgress())
|
||||
|
||||
@@ -318,46 +318,46 @@ class go_ahune_ice_stone : public GameObjectScript
|
||||
public:
|
||||
go_ahune_ice_stone() : GameObjectScript("go_ahune_ice_stone") { }
|
||||
|
||||
bool OnGossipHello(Player *pPlayer, GameObject *pGO)
|
||||
bool OnGossipHello(Player* player, GameObject* go) override
|
||||
{
|
||||
if (!pPlayer || !pGO)
|
||||
if (!player || !go)
|
||||
return true;
|
||||
if (!pPlayer->HasItemCount(ITEM_MAGMA_TOTEM))
|
||||
if (!player->HasItemCount(ITEM_MAGMA_TOTEM))
|
||||
return true;
|
||||
if (pGO->FindNearestCreature(NPC_AHUNE, 200.0f, true))
|
||||
if (go->FindNearestCreature(NPC_AHUNE, 200.0f, true))
|
||||
return true;
|
||||
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Disturb the stone and summon Lord Ahune.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1337);
|
||||
pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXT_ID, pGO->GetGUID());
|
||||
AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Disturb the stone and summon Lord Ahune.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1337);
|
||||
SendGossipMenuFor(player, GOSSIP_TEXT_ID, go->GetGUID());
|
||||
return true;
|
||||
}
|
||||
|
||||
bool OnGossipSelect(Player *pPlayer, GameObject *pGO, uint32 /*sender*/, uint32 action)
|
||||
bool OnGossipSelect(Player* player, GameObject* go, uint32 /*sender*/, uint32 action) override
|
||||
{
|
||||
if (!pPlayer || !pGO)
|
||||
if (!player || !go)
|
||||
return true;
|
||||
if (action != GOSSIP_ACTION_INFO_DEF+1337)
|
||||
return true;
|
||||
if (!pPlayer->HasItemCount(ITEM_MAGMA_TOTEM))
|
||||
if (!player->HasItemCount(ITEM_MAGMA_TOTEM))
|
||||
return true;
|
||||
if (pGO->FindNearestCreature(NPC_AHUNE, 200.0f, true))
|
||||
if (go->FindNearestCreature(NPC_AHUNE, 200.0f, true))
|
||||
return true;
|
||||
|
||||
if (Creature* c = pGO->SummonCreature(NPC_AHUNE, AhuneSummonPos, TEMPSUMMON_MANUAL_DESPAWN))
|
||||
if (Creature* c = go->SummonCreature(NPC_AHUNE, AhuneSummonPos, TEMPSUMMON_MANUAL_DESPAWN))
|
||||
{
|
||||
pPlayer->DestroyItemCount(ITEM_MAGMA_TOTEM, 1, true, false);
|
||||
pPlayer->AreaExploredOrEventHappens(QUEST_SUMMON_AHUNE); // auto rewarded
|
||||
player->DestroyItemCount(ITEM_MAGMA_TOTEM, 1, true, false);
|
||||
player->AreaExploredOrEventHappens(QUEST_SUMMON_AHUNE); // auto rewarded
|
||||
|
||||
c->SetVisible(false);
|
||||
c->SetDisplayId(AHUNE_DEFAULT_MODEL);
|
||||
c->SetFloatValue(UNIT_FIELD_COMBATREACH, 18.0f);
|
||||
CAST_AI(boss_ahune::boss_ahuneAI, c->AI())->InvokerGUID = pPlayer->GetGUID();
|
||||
if (Creature* bunny = pGO->SummonCreature(NPC_AHUNE_SUMMON_LOC_BUNNY, AhuneSummonPos, TEMPSUMMON_TIMED_DESPAWN, 12000))
|
||||
if (Creature* crystal_trigger = pGO->SummonCreature(WORLD_TRIGGER, pGO->GetPositionX(), pGO->GetPositionY(), 5.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN, 12000))
|
||||
CAST_AI(boss_ahune::boss_ahuneAI, c->AI())->InvokerGUID = player->GetGUID();
|
||||
if (Creature* bunny = go->SummonCreature(NPC_AHUNE_SUMMON_LOC_BUNNY, AhuneSummonPos, TEMPSUMMON_TIMED_DESPAWN, 12000))
|
||||
if (Creature* crystal_trigger = go->SummonCreature(WORLD_TRIGGER, go->GetPositionX(), go->GetPositionY(), 5.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN, 12000))
|
||||
crystal_trigger->CastSpell(bunny, SPELL_STARTING_BEAM, false);
|
||||
}
|
||||
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
CloseGossipMenuFor(player);
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -11,7 +11,7 @@ class go_main_chambers_access_panel : public GameObjectScript
|
||||
public:
|
||||
go_main_chambers_access_panel() : GameObjectScript("go_main_chambers_access_panel") { }
|
||||
|
||||
bool OnGossipHello(Player* /*player*/, GameObject* go)
|
||||
bool OnGossipHello(Player* /*player*/, GameObject* go) override
|
||||
{
|
||||
InstanceScript* instance = go->GetInstanceScript();
|
||||
if (!instance)
|
||||
|
||||
@@ -90,7 +90,7 @@ class boss_broggok : public CreatureScript
|
||||
me->CastSpell(me, SPELL_POISON_CLOUD, false);
|
||||
events.RepeatEvent(20000);
|
||||
break;
|
||||
|
||||
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
@@ -138,7 +138,7 @@ class go_broggok_lever : public GameObjectScript
|
||||
public:
|
||||
go_broggok_lever() : GameObjectScript("go_broggok_lever") {}
|
||||
|
||||
bool OnGossipHello(Player* /*player*/, GameObject* go)
|
||||
bool OnGossipHello(Player* /*player*/, GameObject* go) override
|
||||
{
|
||||
if (InstanceScript* instance = go->GetInstanceScript())
|
||||
if (instance->GetData(DATA_BROGGOK) != DONE && instance->GetData(DATA_BROGGOK) != IN_PROGRESS)
|
||||
|
||||
@@ -890,7 +890,7 @@ class go_simon_cluster : public GameObjectScript
|
||||
public:
|
||||
go_simon_cluster() : GameObjectScript("go_simon_cluster") { }
|
||||
|
||||
bool OnGossipHello(Player* player, GameObject* go)
|
||||
bool OnGossipHello(Player* player, GameObject* go) override
|
||||
{
|
||||
if (Creature* bunny = go->FindNearestCreature(NPC_SIMON_BUNNY, 12.0f, true))
|
||||
bunny->AI()->SetData(go->GetEntry(), 0);
|
||||
@@ -916,16 +916,16 @@ class go_apexis_relic : public GameObjectScript
|
||||
public:
|
||||
go_apexis_relic() : GameObjectScript("go_apexis_relic") { }
|
||||
|
||||
bool OnGossipHello(Player* player, GameObject* go)
|
||||
bool OnGossipHello(Player* player, GameObject* go) override
|
||||
{
|
||||
player->PrepareGossipMenu(go, go->GetGOInfo()->questgiver.gossipID);
|
||||
player->SendPreparedGossip(go);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool OnGossipSelect(Player* player, GameObject* go, uint32 /*sender*/, uint32 /*action*/)
|
||||
bool OnGossipSelect(Player* player, GameObject* go, uint32 /*sender*/, uint32 /*action*/) override
|
||||
{
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
CloseGossipMenuFor(player);
|
||||
|
||||
bool large = (go->GetEntry() == GO_APEXIS_MONUMENT);
|
||||
if (player->HasItemCount(ITEM_APEXIS_SHARD, large ? 35 : 1))
|
||||
|
||||
@@ -276,42 +276,43 @@ enum CorkiData
|
||||
class go_corkis_prison : public GameObjectScript
|
||||
{
|
||||
public:
|
||||
go_corkis_prison() : GameObjectScript("go_corkis_prison") { }
|
||||
go_corkis_prison() : GameObjectScript("go_corkis_prison") { }
|
||||
|
||||
bool OnGossipHello(Player* player, GameObject* go)
|
||||
{
|
||||
go->SetGoState(GO_STATE_READY);
|
||||
if (go->GetEntry() == GO_CORKIS_PRISON)
|
||||
{
|
||||
if (Creature* corki = go->FindNearestCreature(NPC_CORKI, 25, true))
|
||||
{
|
||||
corki->GetMotionMaster()->MovePoint(1, go->GetPositionX()+5, go->GetPositionY(), go->GetPositionZ());
|
||||
if (player)
|
||||
player->KilledMonsterCredit(NPC_CORKI_CREDIT_1, 0);
|
||||
}
|
||||
}
|
||||
bool OnGossipHello(Player* player, GameObject* go) override
|
||||
{
|
||||
go->SetGoState(GO_STATE_READY);
|
||||
if (go->GetEntry() == GO_CORKIS_PRISON)
|
||||
{
|
||||
if (Creature* corki = go->FindNearestCreature(NPC_CORKI, 25, true))
|
||||
{
|
||||
corki->GetMotionMaster()->MovePoint(1, go->GetPositionX()+5, go->GetPositionY(), go->GetPositionZ());
|
||||
if (player)
|
||||
player->KilledMonsterCredit(NPC_CORKI_CREDIT_1, 0);
|
||||
}
|
||||
}
|
||||
|
||||
if (go->GetEntry() == GO_CORKIS_PRISON_2)
|
||||
{
|
||||
if (Creature* corki = go->FindNearestCreature(NPC_CORKI_2, 25, true))
|
||||
{
|
||||
corki->GetMotionMaster()->MovePoint(1, go->GetPositionX()-5, go->GetPositionY(), go->GetPositionZ());
|
||||
if (player)
|
||||
player->KilledMonsterCredit(NPC_CORKI_2, 0);
|
||||
}
|
||||
}
|
||||
if (go->GetEntry() == GO_CORKIS_PRISON_2)
|
||||
{
|
||||
if (Creature* corki = go->FindNearestCreature(NPC_CORKI_2, 25, true))
|
||||
{
|
||||
corki->GetMotionMaster()->MovePoint(1, go->GetPositionX()-5, go->GetPositionY(), go->GetPositionZ());
|
||||
if (player)
|
||||
player->KilledMonsterCredit(NPC_CORKI_2, 0);
|
||||
}
|
||||
}
|
||||
|
||||
if (go->GetEntry() == GO_CORKIS_PRISON_3)
|
||||
{
|
||||
if (Creature* corki = go->FindNearestCreature(NPC_CORKI_3, 25, true))
|
||||
{
|
||||
corki->GetMotionMaster()->MovePoint(1, go->GetPositionX()+4, go->GetPositionY(), go->GetPositionZ());
|
||||
if (player)
|
||||
player->KilledMonsterCredit(NPC_CORKI_CREDIT_3, 0);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
if (go->GetEntry() == GO_CORKIS_PRISON_3)
|
||||
{
|
||||
if (Creature* corki = go->FindNearestCreature(NPC_CORKI_3, 25, true))
|
||||
{
|
||||
corki->GetMotionMaster()->MovePoint(1, go->GetPositionX()+4, go->GetPositionY(), go->GetPositionZ());
|
||||
if (player)
|
||||
player->KilledMonsterCredit(NPC_CORKI_CREDIT_3, 0);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
class npc_corki : public CreatureScript
|
||||
@@ -567,24 +568,26 @@ enum FindingTheSurvivorsData
|
||||
|
||||
class go_warmaul_prison : public GameObjectScript
|
||||
{
|
||||
public:
|
||||
go_warmaul_prison() : GameObjectScript("go_warmaul_prison") { }
|
||||
public:
|
||||
go_warmaul_prison() : GameObjectScript("go_warmaul_prison") { }
|
||||
|
||||
bool OnGossipHello(Player* player, GameObject* go)
|
||||
bool OnGossipHello(Player* player, GameObject* go) override
|
||||
{
|
||||
go->UseDoorOrButton();
|
||||
|
||||
if (player->GetQuestStatus(QUEST_FINDING_THE_SURVIVORS) != QUEST_STATUS_INCOMPLETE)
|
||||
return false;
|
||||
|
||||
if (Creature* prisoner = go->FindNearestCreature(NPC_MAGHAR_PRISONER, 5.0f))
|
||||
{
|
||||
go->UseDoorOrButton();
|
||||
if (player->GetQuestStatus(QUEST_FINDING_THE_SURVIVORS) != QUEST_STATUS_INCOMPLETE)
|
||||
return false;
|
||||
player->KilledMonsterCredit(NPC_MAGHAR_PRISONER, 0);
|
||||
|
||||
if (Creature* prisoner = go->FindNearestCreature(NPC_MAGHAR_PRISONER, 5.0f))
|
||||
{
|
||||
player->KilledMonsterCredit(NPC_MAGHAR_PRISONER, 0);
|
||||
|
||||
prisoner->AI()->Talk(SAY_FREE, player);
|
||||
prisoner->DespawnOrUnsummon(6000);
|
||||
}
|
||||
return true;
|
||||
prisoner->AI()->Talk(SAY_FREE, player);
|
||||
prisoner->DespawnOrUnsummon(6000);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_nagrand()
|
||||
|
||||
@@ -53,12 +53,7 @@ enum saeed
|
||||
class npc_captain_saeed : public CreatureScript
|
||||
{
|
||||
public:
|
||||
npc_captain_saeed() : CreatureScript("npc_captain_saeed") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new npc_captain_saeedAI(creature);
|
||||
}
|
||||
npc_captain_saeed() : CreatureScript("npc_captain_saeed") { }
|
||||
|
||||
struct npc_captain_saeedAI : public npc_escortAI
|
||||
{
|
||||
@@ -68,7 +63,7 @@ class npc_captain_saeed : public CreatureScript
|
||||
EventMap events;
|
||||
bool started, fight;
|
||||
|
||||
void Reset()
|
||||
void Reset() override
|
||||
{
|
||||
if (!summons.empty())
|
||||
{
|
||||
@@ -87,7 +82,7 @@ class npc_captain_saeed : public CreatureScript
|
||||
me->RestoreFaction();
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit* who)
|
||||
void MoveInLineOfSight(Unit* who) override
|
||||
{
|
||||
if (Player* player = GetPlayerForEscort())
|
||||
if (me->GetDistance(who) < 10.0f && !me->GetVictim())
|
||||
@@ -100,7 +95,7 @@ class npc_captain_saeed : public CreatureScript
|
||||
npc_escortAI::MoveInLineOfSight(who);
|
||||
}
|
||||
|
||||
void SetGUID(uint64 playerGUID, int32 type)
|
||||
void SetGUID(uint64 playerGUID, int32 type) override
|
||||
{
|
||||
if (type == DATA_START_ENCOUNTER)
|
||||
{
|
||||
@@ -137,7 +132,7 @@ class npc_captain_saeed : public CreatureScript
|
||||
}
|
||||
}
|
||||
|
||||
void EnterEvadeMode()
|
||||
void EnterEvadeMode() override
|
||||
{
|
||||
if (fight)
|
||||
SetEscortPaused(false);
|
||||
@@ -165,7 +160,7 @@ class npc_captain_saeed : public CreatureScript
|
||||
}
|
||||
}
|
||||
|
||||
void WaypointReached(uint32 i)
|
||||
void WaypointReached(uint32 i) override
|
||||
{
|
||||
Player* player = GetPlayerForEscort();
|
||||
if (!player)
|
||||
@@ -188,12 +183,12 @@ class npc_captain_saeed : public CreatureScript
|
||||
}
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* who)
|
||||
void EnterCombat(Unit* who) override
|
||||
{
|
||||
SummonsAction(who);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/)
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
{
|
||||
Player* player = GetPlayerForEscort();
|
||||
if (player)
|
||||
@@ -202,12 +197,12 @@ class npc_captain_saeed : public CreatureScript
|
||||
summons.DespawnAll();
|
||||
}
|
||||
|
||||
void CorpseRemoved(uint32&)
|
||||
void CorpseRemoved(uint32&) override
|
||||
{
|
||||
summons.DespawnAll();
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 data) const
|
||||
uint32 GetData(uint32 data) const override
|
||||
{
|
||||
if (data == 1)
|
||||
return (uint32)started;
|
||||
@@ -215,7 +210,7 @@ class npc_captain_saeed : public CreatureScript
|
||||
return 0;
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff)
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
npc_escortAI::UpdateAI(diff);
|
||||
|
||||
@@ -248,10 +243,9 @@ class npc_captain_saeed : public CreatureScript
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
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);
|
||||
if (uiAction == GOSSIP_ACTION_INFO_DEF+1)
|
||||
{
|
||||
creature->AI()->SetGUID(player->GetGUID(), DATA_START_ENCOUNTER);
|
||||
@@ -262,11 +256,11 @@ class npc_captain_saeed : public CreatureScript
|
||||
creature->AI()->SetGUID(player->GetGUID(), DATA_START_FIGHT);
|
||||
}
|
||||
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
CloseGossipMenuFor(player);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool OnGossipHello(Player* player, Creature* creature)
|
||||
bool OnGossipHello(Player* player, Creature* creature) override
|
||||
{
|
||||
if (creature->IsQuestGiver())
|
||||
player->PrepareQuestMenu(creature->GetGUID());
|
||||
@@ -274,15 +268,20 @@ class npc_captain_saeed : public CreatureScript
|
||||
if (player->GetQuestStatus(QUEST_DIMENSIUS_DEVOURING) == QUEST_STATUS_INCOMPLETE)
|
||||
{
|
||||
if (!creature->AI()->GetData(1))
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Let's move out.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
||||
AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Let's move out.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
||||
else
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Let's start the battle.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
|
||||
AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Let's start the battle.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
|
||||
}
|
||||
|
||||
player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID());
|
||||
SendGossipMenuFor(player, player->GetGossipTextId(creature), creature->GetGUID());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return new npc_captain_saeedAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -603,27 +602,27 @@ public:
|
||||
//if (quest->GetQuestId() == QUEST_DIMENSIUS)
|
||||
//creature->AI()->Talk(WHISPER_DABIRI, player);
|
||||
|
||||
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)
|
||||
{
|
||||
creature->CastSpell(player, SPELL_PHASE_DISTRUPTOR, false);
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
CloseGossipMenuFor(player);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool OnGossipHello(Player* player, Creature* creature)
|
||||
bool OnGossipHello(Player* player, Creature* creature) override
|
||||
{
|
||||
if (creature->IsQuestGiver())
|
||||
player->PrepareQuestMenu(creature->GetGUID());
|
||||
|
||||
if (player->GetQuestStatus(QUEST_ON_NETHERY_WINGS) == QUEST_STATUS_INCOMPLETE && !player->HasItemCount(29778))
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
||||
AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_ITEM, 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;
|
||||
}
|
||||
|
||||
@@ -94,7 +94,7 @@ public:
|
||||
class spell_q10563_q10596_to_legion_hold_AuraScript : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_q10563_q10596_to_legion_hold_AuraScript)
|
||||
|
||||
|
||||
void HandleEffectRemove(AuraEffect const * /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||
{
|
||||
if (Player* player = GetTarget()->ToPlayer())
|
||||
@@ -641,21 +641,21 @@ class npc_drake_dealer_hurlunk : public CreatureScript
|
||||
public:
|
||||
npc_drake_dealer_hurlunk() : CreatureScript("npc_drake_dealer_hurlunk") { }
|
||||
|
||||
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_TRADE)
|
||||
player->GetSession()->SendListInventory(creature->GetGUID());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool OnGossipHello(Player* player, Creature* creature)
|
||||
bool OnGossipHello(Player* player, Creature* creature) override
|
||||
{
|
||||
if (creature->IsVendor() && player->GetReputationRank(1015) == REP_EXALTED)
|
||||
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;
|
||||
}
|
||||
@@ -673,9 +673,9 @@ class npcs_flanis_swiftwing_and_kagrosh : public CreatureScript
|
||||
public:
|
||||
npcs_flanis_swiftwing_and_kagrosh() : CreatureScript("npcs_flanis_swiftwing_and_kagrosh") { }
|
||||
|
||||
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)
|
||||
{
|
||||
ItemPosCountVec dest;
|
||||
@@ -683,7 +683,7 @@ public:
|
||||
if (msg == EQUIP_ERR_OK)
|
||||
{
|
||||
player->StoreNewItem(dest, 30658, 1, true);
|
||||
player->PlayerTalkClass->ClearMenus();
|
||||
ClearGossipMenuFor(player);
|
||||
}
|
||||
}
|
||||
if (action == GOSSIP_ACTION_INFO_DEF+2)
|
||||
@@ -693,20 +693,20 @@ public:
|
||||
if (msg == EQUIP_ERR_OK)
|
||||
{
|
||||
player->StoreNewItem(dest, 30659, 1, true);
|
||||
player->PlayerTalkClass->ClearMenus();
|
||||
ClearGossipMenuFor(player);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool OnGossipHello(Player* player, Creature* creature)
|
||||
bool OnGossipHello(Player* player, Creature* creature) override
|
||||
{
|
||||
if (player->GetQuestStatus(10583) == QUEST_STATUS_INCOMPLETE && !player->HasItemCount(30658, 1, true))
|
||||
player->ADD_GOSSIP_ITEM(0, GOSSIP_HSK1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
||||
AddGossipItemFor(player, 0, GOSSIP_HSK1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
||||
if (player->GetQuestStatus(10601) == QUEST_STATUS_INCOMPLETE && !player->HasItemCount(30659, 1, true))
|
||||
player->ADD_GOSSIP_ITEM(0, GOSSIP_HSK2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
|
||||
AddGossipItemFor(player, 0, GOSSIP_HSK2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
|
||||
|
||||
player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID());
|
||||
SendGossipMenuFor(player, player->GetGossipTextId(creature), creature->GetGUID());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -45,28 +45,28 @@ class npc_raliq_the_drunk : public CreatureScript
|
||||
public:
|
||||
npc_raliq_the_drunk() : CreatureScript("npc_raliq_the_drunk") { }
|
||||
|
||||
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->setFaction(FACTION_HOSTILE_RD);
|
||||
creature->AI()->AttackStart(player);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool OnGossipHello(Player* player, Creature* creature)
|
||||
bool OnGossipHello(Player* player, Creature* creature) override
|
||||
{
|
||||
if (player->GetQuestStatus(QUEST_CRACK_SKULLS) == QUEST_STATUS_INCOMPLETE)
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_RALIQ, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
||||
AddGossipItemFor(player, GOSSIP_ICON_VENDOR, GOSSIP_RALIQ, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
||||
|
||||
player->SEND_GOSSIP_MENU(9440, creature->GetGUID());
|
||||
SendGossipMenuFor(player, 9440, creature->GetGUID());
|
||||
return true;
|
||||
}
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return new npc_raliq_the_drunkAI(creature);
|
||||
}
|
||||
@@ -81,13 +81,13 @@ public:
|
||||
uint32 m_uiNormFaction;
|
||||
uint32 Uppercut_Timer;
|
||||
|
||||
void Reset()
|
||||
void Reset() override
|
||||
{
|
||||
Uppercut_Timer = 5000;
|
||||
me->RestoreFaction();
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff)
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
@@ -126,7 +126,7 @@ class npc_salsalabim : public CreatureScript
|
||||
public:
|
||||
npc_salsalabim() : CreatureScript("npc_salsalabim") { }
|
||||
|
||||
bool OnGossipHello(Player* player, Creature* creature)
|
||||
bool OnGossipHello(Player* player, Creature* creature) override
|
||||
{
|
||||
if (player->GetQuestStatus(QUEST_10004) == QUEST_STATUS_INCOMPLETE)
|
||||
{
|
||||
@@ -137,12 +137,12 @@ public:
|
||||
{
|
||||
if (creature->IsQuestGiver())
|
||||
player->PrepareQuestMenu(creature->GetGUID());
|
||||
player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID());
|
||||
SendGossipMenuFor(player, player->GetGossipTextId(creature), creature->GetGUID());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return new npc_salsalabimAI(creature);
|
||||
}
|
||||
@@ -153,13 +153,13 @@ public:
|
||||
|
||||
uint32 MagneticPull_Timer;
|
||||
|
||||
void Reset()
|
||||
void Reset() override
|
||||
{
|
||||
MagneticPull_Timer = 15000;
|
||||
me->RestoreFaction();
|
||||
}
|
||||
|
||||
void DamageTaken(Unit* done_by, uint32 &damage, DamageEffectType, SpellSchoolMask)
|
||||
void DamageTaken(Unit* done_by, uint32 &damage, DamageEffectType, SpellSchoolMask) override
|
||||
{
|
||||
// xinef: some corrections
|
||||
if (done_by)
|
||||
@@ -172,7 +172,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff)
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
@@ -204,28 +204,28 @@ class npc_shattrathflaskvendors : public CreatureScript
|
||||
public:
|
||||
npc_shattrathflaskvendors() : CreatureScript("npc_shattrathflaskvendors") { }
|
||||
|
||||
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_TRADE)
|
||||
player->GetSession()->SendListInventory(creature->GetGUID());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool OnGossipHello(Player* player, Creature* creature)
|
||||
bool OnGossipHello(Player* player, Creature* creature) override
|
||||
{
|
||||
if (creature->GetEntry() == 23484)
|
||||
{
|
||||
// Aldor vendor
|
||||
if (creature->IsVendor() && (player->GetReputationRank(932) == REP_EXALTED) && (player->GetReputationRank(935) == REP_EXALTED) && (player->GetReputationRank(942) == REP_EXALTED))
|
||||
{
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE);
|
||||
player->SEND_GOSSIP_MENU(11085, creature->GetGUID());
|
||||
AddGossipItemFor(player, GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE);
|
||||
SendGossipMenuFor(player, 11085, creature->GetGUID());
|
||||
}
|
||||
else
|
||||
{
|
||||
player->SEND_GOSSIP_MENU(11083, creature->GetGUID());
|
||||
SendGossipMenuFor(player, 11083, creature->GetGUID());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -234,12 +234,12 @@ public:
|
||||
// Scryers vendor
|
||||
if (creature->IsVendor() && (player->GetReputationRank(934) == REP_EXALTED) && (player->GetReputationRank(935) == REP_EXALTED) && (player->GetReputationRank(942) == REP_EXALTED))
|
||||
{
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE);
|
||||
player->SEND_GOSSIP_MENU(11085, creature->GetGUID());
|
||||
AddGossipItemFor(player, GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE);
|
||||
SendGossipMenuFor(player, 11085, creature->GetGUID());
|
||||
}
|
||||
else
|
||||
{
|
||||
player->SEND_GOSSIP_MENU(11084, creature->GetGUID());
|
||||
SendGossipMenuFor(player, 11084, creature->GetGUID());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -258,21 +258,21 @@ class npc_zephyr : public CreatureScript
|
||||
public:
|
||||
npc_zephyr() : CreatureScript("npc_zephyr") { }
|
||||
|
||||
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->CastSpell(player, 37778, false);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool OnGossipHello(Player* player, Creature* creature)
|
||||
bool OnGossipHello(Player* player, Creature* creature) override
|
||||
{
|
||||
if (player->GetReputationRank(989) >= REP_REVERED)
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_HZ, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
||||
AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_HZ, 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;
|
||||
}
|
||||
@@ -427,26 +427,26 @@ class npc_ishanah : public CreatureScript
|
||||
public:
|
||||
npc_ishanah() : CreatureScript("npc_ishanah") { }
|
||||
|
||||
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->SEND_GOSSIP_MENU(9458, creature->GetGUID());
|
||||
SendGossipMenuFor(player, 9458, creature->GetGUID());
|
||||
else if (action == GOSSIP_ACTION_INFO_DEF+2)
|
||||
player->SEND_GOSSIP_MENU(9459, creature->GetGUID());
|
||||
SendGossipMenuFor(player, 9459, creature->GetGUID());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool OnGossipHello(Player* player, Creature* creature)
|
||||
bool OnGossipHello(Player* player, Creature* creature) override
|
||||
{
|
||||
if (creature->IsQuestGiver())
|
||||
player->PrepareQuestMenu(creature->GetGUID());
|
||||
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, ISANAH_GOSSIP_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, ISANAH_GOSSIP_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
|
||||
AddGossipItemFor(player, GOSSIP_ICON_CHAT, ISANAH_GOSSIP_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
||||
AddGossipItemFor(player, GOSSIP_ICON_CHAT, ISANAH_GOSSIP_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
|
||||
|
||||
player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID());
|
||||
SendGossipMenuFor(player, player->GetGossipTextId(creature), creature->GetGUID());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@ class spell_q10930_big_bone_worm : public SpellScriptLoader
|
||||
PrepareAuraScript(spell_q10930_big_bone_worm_AuraScript);
|
||||
|
||||
void HandleEffectRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||
{
|
||||
{
|
||||
if (GetTargetApplication()->GetRemoveMode() != AURA_REMOVE_BY_EXPIRE)
|
||||
return;
|
||||
|
||||
@@ -524,17 +524,17 @@ class npc_floon : public CreatureScript
|
||||
public:
|
||||
npc_floon() : CreatureScript("npc_floon") { }
|
||||
|
||||
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)
|
||||
{
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_FLOON2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
||||
player->SEND_GOSSIP_MENU(9443, creature->GetGUID());
|
||||
AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_FLOON2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
||||
SendGossipMenuFor(player, 9443, creature->GetGUID());
|
||||
}
|
||||
if (action == GOSSIP_ACTION_INFO_DEF+1)
|
||||
{
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
CloseGossipMenuFor(player);
|
||||
creature->setFaction(FACTION_HOSTILE_FL);
|
||||
creature->AI()->Talk(SAY_FLOON_ATTACK, player);
|
||||
creature->AI()->AttackStart(player);
|
||||
@@ -542,16 +542,16 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
bool OnGossipHello(Player* player, Creature* creature)
|
||||
bool OnGossipHello(Player* player, Creature* creature) override
|
||||
{
|
||||
if (player->GetQuestStatus(QUEST_CRACK_SKULLS) == QUEST_STATUS_INCOMPLETE)
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_FLOON1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
|
||||
AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_FLOON1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
|
||||
|
||||
player->SEND_GOSSIP_MENU(9442, creature->GetGUID());
|
||||
SendGossipMenuFor(player, 9442, creature->GetGUID());
|
||||
return true;
|
||||
}
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return new npc_floonAI(creature);
|
||||
}
|
||||
@@ -568,7 +568,7 @@ public:
|
||||
uint32 Frostbolt_Timer;
|
||||
uint32 FrostNova_Timer;
|
||||
|
||||
void Reset()
|
||||
void Reset() override
|
||||
{
|
||||
Silence_Timer = 2000;
|
||||
Frostbolt_Timer = 4000;
|
||||
@@ -577,9 +577,9 @@ public:
|
||||
me->setFaction(m_uiNormFaction);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) { }
|
||||
void EnterCombat(Unit* /*who*/) override { }
|
||||
|
||||
void UpdateAI(uint32 diff)
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
@@ -763,9 +763,9 @@ class go_skull_pile : public GameObjectScript
|
||||
public:
|
||||
go_skull_pile() : GameObjectScript("go_skull_pile") { }
|
||||
|
||||
bool OnGossipSelect(Player* player, GameObject* go, uint32 sender, uint32 action)
|
||||
bool OnGossipSelect(Player* player, GameObject* go, uint32 sender, uint32 action) override
|
||||
{
|
||||
player->PlayerTalkClass->ClearMenus();
|
||||
ClearGossipMenuFor(player);
|
||||
switch (sender)
|
||||
{
|
||||
case GOSSIP_SENDER_MAIN: SendActionMenu(player, go, action); break;
|
||||
@@ -773,17 +773,17 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
bool OnGossipHello(Player* player, GameObject* go)
|
||||
bool OnGossipHello(Player* player, GameObject* go) override
|
||||
{
|
||||
if ((player->GetQuestStatus(11885) == QUEST_STATUS_INCOMPLETE) || player->GetQuestRewardStatus(11885))
|
||||
{
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_S_DARKSCREECHER_AKKARAI, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_S_KARROG, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_S_GEZZARAK_THE_HUNTRESS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_S_VAKKIZ_THE_WINDRAGER, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4);
|
||||
AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_S_DARKSCREECHER_AKKARAI, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
|
||||
AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_S_KARROG, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
|
||||
AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_S_GEZZARAK_THE_HUNTRESS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
|
||||
AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_S_VAKKIZ_THE_WINDRAGER, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4);
|
||||
}
|
||||
|
||||
player->SEND_GOSSIP_MENU(go->GetGOInfo()->questgiver.gossipID, go->GetGUID());
|
||||
SendGossipMenuFor(player, go->GetGOInfo()->questgiver.gossipID, go->GetGUID());
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -821,24 +821,24 @@ class npc_slim : public CreatureScript
|
||||
public:
|
||||
npc_slim() : CreatureScript("npc_slim") { }
|
||||
|
||||
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_TRADE)
|
||||
player->GetSession()->SendListInventory(creature->GetGUID());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool OnGossipHello(Player* player, Creature* creature)
|
||||
bool OnGossipHello(Player* player, Creature* creature) override
|
||||
{
|
||||
if (creature->IsVendor() && player->GetReputationRank(FACTION_CONSORTIUM) >= REP_FRIENDLY)
|
||||
{
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE);
|
||||
player->SEND_GOSSIP_MENU(9896, creature->GetGUID());
|
||||
AddGossipItemFor(player, GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE);
|
||||
SendGossipMenuFor(player, 9896, creature->GetGUID());
|
||||
}
|
||||
else
|
||||
player->SEND_GOSSIP_MENU(9895, creature->GetGUID());
|
||||
SendGossipMenuFor(player, 9895, creature->GetGUID());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ class npc_natrualist_bite : public CreatureScript
|
||||
public:
|
||||
npc_natrualist_bite() : CreatureScript("npc_natrualist_bite") { }
|
||||
|
||||
bool OnGossipHello(Player* player, Creature* creature)
|
||||
bool OnGossipHello(Player* player, Creature* creature) override
|
||||
{
|
||||
uint32 menuId = creature->AI()->GetData(1) ? 7540 : 7520;
|
||||
player->PrepareGossipMenu(creature, menuId, false);
|
||||
@@ -47,10 +47,10 @@ public:
|
||||
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();
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
ClearGossipMenuFor(player);
|
||||
CloseGossipMenuFor(player);
|
||||
if (creature->AI()->GetData(1))
|
||||
{
|
||||
creature->CastSpell(player, SPELL_MARK_OF_BITE, true);
|
||||
@@ -84,7 +84,8 @@ public:
|
||||
}
|
||||
|
||||
uint8 _spoken;
|
||||
void MoveInLineOfSight(Unit* who)
|
||||
|
||||
void MoveInLineOfSight(Unit* who) override
|
||||
{
|
||||
if (!_spoken && !me->IsHostileTo(who))
|
||||
{
|
||||
@@ -93,11 +94,19 @@ public:
|
||||
}
|
||||
ScriptedAI::MoveInLineOfSight(who);
|
||||
}
|
||||
void EnterCombat(Unit*) { _spoken = 2; }
|
||||
uint32 GetData(uint32) const { return _spoken == 2; }
|
||||
|
||||
void EnterCombat(Unit*) override
|
||||
{
|
||||
_spoken = 2;
|
||||
}
|
||||
|
||||
uint32 GetData(uint32) const override
|
||||
{
|
||||
return _spoken == 2;
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return new npc_natrualist_biteAI (creature);
|
||||
}
|
||||
@@ -135,24 +144,24 @@ class npcs_ashyen_and_keleth : public CreatureScript
|
||||
public:
|
||||
npcs_ashyen_and_keleth() : CreatureScript("npcs_ashyen_and_keleth") { }
|
||||
|
||||
bool OnGossipHello(Player* player, Creature* creature)
|
||||
bool OnGossipHello(Player* player, Creature* creature) override
|
||||
{
|
||||
if (player->GetReputationRank(942) > REP_NEUTRAL)
|
||||
{
|
||||
if (creature->GetEntry() == NPC_ASHYEN)
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_BLESS_ASH, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
||||
AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_ITEM_BLESS_ASH, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
||||
|
||||
if (creature->GetEntry() == NPC_KELETH)
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_BLESS_KEL, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
||||
AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_ITEM_BLESS_KEL, 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)
|
||||
{
|
||||
creature->setPowerType(POWER_MANA);
|
||||
@@ -214,7 +223,7 @@ public:
|
||||
creature->AI()->Talk(GOSSIP_REWARD_BLESS);
|
||||
}
|
||||
}
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
CloseGossipMenuFor(player);
|
||||
player->TalkedToCreature(creature->GetEntry(), creature->GetGUID());
|
||||
}
|
||||
return true;
|
||||
@@ -249,16 +258,16 @@ public:
|
||||
uint32 m_uiNormFaction;
|
||||
uint32 LightningBolt_Timer;
|
||||
|
||||
void Reset()
|
||||
void Reset() override
|
||||
{
|
||||
LightningBolt_Timer = 2000;
|
||||
if (me->getFaction() != m_uiNormFaction)
|
||||
me->setFaction(m_uiNormFaction);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) { }
|
||||
void EnterCombat(Unit* /*who*/) override { }
|
||||
|
||||
void UpdateAI(uint32 diff)
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
@@ -273,26 +282,26 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return new npc_cooshcooshAI(creature);
|
||||
}
|
||||
|
||||
bool OnGossipHello(Player* player, Creature* creature)
|
||||
bool OnGossipHello(Player* player, Creature* creature) override
|
||||
{
|
||||
if (player->GetQuestStatus(QUEST_CRACK_SKULLS) == QUEST_STATUS_INCOMPLETE)
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_COOSH, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
|
||||
AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_COOSH, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
|
||||
|
||||
player->SEND_GOSSIP_MENU(9441, creature->GetGUID());
|
||||
SendGossipMenuFor(player, 9441, 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)
|
||||
{
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
CloseGossipMenuFor(player);
|
||||
creature->setFaction(FACTION_HOSTILE_CO);
|
||||
creature->AI()->AttackStart(player);
|
||||
}
|
||||
@@ -313,28 +322,28 @@ class npc_elder_kuruti : public CreatureScript
|
||||
public:
|
||||
npc_elder_kuruti() : CreatureScript("npc_elder_kuruti") { }
|
||||
|
||||
bool OnGossipHello(Player* player, Creature* creature)
|
||||
bool OnGossipHello(Player* player, Creature* creature) override
|
||||
{
|
||||
if (player->GetQuestStatus(9803) == QUEST_STATUS_INCOMPLETE)
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KUR1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
|
||||
AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_ITEM_KUR1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
|
||||
|
||||
player->SEND_GOSSIP_MENU(9226, creature->GetGUID());
|
||||
SendGossipMenuFor(player, 9226, 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:
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KUR2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
|
||||
player->SEND_GOSSIP_MENU(9227, creature->GetGUID());
|
||||
AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_ITEM_KUR2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
|
||||
SendGossipMenuFor(player, 9227, creature->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF + 1:
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KUR3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
|
||||
player->SEND_GOSSIP_MENU(9229, creature->GetGUID());
|
||||
AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_ITEM_KUR3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
|
||||
SendGossipMenuFor(player, 9229, creature->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF + 2:
|
||||
{
|
||||
@@ -350,7 +359,7 @@ public:
|
||||
else
|
||||
player->SendEquipError(msg, NULL, NULL, itemId);
|
||||
}
|
||||
player->SEND_GOSSIP_MENU(9231, creature->GetGUID());
|
||||
SendGossipMenuFor(player, 9231, creature->GetGUID());
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -366,19 +375,19 @@ class npc_mortog_steamhead : public CreatureScript
|
||||
public:
|
||||
npc_mortog_steamhead() : CreatureScript("npc_mortog_steamhead") { }
|
||||
|
||||
bool OnGossipHello(Player* player, Creature* creature)
|
||||
bool OnGossipHello(Player* player, Creature* creature) override
|
||||
{
|
||||
if (creature->IsVendor() && player->GetReputationRank(942) == REP_EXALTED)
|
||||
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);
|
||||
if (action == GOSSIP_ACTION_TRADE)
|
||||
player->GetSession()->SendListInventory(creature->GetGUID());
|
||||
return true;
|
||||
@@ -480,26 +489,26 @@ class npc_timothy_daniels : public CreatureScript
|
||||
public:
|
||||
npc_timothy_daniels() : CreatureScript("npc_timothy_daniels") { }
|
||||
|
||||
bool OnGossipHello(Player* player, Creature* creature)
|
||||
bool OnGossipHello(Player* player, Creature* creature) override
|
||||
{
|
||||
if (creature->IsQuestGiver())
|
||||
player->PrepareQuestMenu(creature->GetGUID());
|
||||
|
||||
if (creature->IsVendor())
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_POISONS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE);
|
||||
AddGossipItemFor(player, GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_POISONS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE);
|
||||
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TIMOTHY_DANIELS_ITEM1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
|
||||
player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID());
|
||||
AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_TIMOTHY_DANIELS_ITEM1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
|
||||
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_TIMOTHY_DANIELS1, creature->GetGUID());
|
||||
SendGossipMenuFor(player, GOSSIP_TEXTID_TIMOTHY_DANIELS1, creature->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_TRADE:
|
||||
player->GetSession()->SendListInventory(creature->GetGUID());
|
||||
|
||||
Reference in New Issue
Block a user