diff options
author | Killyana <morphone1@gmail.com> | 2020-01-03 15:55:26 +0100 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2021-12-19 19:49:52 +0100 |
commit | 3f3abe9ad0dac56637b1c135c6eafe4054d55c47 (patch) | |
tree | e44018cf2d84ebecaf8912d7202a59b7f8a77567 /src | |
parent | e67e52fe2ff7d34f3df970047996d7e827e1c9cc (diff) |
Creature/Script: Add text target for npc_shadowfang_prisoner
(cherry picked from commit 10ba39e62644c0d071013d50775790307de807c2)
Diffstat (limited to 'src')
-rw-r--r-- | src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.cpp | 63 |
1 files changed, 33 insertions, 30 deletions
diff --git a/src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.cpp b/src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.cpp index 20e8d225e81..d4b46df4913 100644 --- a/src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.cpp +++ b/src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.cpp @@ -77,36 +77,39 @@ public: void WaypointReached(uint32 waypointId, uint32 /*pathId*/) override { - switch (waypointId) + if (Player* player = GetPlayerForEscort()) { - case 0: - if (me->GetEntry() == NPC_ASH) - Talk(SAY_FREE_AS); - else - Talk(SAY_FREE_AD); - break; - case 10: - if (me->GetEntry() == NPC_ASH) - Talk(SAY_OPEN_DOOR_AS); - else - Talk(SAY_OPEN_DOOR_AD); - break; - case 11: - if (me->GetEntry() == NPC_ASH) - DoCast(me, SPELL_UNLOCK); - break; - case 12: - if (me->GetEntry() == NPC_ASH) - Talk(SAY_POST_DOOR_AS); - else - Talk(SAY_POST1_DOOR_AD); - - instance->SetData(TYPE_FREE_NPC, DONE); - break; - case 13: - if (me->GetEntry() != NPC_ASH) - Talk(SAY_POST2_DOOR_AD); - break; + switch (waypointId) + { + case 0: + if (me->GetEntry() == NPC_ASH) + Talk(SAY_FREE_AS, player); + else + Talk(SAY_FREE_AD, player); + break; + case 10: + if (me->GetEntry() == NPC_ASH) + Talk(SAY_OPEN_DOOR_AS, player); + else + Talk(SAY_OPEN_DOOR_AD, player); + break; + case 11: + if (me->GetEntry() == NPC_ASH) + DoCast(me, SPELL_UNLOCK); + break; + case 12: + if (me->GetEntry() == NPC_ASH) + Talk(SAY_POST_DOOR_AS, player); + else + Talk(SAY_POST1_DOOR_AD, player); + + instance->SetData(TYPE_FREE_NPC, DONE); + break; + case 13: + if (me->GetEntry() != NPC_ASH) + Talk(SAY_POST2_DOOR_AD, player); + break; + } } } @@ -120,7 +123,7 @@ public: if (action == GOSSIP_ACTION_INFO_DEF + 1) { CloseGossipMenuFor(player); - Start(false, false); + Start(false, false, player->GetGUID()); } return true; } |