Skip to content

Commit

Permalink
Add missing Hallows End texts to GossipNPCPeriodicTriggerTalk
Browse files Browse the repository at this point in the history
  • Loading branch information
killerwife committed May 26, 2022
1 parent 41939de commit 0d801e7
Showing 1 changed file with 34 additions and 1 deletion.
35 changes: 34 additions & 1 deletion src/game/AI/ScriptDevAI/scripts/world/npcs_special.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2560,6 +2560,9 @@ const std::vector<uint32> winterTextsHorde = { 16464, 24324, 24325 };
const std::vector<uint32> brewfestTextsAlliance = { 23629, 23630 };
const std::vector<uint32> brewfestTextsHorde = { 23627, 23628 };

const std::vector<uint32> hallowsEndTextsAlliance = { 24346, 24348, 24338, 24339, 23287, 23293, 24347, 23357 };
const std::vector<uint32> hallowsEndTextsHorde = { 23295, 24331, 23298, 24329, 24336, 23351, 24337, 24330 };

uint32 GetRandomText(const std::vector<uint32> texts)
{
return texts[urand(0, texts.size() - 1)];
Expand Down Expand Up @@ -2596,7 +2599,37 @@ struct GossipNPCPeriodicTriggerTalk : public SpellScript

if (events == GOSSIP_EVENT_HALLOWS_END)
{

std::vector<uint32> texts;
switch (spell->GetCaster()->GetEntry())
{
default:
case NPC_HUMAN_COMMONER: // 23358 human only
case NPC_DWARF_COMMONER: // 23359 prolly dwarf only
case NPC_GNOME_COMMONER: // 23361 gnome only
case NPC_NIGHT_ELF_COMMONER: // 23362
case NPC_DRAENEI_COMMONER: texts = hallowsEndTextsAlliance; break; // 23362
case NPC_BLOOD_ELF_COMMONER: // 23356
case NPC_ORC_COMMONER: // 23352
case NPC_TAUREN_COMMONER: // 23355
case NPC_TROLL_COMMONER: // 23354
case NPC_FORSAKEN_COMMONER: // 23353
case NPC_GOBLIN_COMMONER: texts = hallowsEndTextsHorde; break;
}
switch (spell->GetCaster()->GetEntry())
{
default:
case NPC_HUMAN_COMMONER: texts.push_back(23358); break;
case NPC_DWARF_COMMONER: texts.push_back(23359); break;
case NPC_GNOME_COMMONER: texts.push_back(23361); break;
case NPC_NIGHT_ELF_COMMONER: texts.push_back(23362); break;
case NPC_DRAENEI_COMMONER: texts.push_back(23362); break;
case NPC_BLOOD_ELF_COMMONER: texts.push_back(23356); break;
case NPC_ORC_COMMONER: texts.push_back(23352); break;
case NPC_TAUREN_COMMONER: texts.push_back(23355); break;
case NPC_TROLL_COMMONER: texts.push_back(23354); break;
case NPC_FORSAKEN_COMMONER: texts.push_back(23353); break;
}
textId = GetRandomText(texts);
}

if (events == GOSSIP_EVENT_LUNAR_FESTIVAL)
Expand Down

0 comments on commit 0d801e7

Please sign in to comment.