561 {
563 switch (
events.ExecuteEvent())
564 {
565 case 0:
566 break;
568 {
572
574 {
576 }
578 }
579 break;
581 {
583 break;
584 }
586 {
588 }
589 break;
591 {
594
596 }
597 break;
599 {
602
604 }
605 break;
607 {
610
612 }
613 break;
615 {
618
623
626 {
630 }
631 }
632 break;
635 if (c->IsAlive())
636 c->CastSpell(c, 26662, true);
638 if (c->IsAlive())
639 c->CastSpell(c, 26662, true);
641 if (c->IsAlive())
642 c->CastSpell(c, 26662, true);
644 if (c->IsAlive())
645 c->CastSpell(c, 26662, true);
646
647 break;
649 {
653
656 }
657 break;
659 {
662 {
666 if (
Unit* target = c->SelectNearestTarget(200.0f))
667 {
668 c->AI()->AttackStart(target);
669 c->AI()->DoZoneInCombat();
670 }
671 }
672 break;
673 }
675 {
679
682 break;
683 }
685 {
687 {
691 acidmaw->AddAura(53421, acidmaw);
692 }
693
695 break;
696 }
697
699 {
702
704 break;
705 }
707 {
710 {
714 if (
Unit* target = c->SelectNearestTarget(200.0f))
715 {
716 c->AI()->AttackStart(target);
717 c->AI()->DoZoneInCombat();
718 }
719 }
721 {
725 if (
Unit* target = c->SelectNearestTarget(200.0f))
726 {
727 c->RemoveAura(53421);
728 c->CastSpell(c, 66947, false);
729 c->AI()->AttackStart(target);
730 c->AI()->DoZoneInCombat();
731 }
732 }
733 break;
734 }
736 {
740
743 break;
744 }
746 {
750
753 break;
754 }
756 {
758 {
762 if (
Unit* target = c->SelectNearestTarget(200.0f))
763 {
764 c->AI()->AttackStart(target);
765 c->AI()->DoZoneInCombat();
766 }
767 }
768 break;
769 }
771 {
776 break;
777 }
779 {
781 {
785 {
788 }
790
791
793 {
794 icehowl->UpdatePosition(513.19f, 139.48f, 395.22f, 3 * M_PI / 2, true);
795 icehowl->StopMovingOnCurrentPos();
796 icehowl->DestroyForNearbyPlayers();
797 }
798 }
799 break;
800 }
802 {
806
808 break;
809 }
811 {
813 {
818 }
819
821 break;
822 }
824 {
826 {
828 {
830 portal->SetObjectScale(3.0f);
833 }
835 }
836
838 break;
839 }
841 {
843 {
848 }
849
851 break;
852 }
854 {
856 c->SetFacingTo(M_PI / 2);
858 c->DespawnOrUnsummon();
861 c->DespawnOrUnsummon();
863
865 break;
866 }
868 {
871
873 break;
874 }
876 {
879
881 break;
882 }
884 {
886 {
889 {
890 c->CastSpell(f, 67888, true);
892 }
893 }
894
896 break;
897 }
899 {
901 c->SetFacingTo(3 * M_PI / 2);
904
906 break;
907 }
909 {
912 {
916 if (
Unit* target = c->SelectNearestTarget(200.0f))
917 {
918 c->AI()->AttackStart(target);
919 c->AI()->DoZoneInCombat();
920 }
921 }
922 break;
923 }
925 {
928
930 break;
931 }
933 {
936
938 break;
939 }
941 {
944
946 break;
947 }
949 {
954 break;
955 }
957 {
958
960 {
961 jaraxxus->UpdatePosition(613.83f, 139.5f, 395.22f, 3 * M_PI / 2, true);
962 jaraxxus->StopMovingOnCurrentPos();
963 jaraxxus->DestroyForNearbyPlayers();
964 }
965
968
970 break;
971 }
973 {
976 if (
Player* plr = itr->GetSource())
977 if (!plr->IsGameMaster())
978 {
980 break;
981 }
982
984 {
988 }
989 else
990 {
994 }
995 break;
996 }
998 {
1001
1003 break;
1004 }
1006 {
1008 {
1012 }
1013 else
1014 {
1018 }
1019
1021 break;
1022 }
1024 {
1027
1028 break;
1029 }
1031 {
1032 std::vector<uint32> vHealerEntries;
1037
1038 std::vector<uint32> vOtherEntries;
1045
1046 uint8 healersSubtracted = 2;
1048 healersSubtracted = 1;
1049 for(
uint8 i = 0; i < healersSubtracted; ++i )
1050 {
1051 uint8 pos =
urand(0, vHealerEntries.size() - 1);
1052 switch (vHealerEntries[pos])
1053 {
1056 break;
1059 break;
1062 break;
1065 break;
1068 break;
1071 break;
1074 break;
1077 break;
1078 }
1079 vHealerEntries.erase(vHealerEntries.begin() + pos);
1080 }
1081
1083 for(
uint8 i = 0; i < 4; ++i )
1084 vOtherEntries.erase(vOtherEntries.begin() +
urand(0, vOtherEntries.size() - 1));
1085
1086 for( std::vector<uint32>::iterator itr = vHealerEntries.begin(); itr != vHealerEntries.end(); ++itr )
1087 vOtherEntries.push_back(*itr);
1088
1090 for( std::vector<uint32>::iterator itr = vOtherEntries.begin(); itr != vOtherEntries.end(); ++itr )
1091 {
1093 {
1097 }
1098 ++pos2;
1099 }
1100
1103 break;
1104 }
1106 {
1109 {
1113
1114
1115 }
1120 break;
1121 }
1123 {
1128 break;
1129 }
1131 {
1134
1136 break;
1137 }
1139 {
1142
1144 break;
1145 }
1147 {
1150 {
1156 }
1157
1159 break;
1160 }
1162 {
1169
1171 break;
1172 }
1174 {
1176 {
1179
1180
1181
1182
1183
1184 }
1186 {
1189
1190
1191
1192
1193
1194 }
1195 break;
1196 }
1198 {
1200 {
1203 if (
Player* plr = itr->GetSource())
1204 if (!plr->IsGameMaster())
1205 {
1207 break;
1208 }
1209 }
1212
1214 break;
1215 }
1217 {
1220
1222 break;
1223 }
1225 {
1230 {
1233 t->SetDisplayId(11686);
1235 t->SetVisible(false);
1236 }
1237
1239 break;
1240 }
1242 {
1245 {
1247 t->CastSpell(t, 51807, true);
1248 }
1249
1251 break;
1252 }
1254 {
1256 {
1257 c->SetDisplayId(c->GetNativeDisplayId());
1258 c->SetVisible(true);
1260 }
1261
1263 break;
1264 }
1266 {
1269
1271 break;
1272 }
1274 {
1276 {
1279 }
1280
1283 break;
1284 }
1286 {
1288 {
1290 }
1291
1292 break;
1293 }
1294
1296 {
1299
1301 break;
1302 }
1304 {
1306 {
1308 }
1309
1311 break;
1312 }
1314 {
1316 {
1319 c->CastSpell((
Unit*)
nullptr, 68193,
true);
1320 c->SetVisible(false);
1321 c->SetDisplayId(11686);
1323 t->DespawnOrUnsummon();
1324
1327 }
1328
1330 break;
1331 }
1333 {
1335 {
1336 c->SetVisible(true);
1338 c->DespawnOrUnsummon(0);
1339 }
1340
1341 break;
1342 }
1344 {
1346 {
1349 c->SummonGameObject(195682, 668.15f, 134.57f, 142.12f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 630000000);
1350 }
1351
1353 break;
1354 }
1356 {
1358 {
1361 {
1368 else
1370 }
1372 {
1379 else
1381 }
1382 if (tributeChest)
1384 {
1387 {
1388 chest->SetRespawnTime(chest->GetRespawnDelay());
1390 }
1391 }
1392 }
1393 break;
1394 }
1395 }
1396 }
@ EVENT_CLOSE_GATE
Definition: trial_of_the_champion.h:68
@ GO_TRIBUTE_CHEST_10H_99
Definition: trial_of_the_crusader.h:208
@ GO_TRIBUTE_CHEST_25H_25
Definition: trial_of_the_crusader.h:209
@ GO_TRIBUTE_CHEST_25H_99
Definition: trial_of_the_crusader.h:212
@ GO_TRIBUTE_CHEST_25H_45
Definition: trial_of_the_crusader.h:210
@ GO_TRIBUTE_CHEST_10H_45
Definition: trial_of_the_crusader.h:206
@ GO_TRIBUTE_CHEST_25H_50
Definition: trial_of_the_crusader.h:211
@ GO_TRIBUTE_CHEST_10H_25
Definition: trial_of_the_crusader.h:205
@ GO_TRIBUTE_CHEST_10H_50
Definition: trial_of_the_crusader.h:207
@ LOC_VALKYR_DEST_2_LEFT
Definition: trial_of_the_crusader.h:310
@ LOC_VALKYR_RIGHT
Definition: trial_of_the_crusader.h:305
@ LOC_BEHIND_GATE
Definition: trial_of_the_crusader.h:300
@ LOC_VALKYR_LEFT
Definition: trial_of_the_crusader.h:306
@ LOC_GATE_FRONT
Definition: trial_of_the_crusader.h:301
@ LOC_DREADSCALE
Definition: trial_of_the_crusader.h:302
@ LOC_MAGE
Definition: trial_of_the_crusader.h:319
@ LOC_ARTHAS_PORTAL
Definition: trial_of_the_crusader.h:311
@ LOC_ARTHAS
Definition: trial_of_the_crusader.h:312
@ LOC_VALKYR_DEST_LEFT
Definition: trial_of_the_crusader.h:308
@ LOC_ACIDMAW
Definition: trial_of_the_crusader.h:303
@ LOC_VALKYR_DEST_2_RIGHT
Definition: trial_of_the_crusader.h:309
@ LOC_VALKYR_DEST_RIGHT
Definition: trial_of_the_crusader.h:307
@ NPC_ALLIANCE_SHAMAN_RESTORATION
Definition: trial_of_the_crusader.h:165
@ NPC_ALLIANCE_MAGE
Definition: trial_of_the_crusader.h:158
@ NPC_ALLIANCE_PALADIN_HOLY
Definition: trial_of_the_crusader.h:159
@ NPC_HORDE_SHAMAN_RESTORATION
Definition: trial_of_the_crusader.h:180
@ NPC_ALLIANCE_DRUID_RESTORATION
Definition: trial_of_the_crusader.h:156
@ NPC_ALLIANCE_DRUID_BALANCE
Definition: trial_of_the_crusader.h:155
@ NPC_ALLIANCE_HUNTER
Definition: trial_of_the_crusader.h:157
@ NPC_HORDE_ROGUE
Definition: trial_of_the_crusader.h:178
@ NPC_HORDE_HUNTER
Definition: trial_of_the_crusader.h:172
@ NPC_PURPLE_GROUND
Definition: trial_of_the_crusader.h:151
@ NPC_ARGENT_MAGE
Definition: trial_of_the_crusader.h:140
@ NPC_HORDE_PRIEST_SHADOW
Definition: trial_of_the_crusader.h:177
@ NPC_HORDE_WARLOCK
Definition: trial_of_the_crusader.h:181
@ NPC_ALLIANCE_ROGUE
Definition: trial_of_the_crusader.h:163
@ NPC_HORDE_PALADIN_RETRIBUTION
Definition: trial_of_the_crusader.h:175
@ NPC_ALLIANCE_WARRIOR
Definition: trial_of_the_crusader.h:167
@ NPC_HORDE_DRUID_RESTORATION
Definition: trial_of_the_crusader.h:171
@ NPC_HORDE_DEATH_KNIGHT
Definition: trial_of_the_crusader.h:169
@ NPC_ALLIANCE_PALADIN_RETRIBUTION
Definition: trial_of_the_crusader.h:160
@ NPC_HORDE_DRUID_BALANCE
Definition: trial_of_the_crusader.h:170
@ NPC_HORDE_WARRIOR
Definition: trial_of_the_crusader.h:182
@ NPC_HORDE_MAGE
Definition: trial_of_the_crusader.h:173
@ NPC_HORDE_SHAMAN_ENHANCEMENT
Definition: trial_of_the_crusader.h:179
@ NPC_ALLIANCE_PRIEST_DISCIPLINE
Definition: trial_of_the_crusader.h:161
@ NPC_HORDE_PRIEST_DISCIPLINE
Definition: trial_of_the_crusader.h:176
@ NPC_ALLIANCE_DEATH_KNIGHT
Definition: trial_of_the_crusader.h:154
@ NPC_ALLIANCE_SHAMAN_ENHANCEMENT
Definition: trial_of_the_crusader.h:164
@ NPC_ALLIANCE_WARLOCK
Definition: trial_of_the_crusader.h:166
@ NPC_HORDE_PALADIN_HOLY
Definition: trial_of_the_crusader.h:174
@ NPC_ALLIANCE_PRIEST_SHADOW
Definition: trial_of_the_crusader.h:162
@ SAY_STAGE_4_07
Definition: trial_of_the_crusader.h:271
@ SAY_STAGE_1_03
Definition: trial_of_the_crusader.h:256
@ SAY_STAGE_1_08
Definition: trial_of_the_crusader.h:226
@ SAY_STAGE_0_06
Definition: trial_of_the_crusader.h:222
@ SAY_STAGE_2_02h
Definition: trial_of_the_crusader.h:248
@ SAY_STAGE_0_02
Definition: trial_of_the_crusader.h:219
@ SAY_STAGE_0_01
Definition: trial_of_the_crusader.h:218
@ SAY_STAGE_4_01
Definition: trial_of_the_crusader.h:233
@ SAY_STAGE_1_10
Definition: trial_of_the_crusader.h:238
@ SAY_STAGE_4_02
Definition: trial_of_the_crusader.h:265
@ SAY_STAGE_4_06
Definition: trial_of_the_crusader.h:270
@ SAY_STAGE_4_04
Definition: trial_of_the_crusader.h:267
@ SAY_STAGE_0_03a
Definition: trial_of_the_crusader.h:237
@ SAY_STAGE_4_05
Definition: trial_of_the_crusader.h:266
@ SAY_STAGE_4_03
Definition: trial_of_the_crusader.h:234
@ SAY_STAGE_0_03h
Definition: trial_of_the_crusader.h:246
@ SAY_STAGE_1_07
Definition: trial_of_the_crusader.h:225
@ SAY_STAGE_1_11
Definition: trial_of_the_crusader.h:227
@ SAY_STAGE_2_04a
Definition: trial_of_the_crusader.h:240
@ SAY_STAGE_1_06_1
Definition: trial_of_the_crusader.h:262
@ SAY_STAGE_2_02a
Definition: trial_of_the_crusader.h:239
@ SAY_STAGE_1_05
Definition: trial_of_the_crusader.h:261
@ SAY_STAGE_1_01
Definition: trial_of_the_crusader.h:224
@ SAY_STAGE_2_01
Definition: trial_of_the_crusader.h:228
@ SAY_STAGE_0_05
Definition: trial_of_the_crusader.h:221
@ SAY_STAGE_3_03a
Definition: trial_of_the_crusader.h:242
@ SAY_STAGE_1_06
Definition: trial_of_the_crusader.h:258
@ SAY_STAGE_1_04
Definition: trial_of_the_crusader.h:257
@ SAY_STAGE_0_04
Definition: trial_of_the_crusader.h:220
@ SAY_STAGE_1_02
Definition: trial_of_the_crusader.h:255
@ SAY_STAGE_3_01
Definition: trial_of_the_crusader.h:231
@ SAY_STAGE_2_06
Definition: trial_of_the_crusader.h:230
@ SAY_STAGE_2_05h
Definition: trial_of_the_crusader.h:250
@ SAY_STAGE_3_03h
Definition: trial_of_the_crusader.h:251
@ SAY_STAGE_3_02
Definition: trial_of_the_crusader.h:232
@ SAY_STAGE_2_04h
Definition: trial_of_the_crusader.h:249
@ SAY_STAGE_2_05a
Definition: trial_of_the_crusader.h:241
@ SAY_STAGE_1_09
Definition: trial_of_the_crusader.h:247
@ SAY_STAGE_2_03
Definition: trial_of_the_crusader.h:229
@ SPELL_WILFRED_PORTAL
Definition: trial_of_the_crusader.h:350
const Position FactionChampionLoc[]
Definition: trial_of_the_crusader.h:322
@ EVENT_SUMMON_CHAMPIONS
Definition: trial_of_the_crusader.h:106
@ EVENT_SCENE_409
Definition: trial_of_the_crusader.h:126
@ EVENT_SCENE_404
Definition: trial_of_the_crusader.h:120
@ EVENT_SCENE_402
Definition: trial_of_the_crusader.h:118
@ EVENT_SCENE_002
Definition: trial_of_the_crusader.h:70
@ EVENT_SCENE_410
Definition: trial_of_the_crusader.h:127
@ EVENT_SCENE_104
Definition: trial_of_the_crusader.h:88
@ EVENT_SCENE_406_2
Definition: trial_of_the_crusader.h:123
@ EVENT_SCENE_407
Definition: trial_of_the_crusader.h:124
@ EVENT_CHAMPIONS_ATTACK
Definition: trial_of_the_crusader.h:107
@ EVENT_ACIDMAW_AND_DREADSCALE_ATTACK
Definition: trial_of_the_crusader.h:78
@ EVENT_GORMOK_ATTACK
Definition: trial_of_the_crusader.h:74
@ EVENT_SCENE_113
Definition: trial_of_the_crusader.h:99
@ EVENT_SUMMON_ICEHOWL
Definition: trial_of_the_crusader.h:80
@ EVENT_SCENE_204
Definition: trial_of_the_crusader.h:104
@ EVENT_SCENE_005_2
Definition: trial_of_the_crusader.h:76
@ EVENT_SCENE_502
Definition: trial_of_the_crusader.h:129
@ EVENT_SCENE_103
Definition: trial_of_the_crusader.h:87
@ EVENT_SCENE_202
Definition: trial_of_the_crusader.h:102
@ EVENT_SCENE_405
Definition: trial_of_the_crusader.h:121
@ EVENT_SCENE_106
Definition: trial_of_the_crusader.h:91
@ EVENT_OPEN_GATE
Definition: trial_of_the_crusader.h:66
@ EVENT_ICEHOWL_ATTACK
Definition: trial_of_the_crusader.h:81
@ EVENT_SCENE_303
Definition: trial_of_the_crusader.h:112
@ EVENT_SCENE_205
Definition: trial_of_the_crusader.h:105
@ EVENT_SUMMON_GORMOK
Definition: trial_of_the_crusader.h:73
@ EVENT_SCENE_403
Definition: trial_of_the_crusader.h:119
@ EVENT_JARAXXUS_ATTACK
Definition: trial_of_the_crusader.h:95
@ EVENT_SCENE_302
Definition: trial_of_the_crusader.h:111
@ EVENT_SCENE_406
Definition: trial_of_the_crusader.h:122
@ EVENT_SCENE_108
Definition: trial_of_the_crusader.h:93
@ EVENT_SCENE_408
Definition: trial_of_the_crusader.h:125
@ EVENT_SCENE_203
Definition: trial_of_the_crusader.h:103
@ EVENT_SCENE_003
Definition: trial_of_the_crusader.h:71
@ EVENT_SCENE_107
Definition: trial_of_the_crusader.h:92
@ EVENT_SUMMON_ACIDMAW_AND_DREADSCALE
Definition: trial_of_the_crusader.h:77
@ EVENT_SCENE_304
Definition: trial_of_the_crusader.h:113
@ EVENT_SCENE_111
Definition: trial_of_the_crusader.h:97
@ EVENT_SUMMON_JARAXXUS
Definition: trial_of_the_crusader.h:89
@ EVENT_VALKYRIES_ATTACK
Definition: trial_of_the_crusader.h:114
@ EVENT_SCENE_109
Definition: trial_of_the_crusader.h:94
@ EVENT_SCENE_105
Definition: trial_of_the_crusader.h:90
@ EVENT_SCENE_112
Definition: trial_of_the_crusader.h:98
@ EVENT_SCENE_102
Definition: trial_of_the_crusader.h:86
@ EMOTE_STATE_SPELL_PRECAST
Definition: SharedDefines.h:1954
@ EMOTE_ONESHOT_KNEEL
Definition: SharedDefines.h:1908
@ EMOTE_ONESHOT_EXCLAMATION
Definition: SharedDefines.h:1899
@ EMOTE_STATE_TALK
Definition: SharedDefines.h:1973
@ EMOTE_ONESHOT_LAUGH
Definition: SharedDefines.h:1903
@ EMOTE_STATE_NONE
Definition: SharedDefines.h:1922
@ TEAM_ALLIANCE
Definition: SharedDefines.h:760
@ TEMPSUMMON_MANUAL_DESPAWN
Definition: Object.h:53
@ TEMPSUMMON_TIMED_DESPAWN
Definition: Object.h:48
@ NOTIFY_AI_RELOCATION
Definition: Object.h:67
@ UNIT_NPC_EMOTESTATE
Definition: UpdateFields.h:140
@ REACT_PASSIVE
Definition: Unit.h:548
static void Kill(Unit *killer, Unit *victim, bool durabilityLoss=true, WeaponAttackType attackType=BASE_ATTACK, SpellInfo const *spellProto=nullptr, Spell const *spell=nullptr)
Definition: Unit.cpp:17702
uint8 GetSpawnMode() const
Definition: Map.h:418
void DoCheckDedicatedInsanity()
Definition: instance_trial_of_the_crusader.cpp:129