TrinityCore
Loading...
Searching...
No Matches
boss_razorscale.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#include "ScriptMgr.h"
19#include "G3DPosition.hpp"
20#include "GameObject.h"
21#include "GameObjectAI.h"
22#include "InstanceScript.h"
23#include "MotionMaster.h"
24#include "MoveSplineInit.h"
25#include "ObjectAccessor.h"
26#include "Player.h"
27#include "ScriptedCreature.h"
28#include "ScriptedGossip.h"
29#include "SpellInfo.h"
30#include "SpellScript.h"
31#include "TemporarySummon.h"
32#include "ulduar.h"
33
34enum Says
35{
36 // Expedition Commander
40
41 // Expedition Engineer
45
46 // Razorscale Controller
48
49 // Razorscale
53};
54
56{
65
66 // Razorscale Harpoon Fire State
68
69 // Harpoon
75
76 // Razorscale Spawner
84
85 // Dark Rune Guardian
87
88 // Dark Rune Sentinel
92
93 // Expedition Defender
94 SPELL_THREAT = 65146,
95
96 // Expedition Trapper
97 SPELL_SHACKLE = 62646
98};
99
100#define DEVOURING_FLAME_GROUND RAID_MODE<uint32>(64709, 64734)
101#define FLAME_BREATH RAID_MODE<uint32>(63317, 64021)
102#define CHAIN_LIGHTNING RAID_MODE<uint32>(64758, 64759)
103#define LIGHTNING_BOLT RAID_MODE<uint32>(63809, 64696)
104
122
158
177
196
223
232
234{
235 { 571.9465f, -136.0118f, 391.5171f, 2.286379f }, // 1
236 { 589.9233f, -133.6223f, 391.8968f, 3.298687f }, // 2
237 { 559.1199f, -140.5058f, 391.1803f, 4.049168f }, // 0
238 { 606.2297f, -136.7212f, 391.1803f, 5.131269f } // 3
239};
240
241constexpr Position PosHarpoon[4] =
242{
243 { 571.9012f, -136.5541f, 391.5171f, 4.921829f }, // GO_RAZOR_HARPOON_1
244 { 589.9233f, -133.6223f, 391.8968f, 4.81711f }, // GO_RAZOR_HARPOON_2
245 { 559.1199f, -140.5058f, 391.1803f, 5.061456f }, // GO_RAZOR_HARPOON_3
246 { 606.2297f, -136.7212f, 391.1803f, 4.537859f } // GO_RAZOR_HARPOON_4
247};
248
250{
251 { 624.3065f, -154.4163f, 391.6442f },
252 { 611.6274f, -170.9375f, 391.8087f },
253 { 572.1548f, -167.4471f, 391.8087f },
254 { 558.4640f, -165.0114f, 391.8087f },
255 { 603.3345f, -164.4297f, 391.8087f },
256 { 549.1727f, -159.1180f, 391.8087f }
257};
258
260{
261 { 574.9293f, -184.5150f, 391.8921f },
262 { 539.7838f, -178.5337f, 391.3053f },
263 { 627.1754f, -177.9638f, 391.5553f }
264};
265
273
274G3D::Vector3 const RazorscalePath[] =
275{
276 { 657.0227f, -361.1278f, 519.5406f },
277 { 698.9319f, -340.9654f, 520.4857f },
278 { 713.8673f, -290.2219f, 518.4573f },
279 { 711.1782f, -259.6798f, 524.6802f },
280 { 695.5101f, -234.6734f, 529.1528f },
281 { 666.9619f, -220.7599f, 531.4860f },
282 { 629.2765f, -219.7951f, 528.9301f },
283 { 597.4018f, -233.7745f, 526.6508f },
284 { 577.5307f, -275.4489f, 528.1241f },
285 { 583.1092f, -319.5873f, 527.9302f },
286 { 611.5800f, -353.1930f, 526.2653f }
287};
288
289constexpr Position RazorFlightPosition = { 585.3610f, -173.5592f, 456.8430f, 1.526665f };
290constexpr Position RazorFlightPositionPhase2 = { 619.1450f, -238.0780f, 475.1800f, 1.423917f };
291constexpr Position RazorscaleLand = { 585.4010f, -173.5430f, 408.5080f, 1.570796f };
292constexpr Position RazorscaleGroundPosition = { 585.4010f, -173.5430f, 391.6421f, 1.570796f };
293
294struct boss_razorscale : public BossAI
295{
297 {
298 Initialize();
299 }
300
302 {
303 _engineersCount = 3;
304 _defendersCount = 0;
307 _trappersCount = 0;
308 _permaGround = false;
309 _flyCount = 0;
310 me->SetDisableGravity(true);
311 }
312
313 void Reset() override
314 {
315 _Reset();
316 Initialize();
320 if (Is25ManRaid())
322 // @Developer remove this comment when someone create a way to change view distance for objects
323 // me->GetMotionMaster()->MovePoint(POINT_START_WAYPOINT, RazorscaleFirstPoint);
324 // And apply it on DB: UPDATE `creature` SET `position_x`=699.7847, `position_y`=-424.8246, `position_z`=589.2745, `orientation`=1.972222 WHERE `guid`=137611; -- Razorscale
325 SetCombatMovement(false);
326 }
327
329 {
330 std::function<void(Movement::MoveSplineInit&)> initializer = [](Movement::MoveSplineInit& init)
331 {
332 init.MovebyPath(RazorscalePath);
333 init.SetCyclic();
334 init.SetFly();
335 };
337 }
338
339 bool CanAIAttack(Unit const* target) const override
340 {
341 switch (target->GetEntry())
342 {
347 return false;
348 default:
349 return BossAI::CanAIAttack(target);
350 }
351 }
352
362
369
377
411
412 void MovementInform(uint32 type, uint32 pointId) override
413 {
414 if (type != POINT_MOTION_TYPE && type != EFFECT_MOTION_TYPE)
415 return;
416
417 switch (pointId)
418 {
421 break;
426 break;
428 me->SetDisableGravity(false);
429 if (!_permaGround)
430 {
435 commander->AI()->DoAction(ACTION_GROUND_PHASE);
437 }
438 break;
440 me->SetSpeedRate(MOVE_RUN, 3.0f);
442 break;
447 ++_flyCount;
449 break;
454 break;
455 default:
456 break;
457 }
458 }
459
460 void JustSummoned(Creature* summon) override
461 {
462 BossAI::JustSummoned(summon);
463
464 switch (summon->GetEntry())
465 {
469 break;
473 break;
477 break;
478 default:
479 break;
480 }
481 }
482
483 void SummonedCreatureDies(Creature* summon, Unit* /*killer*/) override
484 {
485 if (summon->GetEntry() == NPC_EXPEDITION_ENGINEER)
486 {
488 if (_engineersCount == 0)
490 commander->AI()->DoAction(ACTION_ENGINEER_DEAD);
491 }
492 }
493
494 void SpellHit(WorldObject* /*caster*/, SpellInfo const* spellInfo) override
495 {
496 if (spellInfo->Id == SPELL_HARPOON_TRIGGER)
497 {
499 if (_harpoonHitCount == RAID_MODE(2, 4))
501 }
502 }
503
504 uint32 GetData(uint32 type) const override
505 {
506 if (type == DATA_QUICK_SHAVE && _flyCount <= 1)
507 return 1;
508 return 0;
509 }
510
522
523 void JustDied(Unit* /*killer*/) override
524 {
525 _JustDied();
527 HandleMusic(false);
528 }
529
530 void HandleMusic(bool active)
531 {
532 int32 enabled = active ? 1 : 0;
534 }
535
537 {
538 float x = frand(540.0f, 640.0f); // Safe range is between 500 and 650
539 float y = frand(-230.0f, -195.0f); // Safe range is between -235 and -145
540 float z = 391.517f; // Ground level
542 }
543
544 void DamageTaken(Unit* /*done_by*/, uint32& damage, DamageEffectType /*damageType*/, SpellInfo const* /*spellInfo = nullptr*/) override
545 {
547 {
548 _permaGround = true;
552 }
553 }
554
555 void UpdateAI(uint32 diff) override
556 {
557 if (!UpdateVictim())
558 return;
559
560 events.Update(diff);
561
563 return;
564
565 while (uint32 eventId = events.ExecuteEvent())
566 {
567 switch (eventId)
568 {
569 case EVENT_BERSERK:
572 break;
573 case EVENT_FIREBALL:
575 DoCast(target, SPELL_FIREBALL);
577 break;
581 if (_permaGround)
582 events.Repeat(Seconds(10), Seconds(12));
583 else
584 events.Repeat(Seconds(6), Seconds(12));
585 break;
587 {
588 uint8 random = RAID_MODE<uint8>(2, urand(2, 4));
589 uint8 time = 5;
590 for (uint8 n = 0; n < random; ++n)
591 {
593 time += urand(2, 5);
594 }
595 events.Repeat(Seconds(40));
596 break;
597 }
600 break;
606 break;
610 events.Repeat(Seconds(15), Seconds(18));
611 break;
613 {
619 break;
620 }
622 {
623 me->SetDisableGravity(true);
626 Position pos = me->GetPosition();
627 pos.m_positionZ += 10.0f;
631 break;
632 }
633 case EVENT_FIREBOLT:
635 break;
636 case EVENT_FUSE_ARMOR:
637 if (Unit* victim = me->GetVictim())
638 if (!victim->HasAura(SPELL_FUSED_ARMOR))
639 DoCast(victim, SPELL_FUSE_ARMOR);
640 events.Repeat(Seconds(10), Seconds(15));
641 break;
643 SetCombatMovement(true);
644 if (Unit* victim = me->GetVictim())
645 me->GetMotionMaster()->MoveChase(victim);
646 break;
647 default:
648 break;
649 }
650
652 return;
653 }
654 }
655
656private:
664};
665
667{
668 npc_expedition_commander(Creature* creature) : ScriptedAI(creature), _instance(creature->GetInstanceScript()),
669 _is25Man(Is25ManRaid()), _building(false), _destroy(false), _stopControllers(false) { }
670
671 void Reset() override
672 {
673 _events.Reset();
676 }
677
678 bool OnGossipSelect(Player* player, uint32 /*menuId*/, uint32 gossipListId) override
679 {
680 if (gossipListId == GOSSIP_START_ENCOUNTER)
681 {
682 CloseGossipMenuFor(player);
685 if (Creature* razorscale = _instance->GetCreature(DATA_RAZORSCALE))
686 razorscale->AI()->DoAction(ACTION_START_FIGHT);
687 return true;
688 }
689 return false;
690 }
691
693 {
694 uint8 harpoonNumber = _is25Man ? 4 : 2;
695 for (uint8 i = 0; i < harpoonNumber; ++i)
696 me->SummonGameObject(GO_RAZOR_BROKEN_HARPOON, PosBrokenHarpoon[i], QuaternionData(0.0f, 0.0f, -0.8987932f, 0.4383728f), 7_days);
697 }
698
700 {
701 for (ObjectGuid harpoonGuid : _harpoons)
702 if (GameObject* harpoon = ObjectAccessor::GetGameObject(*me, harpoonGuid))
703 harpoon->RemoveFromWorld();
704
705 _harpoons.clear();
708 }
709
711 {
712 std::list<Creature*> Controllers;
714
715 for (Creature* controller : Controllers)
716 controller->InterruptNonMeleeSpells(false);
717
718 _stopControllers = false;
719 }
720
721 void BuildHarpoon(uint8 harpoonNumber)
722 {
723
724 if (_is25Man)
725 {
726 switch (harpoonNumber)
727 {
728 case HARPOON_1:
729 if (GameObject* harpoon = me->SummonGameObject(GO_RAZOR_HARPOON_3, PosHarpoon[2], QuaternionData(0.0f, 0.0f, -0.573576f, 0.8191524f), 7_days))
730 _harpoons.emplace_back(harpoon->GetGUID());
731 break;
732 case HARPOON_2:
733 if (GameObject* harpoon = me->SummonGameObject(GO_RAZOR_HARPOON_1, PosHarpoon[0], QuaternionData(0.0f, 0.0f, -0.6293201f, 0.7771462f), 7_days))
734 _harpoons.emplace_back(harpoon->GetGUID());
735 break;
736 case HARPOON_3:
737 if (GameObject* harpoon = me->SummonGameObject(GO_RAZOR_HARPOON_2, PosHarpoon[1], QuaternionData(0.0f, 0.0f, -0.6691303f, 0.743145f), 7_days))
738 _harpoons.emplace_back(harpoon->GetGUID());
739 break;
740 case HARPOON_4:
741 if (GameObject* harpoon = me->SummonGameObject(GO_RAZOR_HARPOON_4, PosHarpoon[3], QuaternionData(0.0f, 0.0f, -0.7660437f, 0.6427886f), 7_days))
742 _harpoons.emplace_back(harpoon->GetGUID());
743 break;
744 default:
745 break;
746 }
747 }
748 else
749 {
750 switch (harpoonNumber)
751 {
752 case HARPOON_1:
753 if (GameObject* harpoon = me->SummonGameObject(GO_RAZOR_HARPOON_1, PosHarpoon[harpoonNumber], QuaternionData(0.0f, 0.0f, -0.6293201f, 0.7771462f), 0s))
754 _harpoons.emplace_back(harpoon->GetGUID());
755 break;
756 case HARPOON_2:
757 if (GameObject* harpoon = me->SummonGameObject(GO_RAZOR_HARPOON_2, PosHarpoon[harpoonNumber], QuaternionData(0.0f, 0.0f, -0.6691303f, 0.743145f), 0s))
758 _harpoons.emplace_back(harpoon->GetGUID());
759 break;
760 default:
761 break;
762 }
763 }
764 }
765
766 void DoAction(int32 actionId) override
767 {
768 if (_building && actionId != ACTION_ENGINEER_DEAD)
769 return;
770
771 switch (actionId)
772 {
775 break;
778 break;
781 _events.Reset();
782 _building = false;
783 break;
785 _building = true;
787 break;
789 _building = true;
791 break;
793 _building = true;
795 break;
797 _building = true;
799 break;
801 if (_destroy)
802 return;
803 _destroy = true;
805 break;
808 return;
809 _stopControllers = true;
811 break;
812 default:
813 break;
814 }
815 }
816
817 void UpdateAI(uint32 diff) override
818 {
820 return;
821
822 _events.Update(diff);
823
824 while (uint32 eventId = _events.ExecuteEvent())
825 {
826 switch (eventId)
827 {
830 _building = false;
831 break;
834 _building = false;
835 break;
838 _building = false;
839 break;
842 _building = false;
843 break;
845 _destroy = false;
846 break;
847 default:
848 break;
849 }
850 }
851 }
852
853private:
861};
862
864{
865 npc_expedition_defender(Creature* creature) : ScriptedAI(creature), _myPositionNumber(0), _instance(creature->GetInstanceScript())
866 {
867 me->SetRegenerateHealth(false);
868 }
869
870 void Reset() override
871 {
873 }
874
875 bool CanAIAttack(Unit const* target) const override
876 {
877 if (target->GetEntry() == NPC_RAZORSCALE || target->GetEntry() == NPC_RAZORSCALE_SPAWNER)
878 return false;
879
880 return ScriptedAI::CanAIAttack(target);
881 }
882
883 void SetData(uint32 type, uint32 value) override
884 {
885 if (type == DATA_EXPEDITION_NUMBER)
886 _myPositionNumber = value;
887 }
888
889 void DoAction(int32 actionId) override
890 {
891 if (actionId == ACTION_START_FIGHT)
893 }
894
895 void MovementInform(uint32 type, uint32 pointId) override
896 {
897 if (type != POINT_MOTION_TYPE && pointId != POINT_DEFENDER_ATTACK)
898 return;
899
901 me->SetImmuneToNPC(false);
902 }
903
904private:
907};
908
910{
911 npc_expedition_trapper(Creature* creature) : ScriptedAI(creature), _myPositionNumber(0), _instance(creature->GetInstanceScript())
912 {
913 SetCombatMovement(false);
915 }
916
917 void DoAction(int32 actionId) override
918 {
919 if (!me->IsAlive())
920 return;
921
922 switch (actionId)
923 {
926 break;
929 break;
931 me->SetImmuneToNPC(false);
932 break;
933 case ACTION_STOP_CAST:
935 _scheduler.Schedule(Seconds(2), [this](TaskContext const& /*context*/)
936 {
937 me->GetMotionMaster()->MoveTargetedHome();
938 });
940 commander->AI()->DoAction(ACTION_STOP_CONTROLLERS);
941 break;
942 default:
943 break;
944 }
945 }
946
947 void SetData(uint32 type, uint32 value) override
948 {
949 if (type == DATA_EXPEDITION_NUMBER)
950 _myPositionNumber = value;
951 }
952
953 void MovementInform(uint32 type, uint32 pointId) override
954 {
955 if (type != POINT_MOTION_TYPE && pointId != POINT_SHACKLE_RAZORSCALE)
956 return;
957
959 }
960
961 void UpdateAI(uint32 diff) override
962 {
963 _scheduler.Update(diff);
964 }
965
966private:
970};
971
973{
974 npc_expedition_engineer(Creature* creature) : ScriptedAI(creature), _instance(creature->GetInstanceScript()), _myPositionNumber(0), _canUpdateAI(false) { }
975
976 void Reset() override
977 {
980 }
981
982 void DoAction(int32 actionId) override
983 {
984 if (!me->IsAlive())
985 return;
986
987 if (actionId == ACTION_START_FIGHT)
988 {
989 _canUpdateAI = true;
992 _scheduler.Schedule(Seconds(28), [this](TaskContext const& /*context*/)
993 {
995 me->SetImmuneToNPC(false);
996 });
997 }
998 else if (actionId == ACTION_FIX_HARPOONS)
999 {
1001 Talk(SAY_AGGRO);
1002 _scheduler.Schedule(Seconds(28), [this](TaskContext const& /*context*/)
1003 {
1005 });
1006 }
1007 }
1008
1009 void ChangeOrientation(float orientation)
1010 {
1011 _scheduler.Schedule(Milliseconds(1), [this, orientation](TaskContext const& /*context*/)
1012 {
1013 me->SetFacingTo(orientation);
1014 });
1015 }
1016
1044
1071
1098
1100 {
1101 switch (_myPositionNumber)
1102 {
1103 case ENGINEER_NORTH:
1104 if (Is25ManRaid())
1106 break;
1107 case ENGINEER_EAST:
1108 if (Is25ManRaid())
1110 break;
1111 case ENGINEER_WEST:
1112 if (Is25ManRaid())
1114 break;
1115 default:
1116 break;
1117 }
1118 }
1119
1121 {
1122 switch (_myPositionNumber)
1123 {
1124 case ENGINEER_NORTH:
1125 if (Is25ManRaid())
1127 break;
1128 case ENGINEER_EAST:
1129 if (Is25ManRaid())
1131 break;
1132 case ENGINEER_WEST:
1133 if (Is25ManRaid())
1135 break;
1136 default:
1137 break;
1138 }
1139 }
1140
1141 void UpdateAI(uint32 diff) override
1142 {
1143 if (!_canUpdateAI)
1144 return;
1145
1146 _scheduler.Update(diff);
1147 }
1148
1149 void SetData(uint32 type, uint32 value) override
1150 {
1151 if (type == DATA_EXPEDITION_NUMBER)
1152 _myPositionNumber = value;
1153 }
1154
1155 void MovementInform(uint32 type, uint32 pointId) override
1156 {
1157 if (type != POINT_MOTION_TYPE && type != SPLINE_CHAIN_MOTION_TYPE)
1158 return;
1159
1160 switch (pointId)
1161 {
1162 case POINT_HARPOON_1:
1163 case POINT_HARPOON_1_25:
1165 commander->AI()->DoAction(ACTION_BUILD_HARPOON_1);
1166
1167 _scheduler.
1168 Schedule(Seconds(3), [this](TaskContext const& /*context*/)
1169 {
1171 })
1172 .Schedule(Seconds(18), [this](TaskContext const& /*context*/)
1173 {
1175 });
1176 break;
1177 case POINT_HARPOON_2:
1178 case POINT_HARPOON_2_25:
1180 commander->AI()->DoAction(ACTION_BUILD_HARPOON_2);
1181 _scheduler.Schedule(Seconds(18), [this](TaskContext const& /*context*/)
1182 {
1184 });
1185 break;
1186 case POINT_HARPOON_3:
1188 commander->AI()->DoAction(ACTION_BUILD_HARPOON_3);
1189 _scheduler.Schedule(Seconds(18), [this](TaskContext const& /*context*/)
1190 {
1192 });
1193 break;
1194 case POINT_HARPOON_4:
1196 commander->AI()->DoAction(ACTION_BUILD_HARPOON_4);
1197 _scheduler.Schedule(Seconds(18), [this](TaskContext const& /*context*/)
1198 {
1200 });
1201 break;
1202 case POINT_BASE:
1203 ChangeOrientation(4.61684f);
1204 break;
1205 default:
1206 break;
1207 }
1208 }
1209
1210private:
1215};
1216
1218{
1219 npc_razorscale_spawner(Creature* creature) : ScriptedAI(creature) { }
1220
1221 void Reset() override
1222 {
1223 me->setActive(true);
1224 me->SetFarVisible(true);
1226 _scheduler.
1227 Schedule(Seconds(1), [this](TaskContext const& /*context*/)
1228 {
1230 }).Schedule(Seconds(6), [this](TaskContext const& /*context*/)
1231 {
1233 });
1234 }
1235
1236 void UpdateAI(uint32 diff) override
1237 {
1238 _scheduler.Update(diff);
1239 }
1240
1241private:
1243};
1244
1246{
1247 npc_darkrune_watcher(Creature* creature) : ScriptedAI(creature), _instance(creature->GetInstanceScript()) { }
1248
1249 void Reset() override
1250 {
1251 _events.Reset();
1254 if (Creature* razorscale = _instance->GetCreature(DATA_RAZORSCALE))
1255 razorscale->AI()->JustSummoned(me);
1256 }
1257
1258 void JustEngagedWith(Unit* /*who*/) override
1259 {
1262 }
1263
1264 void UpdateAI(uint32 diff) override
1265 {
1266 if (!UpdateVictim())
1267 return;
1268
1269 _events.Update(diff);
1270
1272 return;
1273
1274 while (uint32 eventId = _events.ExecuteEvent())
1275 {
1276 switch (eventId)
1277 {
1278 case EVENT_START_COMBAT:
1281 break;
1285 break;
1288 _events.Repeat(Seconds(9), Seconds(15));
1289 break;
1290 default:
1291 break;
1292 }
1293
1295 return;
1296 }
1297 }
1298
1299private:
1302};
1303
1305{
1306 npc_darkrune_guardian(Creature* creature) : ScriptedAI(creature), _instance(creature->GetInstanceScript()), _killedByBreath(false) { }
1307
1308 void Reset() override
1309 {
1310 _events.Reset();
1313 if (Creature* razorscale = _instance->GetCreature(DATA_RAZORSCALE))
1314 razorscale->AI()->JustSummoned(me);
1315 }
1316
1317 void JustEngagedWith(Unit* /*who*/) override
1318 {
1320 }
1321
1322 uint32 GetData(uint32 type) const override
1323 {
1324 return type == DATA_IRON_DWARF_MEDIUM_RARE ? _killedByBreath : 0;
1325 }
1326
1327 void SetData(uint32 type, uint32 value) override
1328 {
1329 if (type == DATA_IRON_DWARF_MEDIUM_RARE)
1330 _killedByBreath = value != 0;
1331 }
1332
1333 void UpdateAI(uint32 diff) override
1334 {
1335 if (!UpdateVictim())
1336 return;
1337
1338 _events.Update(diff);
1339
1341 return;
1342
1343 while (uint32 eventId = _events.ExecuteEvent())
1344 {
1345 switch (eventId)
1346 {
1347 case EVENT_START_COMBAT:
1350 break;
1351 case EVENT_STORMSTRIKE:
1353 _events.Repeat(Seconds(13), Seconds(25));
1354 break;
1355 default:
1356 break;
1357 }
1358
1360 return;
1361 }
1362 }
1363
1364private:
1368};
1369
1371{
1372 npc_darkrune_sentinel(Creature* creature) : ScriptedAI(creature), _instance(creature->GetInstanceScript()) { }
1373
1374 void Reset() override
1375 {
1376 _events.Reset();
1379 if (Creature* razorscale = _instance->GetCreature(DATA_RAZORSCALE))
1380 razorscale->AI()->JustSummoned(me);
1381 }
1382
1389
1390 void UpdateAI(uint32 diff) override
1391 {
1392 if (!UpdateVictim())
1393 return;
1394
1395 _events.Update(diff);
1396
1398 return;
1399
1400 while (uint32 eventId = _events.ExecuteEvent())
1401 {
1402 switch (eventId)
1403 {
1404 case EVENT_START_COMBAT:
1407 break;
1410 _events.Repeat(Seconds(5), Seconds(9));
1411 break;
1412 case EVENT_BATTLE_SHOUT:
1414 _events.Repeat(Seconds(25));
1415 break;
1416 case EVENT_WHIRLWIND:
1418 _events.Repeat(Seconds(10), Seconds(13));
1419 break;
1420 default:
1421 break;
1422 }
1423
1425 return;
1426 }
1427 }
1428
1429private:
1432};
1433
1435{
1436 npc_razorscale_harpoon_fire_state(Creature* creature) : ScriptedAI(creature), _instance(creature->GetInstanceScript()) { }
1437
1438 void SpellHit(WorldObject* /*caster*/, SpellInfo const* spellInfo) override
1439 {
1440 if (spellInfo->Id == SPELL_FIREBOLT)
1441 {
1444 commander->AI()->DoAction(ACTION_DESTROY_HARPOONS);
1445 }
1446 }
1447
1448private:
1450};
1451
1453{
1455
1456 void Reset() override
1457 {
1460 }
1461
1462 // Evade caused by Spell::SummonGuardian. Creature dont need evade at all, is despawned if razorscale enter in evade
1463 void EnterEvadeMode(EvadeReason /*why*/) override { }
1464};
1465
1467{
1468public:
1469 go_razorscale_harpoon() : GameObjectScript("go_razorscale_harpoon") { }
1470
1472 {
1474
1475 void Reset() override
1476 {
1477 _scheduler.Schedule(Seconds(1), [this](TaskContext const& /*context*/)
1478 {
1479 if (Creature* controller = me->FindNearestCreature(NPC_RAZORSCALE_CONTROLLER, 5.0f))
1480 controller->AI()->Talk(EMOTE_HARPOON);
1481
1482 if (GameObject* brokenHarpoon = me->FindNearestGameObject(GO_RAZOR_BROKEN_HARPOON, 5.0f))
1483 brokenHarpoon->RemoveFromWorld();
1484 });
1485 }
1486
1488 {
1489 switch (me->GetEntry())
1490 {
1491 case GO_RAZOR_HARPOON_1:
1492 return SPELL_HARPOON_SHOT_1;
1493 case GO_RAZOR_HARPOON_2:
1494 return SPELL_HARPOON_SHOT_2;
1495 case GO_RAZOR_HARPOON_3:
1496 return SPELL_HARPOON_SHOT_3;
1497 case GO_RAZOR_HARPOON_4:
1498 return SPELL_HARPOON_SHOT_4;
1499 default:
1500 return 0;
1501 }
1502 }
1503
1504 bool OnGossipHello(Player* /*player*/) override
1505 {
1507 if (Creature* controller = me->FindNearestCreature(NPC_RAZORSCALE_CONTROLLER, 5.0f))
1508 {
1509 // Prevent 2 players clicking at "same time"
1510 if (controller->HasUnitState(UNIT_STATE_CASTING))
1511 return true;
1512
1513 uint32 spellId = SelectRightSpell();
1514 controller->CastSpell(nullptr, spellId, true);
1515 }
1516
1517 return true;
1518 }
1519
1520 void UpdateAI(uint32 diff) override
1521 {
1522 _scheduler.Update(diff);
1523 }
1524
1525 private:
1527 };
1528
1529 GameObjectAI* GetAI(GameObject* go) const override
1530 {
1531 return GetUlduarAI<go_razorscale_harpoonAI>(go);
1532 }
1533};
1534
1536{
1537public:
1538 go_razorscale_mole_machine() : GameObjectScript("go_razorscale_mole_machine") { }
1539
1541 {
1543
1544 void Reset() override
1545 {
1547 _scheduler.Schedule(Seconds(1), [this](TaskContext const& /*context*/)
1548 {
1550 });
1551 _scheduler.Schedule(Seconds(10), [this](TaskContext const& /*context*/)
1552 {
1553 me->Delete();
1554 });
1555 }
1556
1557 void UpdateAI(uint32 diff) override
1558 {
1559 _scheduler.Update(diff);
1560 }
1561
1562 private:
1564 };
1565 GameObjectAI* GetAI(GameObject* go) const override
1566 {
1567 return GetUlduarAI<go_razorscale_mole_machineAI>(go);
1568 }
1569};
1570
1571/* 63317 - Flame Breath
1572 64021 - Flame Breath */
1574{
1576 {
1577 Creature* target = GetHitCreature();
1578 if (!target || target->GetEntry() != NPC_DARK_RUNE_GUARDIAN || !target->IsAlive())
1579 return;
1580
1581 if (GetHitDamage() >= int32(target->GetHealth()))
1582 target->AI()->SetData(DATA_IRON_DWARF_MEDIUM_RARE, 1);
1583 }
1584
1585 void FilterTargets(std::list<WorldObject*>& targets)
1586 {
1587 targets.remove_if([](WorldObject* obj)
1588 {
1589 if (Creature* target = obj->ToCreature())
1590 if (target->IsTrigger())
1591 return true;
1592
1593 return false;
1594 });
1595 }
1596
1602};
1603
1604/* 63968 - Summon Iron Dwarves
1605 63970 - Summon Iron Dwarves
1606 63969 - Summon Iron Dwarves */
1608{
1609 bool Validate(SpellInfo const* /*spellInfo*/) override
1610 {
1611 return ValidateSpellInfo(
1612 {
1615 });
1616 }
1617
1619 {
1620 Unit* caster = GetCaster();
1621 switch (GetSpellInfo()->Id)
1622 {
1624 caster->CastSpell(caster, SPELL_SUMMON_IRON_DWARF_GUARDIAN, true);
1625 caster->CastSpell(caster, SPELL_SUMMON_IRON_DWARF_GUARDIAN, true);
1626 caster->CastSpell(caster, SPELL_SUMMON_IRON_DWARF_WATCHER, true);
1627 break;
1630 caster->CastSpell(caster, SPELL_SUMMON_IRON_DWARF_GUARDIAN, true);
1631 caster->CastSpell(caster, SPELL_SUMMON_IRON_DWARF_WATCHER, true);
1632 caster->CastSpell(caster, SPELL_SUMMON_IRON_DWARF_WATCHER, true);
1633 break;
1634 default:
1635 break;
1636 }
1637 }
1638
1643};
1644
1645// 64821 - Fuse Armor
1647{
1648 bool Validate(SpellInfo const* /*spellInfo*/) override
1649 {
1651 }
1652
1653 void HandleFused(AuraEffect const* /*aurEff*/)
1654 {
1655 if (GetStackAmount() != GetSpellInfo()->StackAmount)
1656 return;
1657
1658 GetTarget()->CastSpell(nullptr, SPELL_FUSED_ARMOR, true);
1659 Remove();
1660 }
1661
1666};
1667
1668// 62669 - Firebolt
1670{
1671 void FilterTargets(std::list<WorldObject*>& targets)
1672 {
1673 targets.remove_if([](WorldObject* obj) { return obj->GetEntry() != NPC_RAZORSCALE_HARPOON_FIRE_STATE; });
1674 }
1675
1680};
1681
1683{
1684 public:
1685 achievement_iron_dwarf_medium_rare() : AchievementCriteriaScript("achievement_iron_dwarf_medium_rare") { }
1686
1687 bool OnCheck(Player* /*player*/, Unit* target) override
1688 {
1689 return target && target->GetAI() && target->GetAI()->GetData(DATA_IRON_DWARF_MEDIUM_RARE);
1690 }
1691};
1692
1694{
1695 public:
1696 achievement_quick_shave() : AchievementCriteriaScript("achievement_quick_shave") { }
1697
1698 bool OnCheck(Player* /*source*/, Unit* target) override
1699 {
1700 if (target)
1701 if (Creature* razorscale = target->ToCreature())
1702 if (razorscale->AI()->GetData(DATA_QUICK_SHAVE))
1703 return true;
1704
1705 return false;
1706 }
1707};
1708
uint8_t uint8
Definition Define.h:156
int32_t int32
Definition Define.h:150
uint32_t uint32
Definition Define.h:154
std::chrono::milliseconds Milliseconds
Milliseconds shorthand typedef.
Definition Duration.h:24
std::chrono::seconds Seconds
Seconds shorthand typedef.
Definition Duration.h:28
@ ENCOUNTER_FRAME_DISENGAGE
@ ENCOUNTER_FRAME_ENGAGE
@ MOTION_PRIORITY_NORMAL
@ SPLINE_CHAIN_MOTION_TYPE
@ POINT_MOTION_TYPE
@ EFFECT_MOTION_TYPE
@ TEMPSUMMON_TIMED_DESPAWN
std::vector< ObjectGuid > GuidVector
Definition ObjectGuid.h:434
Spells
Definition PlayerAI.cpp:32
float frand(float min, float max)
Definition Random.cpp:55
uint32 urand(uint32 min, uint32 max)
Definition Random.cpp:42
#define RegisterSpellScript(spell_script)
Definition ScriptMgr.h:1383
void CloseGossipMenuFor(Player *player)
SpellEffIndex
@ EFFECT_1
@ EFFECT_0
@ TARGET_UNIT_CONE_ENTRY
@ TARGET_UNIT_SRC_AREA_ENTRY
@ EMOTE_STATE_USE_STANDING
@ SPELL_EFFECT_SCRIPT_EFFECT
@ GO_FLAG_NOT_SELECTABLE
@ SPELL_AURA_PERIODIC_DUMMY
#define SpellEffectFn(F, I, N)
#define SpellObjectAreaTargetSelectFn(F, I, N)
#define AuraEffectPeriodicFn(F, I, N)
#define SpellHitFn(F)
EvadeReason
@ MOVE_RUN
@ REACT_PASSIVE
@ REACT_AGGRESSIVE
@ UNIT_NPC_FLAG_GOSSIP
DamageEffectType
@ UNIT_STATE_CASTING
Definition Unit.h:276
constexpr Position RazorFlightPositionPhase2
@ EMOTE_PERMA_GROUND
@ SAY_COMMANDER_AGGRO
@ SAY_COMMANDER_GROUND_PHASE
@ SAY_START_REPAIR
@ SAY_AGGRO
@ EMOTE_HARPOON
@ EMOTE_BREATH
@ SAY_REBUILD_TURRETS
@ EMOTE_BERSERK
@ SAY_COMMANDER_ENGINEERS_DEAD
constexpr Position RazorscaleLand
@ ACTION_START_PERMA_GROUND
@ ACTION_STOP_CONTROLLERS
@ ACTION_BUILD_HARPOON_1
@ ACTION_BUILD_HARPOON_4
@ ACTION_SHACKLE_RAZORSCALE
@ ACTION_BUILD_HARPOON_2
@ ACTION_RETURN_TO_BASE
@ ACTION_BUILD_HARPOON_3
@ ACTION_DESTROY_HARPOONS
@ ACTION_GROUND_PHASE
@ ACTION_ENGINEER_DEAD
@ ACTION_STOP_CAST
@ ACTION_FIX_HARPOONS
@ ACTION_START_FIGHT
constexpr Position PosHarpoon[4]
@ HARPOON_4
@ RAZORSCALE_FIRE_STATE_10_GROUP
@ DATA_EXPEDITION_NUMBER
@ WORLD_STATE_RAZORSCALE_MUSIC
@ ENGINEER_EAST
@ DATA_IRON_DWARF_MEDIUM_RARE
@ HARPOON_3
@ HARPOON_1
@ DATA_QUICK_SHAVE
@ ENGINEER_NORTH
@ GOSSIP_START_ENCOUNTER
@ HARPOON_2
@ RAZORSCALE_FIRE_STATE_25_GROUP
@ ENGINEER_WEST
@ RAZORSCALE_EXPEDITION_GROUP
constexpr Position TrapperPosition[3]
#define CHAIN_LIGHTNING
constexpr Position PosBrokenHarpoon[4]
@ SPELL_TRIGGER_SUMMON_IRON_VRYKUL
@ SPELL_WING_BUFFET
@ SPELL_STORMSTRIKE
@ SPELL_SUMMON_MOLE_MACHINE
@ SPELL_HARPOON_FIRE_STATE
@ SPELL_BATTLE_SHOUT
@ SPELL_HARPOON_SHOT_1
@ SPELL_SHACKLE
@ SPELL_TRIGGER_SUMMON_IRON_DWARVES
@ SPELL_FIREBOLT
@ SPELL_FIREBALL
@ SPELL_SUMMON_IRON_DWARF_GUARDIAN
@ SPELL_HARPOON_SHOT_3
@ SPELL_HEROIC_STRIKE
@ SPELL_FUSED_ARMOR
@ SPELL_FUSE_ARMOR
@ SPELL_HARPOON_SHOT_4
@ SPELL_TRIGGER_SUMMON_IRON_DWARVES_2
@ SPELL_THREAT
@ SPELL_BERSERK
@ SPELL_DEVOURING_FLAME
@ SPELL_WHIRLWIND
@ SPELL_TRIGGER_SUMMON_IRON_DWARVES_3
@ SPELL_SUMMON_IRON_DWARF_WATCHER
@ SPELL_HARPOON_TRIGGER
@ SPELL_STUN_SELF
@ SPELL_HARPOON_SHOT_2
G3D::Vector3 const RazorscalePath[]
@ POINT_RAZORSCALE_TAKEOFF
@ POINT_RAZORSCALE_FLIGHT_2
@ POINT_SHACKLE_RAZORSCALE
@ POINT_HARPOON_2_25
@ POINT_START_WAYPOINT
@ POINT_RAZORSCALE_LAND
@ POINT_BASE
@ POINT_DEFENDER_ATTACK
@ POINT_HARPOON_2
@ POINT_HARPOON_1_25
@ POINT_RAZORSCALE_FLIGHT
@ POINT_HARPOON_3
@ POINT_HARPOON_1
@ POINT_HARPOON_4
@ POINT_RAZORSCALE_GROUND
EngineersSplineMovements
@ SPLINE_ENGINEER_WEST_25_HARPOON_1
@ SPLINE_ENGINEER_NORTH_25_HARPOON_2
@ SPLINE_ENGINEER_EAST_25_HARPOON_1
@ SPLINE_ENGINEER_EAST_10_BASE
@ SPLINE_ENGINEER_NORTH_25_HARPOON_1
@ SPLINE_ENGINEER_EAST_10_HARPOON_1
@ SPLINE_ENGINEER_NORTH_10_BASE
@ SPLINE_ENGINEER_WEST_10_HARPOON_1
@ SPLINE_ENGINEER_EAST_25_HARPOON_3
@ SPLINE_ENGINEER_NORTH_10_HARPOON_1
@ SPLINE_ENGINEER_WEST_25_HARPOON_3
@ SPLINE_ENGINEER_EAST_25_HARPOON_4
@ SPLINE_ENGINEER_WEST_10_BASE
@ SPLINE_ENGINEER_NORTH_25_HARPOON_3
@ SPLINE_ENGINEER_NORTH_10_HARPOON_2
@ SPLINE_ENGINEER_WEST_25_HARPOON_4
@ SPLINE_ENGINEER_NORTH_25_BASE
@ SPLINE_ENGINEER_WEST_10_HARPOON_2
@ SPLINE_ENGINEER_EAST_25_HARPOON_2
@ SPLINE_ENGINEER_WEST_25_HARPOON_2
@ SPLINE_ENGINEER_NORTH_25_HARPOON_4
@ SPLINE_ENGINEER_WEST_25_BASE
@ SPLINE_ENGINEER_EAST_10_HARPOON_2
#define FLAME_BREATH
RazorscalePhases
@ PHASE_NONE
@ PHASE_PERMA_GROUND
@ PHASE_GROUND
@ PHASE_AIR
@ PHASE_COMBAT
#define LIGHTNING_BOLT
constexpr uint32 SummonMinionsSpells[4]
#define DEVOURING_FLAME_GROUND
void AddSC_boss_razorscale()
constexpr Position DefendersPosition[6]
constexpr Position RazorscaleGroundPosition
constexpr Position RazorFlightPosition
@ EVENT_CHAIN_LIGHTNING
@ EVENT_BUILD_HARPOON_2
@ EVENT_SUMMON_MINIONS
@ EVENT_FLAME_BREATH
@ EVENT_START_COMBAT
@ EVENT_FIREBALL
@ EVENT_BUILD_HARPOON_3
@ EVENT_WHIRLWIND
@ EVENT_BUILD_HARPOON_4
@ EVENT_WING_BUFFET
@ EVENT_SUMMON_MINIONS_2
@ EVENT_HANDLE_DESTROY_HARPOON
@ EVENT_STORMSTRIKE
@ EVENT_RESUME_MOVE_CHASE
@ EVENT_FLAME_BREATH_GROUND
@ EVENT_BUILD_HARPOON_1
@ EVENT_LIGHTNING_BOLT
@ EVENT_BERSERK
@ EVENT_BATTLE_SHOUT
@ EVENT_RESUME_AIR_PHASE
@ EVENT_DEVOURING_FLAME
@ EVENT_FUSE_ARMOR
@ EVENT_HEROIC_STRIKE
@ EVENT_FIREBOLT
MovePoints
HookList< EffectPeriodicHandler > OnEffectPeriodic
SpellInfo const * GetSpellInfo() const
Unit * GetTarget() const
uint8 GetStackAmount() const
InstanceScript *const instance
void JustEngagedWith(Unit *who) override
void JustSummoned(Creature *summon) override
void _DespawnAtEvade(Seconds delayToRespawn=30s, Creature *who=nullptr)
bool CanAIAttack(Unit const *target) const override
SummonList summons
EventMap events
void DoZoneInCombat()
Definition CreatureAI.h:169
bool _EnterEvadeMode(EvadeReason why=EvadeReason::Other)
bool UpdateVictim()
Creature *const me
Definition CreatureAI.h:63
void SetHomePosition(float x, float y, float z, float o)
Definition Creature.h:386
void SetImmuneToPC(bool apply) override
Definition Creature.h:184
void GetHomePosition(float &x, float &y, float &z, float &ori) const
Definition Creature.h:388
void SetReactState(ReactStates st)
Definition Creature.h:174
void SetRegenerateHealth(bool value)
Definition Creature.h:373
void SetImmuneToNPC(bool apply) override
Definition Creature.h:187
CreatureAI * AI() const
Definition Creature.h:228
uint32 ExecuteEvent()
Definition EventMap.cpp:77
void Update(uint32 time)
Definition EventMap.h:61
void Repeat(Milliseconds time)
Definition EventMap.cpp:67
void ScheduleEvent(uint32 eventId, Milliseconds time, uint32 group=0, uint8 phase=0)
Definition EventMap.cpp:40
bool IsInPhase(uint8 phase) const
Definition EventMap.h:222
void SetPhase(uint8 phase)
Definition EventMap.cpp:32
void Reset()
Definition EventMap.cpp:25
GameObject *const me
void UseDoorOrButton(uint32 time_to_restore=0, bool alternative=false, Unit *user=nullptr)
void SetFlag(GameObjectFlags flags)
Definition GameObject.h:277
Creature * GetCreature(uint32 type)
void DoUpdateWorldState(int32 worldStateId, int32 value)
void SendEncounterUnit(EncounterFrameType type, Unit const *unit, Optional< int32 > param1={}, Optional< int32 > param2={})
void LaunchMoveSpline(std::function< void(Movement::MoveSplineInit &init)> &&initializer, uint32 id=0, MovementGeneratorPriority priority=MOTION_PRIORITY_NORMAL, MovementGeneratorType type=EFFECT_MOTION_TYPE, Scripting::v2::ActionResultSetter< MovementStopReason > &&scriptResult={})
void MoveTakeoff(uint32 id, Position const &pos, Optional< int32 > tierTransitionId={}, Optional< float > velocity={}, MovementWalkRunSpeedSelectionMode speedSelectionMode=MovementWalkRunSpeedSelectionMode::Default, Scripting::v2::ActionResultSetter< MovementStopReason > &&scriptResult={})
void MoveChase(Unit *target, Optional< ChaseRange > dist={}, Optional< ChaseAngle > angle={})
void MoveAlongSplineChain(uint32 pointId, uint16 dbChainId, bool walk)
void MovePoint(uint32 id, Position const &pos, bool generatePath=true, Optional< float > finalOrient={}, Optional< float > speed={}, MovementWalkRunSpeedSelectionMode speedSelectionMode=MovementWalkRunSpeedSelectionMode::Default, Optional< float > closeEnoughDistance={}, Optional< MovementFadeObject > fadeObject={}, Scripting::v2::ActionResultSetter< MovementStopReason > &&scriptResult={})
void MoveTargetedHome()
void MoveLand(uint32 id, Position const &pos, Optional< int32 > tierTransitionId={}, Optional< float > velocity={}, MovementWalkRunSpeedSelectionMode speedSelectionMode=MovementWalkRunSpeedSelectionMode::Default, Scripting::v2::ActionResultSetter< MovementStopReason > &&scriptResult={})
uint32 GetEntry() const
Definition Object.h:89
Creature * ToCreature()
Definition Object.h:121
uint32 const Id
Definition SpellInfo.h:328
static bool ValidateSpellInfo(std::initializer_list< uint32 > spellIds)
Creature * GetHitCreature() const
int32 GetHitDamage() const
Unit * GetCaster() const
HookList< HitHandler > OnHit
HookList< EffectHandler > OnEffectHitTarget
SpellInfo const * GetSpellInfo() const
HookList< ObjectAreaTargetSelectHandler > OnObjectAreaTargetSelect
void DoAction(int32 info, Predicate &&predicate, uint16 max=0)
TaskScheduler & CancelAll()
TaskScheduler & Schedule(duration_t time, task_handler_t task)
TaskScheduler & Update()
Update the scheduler to the current time.
virtual void SetData(uint32 id, uint32 value)
Definition UnitAI.h:75
SpellCastResult DoCastSelf(uint32 spellId, CastSpellExtraArgs const &args={})
Definition UnitAI.h:160
virtual bool CanAIAttack(Unit const *) const
Definition UnitAI.h:58
SpellCastResult DoCastVictim(uint32 spellId, CastSpellExtraArgs const &args={})
Definition UnitAI.cpp:180
Unit * SelectTarget(SelectTargetMethod targetType, uint32 offset=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
Definition UnitAI.cpp:79
virtual uint32 GetData(uint32 id) const
Definition UnitAI.h:74
SpellCastResult DoCast(uint32 spellId)
Definition UnitAI.cpp:89
Definition Unit.h:635
void UpdateSpeed(UnitMoveType mtype)
Definition Unit.cpp:8778
void InterruptNonMeleeSpells(bool withDelayed, uint32 spellid=0, bool withInstant=true)
Definition Unit.cpp:3231
MotionMaster * GetMotionMaster()
Definition Unit.h:1723
bool IsAlive() const
Definition Unit.h:1185
void StopMoving()
Definition Unit.cpp:10680
void RemoveNpcFlag(NPCFlags flags)
Definition Unit.h:998
UnitAI * GetAI() const
Definition Unit.h:668
bool SetDisableGravity(bool disable, bool updateAnimTier=true)
Definition Unit.cpp:13361
void SetEmoteState(Emote emote)
Definition Unit.h:865
uint64 GetHealth() const
Definition Unit.h:788
bool HealthBelowPctDamaged(float pct, uint32 damage) const
Definition Unit.h:793
Unit * GetVictim() const
Definition Unit.h:726
void SetSpeedRate(UnitMoveType mtype, float rate)
Definition Unit.cpp:8942
void SetFacingTo(float const ori, bool force=true)
Definition Unit.cpp:13289
bool HasUnitState(const uint32 f) const
Definition Unit.h:743
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint32 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
Definition Unit.cpp:3974
GameObject * FindNearestGameObject(uint32 entry, float range, bool spawnedOnly=true) const
Definition Object.cpp:1539
void GetCreatureListWithEntryInGrid(Container &creatureContainer, uint32 entry, float maxSearchRange=250.0f) const
Definition Object.cpp:2658
SpellCastResult CastSpell(CastSpellTargetArg const &targets, uint32 spellId, CastSpellExtraArgs const &args={ })
Definition Object.cpp:2217
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:1398
void setActive(bool isActiveObject)
Definition Object.cpp:276
GameObject * SummonGameObject(uint32 entry, Position const &pos, QuaternionData const &rot, Seconds respawnTime, GOSummonType summonType=GO_SUMMON_TIMED_OR_CORPSE_DESPAWN)
Definition Object.cpp:1441
void SetFarVisible(bool on)
Definition Object.cpp:327
Creature * FindNearestCreature(uint32 entry, float range, bool alive=true) const
Definition Object.cpp:1517
void SummonCreatureGroup(uint8 group, std::list< TempSummon * > *list=nullptr)
Definition Object.cpp:1507
bool OnCheck(Player *, Unit *target) override
bool OnCheck(Player *, Unit *target) override
GameObjectAI * GetAI(GameObject *go) const override
GameObjectAI * GetAI(GameObject *go) const override
void FilterTargets(std::list< WorldObject * > &targets)
void FilterTargets(std::list< WorldObject * > &targets)
bool Validate(SpellInfo const *) override
void HandleFused(AuraEffect const *)
bool Validate(SpellInfo const *) override
TC_GAME_API GameObject * GetGameObject(WorldObject const &u, ObjectGuid const &guid)
float m_positionZ
Definition Position.h:66
constexpr void GetPosition(float &x, float &y) const
Definition Position.h:92
constexpr float GetOrientation() const
Definition Position.h:90
void SetCombatMovement(bool allowMovement)
T const & RAID_MODE(T const &normal10, T const &normal25) const
bool Is25ManRaid() const
void DamageTaken(Unit *, uint32 &damage, DamageEffectType, SpellInfo const *) override
void JustSummoned(Creature *summon) override
void DoAction(int32 actionId) override
void SpellHit(WorldObject *, SpellInfo const *spellInfo) override
void Reset() override
uint32 GetData(uint32 type) const override
void SummonedCreatureDies(Creature *summon, Unit *) override
void MovementInform(uint32 type, uint32 pointId) override
bool CanAIAttack(Unit const *target) const override
void HandleMusic(bool active)
boss_razorscale(Creature *creature)
void UpdateAI(uint32 diff) override
void EnterEvadeMode(EvadeReason why) override
void JustDied(Unit *) override
void JustEngagedWith(Unit *who) override
void UpdateAI(uint32 diff) override
void JustEngagedWith(Unit *) override
uint32 GetData(uint32 type) const override
npc_darkrune_guardian(Creature *creature)
void SetData(uint32 type, uint32 value) override
void JustEngagedWith(Unit *) override
void UpdateAI(uint32 diff) override
npc_darkrune_sentinel(Creature *creature)
void JustEngagedWith(Unit *) override
InstanceScript * _instance
npc_darkrune_watcher(Creature *creature)
void UpdateAI(uint32 diff) override
bool OnGossipSelect(Player *player, uint32, uint32 gossipListId) override
void DoAction(int32 actionId) override
npc_expedition_commander(Creature *creature)
void UpdateAI(uint32 diff) override
void BuildHarpoon(uint8 harpoonNumber)
void SetData(uint32 type, uint32 value) override
bool CanAIAttack(Unit const *target) const override
npc_expedition_defender(Creature *creature)
void MovementInform(uint32 type, uint32 pointId) override
void DoAction(int32 actionId) override
void UpdateAI(uint32 diff) override
npc_expedition_engineer(Creature *creature)
void ChangeOrientation(float orientation)
void MovementInform(uint32 type, uint32 pointId) override
void SetData(uint32 type, uint32 value) override
void DoAction(int32 actionId) override
void UpdateAI(uint32 diff) override
void SetData(uint32 type, uint32 value) override
void DoAction(int32 actionId) override
npc_expedition_trapper(Creature *creature)
void MovementInform(uint32 type, uint32 pointId) override
void EnterEvadeMode(EvadeReason) override
npc_razorscale_devouring_flame(Creature *creature)
npc_razorscale_harpoon_fire_state(Creature *creature)
void SpellHit(WorldObject *, SpellInfo const *spellInfo) override
void UpdateAI(uint32 diff) override
npc_razorscale_spawner(Creature *creature)
@ DATA_RAZORSCALE
Definition ulduar.h:39
@ DATA_EXPEDITION_COMMANDER
Definition ulduar.h:398
@ GO_RAZOR_HARPOON_4
Definition ulduar.h:255
@ GO_RAZOR_BROKEN_HARPOON
Definition ulduar.h:256
@ GO_RAZOR_HARPOON_3
Definition ulduar.h:254
@ GO_RAZOR_HARPOON_2
Definition ulduar.h:253
@ GO_RAZOR_HARPOON_1
Definition ulduar.h:252
#define RegisterUlduarCreatureAI(ai_name)
Definition ulduar.h:524
@ NPC_RAZORSCALE_HARPOON_FIRE_STATE
Definition ulduar.h:96
@ NPC_DARK_RUNE_GUARDIAN
Definition ulduar.h:87
@ NPC_EXPEDITION_COMMANDER
Definition ulduar.h:91
@ NPC_EXPEDITION_TRAPPER
Definition ulduar.h:94
@ NPC_RAZORSCALE_CONTROLLER
Definition ulduar.h:95
@ NPC_RAZORSCALE_SPAWNER
Definition ulduar.h:90
@ NPC_EXPEDITION_ENGINEER
Definition ulduar.h:92
@ NPC_RAZORSCALE
Definition ulduar.h:64
@ NPC_EXPEDITION_DEFENDER
Definition ulduar.h:93