562 {
564 switch(
events.ExecuteEvent() )
565 {
566 case 0:
567 break;
569 {
573
575 {
577 }
579 }
580 break;
582 {
584 break;
585 }
587 {
589 }
590 break;
592 {
595
597 }
598 break;
600 {
603
605 }
606 break;
608 {
611
613 }
614 break;
616 {
619
624
627 {
631 }
632 }
633 break;
636 if (c->IsAlive())
637 c->CastSpell(c, 26662, true);
639 if (c->IsAlive())
640 c->CastSpell(c, 26662, true);
642 if (c->IsAlive())
643 c->CastSpell(c, 26662, true);
645 if (c->IsAlive())
646 c->CastSpell(c, 26662, true);
647
648 break;
650 {
654
657 }
658 break;
660 {
663 {
667 if(
Unit* target = c->SelectNearestTarget(200.0f) )
668 {
669 c->AI()->AttackStart(target);
670 c->AI()->DoZoneInCombat();
671 }
672 }
673 break;
674 }
676 {
680
683 break;
684 }
686 {
688 {
692 acidmaw->AddAura(53421, acidmaw);
693 }
694
696 break;
697 }
698
700 {
703
705 break;
706 }
708 {
711 {
715 if(
Unit* target = c->SelectNearestTarget(200.0f) )
716 {
717 c->AI()->AttackStart(target);
718 c->AI()->DoZoneInCombat();
719 }
720 }
722 {
726 if(
Unit* target = c->SelectNearestTarget(200.0f) )
727 {
728 c->RemoveAura(53421);
729 c->CastSpell(c, 66947, false);
730 c->AI()->AttackStart(target);
731 c->AI()->DoZoneInCombat();
732 }
733 }
734 break;
735 }
737 {
741
744 break;
745 }
747 {
751
754 break;
755 }
757 {
759 {
763 if(
Unit* target = c->SelectNearestTarget(200.0f) )
764 {
765 c->AI()->AttackStart(target);
766 c->AI()->DoZoneInCombat();
767 }
768 }
769 break;
770 }
772 {
777 break;
778 }
780 {
782 {
786 {
789 }
791
792
794 {
795 icehowl->UpdatePosition(513.19f, 139.48f, 395.22f, 3 * M_PI / 2, true);
796 icehowl->StopMovingOnCurrentPos();
797 icehowl->DestroyForNearbyPlayers();
798 }
799 }
800 break;
801 }
803 {
807
809 break;
810 }
812 {
814 {
819 }
820
822 break;
823 }
825 {
827 {
829 {
831 portal->SetObjectScale(3.0f);
834 }
836 }
837
839 break;
840 }
842 {
844 {
849 }
850
852 break;
853 }
855 {
857 c->SetFacingTo(M_PI / 2);
859 c->DespawnOrUnsummon();
862 c->DespawnOrUnsummon();
864
866 break;
867 }
869 {
872
874 break;
875 }
877 {
880
882 break;
883 }
885 {
887 {
889 c->PlayDirectSound(16146, 0);
891 {
892 c->CastSpell(f, 67888, true);
894 }
895 }
896
898 break;
899 }
901 {
903 c->SetFacingTo(3 * M_PI / 2);
906
908 break;
909 }
911 {
914 {
918 if(
Unit* target = c->SelectNearestTarget(200.0f) )
919 {
920 c->AI()->AttackStart(target);
921 c->AI()->DoZoneInCombat();
922 }
923 }
924 break;
925 }
927 {
930
932 break;
933 }
935 {
938
940 break;
941 }
943 {
946
948 break;
949 }
951 {
956 break;
957 }
959 {
960
962 {
963 jaraxxus->UpdatePosition(613.83f, 139.5f, 395.22f, 3 * M_PI / 2, true);
964 jaraxxus->StopMovingOnCurrentPos();
965 jaraxxus->DestroyForNearbyPlayers();
966 }
967
970
972 break;
973 }
975 {
978 if(
Player* plr = itr->GetSource() )
979 if( !plr->IsGameMaster() )
980 {
982 break;
983 }
984
986 {
990 }
991 else
992 {
996 }
997 break;
998 }
1000 {
1003
1005 break;
1006 }
1008 {
1010 {
1014 }
1015 else
1016 {
1020 }
1021
1023 break;
1024 }
1026 {
1029
1030 break;
1031 }
1033 {
1034 std::vector<uint32> vHealerEntries;
1039
1040 std::vector<uint32> vOtherEntries;
1047
1048 uint8 healersSubtracted = 2;
1050 healersSubtracted = 1;
1051 for(
uint8 i = 0; i < healersSubtracted; ++i )
1052 {
1053 uint8 pos =
urand(0, vHealerEntries.size() - 1);
1054 switch( vHealerEntries[pos] )
1055 {
1058 break;
1061 break;
1064 break;
1067 break;
1070 break;
1073 break;
1076 break;
1079 break;
1080 }
1081 vHealerEntries.erase(vHealerEntries.begin() + pos);
1082 }
1083
1085 for(
uint8 i = 0; i < 4; ++i )
1086 vOtherEntries.erase(vOtherEntries.begin() +
urand(0, vOtherEntries.size() - 1));
1087
1088 for( std::vector<uint32>::iterator itr = vHealerEntries.begin(); itr != vHealerEntries.end(); ++itr )
1089 vOtherEntries.push_back(*itr);
1090
1092 for( std::vector<uint32>::iterator itr = vOtherEntries.begin(); itr != vOtherEntries.end(); ++itr )
1093 {
1095 {
1099 }
1100 ++pos2;
1101 }
1102
1105 break;
1106 }
1108 {
1111 {
1115
1116
1117 }
1122 break;
1123 }
1125 {
1130 break;
1131 }
1133 {
1136
1138 break;
1139 }
1141 {
1144
1146 break;
1147 }
1149 {
1152 {
1158 }
1159
1161 break;
1162 }
1164 {
1171
1173 break;
1174 }
1176 {
1178 {
1181
1182
1183
1184
1185
1186 }
1188 {
1191
1192
1193
1194
1195
1196 }
1197 break;
1198 }
1200 {
1202 {
1205 if(
Player* plr = itr->GetSource() )
1206 if( !plr->IsGameMaster() )
1207 {
1209 break;
1210 }
1211 }
1214
1216 break;
1217 }
1219 {
1222
1224 break;
1225 }
1227 {
1232 {
1235 t->SetDisplayId(11686);
1237 t->SetVisible(false);
1238 }
1239
1241 break;
1242 }
1244 {
1247 {
1249 t->CastSpell(t, 51807, true);
1250 }
1251
1253 break;
1254 }
1256 {
1258 {
1259 c->SetDisplayId(c->GetNativeDisplayId());
1260 c->SetVisible(true);
1262 }
1263
1265 break;
1266 }
1268 {
1271
1273 break;
1274 }
1276 {
1278 {
1281 }
1282
1285 break;
1286 }
1288 {
1290 {
1292 }
1293
1294 break;
1295 }
1296
1298 {
1301
1303 break;
1304 }
1306 {
1308 {
1310 }
1311
1313 break;
1314 }
1316 {
1318 {
1321 c->CastSpell((
Unit*)
nullptr, 68193,
true);
1322 c->SetVisible(false);
1323 c->SetDisplayId(11686);
1325 t->DespawnOrUnsummon();
1326
1329 }
1330
1332 break;
1333 }
1335 {
1337 {
1338 c->SetVisible(true);
1340 c->DespawnOrUnsummon(0);
1341 }
1342
1343 break;
1344 }
1346 {
1348 {
1351 c->SummonGameObject(195682, 668.15f, 134.57f, 142.12f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 630000000);
1352 }
1353
1355 break;
1356 }
1358 {
1360 {
1363 {
1370 else
1372 }
1374 {
1381 else
1383 }
1384 if (tributeChest)
1386 {
1389 {
1390 chest->SetRespawnTime(chest->GetRespawnDelay());
1392 }
1393 }
1394 }
1395 break;
1396 }
1397 }
1398 }
@ TEMPSUMMON_MANUAL_DESPAWN
Definition: Object.h:49
@ TEMPSUMMON_TIMED_DESPAWN
Definition: Object.h:44
@ NOTIFY_AI_RELOCATION
Definition: Object.h:63
@ UNIT_NPC_EMOTESTATE
Definition: UpdateFields.h:140
@ REACT_PASSIVE
Definition: Unit.h:1035
@ EVENT_CLOSE_GATE
Definition: trial_of_the_champion.h:69
@ GO_TRIBUTE_CHEST_10H_99
Definition: trial_of_the_crusader.h:209
@ GO_TRIBUTE_CHEST_25H_25
Definition: trial_of_the_crusader.h:210
@ GO_TRIBUTE_CHEST_25H_99
Definition: trial_of_the_crusader.h:213
@ GO_TRIBUTE_CHEST_25H_45
Definition: trial_of_the_crusader.h:211
@ GO_TRIBUTE_CHEST_10H_45
Definition: trial_of_the_crusader.h:207
@ GO_TRIBUTE_CHEST_25H_50
Definition: trial_of_the_crusader.h:212
@ GO_TRIBUTE_CHEST_10H_25
Definition: trial_of_the_crusader.h:206
@ GO_TRIBUTE_CHEST_10H_50
Definition: trial_of_the_crusader.h:208
@ 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:166
@ NPC_ALLIANCE_MAGE
Definition: trial_of_the_crusader.h:159
@ NPC_ALLIANCE_PALADIN_HOLY
Definition: trial_of_the_crusader.h:160
@ NPC_HORDE_SHAMAN_RESTORATION
Definition: trial_of_the_crusader.h:181
@ NPC_ALLIANCE_DRUID_RESTORATION
Definition: trial_of_the_crusader.h:157
@ NPC_ALLIANCE_DRUID_BALANCE
Definition: trial_of_the_crusader.h:156
@ NPC_ALLIANCE_HUNTER
Definition: trial_of_the_crusader.h:158
@ NPC_HORDE_ROGUE
Definition: trial_of_the_crusader.h:179
@ NPC_HORDE_HUNTER
Definition: trial_of_the_crusader.h:173
@ NPC_PURPLE_GROUND
Definition: trial_of_the_crusader.h:152
@ NPC_ARGENT_MAGE
Definition: trial_of_the_crusader.h:141
@ NPC_HORDE_PRIEST_SHADOW
Definition: trial_of_the_crusader.h:178
@ NPC_HORDE_WARLOCK
Definition: trial_of_the_crusader.h:182
@ NPC_ALLIANCE_ROGUE
Definition: trial_of_the_crusader.h:164
@ NPC_HORDE_PALADIN_RETRIBUTION
Definition: trial_of_the_crusader.h:176
@ NPC_ALLIANCE_WARRIOR
Definition: trial_of_the_crusader.h:168
@ NPC_HORDE_DRUID_RESTORATION
Definition: trial_of_the_crusader.h:172
@ NPC_HORDE_DEATH_KNIGHT
Definition: trial_of_the_crusader.h:170
@ NPC_ALLIANCE_PALADIN_RETRIBUTION
Definition: trial_of_the_crusader.h:161
@ NPC_HORDE_DRUID_BALANCE
Definition: trial_of_the_crusader.h:171
@ NPC_HORDE_WARRIOR
Definition: trial_of_the_crusader.h:183
@ NPC_HORDE_MAGE
Definition: trial_of_the_crusader.h:174
@ NPC_HORDE_SHAMAN_ENHANCEMENT
Definition: trial_of_the_crusader.h:180
@ NPC_ALLIANCE_PRIEST_DISCIPLINE
Definition: trial_of_the_crusader.h:162
@ NPC_HORDE_PRIEST_DISCIPLINE
Definition: trial_of_the_crusader.h:177
@ NPC_ALLIANCE_DEATH_KNIGHT
Definition: trial_of_the_crusader.h:155
@ NPC_ALLIANCE_SHAMAN_ENHANCEMENT
Definition: trial_of_the_crusader.h:165
@ NPC_ALLIANCE_WARLOCK
Definition: trial_of_the_crusader.h:167
@ NPC_HORDE_PALADIN_HOLY
Definition: trial_of_the_crusader.h:175
@ NPC_ALLIANCE_PRIEST_SHADOW
Definition: trial_of_the_crusader.h:163
@ SAY_STAGE_4_07
Definition: trial_of_the_crusader.h:271
@ SAY_STAGE_1_03
Definition: trial_of_the_crusader.h:257
@ SAY_STAGE_1_08
Definition: trial_of_the_crusader.h:227
@ SAY_STAGE_0_06
Definition: trial_of_the_crusader.h:223
@ SAY_STAGE_2_02h
Definition: trial_of_the_crusader.h:249
@ SAY_STAGE_0_02
Definition: trial_of_the_crusader.h:220
@ SAY_STAGE_0_01
Definition: trial_of_the_crusader.h:219
@ SAY_STAGE_4_01
Definition: trial_of_the_crusader.h:234
@ SAY_STAGE_1_10
Definition: trial_of_the_crusader.h:239
@ 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:238
@ SAY_STAGE_4_05
Definition: trial_of_the_crusader.h:266
@ SAY_STAGE_4_03
Definition: trial_of_the_crusader.h:235
@ SAY_STAGE_0_03h
Definition: trial_of_the_crusader.h:247
@ SAY_STAGE_1_07
Definition: trial_of_the_crusader.h:226
@ SAY_STAGE_1_11
Definition: trial_of_the_crusader.h:228
@ SAY_STAGE_2_04a
Definition: trial_of_the_crusader.h:241
@ SAY_STAGE_2_02a
Definition: trial_of_the_crusader.h:240
@ SAY_STAGE_1_05
Definition: trial_of_the_crusader.h:262
@ SAY_STAGE_1_01
Definition: trial_of_the_crusader.h:225
@ SAY_STAGE_2_01
Definition: trial_of_the_crusader.h:229
@ SAY_STAGE_0_05
Definition: trial_of_the_crusader.h:222
@ SAY_STAGE_3_03a
Definition: trial_of_the_crusader.h:243
@ SAY_STAGE_1_06
Definition: trial_of_the_crusader.h:259
@ SAY_STAGE_1_04
Definition: trial_of_the_crusader.h:258
@ SAY_STAGE_0_04
Definition: trial_of_the_crusader.h:221
@ SAY_STAGE_1_02
Definition: trial_of_the_crusader.h:256
@ SAY_STAGE_3_01
Definition: trial_of_the_crusader.h:232
@ SAY_STAGE_2_06
Definition: trial_of_the_crusader.h:231
@ SAY_STAGE_2_05h
Definition: trial_of_the_crusader.h:251
@ SAY_STAGE_3_03h
Definition: trial_of_the_crusader.h:252
@ SAY_STAGE_3_02
Definition: trial_of_the_crusader.h:233
@ SAY_STAGE_2_04h
Definition: trial_of_the_crusader.h:250
@ SAY_STAGE_2_05a
Definition: trial_of_the_crusader.h:242
@ SAY_STAGE_1_09
Definition: trial_of_the_crusader.h:248
@ SAY_STAGE_2_03
Definition: trial_of_the_crusader.h:230
@ 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:107
@ EVENT_SCENE_409
Definition: trial_of_the_crusader.h:127
@ EVENT_SCENE_404
Definition: trial_of_the_crusader.h:121
@ EVENT_SCENE_402
Definition: trial_of_the_crusader.h:119
@ EVENT_SCENE_002
Definition: trial_of_the_crusader.h:71
@ EVENT_SCENE_410
Definition: trial_of_the_crusader.h:128
@ EVENT_SCENE_104
Definition: trial_of_the_crusader.h:89
@ EVENT_SCENE_406_2
Definition: trial_of_the_crusader.h:124
@ EVENT_SCENE_407
Definition: trial_of_the_crusader.h:125
@ EVENT_CHAMPIONS_ATTACK
Definition: trial_of_the_crusader.h:108
@ EVENT_ACIDMAW_AND_DREADSCALE_ATTACK
Definition: trial_of_the_crusader.h:79
@ EVENT_GORMOK_ATTACK
Definition: trial_of_the_crusader.h:75
@ EVENT_SCENE_113
Definition: trial_of_the_crusader.h:100
@ EVENT_SUMMON_ICEHOWL
Definition: trial_of_the_crusader.h:81
@ EVENT_SCENE_204
Definition: trial_of_the_crusader.h:105
@ EVENT_SCENE_005_2
Definition: trial_of_the_crusader.h:77
@ EVENT_SCENE_502
Definition: trial_of_the_crusader.h:130
@ EVENT_SCENE_103
Definition: trial_of_the_crusader.h:88
@ EVENT_SCENE_202
Definition: trial_of_the_crusader.h:103
@ EVENT_SCENE_405
Definition: trial_of_the_crusader.h:122
@ EVENT_SCENE_106
Definition: trial_of_the_crusader.h:92
@ EVENT_OPEN_GATE
Definition: trial_of_the_crusader.h:67
@ EVENT_ICEHOWL_ATTACK
Definition: trial_of_the_crusader.h:82
@ EVENT_SCENE_303
Definition: trial_of_the_crusader.h:113
@ EVENT_SCENE_205
Definition: trial_of_the_crusader.h:106
@ EVENT_SUMMON_GORMOK
Definition: trial_of_the_crusader.h:74
@ EVENT_SCENE_403
Definition: trial_of_the_crusader.h:120
@ EVENT_JARAXXUS_ATTACK
Definition: trial_of_the_crusader.h:96
@ EVENT_SCENE_302
Definition: trial_of_the_crusader.h:112
@ EVENT_SCENE_406
Definition: trial_of_the_crusader.h:123
@ EVENT_SCENE_108
Definition: trial_of_the_crusader.h:94
@ EVENT_SCENE_408
Definition: trial_of_the_crusader.h:126
@ EVENT_SCENE_203
Definition: trial_of_the_crusader.h:104
@ EVENT_SCENE_003
Definition: trial_of_the_crusader.h:72
@ EVENT_SCENE_107
Definition: trial_of_the_crusader.h:93
@ EVENT_SUMMON_ACIDMAW_AND_DREADSCALE
Definition: trial_of_the_crusader.h:78
@ EVENT_SCENE_304
Definition: trial_of_the_crusader.h:114
@ EVENT_SCENE_111
Definition: trial_of_the_crusader.h:98
@ EVENT_SUMMON_JARAXXUS
Definition: trial_of_the_crusader.h:90
@ EVENT_VALKYRIES_ATTACK
Definition: trial_of_the_crusader.h:115
@ EVENT_SCENE_109
Definition: trial_of_the_crusader.h:95
@ EVENT_SCENE_105
Definition: trial_of_the_crusader.h:91
@ EVENT_SCENE_112
Definition: trial_of_the_crusader.h:99
@ EVENT_SCENE_102
Definition: trial_of_the_crusader.h:87
@ 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
@ LANG_UNIVERSAL
Definition: SharedDefines.h:735
@ TEAM_ALLIANCE
Definition: SharedDefines.h:760
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:17956
uint8 GetSpawnMode() const
Definition: Map.h:420
void DoCheckDedicatedInsanity()
Definition: instance_trial_of_the_crusader.cpp:130