mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Scripts/Borean Tundra: link gossip content for NPC Iruk from DB (#23118)
- remove hardcoded text (deprecated method)
- add already existing DB gossip content to enum
- correct spell enum from spell_creature_ to spell_create_
- replace case switch with if statement (only one boolean case)
Extra script file update:
- remove SD comment line 22 (outdated info, replaced by SAI)
(cherry picked from commit 7cb31aa482)
This commit is contained in:
@@ -18,7 +18,6 @@
|
||||
/* ScriptData
|
||||
SDName: Borean_Tundra
|
||||
SD%Complete: 100
|
||||
SDComment: Quest support: 11708. Taxi vendors.
|
||||
SDCategory: Borean Tundra
|
||||
EndScriptData */
|
||||
|
||||
@@ -301,13 +300,15 @@ public:
|
||||
## npc_iruk
|
||||
######*/
|
||||
|
||||
#define GOSSIP_ITEM_I "<Search corpse for Issliruk's Totem.>"
|
||||
|
||||
enum Iruk
|
||||
{
|
||||
QUEST_SPIRITS_WATCH_OVER_US = 11961,
|
||||
SPELL_CREATURE_TOTEM_OF_ISSLIRUK = 46816,
|
||||
GOSSIP_TEXT_I = 12585
|
||||
GOSSIP_MENU_ID_NPC_IRUK = 9280,
|
||||
GOSSIP_OPTION_SEARCH_CORPSE = 0,
|
||||
NPC_TEXT_THIS_YOUNG_TUSKARR = 12585,
|
||||
|
||||
QUEST_SPIRITS_WATCH_OVER_US = 11961,
|
||||
|
||||
SPELL_CREATE_TOTEM_OF_ISSLIRUK = 46816
|
||||
};
|
||||
|
||||
class npc_iruk : public CreatureScript
|
||||
@@ -322,9 +323,9 @@ public:
|
||||
bool GossipHello(Player* player) override
|
||||
{
|
||||
if (player->GetQuestStatus(QUEST_SPIRITS_WATCH_OVER_US) == QUEST_STATUS_INCOMPLETE)
|
||||
AddGossipItemFor(player, GossipOptionIcon::None, GOSSIP_ITEM_I, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
|
||||
AddGossipItemFor(player, GOSSIP_MENU_ID_NPC_IRUK, GOSSIP_OPTION_SEARCH_CORPSE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
|
||||
|
||||
player->PlayerTalkClass->SendGossipMenu(GOSSIP_TEXT_I, me->GetGUID());
|
||||
SendGossipMenuFor(player, NPC_TEXT_THIS_YOUNG_TUSKARR, me->GetGUID());
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -332,13 +333,11 @@ public:
|
||||
{
|
||||
uint32 const action = player->PlayerTalkClass->GetGossipOptionAction(gossipListId);
|
||||
ClearGossipMenuFor(player);
|
||||
switch (action)
|
||||
{
|
||||
case GOSSIP_ACTION_INFO_DEF + 1:
|
||||
player->CastSpell(player, SPELL_CREATURE_TOTEM_OF_ISSLIRUK, true);
|
||||
CloseGossipMenuFor(player);
|
||||
break;
|
||||
|
||||
if (action == GOSSIP_ACTION_INFO_DEF + 1)
|
||||
{
|
||||
player->CastSpell(player, SPELL_CREATE_TOTEM_OF_ISSLIRUK, true);
|
||||
CloseGossipMenuFor(player);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user