40
40
SAY_FRIEND_DEFEAT = -1000979 ,
41
41
SAY_SLIM_NOTES = -1000980 ,
42
42
43
- QUEST_MISSING_DIPLO_PT11 = 1249 ,
43
+ QUEST_MISSING_DIPLOMAT11 = 1249 ,
44
44
FACTION_ENEMY = 168 , // ToDo: faction needs to be confirmed!
45
45
46
46
SPELL_STEALTH = 1785 ,
@@ -54,7 +54,7 @@ static const DialogueEntry aDiplomatDialogue[] =
54
54
{
55
55
{SAY_SLIM_DEFEAT, NPC_TAPOKE_SLIM_JAHN, 4000 },
56
56
{SAY_SLIM_NOTES, NPC_TAPOKE_SLIM_JAHN, 7000 },
57
- {QUEST_MISSING_DIPLO_PT11 , 0 , 0 },
57
+ {QUEST_MISSING_DIPLOMAT11 , 0 , 0 },
58
58
{0 , 0 , 0 },
59
59
};
60
60
@@ -78,6 +78,18 @@ struct npc_tapoke_slim_jahnAI : public npc_escortAI, private DialogueHelper
78
78
}
79
79
}
80
80
81
+ void JustReachedHome () override
82
+ {
83
+ // after the npc is defeated, start the dialog right after it reaches the evade point
84
+ if (m_bEventComplete)
85
+ {
86
+ if (Player* pPlayer = GetPlayerForEscort ())
87
+ m_creature->SetFacingToObject (pPlayer);
88
+
89
+ StartNextDialogueText (SAY_SLIM_DEFEAT);
90
+ }
91
+ }
92
+
81
93
void WaypointReached (uint32 uiPointId) override
82
94
{
83
95
switch (uiPointId)
@@ -137,23 +149,6 @@ struct npc_tapoke_slim_jahnAI : public npc_escortAI, private DialogueHelper
137
149
}
138
150
}
139
151
140
- void MovementInform (uint32 uiMoveType, uint32 uiPointId) override
141
- {
142
- if (uiMoveType != POINT_MOTION_TYPE || !HasEscortState (STATE_ESCORT_ESCORTING))
143
- return ;
144
-
145
- npc_escortAI::MovementInform (uiMoveType, uiPointId);
146
-
147
- // after the npc is defeated, start the dialog right after it reaches the evade point
148
- if (m_bEventComplete)
149
- {
150
- if (Player* pPlayer = GetPlayerForEscort ())
151
- m_creature->SetFacingToObject (pPlayer);
152
-
153
- StartNextDialogueText (SAY_SLIM_DEFEAT);
154
- }
155
- }
156
-
157
152
void ReceiveAIEvent (AIEventType eventType, Creature* /* pSender*/ , Unit* pInvoker, uint32 uiMiscValue) override
158
153
{
159
154
// start escort
@@ -163,11 +158,11 @@ struct npc_tapoke_slim_jahnAI : public npc_escortAI, private DialogueHelper
163
158
164
159
void JustDidDialogueStep (int32 iEntry) override
165
160
{
166
- if (iEntry == QUEST_MISSING_DIPLO_PT11 )
161
+ if (iEntry == QUEST_MISSING_DIPLOMAT11 )
167
162
{
168
163
// complete quest
169
164
if (Player* pPlayer = GetPlayerForEscort ())
170
- pPlayer->GroupEventHappens (QUEST_MISSING_DIPLO_PT11 , m_creature);
165
+ pPlayer->GroupEventHappens (QUEST_MISSING_DIPLOMAT11 , m_creature);
171
166
172
167
// despawn and respawn at inn
173
168
m_creature->ForcedDespawn (1000 );
@@ -205,7 +200,7 @@ CreatureAI* GetAI_npc_tapoke_slim_jahn(Creature* pCreature)
205
200
206
201
bool QuestAccept_npc_mikhail (Player* pPlayer, Creature* pCreature, const Quest* pQuest)
207
202
{
208
- if (pQuest->GetQuestId () == QUEST_MISSING_DIPLO_PT11 )
203
+ if (pQuest->GetQuestId () == QUEST_MISSING_DIPLOMAT11 )
209
204
{
210
205
Creature* pSlim = GetClosestCreatureWithEntry (pCreature, NPC_TAPOKE_SLIM_JAHN, 25 .0f );
211
206
if (!pSlim)
0 commit comments