TrinityCore
old_hillsbrad.cpp
Go to the documentation of this file.
1 /*
2 * This file is part of the TrinityCore Project. See AUTHORS file for Copyright information
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License as published by the
6 * Free Software Foundation; either version 2 of the License, or (at your
7 * option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12 * more details.
13 *
14 * You should have received a copy of the GNU General Public License along
15 * with this program. If not, see <http://www.gnu.org/licenses/>.
16 */
17
18/* ScriptData
19SDName: Old_Hillsbrad
20SD%Complete: 40
21SDComment: Quest support: 10283, 10284. All friendly NPC's. Thrall waypoints fairly complete, missing many details, but possible to complete escort.
22SDCategory: Caverns of Time, Old Hillsbrad Foothills
23EndScriptData */
24
25/* ContentData
26npc_erozion
27npc_thrall_old_hillsbrad
28npc_taretha
29EndContentData */
30
31#include "ScriptMgr.h"
32#include "InstanceScript.h"
33#include "ObjectAccessor.h"
34#include "old_hillsbrad.h"
35#include "Map.h"
36#include "Player.h"
37#include "ScriptedEscortAI.h"
38#include "ScriptedGossip.h"
39
41{
48 GOSSIP_OPTION_BOMB = 0 //I need a pack of Incendiary Bombs.
49};
50#define GOSSIP_HELLO_EROZION2 "[PH] Teleport please, i'm tired." //not in DB,maybe incorrect?
51
52//constexpr Position ThrallRespawnPositionAfterSkarloc(2062.934f, 229.14508f, 64.57113f, 2.338741064071655273);
53//constexpr Position ThrallRespawnPositionAfterHorseRide(2486.5637f, 624.09796f, 57.95088f, 4.136430263519287109);
54//constexpr Position ThrallRespawnPositionAfterMeetingTaretha(2660.0847f, 659.54816f, 62.020317f, 5.864306449890136718);
55
56/*######
57## npc_erozion
58######*/
59
60struct npc_erozion : public ScriptedAI
61{
62 npc_erozion(Creature* creature) : ScriptedAI(creature), instance(creature->GetInstanceScript()) { }
63
65
66 bool OnGossipSelect(Player* player, uint32 /*menuId*/, uint32 gossipListId) override
67 {
68 uint32 const action = player->PlayerTalkClass->GetGossipOptionAction(gossipListId);
69 ClearGossipMenuFor(player);
70 if (action == GOSSIP_ACTION_INFO_DEF + 1)
71 {
72 ItemPosCountVec dest;
74 if (msg == EQUIP_ERR_OK)
75 {
76 player->StoreNewItem(dest, ITEM_ENTRY_BOMBS, true);
77 }
78 SendGossipMenuFor(player, 9515, me->GetGUID());
79 }
80 if (action == GOSSIP_ACTION_INFO_DEF + 2)
81 CloseGossipMenuFor(player);
82 return true;
83 }
84
85 bool OnGossipHello(Player* player) override
86 {
88 if (me->IsQuestGiver())
89 player->PrepareQuestMenu(me->GetGUID());
90
93
96
97 SendGossipMenuFor(player, 9778, me->GetGUID());
98
99 return true;
100 }
101};
102
103/*######
104## npc_thrall_old_hillsbrad
105######*/
106
107//Thrall texts
109{
121
127
128 //Taretha texts
131
132 //Misc for Thrall
135 SPELL_SUMMON_EROZION_IMAGE = 33954, //if thrall dies during escort?
136
143
144 //Misc Creature entries
147
148 NPC_RIFLE = 17820,
149 NPC_WARDEN = 17833,
150 NPC_VETERAN = 17860,
152 NPC_SENTRY = 17815,
153
157
161
165
169 ENTRY_EPOCH = 18096,
170
172 GOSSIP_ID_SKARLOC1 = 9614, //I'm glad Taretha is alive. We now must find a way to free her...
173 GOSSIP_ID_SKARLOC2 = 9579, //What do you mean by this? Is Taretha in danger?
175 GOSSIP_ID_TARREN = 9597, //tarren mill is beyond these trees
176 GOSSIP_ID_COMPLETE = 9578, //Thank you friends, I owe my freedom to you. Where is Taretha? I hoped to see her
178 GOSSIP_ITEM_DEFAULT_OP = 0, //We are ready to get you out of here, Thrall. Let's go!
179 GOSSIP_ITEM_TARREN_MID = 7840, //We're ready, Thrall.
180 GOSSIP_ITEM_SKARLOC1_MID = 7830, //Taretha cannot see you, Thrall.
181 GOSSIP_ITEM_SKARLOC2_MID = 7829 //The situation is rather complicated, Thrall. It would be best for you to head into the mountains now, before more of Blackmoore's men show up. We'll make sure Taretha is safe.
183
184#define SPEED_WALK (0.5f)
185#define SPEED_RUN (1.0f)
186#define SPEED_MOUNT (1.6f)
187
188static constexpr uint32 PATH_ESCORT_THRALL_OLD_HILLSBRAD = 143010;
189static constexpr uint32 PATH_ESCORT_TARETHA = 151098;
190
192{
194 {
195 Initialize();
196 instance = creature->GetInstanceScript();
197 HadMount = false;
198 me->setActive(true);
199 me->SetFarVisible(true);
200 }
201
203 {
204 LowHp = false;
205 }
206
207 void InitializeAI() override
208 {
209 /* correct respawn positions after wipe cannot be used because of how waypoints are set up for this creature
210 * it would require splitting the path into 4 segments, moving it out of waypoint_path_node table and changing
211 * all waypoint ids in WaypointReached function
212 switch (instance->GetData(TYPE_THRALL_EVENT))
213 {
214 case OH_ESCORT_HORSE_RIDE:
215 me->Relocate(ThrallRespawnPositionAfterSkarloc);
216 break;
217 case OH_ESCORT_BARN_TO_TARETHA:
218 me->Relocate(ThrallRespawnPositionAfterHorseRide);
219 break;
220 case OH_ESCORT_EPOCH_HUNTER:
221 me->Relocate(ThrallRespawnPositionAfterMeetingTaretha);
222 break;
223 default:
224 break;
225 }
226
227 if (instance->GetData(TYPE_THRALL_EVENT) != OH_ESCORT_PRISON_TO_SKARLOC)
228 {
229 me->SetVirtualItem(0, THRALL_WEAPON_ITEM);
230 me->SetVirtualItem(1, THRALL_SHIELD_ITEM);
231 me->SetDisplayId(THRALL_MODEL_EQUIPPED);
232 }
233 */
234
237 }
238
240
241 bool LowHp;
243
244 void WaypointReached(uint32 waypointId, uint32 /*pathId*/) override
245 {
246 switch (waypointId)
247 {
248 case 8:
249 me->SummonCreature(18764, 2181.87f, 112.46f, 89.45f, 0.26f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5s);
250 break;
251 case 9:
255 break;
256 case 10:
258 break;
259 case 11:
260 break;
261 case 15:
262 me->SummonCreature(NPC_RIFLE, 2200.28f, 137.37f, 87.93f, 5.07f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5s);
263 me->SummonCreature(NPC_WARDEN, 2197.44f, 131.83f, 87.93f, 0.78f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5s);
264 me->SummonCreature(NPC_VETERAN, 2203.62f, 135.40f, 87.93f, 3.70f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5s);
265 me->SummonCreature(NPC_VETERAN, 2200.75f, 130.13f, 87.93f, 1.48f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5s);
266 break;
267 case 21:
268 me->SummonCreature(NPC_RIFLE, 2135.80f, 154.01f, 67.45f, 4.98f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5s);
269 me->SummonCreature(NPC_WARDEN, 2144.36f, 151.87f, 67.74f, 4.46f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5s);
270 me->SummonCreature(NPC_VETERAN, 2142.12f, 154.41f, 67.12f, 4.56f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5s);
271 me->SummonCreature(NPC_VETERAN, 2138.08f, 155.38f, 67.24f, 4.60f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5s);
272 break;
273 case 25:
274 me->SummonCreature(NPC_RIFLE, 2102.98f, 192.17f, 65.24f, 6.02f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5s);
275 me->SummonCreature(NPC_WARDEN, 2108.48f, 198.75f, 65.18f, 5.15f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5s);
276 me->SummonCreature(NPC_VETERAN, 2106.11f, 197.29f, 65.18f, 5.63f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5s);
277 me->SummonCreature(NPC_VETERAN, 2104.18f, 194.82f, 65.18f, 5.75f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5s);
278 break;
279 case 29:
282 me->SummonCreature(ENTRY_SCARLOC, 2036.48f, 271.22f, 63.43f, 5.27f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30s);
283 else
284 {
285 me->SetNpcFlag(UNIT_NPC_FLAG_GOSSIP); // wipe recovery, prevent repeatedly farming the boss
287 }
288 SetEscortPaused(true);
289 //temporary, skarloc should rather be triggered to walk up to thrall
290 break;
291 case 30:
292 break;
293 case 31:
295 HadMount = true;
296 DoMount();
297 break;
298 case 37:
299 //possibly regular patrollers? If so, remove this and let database handle them
300 me->SummonCreature(NPC_WATCHMAN, 2124.26f, 522.16f, 56.87f, 3.99f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5s);
301 me->SummonCreature(NPC_WATCHMAN, 2121.69f, 525.37f, 57.11f, 4.01f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5s);
302 me->SummonCreature(NPC_SENTRY, 2124.65f, 524.55f, 56.63f, 3.98f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5s);
303 break;
304 case 59:
305 me->SummonCreature(SKARLOC_MOUNT, 2488.64f, 625.77f, 58.26f, 4.71f, TEMPSUMMON_TIMED_DESPAWN, 10s);
306 DoUnmount();
307 HadMount = false;
308 break;
309 case 60:
311 //make horsie run off
312 SetEscortPaused(true);
314 break;
315 case 64:
316 break;
317 case 68:
318 me->SummonCreature(NPC_BARN_PROTECTOR, 2500.22f, 692.60f, 55.50f, 2.84f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5s);
319 me->SummonCreature(NPC_BARN_LOOKOUT, 2500.13f, 696.55f, 55.51f, 3.38f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5s);
320 me->SummonCreature(NPC_BARN_GUARDSMAN, 2500.55f, 693.64f, 55.50f, 3.14f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5s);
321 me->SummonCreature(NPC_BARN_GUARDSMAN, 2500.94f, 695.81f, 55.50f, 3.14f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5s);
322 break;
323 case 71:
324 break;
325 case 81:
326 break;
327 case 83:
328 me->SummonCreature(NPC_CHURCH_PROTECTOR, 2627.33f, 646.82f, 56.03f, 4.28f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 5s);
329 me->SummonCreature(NPC_CHURCH_LOOKOUT, 2624.14f, 648.03f, 56.03f, 4.50f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 5s);
330 me->SummonCreature(NPC_CHURCH_GUARDSMAN, 2625.32f, 649.60f, 56.03f, 4.38f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 5s);
331 me->SummonCreature(NPC_CHURCH_GUARDSMAN, 2627.22f, 649.00f, 56.03f, 4.34f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 5s);
332 break;
333 case 84:
335 break;
336 case 93:
337 me->SummonCreature(NPC_INN_PROTECTOR, 2652.71f, 660.31f, 61.93f, 1.67f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5s);
338 me->SummonCreature(NPC_INN_LOOKOUT, 2648.96f, 662.59f, 61.93f, 0.79f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5s);
339 me->SummonCreature(NPC_INN_GUARDSMAN, 2657.36f, 662.34f, 61.93f, 2.68f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5s);
340 me->SummonCreature(NPC_INN_GUARDSMAN, 2656.39f, 659.77f, 61.93f, 2.61f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5s);
341 break;
342 case 94:
345 break;
346 case 95:
349 SetEscortPaused(true);
350 break;
351 case 96:
353 break;
354 case 97:
356 break;
357 case 98:
358 //trigger epoch Yell("Thrall! Come outside and face your fate! ....")
359 //from here, thrall should not never be allowed to move to point 106 which he currently does.
360 break;
361 case 106:
362 {
363 //trigger taretha to run down outside
365 {
366 if (Player* player = GetPlayerForEscort())
367 {
368 if (EscortAI* ai = CAST_AI(EscortAI, Taretha->AI()))
369 {
370 ai->LoadPath(PATH_ESCORT_TARETHA);
371 ai->Start(false, player->GetGUID());
372 }
373 }
374 }
375
376 //kill credit Creature for quest
377 Map::PlayerList const& players = me->GetMap()->GetPlayers();
378 for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
379 {
380 if (Player* player = itr->GetSource())
381 player->KilledMonsterCredit(20156);
382 }
383
384 //alot will happen here, thrall and taretha talk, erozion appear at spot to explain
385 me->SummonCreature(EROZION_ENTRY, 2646.47f, 680.416f, 55.38f, 4.16f, TEMPSUMMON_TIMED_DESPAWN, 2min);
386 }
387 break;
388 case 108:
389 //last waypoint, just set Thrall invisible, respawn is turned off
390 me->SetVisible(false);
391 break;
392 }
393 }
394
395 void Reset() override
396 {
397 Initialize();
398
399 if (HadMount)
400 DoMount();
401
403 {
404 DoUnmount();
405 HadMount = false;
406 me->SetVirtualItem(0, 0);
407 me->SetVirtualItem(1, 0);
409 }
411 {
413 }
414 }
415 void StartWP()
416 {
418 SetEscortPaused(false);
419 }
420 void DoMount()
421 {
424 }
426 {
427 me->Dismount();
429 }
430 void JustEngagedWith(Unit* /*who*/) override
431 {
433 if (me->IsMounted())
434 DoUnmount();
435 }
436
437 void JustReachedHome() override
438 {
440 if (HadMount)
441 DoMount();
442 }
443
444 void JustSummoned(Creature* summoned) override
445 {
446 switch (summoned->GetEntry())
447 {
451 case NPC_BARN_LOOKOUT:
452 case SKARLOC_MOUNT:
453 case EROZION_ENTRY:
454 break;
455 default:
456 summoned->AI()->AttackStart(me);
457 break;
458 }
459 }
460
461 void KilledUnit(Unit* /*victim*/) override
462 {
464 }
465 void JustDied(Unit* killer) override
466 {
468
469 // Don't do a yell if he kills self (if player goes too far or at the end).
470 if (killer == me)
471 return;
472
474 }
475
476 void UpdateAI(uint32 diff) override
477 {
478 EscortAI::UpdateAI(diff);
479
480 if (!UpdateVictim())
481 return;
482
484 if (!LowHp && HealthBelowPct(20))
485 {
487 LowHp = true;
488 }
489 }
490
491 bool OnGossipSelect(Player* player, uint32 /*menuId*/, uint32 gossipListId) override
492 {
493 uint32 const action = player->PlayerTalkClass->GetGossipOptionAction(gossipListId);
494 ClearGossipMenuFor(player);
495 switch (action)
496 {
497 case GOSSIP_ACTION_INFO_DEF + 1:
498 CloseGossipMenuFor(player);
499
501
503 Start(true, player->GetGUID());
504
505 SetMaxPlayerDistance(100.0f);//not really needed, because it will not despawn if player is too far
506 SetDespawnAtEnd(false);
507 SetDespawnAtFar(false);
508 break;
509
510 case GOSSIP_ACTION_INFO_DEF + 2:
514 break;
515
516 case GOSSIP_ACTION_INFO_DEF + 20:
518 me->SummonCreature(SKARLOC_MOUNT, 2038.81f, 270.26f, 63.20f, 5.41f, TEMPSUMMON_TIMED_DESPAWN, 12s);
519
521
522 StartWP();
523 break;
524
525 case GOSSIP_ACTION_INFO_DEF + 3:
526 CloseGossipMenuFor(player);
527 StartWP();
528 break;
529 }
530 return true;
531 }
532
533 bool OnGossipHello(Player* player) override
534 {
535 if (me->IsQuestGiver())
536 {
537 player->PrepareQuestMenu(me->GetGUID());
538 player->SendPreparedQuest(me);
539 }
540
542 {
546 }
547
549 {
553 }
554
556 {
560 }
561 return true;
562 }
563};
564
565/*######
566## npc_taretha
567######*/
569{
570 GOSSIP_ID_EPOCH1 = 9610, //Thank you for helping Thrall escape, friends. Now I only hope
571 GOSSIP_ID_EPOCH2 = 9613, //Yes, friends. This man was no wizard of
573 GOSSIP_ITEM_EPOCH1_OID = 0, //Strange wizard?
575 GOSSIP_ITEM_EPOCH2_OID = 0 //We'll get you out, Taretha. Don't worry. I doubt the wizard would wander too far away.
577
578struct npc_taretha : public EscortAI
579{
580 npc_taretha(Creature* creature) : EscortAI(creature)
581 {
582 instance = creature->GetInstanceScript();
583 }
584
586
587 void WaypointReached(uint32 waypointId, uint32 /*pathId*/) override
588 {
589 switch (waypointId)
590 {
591 case 6:
593 break;
594 case 7:
596 break;
597 }
598 }
599
600 void Reset() override { }
601 void JustEngagedWith(Unit* /*who*/) override { }
602
603 bool OnGossipSelect(Player* player, uint32 /*menuId*/, uint32 gossipListId) override
604 {
605 uint32 const action = player->PlayerTalkClass->GetGossipOptionAction(gossipListId);
606 ClearGossipMenuFor(player);
607
608 if (action == GOSSIP_ACTION_INFO_DEF + 1)
609 {
613 }
614 if (action == GOSSIP_ACTION_INFO_DEF + 2)
615 {
616 CloseGossipMenuFor(player);
617
619 me->SummonCreature(ENTRY_EPOCH, 2639.13f, 698.55f, 65.43f, 4.59f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 2min);
620
622 ENSURE_AI(npc_thrall_old_hillsbrad, thrall->AI())->StartWP();
623
625 }
626 return true;
627 }
628
629 bool OnGossipHello(Player* player) override
630 {
632 {
636 }
637 return true;
638 }
639};
640
641/*######
642## AddSC
643######*/
644
646{
650}
uint8_t uint8
Definition: Define.h:144
uint32_t uint32
Definition: Define.h:142
@ DONE
@ EQUIP_ERR_OK
Definition: ItemDefines.h:26
@ TEMPSUMMON_TIMED_DESPAWN
Definition: ObjectDefines.h:65
@ TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT
Definition: ObjectDefines.h:66
@ TEMPSUMMON_TIMED_OR_DEAD_DESPAWN
Definition: ObjectDefines.h:63
std::vector< ItemPosCount > ItemPosCountVec
Definition: Player.h:750
@ QUEST_STATUS_COMPLETE
Definition: QuestDef.h:143
@ STATE_ESCORT_ESCORTING
void AddGossipItemFor(Player *player, GossipOptionNpc optionNpc, std::string text, uint32 sender, uint32 action)
void SendGossipMenuFor(Player *player, uint32 npcTextID, ObjectGuid const &guid)
void ClearGossipMenuFor(Player *player)
void InitGossipMenuFor(Player *player, uint32 menuId)
void CloseGossipMenuFor(Player *player)
@ GOSSIP_SENDER_MAIN
@ GOSSIP_ACTION_INFO_DEF
@ EMOTE_ONESHOT_EXCLAMATION
@ EMOTE_ONESHOT_CHEER
#define CAST_AI(a, b)
Definition: UnitAI.h:28
#define ENSURE_AI(a, b)
Definition: UnitAI.h:29
@ MOVE_RUN
Definition: UnitDefines.h:118
@ UNIT_NPC_FLAG_GOSSIP
Definition: UnitDefines.h:297
@ NULL_BAG
Definition: Unit.h:62
@ NULL_SLOT
Definition: Unit.h:63
virtual void JustReachedHome()
Definition: CreatureAI.h:159
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
Definition: CreatureAI.cpp:56
bool UpdateVictim()
Definition: CreatureAI.cpp:245
void AttackStart(Unit *victim) override
== Triggered Actions Requested ==================
Definition: CreatureAI.cpp:328
Creature *const me
Definition: CreatureAI.h:61
void SetRespawnCompatibilityMode(bool mode=true)
Definition: Creature.h:407
void SetDisplayId(uint32 displayId, bool setNative=false) override
Definition: Creature.cpp:3402
CreatureAI * AI() const
Definition: Creature.h:214
virtual ObjectGuid GetGuidData(uint32 type) const override
EncounterState GetBossState(uint32 id) const
iterator end()
Definition: MapRefManager.h:35
iterator begin()
Definition: MapRefManager.h:34
PlayerList const & GetPlayers() const
Definition: Map.h:367
bool IsEmpty() const
Definition: ObjectGuid.h:319
uint32 GetEntry() const
Definition: Object.h:161
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:159
Item * StoreNewItem(ItemPosCountVec const &pos, uint32 itemId, bool update, ItemRandomBonusListId randomBonusListId=0, GuidSet const &allowedLooters=GuidSet(), ItemContext context=ItemContext::NONE, std::vector< int32 > const *bonusListIDs=nullptr, bool addToCollection=true)
Definition: Player.cpp:11537
bool HasItemCount(uint32 item, uint32 count=1, bool inBankAlso=false) const
Definition: Player.cpp:9888
void PrepareQuestMenu(ObjectGuid guid)
Definition: Player.cpp:14474
QuestStatus GetQuestStatus(uint32 quest_id) const
Definition: Player.cpp:16050
void SendPreparedQuest(WorldObject *source)
Definition: Player.cpp:14534
InventoryResult CanStoreNewItem(uint8 bag, uint8 slot, ItemPosCountVec &dest, uint32 item, uint32 count, uint32 *no_space_count=nullptr) const
Definition: Player.cpp:10032
std::unique_ptr< PlayerMenu > PlayerTalkClass
Definition: Player.h:2380
Definition: Unit.h:627
void SetVisible(bool x)
Definition: Unit.cpp:8351
void SetVirtualItem(uint32 slot, uint32 itemId, uint16 appearanceModId=0, uint16 itemVisual=0)
Definition: Unit.cpp:13604
void Dismount()
Definition: Unit.cpp:7920
void RemoveNpcFlag(NPCFlags flags)
Definition: Unit.h:983
bool IsQuestGiver() const
Definition: Unit.h:994
void Mount(uint32 mount, uint32 vehicleId=0, uint32 creatureEntry=0)
Definition: Unit.cpp:7887
void SetNpcFlag(NPCFlags flags)
Definition: Unit.h:982
bool IsMounted() const
Definition: Unit.h:898
void SetSpeedRate(UnitMoveType mtype, float rate)
Definition: Unit.cpp:8525
void HandleEmoteCommand(Emote emoteId, Player *target=nullptr, Trinity::IteratorPair< int32 const * > spellVisualKitIds={}, int32 sequenceVariation=0)
Definition: Unit.cpp:1598
Map * GetMap() const
Definition: Object.h:624
InstanceScript * GetInstanceScript() const
Definition: Object.cpp:1042
TempSummon * SummonCreature(uint32 entry, Position const &pos, TempSummonType despawnType=TEMPSUMMON_MANUAL_DESPAWN, Milliseconds despawnTime=0s, uint32 vehId=0, uint32 spellId=0, ObjectGuid privateObjectOwner=ObjectGuid::Empty)
Definition: Object.cpp:2025
void setActive(bool isActiveObject)
Definition: Object.cpp:922
void SetFarVisible(bool on)
Definition: Object.cpp:973
virtual uint32 GetData(uint32) const
Definition: ZoneScript.h:91
virtual void SetData(uint32, uint32)
Definition: ZoneScript.h:92
@ DATA_THRALL
Definition: hyjal.h:37
TC_GAME_API Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
#define GOSSIP_HELLO_EROZION2
static constexpr uint32 PATH_ESCORT_THRALL_OLD_HILLSBRAD
static constexpr uint32 PATH_ESCORT_TARETHA
void AddSC_old_hillsbrad()
Taretha
@ GOSSIP_ITEM_EPOCH2_OID
@ GOSSIP_ITEM_EPOCH2_MID
@ GOSSIP_ITEM_EPOCH1_MID
@ GOSSIP_ID_EPOCH1
@ GOSSIP_ITEM_EPOCH1_OID
@ GOSSIP_ID_EPOCH2
ThrallOldHillsbrad
@ GOSSIP_ITEM_SKARLOC2_MID
@ GOSSIP_ITEM_SKARLOC1_MID
@ SAY_TH_RANDOM_DIE
@ NPC_WARDEN
@ SPELL_STRIKE
@ SAY_TH_SKARLOC_MEET
@ THRALL_MODEL_UNEQUIPPED
@ NPC_WATCHMAN
@ NPC_BARN_PROTECTOR
@ SAY_TH_EPOCH_WONDER
@ NPC_BARN_GUARDSMAN
@ GOSSIP_ID_COMPLETE
@ ENTRY_ARMORER
@ NPC_INN_GUARDSMAN
@ NPC_CHURCH_LOOKOUT
@ SAY_TH_SKARLOC_TAUNT
@ SAY_TH_RANDOM_LOW_HP
@ ENTRY_EPOCH
@ SAY_TA_ESCAPED
@ SAY_TH_MOUNTS_UP
@ NPC_RIFLE
@ GOSSIP_ITEM_TARREN_MID
@ SAY_TH_RANDOM_AGGRO
@ SAY_TH_RANDOM_KILL
@ EROZION_ENTRY
@ SAY_TH_LEAVE_COMBAT
@ GOSSIP_ID_TARREN
@ SAY_TH_EVENT_COMPLETE
@ GOSSIP_ID_SKARLOC1
@ GOSSIP_ITEM_WALKING_MID
@ SAY_TH_EPOCH_KILL_TARETHA
@ NPC_INN_PROTECTOR
@ SKARLOC_MOUNT
@ SAY_TH_START_EVENT_PART2
@ NPC_CHURCH_GUARDSMAN
@ SPELL_SUMMON_EROZION_IMAGE
@ GOSSIP_ID_START
@ GOSSIP_ID_SKARLOC3
@ NPC_VETERAN
@ THRALL_MODEL_EQUIPPED
@ NPC_CHURCH_PROTECTOR
@ ENTRY_SCARLOC
@ THRALL_WEAPON_ITEM
@ NPC_SENTRY
@ SAY_TH_CHURCH_END
@ GOSSIP_ITEM_DEFAULT_OP
@ SKARLOC_MOUNT_MODEL
@ NPC_INN_LOOKOUT
@ THRALL_SHIELD_INFO
@ SPELL_SHIELD_BLOCK
@ THRALL_SHIELD_ITEM
@ SAY_TH_START_EVENT_PART1
@ THRALL_WEAPON_INFO
@ SAY_TH_MEET_TARETHA
@ SAY_TH_ARMORY
@ GOSSIP_ID_SKARLOC2
@ NPC_BARN_LOOKOUT
@ SAY_TA_FREE
#define SPEED_MOUNT
#define SPEED_RUN
Erozion
@ QUEST_ENTRY_HILLSBRAD
@ ITEM_ENTRY_BOMBS
@ GOSSIP_MENU_EROZION
@ QUEST_ENTRY_DIVERSION
@ QUEST_ENTRY_ESCAPE
@ QUEST_ENTRY_RETURN
@ GOSSIP_OPTION_BOMB
@ OH_ESCORT_PRISON_TO_SKARLOC
Definition: old_hillsbrad.h:48
@ OH_ESCORT_BARN_TO_TARETHA
Definition: old_hillsbrad.h:50
@ OH_ESCORT_HORSE_RIDE
Definition: old_hillsbrad.h:49
@ OH_ESCORT_DEATH_EVENT
Definition: old_hillsbrad.h:54
@ OH_ESCORT_EPOCH_HUNTER
Definition: old_hillsbrad.h:51
#define RegisterOldHillsbradCreatureAI(ai_name)
Definition: old_hillsbrad.h:63
@ DATA_CAPTAIN_SKARLOC
Definition: old_hillsbrad.h:31
@ DATA_EPOCH_HUNTER
Definition: old_hillsbrad.h:32
@ TYPE_THRALL_EVENT
Definition: old_hillsbrad.h:35
@ DATA_TARETHA
Definition: old_hillsbrad.h:38
@ DATA_LIEUTENANT_DRAKE
Definition: old_hillsbrad.h:30
@ TYPE_BARREL_DIVERSION
Definition: old_hillsbrad.h:34
void InitializeAI() override
void SetMaxPlayerDistance(float newMax)
void Start(bool isActiveAttacker=true, ObjectGuid playerGUID=ObjectGuid::Empty, Quest const *quest=nullptr, bool instantRespawn=false, bool canLoopPath=false)
bool HasEscortState(uint32 escortState)
void SetDespawnAtFar(bool despawn)
void SetDespawnAtEnd(bool despawn)
void LoadPath(uint32 pathId)
Player * GetPlayerForEscort()
void SetEscortPaused(bool on)
void UpdateAI(uint32 diff) override
bool HealthBelowPct(uint32 pct) const
InstanceScript * instance
bool OnGossipHello(Player *player) override
npc_erozion(Creature *creature)
bool OnGossipSelect(Player *player, uint32, uint32 gossipListId) override
npc_taretha(Creature *creature)
void JustEngagedWith(Unit *) override
bool OnGossipSelect(Player *player, uint32, uint32 gossipListId) override
void Reset() override
bool OnGossipHello(Player *player) override
InstanceScript * instance
void WaypointReached(uint32 waypointId, uint32) override
void JustDied(Unit *killer) override
npc_thrall_old_hillsbrad(Creature *creature)
void WaypointReached(uint32 waypointId, uint32) override
void JustReachedHome() override
void JustSummoned(Creature *summoned) override
void UpdateAI(uint32 diff) override
void JustEngagedWith(Unit *) override
InstanceScript * instance
bool OnGossipHello(Player *player) override
void KilledUnit(Unit *) override
bool OnGossipSelect(Player *player, uint32, uint32 gossipListId) override
void InitializeAI() override