mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2025-11-29 17:38:24 +08:00
fix(Scripts/Northrend): Sniffing Out The Perpetrator horde (#23620)
This commit is contained in:
@@ -31,6 +31,7 @@
|
||||
enum qSniffingOutThePerpetrator
|
||||
{
|
||||
NPC_FROSTHOUND = 29677,
|
||||
NPC_FROSTBITE = 29903,
|
||||
SPELL_SUMMON_PURSUERS_PERIODIC = 54993,
|
||||
SPELL_SNIFFING_CREDIT = 55477,
|
||||
TALK_EMOTE_FROSTHOUND_SNIFF = 0,
|
||||
@@ -41,7 +42,7 @@ enum qSniffingOutThePerpetrator
|
||||
|
||||
struct npc_frosthound : public npc_escortAI
|
||||
{
|
||||
explicit npc_frosthound(Creature* creature) : npc_escortAI(creature), _summons(creature) {}
|
||||
explicit npc_frosthound(Creature* creature) : npc_escortAI(creature), _summons(creature), _completionWaypoint((creature->GetEntry() == NPC_FROSTBITE) ? 19 : 34) { }
|
||||
|
||||
void AttackStart(Unit* /*who*/) override {}
|
||||
void JustEngagedWith(Unit* /*who*/) override {}
|
||||
@@ -77,20 +78,15 @@ struct npc_frosthound : public npc_escortAI
|
||||
if (!player)
|
||||
return;
|
||||
|
||||
switch (waypointId)
|
||||
if (waypointId == 0)
|
||||
Talk(TALK_SEEN, player);
|
||||
else if (waypointId == _completionWaypoint)
|
||||
{
|
||||
case 0:
|
||||
Talk(TALK_SEEN, player);
|
||||
break;
|
||||
case 34:
|
||||
Talk(TALK_EMOTE_TRACKED_COMPLETE, me);
|
||||
Talk(TALK_CONFRONT, player);
|
||||
if (Unit* summoner = me->ToTempSummon()->GetSummonerUnit())
|
||||
summoner->ToPlayer()->KilledMonsterCredit(NPC_FROSTHOUND);
|
||||
_summons.DespawnAll();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
Talk(TALK_EMOTE_TRACKED_COMPLETE, me);
|
||||
Talk(TALK_CONFRONT, player);
|
||||
if (Unit* summoner = me->ToTempSummon()->GetSummonerUnit())
|
||||
summoner->ToPlayer()->KilledMonsterCredit(NPC_FROSTHOUND); // same credit for Alliance and Horde
|
||||
_summons.DespawnAll();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -112,6 +108,7 @@ struct npc_frosthound : public npc_escortAI
|
||||
|
||||
private:
|
||||
SummonList _summons;
|
||||
uint32 _completionWaypoint;
|
||||
};
|
||||
|
||||
enum eIronWatcher
|
||||
|
||||
Reference in New Issue
Block a user