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 "GameObject.h"
20#include "GameObjectAI.h"
21#include "InstanceScript.h"
22#include "Map.h"
23#include "MotionMaster.h"
24#include "MoveSplineInit.h"
25#include "ObjectAccessor.h"
26#include "PassiveAI.h"
27#include "Player.h"
28#include "ScriptedCreature.h"
29#include "ScriptedGossip.h"
30#include "SpellInfo.h"
31#include "SpellScript.h"
32#include "TemporarySummon.h"
33#include "ulduar.h"
34#include <G3D/Vector3.h>
35
36enum Says
37{
38 // Expedition Commander
42
43 // Expedition Engineer
47
48 // Razorscale Controller
50
51 // Razorscale
55};
56
58{
67
68 // Razorscale Harpoon Fire State
70
71 // Harpoon
77
78 // Razorscale Spawner
86
87 // Dark Rune Guardian
89
90 // Dark Rune Sentinel
94
95 // Expedition Defender
96 SPELL_THREAT = 65146,
97
98 // Expedition Trapper
99 SPELL_SHACKLE = 62646
101
102#define DEVOURING_FLAME_GROUND RAID_MODE<uint32>(64709, 64734)
103#define FLAME_BREATH RAID_MODE<uint32>(63317, 64021)
104#define CHAIN_LIGHTNING RAID_MODE<uint32>(64758, 64759)
105#define LIGHTNING_BOLT RAID_MODE<uint32>(63809, 64696)
106
124
160
179
198
225
234
236{
237 { 571.9465f, -136.0118f, 391.5171f, 2.286379f }, // 1
238 { 589.9233f, -133.6223f, 391.8968f, 3.298687f }, // 2
239 { 559.1199f, -140.5058f, 391.1803f, 4.049168f }, // 0
240 { 606.2297f, -136.7212f, 391.1803f, 5.131269f } // 3
241};
242
244{
245 { 571.9012f, -136.5541f, 391.5171f, 4.921829f }, // GO_RAZOR_HARPOON_1
246 { 589.9233f, -133.6223f, 391.8968f, 4.81711f }, // GO_RAZOR_HARPOON_2
247 { 559.1199f, -140.5058f, 391.1803f, 5.061456f }, // GO_RAZOR_HARPOON_3
248 { 606.2297f, -136.7212f, 391.1803f, 4.537859f } // GO_RAZOR_HARPOON_4
249};
250
252{
253 { 624.3065f, -154.4163f, 391.6442f },
254 { 611.6274f, -170.9375f, 391.8087f },
255 { 572.1548f, -167.4471f, 391.8087f },
256 { 558.4640f, -165.0114f, 391.8087f },
257 { 603.3345f, -164.4297f, 391.8087f },
258 { 549.1727f, -159.1180f, 391.8087f }
259};
260
262{
263 { 574.9293f, -184.5150f, 391.8921f },
264 { 539.7838f, -178.5337f, 391.3053f },
265 { 627.1754f, -177.9638f, 391.5553f }
266};
267
275
276uint32 const pathSize = 11;
277G3D::Vector3 const RazorscalePath[pathSize] =
278{
279 { 657.0227f, -361.1278f, 519.5406f },
280 { 698.9319f, -340.9654f, 520.4857f },
281 { 713.8673f, -290.2219f, 518.4573f },
282 { 711.1782f, -259.6798f, 524.6802f },
283 { 695.5101f, -234.6734f, 529.1528f },
284 { 666.9619f, -220.7599f, 531.4860f },
285 { 629.2765f, -219.7951f, 528.9301f },
286 { 597.4018f, -233.7745f, 526.6508f },
287 { 577.5307f, -275.4489f, 528.1241f },
288 { 583.1092f, -319.5873f, 527.9302f },
289 { 611.5800f, -353.1930f, 526.2653f }
290};
291
292Position const RazorFlightPosition = { 585.3610f, -173.5592f, 456.8430f, 1.526665f };
293Position const RazorFlightPositionPhase2 = { 619.1450f, -238.0780f, 475.1800f, 1.423917f };
294Position const RazorscaleLand = { 585.4010f, -173.5430f, 408.5080f, 1.570796f };
295Position const RazorscaleGroundPosition = { 585.4010f, -173.5430f, 391.6421f, 1.570796f };
296Position const RazorscaleFirstPoint = { 657.0227f, -361.1278f, 519.5406f };
297
298struct boss_razorscale : public BossAI
299{
301 {
302 Initialize();
303 }
304
306 {
307 _engineersCount = 3;
308 _defendersCount = 0;
311 _trappersCount = 0;
312 _permaGround = false;
313 _flyCount = 0;
314 me->SetDisableGravity(true);
315 }
316
317 void Reset() override
318 {
319 _Reset();
320 Initialize();
324 if (Is25ManRaid())
326 // @Developer remove this comment when someone create a way to change view distance for objects
327 // me->GetMotionMaster()->MovePoint(POINT_START_WAYPOINT, RazorscaleFirstPoint);
328 // 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
329 SetCombatMovement(false);
330 }
331
333 {
334 std::function<void(Movement::MoveSplineInit&)> initializer = [](Movement::MoveSplineInit& init)
335 {
337 init.MovebyPath(path, 0);
338 init.SetCyclic();
339 init.SetFly();
340 };
342 }
343
344 bool CanAIAttack(Unit const* target) const override
345 {
346 switch (target->GetEntry())
347 {
352 return false;
353 default:
354 return BossAI::CanAIAttack(target);
355 }
356 }
357
367
374
382
416
417 void MovementInform(uint32 type, uint32 pointId) override
418 {
419 if (type != POINT_MOTION_TYPE && type != EFFECT_MOTION_TYPE)
420 return;
421
422 switch (pointId)
423 {
426 break;
431 break;
433 me->SetDisableGravity(false);
434 if (!_permaGround)
435 {
440 commander->AI()->DoAction(ACTION_GROUND_PHASE);
442 }
443 break;
445 me->SetSpeedRate(MOVE_RUN, 3.0f);
447 break;
452 ++_flyCount;
454 break;
459 break;
460 default:
461 break;
462 }
463 }
464
465 void JustSummoned(Creature* summon) override
466 {
467 BossAI::JustSummoned(summon);
468
469 switch (summon->GetEntry())
470 {
474 break;
478 break;
482 break;
483 default:
484 break;
485 }
486 }
487
488 void SummonedCreatureDies(Creature* summon, Unit* /*killer*/) override
489 {
490 if (summon->GetEntry() == NPC_EXPEDITION_ENGINEER)
491 {
493 if (_engineersCount == 0)
495 commander->AI()->DoAction(ACTION_ENGINEER_DEAD);
496 }
497 }
498
499 void SpellHit(WorldObject* /*caster*/, SpellInfo const* spellInfo) override
500 {
501 if (spellInfo->Id == SPELL_HARPOON_TRIGGER)
502 {
504 if (_harpoonHitCount == RAID_MODE(2, 4))
506 }
507 }
508
509 uint32 GetData(uint32 type) const override
510 {
511 if (type == DATA_QUICK_SHAVE && _flyCount <= 1)
512 return 1;
513 return 0;
514 }
515
527
528 void JustDied(Unit* /*killer*/) override
529 {
530 _JustDied();
532 HandleMusic(false);
533 }
534
535 void HandleMusic(bool active)
536 {
537 uint32 enabled = active ? 1 : 0;
539 }
540
542 {
543 float x = frand(540.0f, 640.0f); // Safe range is between 500 and 650
544 float y = frand(-230.0f, -195.0f); // Safe range is between -235 and -145
545 float z = 391.517f; // Ground level
547 }
548
549 void DamageTaken(Unit* /*done_by*/, uint32& damage, DamageEffectType /*damageType*/, SpellInfo const* /*spellInfo = nullptr*/) override
550 {
552 {
553 _permaGround = true;
557 }
558 }
559
560 void UpdateAI(uint32 diff) override
561 {
562 if (!UpdateVictim())
563 return;
564
565 events.Update(diff);
566
568 return;
569
570 while (uint32 eventId = events.ExecuteEvent())
571 {
572 switch (eventId)
573 {
574 case EVENT_BERSERK:
577 break;
578 case EVENT_FIREBALL:
580 DoCast(target, SPELL_FIREBALL);
582 break;
586 if (_permaGround)
587 events.Repeat(Seconds(10), Seconds(12));
588 else
589 events.Repeat(Seconds(6), Seconds(12));
590 break;
592 {
593 uint8 random = RAID_MODE<uint8>(2, urand(2, 4));
594 uint8 time = 5;
595 for (uint8 n = 0; n < random; ++n)
596 {
598 time += urand(2, 5);
599 }
600 events.Repeat(Seconds(40));
601 break;
602 }
605 break;
611 break;
615 events.Repeat(Seconds(15), Seconds(18));
616 break;
618 {
624 break;
625 }
627 {
628 me->SetDisableGravity(true);
631 Position pos = me->GetPosition();
632 pos.m_positionZ += 10.0f;
636 break;
637 }
638 case EVENT_FIREBOLT:
640 break;
641 case EVENT_FUSE_ARMOR:
642 if (Unit* victim = me->GetVictim())
643 if (!victim->HasAura(SPELL_FUSED_ARMOR))
644 DoCast(victim, SPELL_FUSE_ARMOR);
645 events.Repeat(Seconds(10), Seconds(15));
646 break;
648 SetCombatMovement(true);
649 if (Unit* victim = me->GetVictim())
650 me->GetMotionMaster()->MoveChase(victim);
651 break;
652 default:
653 break;
654 }
655
657 return;
658 }
659
662 }
663
664private:
672};
673
675{
676 npc_expedition_commander(Creature* creature) : ScriptedAI(creature), _instance(creature->GetInstanceScript()),
677 _is25Man(Is25ManRaid()), _building(false), _destroy(false), _stopControllers(false) { }
678
679 void Reset() override
680 {
681 _events.Reset();
684 }
685
686 bool OnGossipSelect(Player* player, uint32 /*menuId*/, uint32 gossipListId) override
687 {
688 if (gossipListId == GOSSIP_START_ENCOUNTER)
689 {
690 CloseGossipMenuFor(player);
693 if (Creature* razorscale = _instance->GetCreature(DATA_RAZORSCALE))
694 razorscale->AI()->DoAction(ACTION_START_FIGHT);
695 return true;
696 }
697 return false;
698 }
699
701 {
702 uint8 harpoonNumber = _is25Man ? 4 : 2;
703 for (uint8 i = 0; i < harpoonNumber; ++i)
704 me->SummonGameObject(GO_RAZOR_BROKEN_HARPOON, PosBrokenHarpoon[i], QuaternionData(0.0f, 0.0f, -0.8987932f, 0.4383728f), 7_days);
705 }
706
708 {
709 for (ObjectGuid harpoonGuid : _harpoons)
710 if (GameObject* harpoon = ObjectAccessor::GetGameObject(*me, harpoonGuid))
711 harpoon->RemoveFromWorld();
712
713 _harpoons.clear();
716 }
717
719 {
720 std::list<Creature*> Controllers;
722
723 for (Creature* controller : Controllers)
724 controller->InterruptNonMeleeSpells(false);
725
726 _stopControllers = false;
727 }
728
729 void BuildHarpoon(uint8 harpoonNumber)
730 {
731
732 if (_is25Man)
733 {
734 switch (harpoonNumber)
735 {
736 case HARPOON_1:
737 if (GameObject* harpoon = me->SummonGameObject(GO_RAZOR_HARPOON_3, PosHarpoon[2], QuaternionData(0.0f, 0.0f, -0.573576f, 0.8191524f), 7_days))
738 _harpoons.emplace_back(harpoon->GetGUID());
739 break;
740 case HARPOON_2:
741 if (GameObject* harpoon = me->SummonGameObject(GO_RAZOR_HARPOON_1, PosHarpoon[0], QuaternionData(0.0f, 0.0f, -0.6293201f, 0.7771462f), 7_days))
742 _harpoons.emplace_back(harpoon->GetGUID());
743 break;
744 case HARPOON_3:
745 if (GameObject* harpoon = me->SummonGameObject(GO_RAZOR_HARPOON_2, PosHarpoon[1], QuaternionData(0.0f, 0.0f, -0.6691303f, 0.743145f), 7_days))
746 _harpoons.emplace_back(harpoon->GetGUID());
747 break;
748 case HARPOON_4:
749 if (GameObject* harpoon = me->SummonGameObject(GO_RAZOR_HARPOON_4, PosHarpoon[3], QuaternionData(0.0f, 0.0f, -0.7660437f, 0.6427886f), 7_days))
750 _harpoons.emplace_back(harpoon->GetGUID());
751 break;
752 default:
753 break;
754 }
755 }
756 else
757 {
758 switch (harpoonNumber)
759 {
760 case HARPOON_1:
761 if (GameObject* harpoon = me->SummonGameObject(GO_RAZOR_HARPOON_1, PosHarpoon[harpoonNumber], QuaternionData(0.0f, 0.0f, -0.6293201f, 0.7771462f), 0s))
762 _harpoons.emplace_back(harpoon->GetGUID());
763 break;
764 case HARPOON_2:
765 if (GameObject* harpoon = me->SummonGameObject(GO_RAZOR_HARPOON_2, PosHarpoon[harpoonNumber], QuaternionData(0.0f, 0.0f, -0.6691303f, 0.743145f), 0s))
766 _harpoons.emplace_back(harpoon->GetGUID());
767 break;
768 default:
769 break;
770 }
771 }
772 }
773
774 void DoAction(int32 actionId) override
775 {
776 if (_building && actionId != ACTION_ENGINEER_DEAD)
777 return;
778
779 switch (actionId)
780 {
783 break;
786 break;
789 _events.Reset();
790 _building = false;
791 break;
793 _building = true;
795 break;
797 _building = true;
799 break;
801 _building = true;
803 break;
805 _building = true;
807 break;
809 if (_destroy)
810 return;
811 _destroy = true;
813 break;
816 return;
817 _stopControllers = true;
819 break;
820 default:
821 break;
822 }
823 }
824
825 void UpdateAI(uint32 diff) override
826 {
828 return;
829
830 _events.Update(diff);
831
832 while (uint32 eventId = _events.ExecuteEvent())
833 {
834 switch (eventId)
835 {
838 _building = false;
839 break;
842 _building = false;
843 break;
846 _building = false;
847 break;
850 _building = false;
851 break;
853 _destroy = false;
854 break;
855 default:
856 break;
857 }
858 }
859 }
860
861private:
869};
870
872{
873 npc_expedition_defender(Creature* creature) : ScriptedAI(creature), _myPositionNumber(0), _instance(creature->GetInstanceScript())
874 {
875 me->SetRegenerateHealth(false);
876 }
877
878 void Reset() override
879 {
881 }
882
883 bool CanAIAttack(Unit const* target) const override
884 {
885 if (target->GetEntry() == NPC_RAZORSCALE || target->GetEntry() == NPC_RAZORSCALE_SPAWNER)
886 return false;
887
888 return ScriptedAI::CanAIAttack(target);
889 }
890
891 void SetData(uint32 type, uint32 value) override
892 {
893 if (type == DATA_EXPEDITION_NUMBER)
894 _myPositionNumber = value;
895 }
896
897 void DoAction(int32 actionId) override
898 {
899 if (actionId == ACTION_START_FIGHT)
901 }
902
903 void MovementInform(uint32 type, uint32 pointId) override
904 {
905 if (type != POINT_MOTION_TYPE && pointId != POINT_DEFENDER_ATTACK)
906 return;
907
910 }
911
912private:
915};
916
918{
919 npc_expedition_trapper(Creature* creature) : ScriptedAI(creature), _myPositionNumber(0), _instance(creature->GetInstanceScript())
920 {
921 SetCombatMovement(false);
923 }
924
925 void DoAction(int32 actionId) override
926 {
927 if (!me->IsAlive())
928 return;
929
930 switch (actionId)
931 {
934 break;
937 break;
940 break;
941 case ACTION_STOP_CAST:
943 _scheduler.Schedule(Seconds(2), [this](TaskContext /*context*/)
944 {
945 me->GetMotionMaster()->MoveTargetedHome();
946 });
948 commander->AI()->DoAction(ACTION_STOP_CONTROLLERS);
949 break;
950 default:
951 break;
952 }
953 }
954
955 void SetData(uint32 type, uint32 value) override
956 {
957 if (type == DATA_EXPEDITION_NUMBER)
958 _myPositionNumber = value;
959 }
960
961 void MovementInform(uint32 type, uint32 pointId) override
962 {
963 if (type != POINT_MOTION_TYPE && pointId != POINT_SHACKLE_RAZORSCALE)
964 return;
965
967 }
968
969 void UpdateAI(uint32 diff) override
970 {
971 _scheduler.Update(diff);
972 }
973
974private:
978};
979
981{
982 npc_expedition_engineer(Creature* creature) : ScriptedAI(creature), _instance(creature->GetInstanceScript()), _myPositionNumber(0), _canUpdateAI(false) { }
983
984 void Reset() override
985 {
988 }
989
990 void DoAction(int32 actionId) override
991 {
992 if (!me->IsAlive())
993 return;
994
995 if (actionId == ACTION_START_FIGHT)
996 {
997 _canUpdateAI = true;
1000 _scheduler.Schedule(Seconds(28), [this](TaskContext /*context*/)
1001 {
1004 });
1005 }
1006 else if (actionId == ACTION_FIX_HARPOONS)
1007 {
1009 Talk(SAY_AGGRO);
1010 _scheduler.Schedule(Seconds(28), [this](TaskContext /*context*/)
1011 {
1013 });
1014 }
1015 }
1016
1017 void ChangeOrientation(float orientation)
1018 {
1019 _scheduler.Schedule(Milliseconds(1), [this, orientation](TaskContext /*context*/)
1020 {
1021 me->SetFacingTo(orientation);
1022 });
1023 }
1024
1052
1079
1106
1108 {
1109 switch (_myPositionNumber)
1110 {
1111 case ENGINEER_NORTH:
1112 if (Is25ManRaid())
1114 break;
1115 case ENGINEER_EAST:
1116 if (Is25ManRaid())
1118 break;
1119 case ENGINEER_WEST:
1120 if (Is25ManRaid())
1122 break;
1123 default:
1124 break;
1125 }
1126 }
1127
1129 {
1130 switch (_myPositionNumber)
1131 {
1132 case ENGINEER_NORTH:
1133 if (Is25ManRaid())
1135 break;
1136 case ENGINEER_EAST:
1137 if (Is25ManRaid())
1139 break;
1140 case ENGINEER_WEST:
1141 if (Is25ManRaid())
1143 break;
1144 default:
1145 break;
1146 }
1147 }
1148
1149 void UpdateAI(uint32 diff) override
1150 {
1151 if (!_canUpdateAI)
1152 return;
1153
1154 _scheduler.Update(diff);
1155 }
1156
1157 void SetData(uint32 type, uint32 value) override
1158 {
1159 if (type == DATA_EXPEDITION_NUMBER)
1160 _myPositionNumber = value;
1161 }
1162
1163 void MovementInform(uint32 type, uint32 pointId) override
1164 {
1165 if (type != POINT_MOTION_TYPE && type != SPLINE_CHAIN_MOTION_TYPE)
1166 return;
1167
1168 switch (pointId)
1169 {
1170 case POINT_HARPOON_1:
1171 case POINT_HARPOON_1_25:
1173 commander->AI()->DoAction(ACTION_BUILD_HARPOON_1);
1174
1175 _scheduler.
1176 Schedule(Seconds(3), [this](TaskContext /*context*/)
1177 {
1179 })
1180 .Schedule(Seconds(18), [this](TaskContext /*context*/)
1181 {
1183 });
1184 break;
1185 case POINT_HARPOON_2:
1186 case POINT_HARPOON_2_25:
1188 commander->AI()->DoAction(ACTION_BUILD_HARPOON_2);
1189 _scheduler.Schedule(Seconds(18), [this](TaskContext /*context*/)
1190 {
1192 });
1193 break;
1194 case POINT_HARPOON_3:
1196 commander->AI()->DoAction(ACTION_BUILD_HARPOON_3);
1197 _scheduler.Schedule(Seconds(18), [this](TaskContext /*context*/)
1198 {
1200 });
1201 break;
1202 case POINT_HARPOON_4:
1204 commander->AI()->DoAction(ACTION_BUILD_HARPOON_4);
1205 _scheduler.Schedule(Seconds(18), [this](TaskContext /*context*/)
1206 {
1208 });
1209 break;
1210 case POINT_BASE:
1211 ChangeOrientation(4.61684f);
1212 break;
1213 default:
1214 break;
1215 }
1216 }
1217
1218private:
1223};
1224
1226{
1227 npc_razorscale_spawner(Creature* creature) : ScriptedAI(creature) { }
1228
1229 void Reset() override
1230 {
1231 me->setActive(true);
1232 me->SetFarVisible(true);
1234 _scheduler.
1235 Schedule(Seconds(1), [this](TaskContext /*context*/)
1236 {
1238 }).Schedule(Seconds(6), [this](TaskContext /*context*/)
1239 {
1241 });
1242 }
1243
1244 void UpdateAI(uint32 diff) override
1245 {
1246 _scheduler.Update(diff);
1247 }
1248
1249private:
1251};
1252
1254{
1255 npc_darkrune_watcher(Creature* creature) : ScriptedAI(creature), _instance(creature->GetInstanceScript()) { }
1256
1257 void Reset() override
1258 {
1259 _events.Reset();
1262 if (Creature* razorscale = _instance->GetCreature(DATA_RAZORSCALE))
1263 razorscale->AI()->JustSummoned(me);
1264 }
1265
1266 void JustEngagedWith(Unit* /*who*/) override
1267 {
1270 }
1271
1272 void UpdateAI(uint32 diff) override
1273 {
1274 if (!UpdateVictim())
1275 return;
1276
1277 _events.Update(diff);
1278
1280 return;
1281
1282 while (uint32 eventId = _events.ExecuteEvent())
1283 {
1284 switch (eventId)
1285 {
1286 case EVENT_START_COMBAT:
1289 break;
1293 break;
1296 _events.Repeat(Seconds(9), Seconds(15));
1297 break;
1298 default:
1299 break;
1300 }
1301
1303 return;
1304 }
1305
1307 }
1308
1309private:
1312};
1313
1315{
1316 npc_darkrune_guardian(Creature* creature) : ScriptedAI(creature), _instance(creature->GetInstanceScript()), _killedByBreath(false) { }
1317
1318 void Reset() override
1319 {
1320 _events.Reset();
1323 if (Creature* razorscale = _instance->GetCreature(DATA_RAZORSCALE))
1324 razorscale->AI()->JustSummoned(me);
1325 }
1326
1327 void JustEngagedWith(Unit* /*who*/) override
1328 {
1330 }
1331
1332 uint32 GetData(uint32 type) const override
1333 {
1334 return type == DATA_IRON_DWARF_MEDIUM_RARE ? _killedByBreath : 0;
1335 }
1336
1337 void SetData(uint32 type, uint32 value) override
1338 {
1339 if (type == DATA_IRON_DWARF_MEDIUM_RARE)
1340 _killedByBreath = value != 0;
1341 }
1342
1343 void UpdateAI(uint32 diff) override
1344 {
1345 if (!UpdateVictim())
1346 return;
1347
1348 _events.Update(diff);
1349
1351 return;
1352
1353 while (uint32 eventId = _events.ExecuteEvent())
1354 {
1355 switch (eventId)
1356 {
1357 case EVENT_START_COMBAT:
1360 break;
1361 case EVENT_STORMSTRIKE:
1363 _events.Repeat(Seconds(13), Seconds(25));
1364 break;
1365 default:
1366 break;
1367 }
1368
1370 return;
1371 }
1372
1374 }
1375
1376private:
1380};
1381
1383{
1384 npc_darkrune_sentinel(Creature* creature) : ScriptedAI(creature), _instance(creature->GetInstanceScript()) { }
1385
1386 void Reset() override
1387 {
1388 _events.Reset();
1391 if (Creature* razorscale = _instance->GetCreature(DATA_RAZORSCALE))
1392 razorscale->AI()->JustSummoned(me);
1393 }
1394
1401
1402 void UpdateAI(uint32 diff) override
1403 {
1404 if (!UpdateVictim())
1405 return;
1406
1407 _events.Update(diff);
1408
1410 return;
1411
1412 while (uint32 eventId = _events.ExecuteEvent())
1413 {
1414 switch (eventId)
1415 {
1416 case EVENT_START_COMBAT:
1419 break;
1422 _events.Repeat(Seconds(5), Seconds(9));
1423 break;
1424 case EVENT_BATTLE_SHOUT:
1426 _events.Repeat(Seconds(25));
1427 break;
1428 case EVENT_WHIRLWIND:
1430 _events.Repeat(Seconds(10), Seconds(13));
1431 break;
1432 default:
1433 break;
1434 }
1435
1437 return;
1438 }
1439
1441 }
1442
1443private:
1446};
1447
1449{
1450 npc_razorscale_harpoon_fire_state(Creature* creature) : ScriptedAI(creature), _instance(creature->GetInstanceScript()) { }
1451
1452 void SpellHit(WorldObject* /*caster*/, SpellInfo const* spellInfo) override
1453 {
1454 if (spellInfo->Id == SPELL_FIREBOLT)
1455 {
1458 commander->AI()->DoAction(ACTION_DESTROY_HARPOONS);
1459 }
1460 }
1461
1462private:
1464};
1465
1467{
1469
1470 void Reset() override
1471 {
1474 }
1475
1476 // Evade caused by Spell::SummonGuardian. Creature dont need evade at all, is despawned if razorscale enter in evade
1477 void EnterEvadeMode(EvadeReason /*why*/) override { }
1478};
1479
1481{
1482public:
1483 go_razorscale_harpoon() : GameObjectScript("go_razorscale_harpoon") { }
1484
1486 {
1488
1489 void Reset() override
1490 {
1491 _scheduler.Schedule(Seconds(1), [this](TaskContext /*context*/)
1492 {
1493 if (Creature* controller = me->FindNearestCreature(NPC_RAZORSCALE_CONTROLLER, 5.0f))
1494 controller->AI()->Talk(EMOTE_HARPOON);
1495
1496 if (GameObject* brokenHarpoon = me->FindNearestGameObject(GO_RAZOR_BROKEN_HARPOON, 5.0f))
1497 brokenHarpoon->RemoveFromWorld();
1498 });
1499 }
1500
1502 {
1503 switch (me->GetEntry())
1504 {
1505 case GO_RAZOR_HARPOON_1:
1506 return SPELL_HARPOON_SHOT_1;
1507 case GO_RAZOR_HARPOON_2:
1508 return SPELL_HARPOON_SHOT_2;
1509 case GO_RAZOR_HARPOON_3:
1510 return SPELL_HARPOON_SHOT_3;
1511 case GO_RAZOR_HARPOON_4:
1512 return SPELL_HARPOON_SHOT_4;
1513 default:
1514 return 0;
1515 }
1516 }
1517
1518 bool OnGossipHello(Player* /*player*/) override
1519 {
1521 if (Creature* controller = me->FindNearestCreature(NPC_RAZORSCALE_CONTROLLER, 5.0f))
1522 {
1523 // Prevent 2 players clicking at "same time"
1524 if (controller->HasUnitState(UNIT_STATE_CASTING))
1525 return true;
1526
1527 uint32 spellId = SelectRightSpell();
1528 controller->CastSpell(nullptr, spellId, true);
1529 }
1530
1531 return true;
1532 }
1533
1534 void UpdateAI(uint32 diff) override
1535 {
1536 _scheduler.Update(diff);
1537 }
1538
1539 private:
1541 };
1542
1543 GameObjectAI* GetAI(GameObject* go) const override
1544 {
1545 return GetUlduarAI<go_razorscale_harpoonAI>(go);
1546 }
1547};
1548
1550{
1551public:
1552 go_razorscale_mole_machine() : GameObjectScript("go_razorscale_mole_machine") { }
1553
1555 {
1557
1558 void Reset() override
1559 {
1561 _scheduler.Schedule(Seconds(1), [this](TaskContext /*context*/)
1562 {
1564 });
1565 _scheduler.Schedule(Seconds(10), [this](TaskContext /*context*/)
1566 {
1567 me->Delete();
1568 });
1569 }
1570
1571 void UpdateAI(uint32 diff) override
1572 {
1573 _scheduler.Update(diff);
1574 }
1575
1576 private:
1578 };
1579 GameObjectAI* GetAI(GameObject* go) const override
1580 {
1581 return GetUlduarAI<go_razorscale_mole_machineAI>(go);
1582 }
1583};
1584
1585/* 63317 - Flame Breath
1586 64021 - Flame Breath */
1588{
1590
1592 {
1593 Creature* target = GetHitCreature();
1594 if (!target || target->GetEntry() != NPC_DARK_RUNE_GUARDIAN || !target->IsAlive())
1595 return;
1596
1597 if (GetHitDamage() >= int32(target->GetHealth()))
1598 target->AI()->SetData(DATA_IRON_DWARF_MEDIUM_RARE, 1);
1599 }
1600
1601 void FilterTargets(std::list<WorldObject*>& targets)
1602 {
1603 targets.remove_if([](WorldObject* obj)
1604 {
1605 if (Creature* target = obj->ToCreature())
1606 if (target->IsTrigger())
1607 return true;
1608
1609 return false;
1610 });
1611 }
1612
1618};
1619
1620/* 63968 - Summon Iron Dwarves
1621 63970 - Summon Iron Dwarves
1622 63969 - Summon Iron Dwarves */
1624{
1626
1627 bool Validate(SpellInfo const* /*spellInfo*/) override
1628 {
1629 return ValidateSpellInfo(
1630 {
1633 });
1634 }
1635
1637 {
1638 Unit* caster = GetCaster();
1639 switch (GetSpellInfo()->Id)
1640 {
1642 caster->CastSpell(caster, SPELL_SUMMON_IRON_DWARF_GUARDIAN, true);
1643 caster->CastSpell(caster, SPELL_SUMMON_IRON_DWARF_GUARDIAN, true);
1644 caster->CastSpell(caster, SPELL_SUMMON_IRON_DWARF_WATCHER, true);
1645 break;
1648 caster->CastSpell(caster, SPELL_SUMMON_IRON_DWARF_GUARDIAN, true);
1649 caster->CastSpell(caster, SPELL_SUMMON_IRON_DWARF_WATCHER, true);
1650 caster->CastSpell(caster, SPELL_SUMMON_IRON_DWARF_WATCHER, true);
1651 break;
1652 default:
1653 break;
1654 }
1655 }
1656
1661};
1662
1663// 64821 - Fuse Armor
1665{
1667
1668 bool Validate(SpellInfo const* /*spellInfo*/) override
1669 {
1671 }
1672
1673 void HandleFused(AuraEffect const* /*aurEff*/)
1674 {
1675 if (GetStackAmount() != GetSpellInfo()->StackAmount)
1676 return;
1677
1678 GetTarget()->CastSpell(nullptr, SPELL_FUSED_ARMOR, true);
1679 Remove();
1680 }
1681
1686};
1687
1688// 62669 - Firebolt
1690{
1692
1693 void FilterTargets(std::list<WorldObject*>& targets)
1694 {
1695 targets.remove_if([](WorldObject* obj) { return obj->GetEntry() != NPC_RAZORSCALE_HARPOON_FIRE_STATE; });
1696 }
1697
1702};
1703
1705{
1706 public:
1707 achievement_iron_dwarf_medium_rare() : AchievementCriteriaScript("achievement_iron_dwarf_medium_rare") { }
1708
1709 bool OnCheck(Player* /*player*/, Unit* target) override
1710 {
1711 return target && target->GetAI() && target->GetAI()->GetData(DATA_IRON_DWARF_MEDIUM_RARE);
1712 }
1713};
1714
1716{
1717 public:
1718 achievement_quick_shave() : AchievementCriteriaScript("achievement_quick_shave") { }
1719
1720 bool OnCheck(Player* /*source*/, Unit* target) override
1721 {
1722 if (target)
1723 if (Creature* razorscale = target->ToCreature())
1724 if (razorscale->AI()->GetData(DATA_QUICK_SHAVE))
1725 return true;
1726
1727 return false;
1728 }
1729};
1730
Actions
uint8_t uint8
Definition Define.h:135
int32_t int32
Definition Define.h:129
uint32_t uint32
Definition Define.h:133
std::chrono::seconds Seconds
Seconds shorthand typedef.
Definition Duration.h:27
std::chrono::milliseconds Milliseconds
Milliseconds shorthand typedef.
Definition Duration.h:24
@ 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:262
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
if(posix_memalign(&__mallocedMemory, __align, __size)) return NULL
#define RegisterSpellScript(spell_script)
Definition ScriptMgr.h:1128
void CloseGossipMenuFor(Player *player)
SpellEffIndex
@ EFFECT_1
@ EFFECT_0
@ SPELL_EFFECT_SCRIPT_EFFECT
@ TARGET_UNIT_CONE_ENTRY
@ TARGET_UNIT_SRC_AREA_ENTRY
@ EMOTE_STATE_USE_STANDING
@ 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)
@ REACT_PASSIVE
@ REACT_AGGRESSIVE
@ UNIT_NPC_FLAG_GOSSIP
@ MOVE_RUN
@ UNIT_FLAG_IMMUNE_TO_NPC
@ UNIT_FLAG_IMMUNE_TO_PC
@ UNIT_STATE_CASTING
Definition Unit.h:235
DamageEffectType
Definition Unit.h:352
Position const RazorscaleFirstPoint
@ 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
@ 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
@ 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
Position const PosHarpoon[4]
#define CHAIN_LIGHTNING
Position const PosBrokenHarpoon[4]
Position const DefendersPosition[6]
@ 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
Position const RazorFlightPosition
uint32 const pathSize
Position const RazorFlightPositionPhase2
@ 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
uint32 const SummonMinionsSpells[4]
#define FLAME_BREATH
RazorscalePhases
@ PHASE_NONE
@ PHASE_PERMA_GROUND
@ PHASE_GROUND
@ PHASE_AIR
@ PHASE_COMBAT
#define LIGHTNING_BOLT
#define DEVOURING_FLAME_GROUND
void AddSC_boss_razorscale()
G3D::Vector3 const RazorscalePath[pathSize]
Position const RazorscaleLand
Position const RazorscaleGroundPosition
Position const TrapperPosition[3]
@ 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
void Remove(AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
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
@ EVADE_REASON_BOUNDARY
Definition CreatureAI.h:95
bool _EnterEvadeMode(EvadeReason why=EVADE_REASON_OTHER)
void DoZoneInCombat(Creature *creature=nullptr)
bool UpdateVictim()
Creature *const me
Definition CreatureAI.h:82
void SetHomePosition(float x, float y, float z, float o)
Definition Creature.h:293
void GetHomePosition(float &x, float &y, float &z, float &ori) const
Definition Creature.h:295
void SetReactState(ReactStates st)
Definition Creature.h:119
void SetRegenerateHealth(bool value)
Definition Creature.h:285
CreatureAI * AI() const
Definition Creature.h:154
void Update(uint32 time)
Definition EventMap.h:67
void Repeat(Milliseconds time)
Definition EventMap.cpp:63
EventId ExecuteEvent()
Definition EventMap.cpp:73
bool IsInPhase(PhaseIndex phase) const
Definition EventMap.h:236
void SetPhase(PhaseIndex phase)
Definition EventMap.cpp:28
void ScheduleEvent(EventId eventId, Milliseconds time, GroupIndex group=0u, PhaseIndex phase=0u)
Definition EventMap.cpp:36
void Reset()
Definition EventMap.cpp:21
GameObject *const me
void UseDoorOrButton(uint32 time_to_restore=0, bool alternative=false, Unit *user=nullptr)
void Delete()
void SetFlag(GameObjectFlags flags)
Definition GameObject.h:171
Creature * GetCreature(uint32 type)
void DoUpdateWorldState(uint32 worldstateId, uint32 worldstateValue)
void SendEncounterUnit(EncounterFrameType type, Unit const *unit=nullptr, uint8 param1=0, uint8 param2=0)
void LaunchMoveSpline(std::function< void(Movement::MoveSplineInit &init)> &&initializer, uint32 id=0, MovementGeneratorPriority priority=MOTION_PRIORITY_NORMAL, MovementGeneratorType type=EFFECT_MOTION_TYPE)
void MoveChase(Unit *target, Optional< ChaseRange > dist={}, Optional< ChaseAngle > angle={})
void MovePoint(uint32 id, Position const &pos, bool generatePath=true, Optional< float > finalOrient={})
void MoveTakeoff(uint32 id, Position const &pos, Optional< float > velocity={})
void MoveAlongSplineChain(uint32 pointId, uint16 dbChainId, bool walk)
void MoveTargetedHome()
void MoveLand(uint32 id, Position const &pos, Optional< float > velocity={})
static Creature * ToCreature(Object *o)
Definition Object.h:186
uint32 GetEntry() const
Definition Object.h:81
uint32 Id
Definition SpellInfo.h:289
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(std::chrono::duration< _Rep, _Period > const &time, task_handler_t const &task)
TaskScheduler & Update(success_t const &callback=EmptyCallback)
virtual void SetData(uint32, uint32)
Definition UnitAI.h:156
void DoMeleeAttackIfReady()
Definition UnitAI.cpp:54
SpellCastResult DoCastSelf(uint32 spellId, CastSpellExtraArgs const &args={})
Definition UnitAI.h:241
virtual bool CanAIAttack(Unit const *) const
Definition UnitAI.h:139
virtual uint32 GetData(uint32) const
Definition UnitAI.h:155
SpellCastResult DoCastVictim(uint32 spellId, CastSpellExtraArgs const &args={})
Definition UnitAI.cpp:166
Unit * SelectTarget(SelectTargetMethod targetType, uint32 offset=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
Definition UnitAI.cpp:96
SpellCastResult DoCast(uint32 spellId)
Definition UnitAI.cpp:106
Definition Unit.h:769
void UpdateSpeed(UnitMoveType mtype)
Definition Unit.cpp:8523
void StopMoving(bool force=false)
Definition Unit.cpp:10312
void InterruptNonMeleeSpells(bool withDelayed, uint32 spellid=0, bool withInstant=true)
Definition Unit.cpp:3093
MotionMaster * GetMotionMaster()
Definition Unit.h:1667
bool IsAlive() const
Definition Unit.h:1234
void RemoveNpcFlag(NPCFlags flags)
Definition Unit.h:1098
UnitAI * GetAI() const
Definition Unit.h:800
bool SetDisableGravity(bool disable, bool updateAnimTier=true)
Definition Unit.cpp:13286
void SetEmoteState(Emote emote)
Definition Unit.h:967
uint32 GetHealth() const
Definition Unit.h:913
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint8 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
Definition Unit.cpp:3784
Unit * GetVictim() const
Definition Unit.h:859
void SetSpeedRate(UnitMoveType mtype, float rate)
Definition Unit.cpp:8678
bool HasUnitState(const uint32 f) const
Definition Unit.h:876
void SetFacingTo(float ori, bool force=true, uint32 movementId=EVENT_FACE)
Definition Unit.cpp:13250
bool HealthBelowPctDamaged(int32 pct, uint32 damage) const
Definition Unit.h:918
void RemoveUnitFlag(UnitFlags flags)
Definition Unit.h:955
GameObject * FindNearestGameObject(uint32 entry, float range, bool spawnedOnly=true) const
Definition Object.cpp:2121
void GetCreatureListWithEntryInGrid(Container &creatureContainer, uint32 entry, float maxSearchRange=250.0f) const
Definition Object.cpp:3153
SpellCastResult CastSpell(CastSpellTargetArg const &targets, uint32 spellId, CastSpellExtraArgs const &args={ })
Definition Object.cpp:2832
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:1992
void setActive(bool isActiveObject)
Definition Object.cpp:991
GameObject * SummonGameObject(uint32 entry, Position const &pos, QuaternionData const &rot, Seconds respawnTime, GOSummonType summonType=GO_SUMMON_TIMED_OR_CORPSE_DESPAWN)
Definition Object.cpp:2015
void SetFarVisible(bool on)
Definition Object.cpp:1014
Creature * FindNearestCreature(uint32 entry, float range, bool alive=true) const
Definition Object.cpp:2099
void SummonCreatureGroup(uint8 group, std::list< TempSummon * > *list=nullptr)
Definition Object.cpp:2082
static bool ValidateSpellInfo(std::initializer_list< uint32 > spellIds)
bool OnCheck(Player *, Unit *target) override
bool OnCheck(Player *, Unit *target) override
GameObjectAI * GetAI(GameObject *go) const override
GameObjectAI * GetAI(GameObject *go) const override
PrepareSpellScript(spell_razorscale_firebolt)
void FilterTargets(std::list< WorldObject * > &targets)
PrepareSpellScript(spell_razorscale_flame_breath)
void FilterTargets(std::list< WorldObject * > &targets)
PrepareAuraScript(spell_razorscale_fuse_armor)
bool Validate(SpellInfo const *) override
void HandleFused(AuraEffect const *)
PrepareSpellScript(spell_razorscale_summon_iron_dwarves)
bool Validate(SpellInfo const *) override
std::vector< Vector3 > PointsArray
TC_GAME_API GameObject * GetGameObject(WorldObject const &u, ObjectGuid const &guid)
float m_positionZ
Definition Position.h:58
float GetOrientation() const
Definition Position.h:82
void GetPosition(float &x, float &y) const
Definition Position.h:84
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:38
@ DATA_EXPEDITION_COMMANDER
Definition ulduar.h:413
@ GO_RAZOR_HARPOON_4
Definition ulduar.h:254
@ GO_RAZOR_BROKEN_HARPOON
Definition ulduar.h:255
@ GO_RAZOR_HARPOON_3
Definition ulduar.h:253
@ GO_RAZOR_HARPOON_2
Definition ulduar.h:252
@ GO_RAZOR_HARPOON_1
Definition ulduar.h:251
#define RegisterUlduarCreatureAI(ai_name)
Definition ulduar.h:541
@ NPC_RAZORSCALE_HARPOON_FIRE_STATE
Definition ulduar.h:95
@ NPC_DARK_RUNE_GUARDIAN
Definition ulduar.h:86
@ NPC_EXPEDITION_COMMANDER
Definition ulduar.h:90
@ NPC_EXPEDITION_TRAPPER
Definition ulduar.h:93
@ NPC_RAZORSCALE_CONTROLLER
Definition ulduar.h:94
@ NPC_RAZORSCALE_SPAWNER
Definition ulduar.h:89
@ NPC_EXPEDITION_ENGINEER
Definition ulduar.h:91
@ NPC_RAZORSCALE
Definition ulduar.h:63
@ NPC_EXPEDITION_DEFENDER
Definition ulduar.h:92