mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-21 09:44:45 +01:00
2
sql/updates/world/3.3.5/2018_09_25_00_world.sql
Normal file
2
sql/updates/world/3.3.5/2018_09_25_00_world.sql
Normal file
@@ -0,0 +1,2 @@
|
||||
--
|
||||
UPDATE `conditions` SET `SourceEntry`=13018, `NegativeCondition`=1 WHERE `SourceGroup` IN (9568) AND `SourceTypeOrReferenceId`=14;
|
||||
@@ -471,11 +471,8 @@ enum WyrmDefenderEnum
|
||||
{
|
||||
// Quest data
|
||||
QUEST_DEFENDING_WYRMREST_TEMPLE = 12372,
|
||||
GOSSIP_TEXTID_DEF1 = 12899,
|
||||
GOSSIP_OPTION_DEF1 = 9568,
|
||||
|
||||
// Gossip data
|
||||
GOSSIP_TEXTID_DEF2 = 12900,
|
||||
GOSSIP_OPTION_ID = 0,
|
||||
MENU_ID = 9568,
|
||||
|
||||
// Spells data
|
||||
SPELL_CHARACTER_SCRIPT = 49213,
|
||||
@@ -565,33 +562,19 @@ class npc_wyrmrest_defender : public CreatureScript
|
||||
}
|
||||
}
|
||||
|
||||
bool GossipHello(Player* player) override
|
||||
bool GossipSelect(Player* player, uint32 menuId, uint32 gossipListId) override
|
||||
{
|
||||
if (player->GetQuestStatus(QUEST_DEFENDING_WYRMREST_TEMPLE) == QUEST_STATUS_INCOMPLETE)
|
||||
{
|
||||
AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_OPTION_DEF1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
|
||||
SendGossipMenuFor(player, GOSSIP_TEXTID_DEF1, me->GetGUID());
|
||||
}
|
||||
else
|
||||
SendGossipMenuFor(player, player->GetGossipTextId(me), me->GetGUID());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool GossipSelect(Player* player, uint32 /*menuId*/, uint32 gossipListId) override
|
||||
{
|
||||
uint32 const action = player->PlayerTalkClass->GetGossipOptionAction(gossipListId);
|
||||
ClearGossipMenuFor(player);
|
||||
if (action == GOSSIP_ACTION_INFO_DEF + 1)
|
||||
{
|
||||
SendGossipMenuFor(player, GOSSIP_TEXTID_DEF2, me->GetGUID());
|
||||
if (menuId == MENU_ID && gossipListId == GOSSIP_OPTION_ID)
|
||||
// Makes player cast trigger spell for 49207 on self
|
||||
player->CastSpell(player, SPELL_CHARACTER_SCRIPT, true);
|
||||
// The gossip should not auto close
|
||||
}
|
||||
|
||||
CloseGossipMenuFor(player);
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnCharmed(bool apply) override
|
||||
{
|
||||
me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
|
||||
Reference in New Issue
Block a user