Skip to content

Commit

Permalink
fix(Scripts/Karazhan): change to right gossip menu for Barnes (azerot…
Browse files Browse the repository at this point in the history
…hcore#17151)

* initial

* make sense of ids
  • Loading branch information
elthehablo authored Sep 3, 2023
1 parent 4886dac commit cacb32f
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,14 @@ enum Misc
OZ_GOSSIP2_OID = 0,
};

enum NPCTexts
{
BARNES_TEXT_NOT_READY = 8969,
BARNES_TEXT_IS_READY = 8970,
BARNES_TEXT_IS_READY2 = 8971,
BARNES_TEXT_WIPED = 8975
};

#define OZ_GM_GOSSIP1 "[GM] Change event to EVENT_OZ"
#define OZ_GM_GOSSIP2 "[GM] Change event to EVENT_HOOD"
#define OZ_GM_GOSSIP3 "[GM] Change event to EVENT_RAJ"
Expand Down Expand Up @@ -344,7 +352,7 @@ class npc_barnes : public CreatureScript
{
case GOSSIP_ACTION_INFO_DEF+1:
AddGossipItemFor(player, OZ_GOSSIP2_MID, OZ_GOSSIP2_OID, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
SendGossipMenuFor(player, 8971, creature->GetGUID());
SendGossipMenuFor(player, BARNES_TEXT_IS_READY2, creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+2:
CloseGossipMenuFor(player);
Expand Down Expand Up @@ -386,16 +394,16 @@ class npc_barnes : public CreatureScript
if (npc_barnesAI* pBarnesAI = CAST_AI(npc_barnes::npc_barnesAI, creature->AI()))
{
if (!pBarnesAI->RaidWiped)
SendGossipMenuFor(player, 8970, creature->GetGUID());
SendGossipMenuFor(player, BARNES_TEXT_IS_READY, creature->GetGUID());
else
SendGossipMenuFor(player, 8975, creature->GetGUID());
SendGossipMenuFor(player, BARNES_TEXT_WIPED, creature->GetGUID());

return true;
}
}
}

SendGossipMenuFor(player, 8978, creature->GetGUID());
SendGossipMenuFor(player, BARNES_TEXT_NOT_READY, creature->GetGUID());
return true;
}

Expand Down

0 comments on commit cacb32f

Please sign in to comment.