786 {
788 switch (
events.ExecuteEvent())
789 {
791 break;
793 {
795 {
797 }
799 }
800 break;
802 {
807 }
808 break;
810 {
816 }
817 break;
819 {
821 do { number =
urand(0, 4); }
826 }
827 break;
829 {
831 }
832 break;
834 {
836 {
838 }
839
841 break;
842 }
844 {
846 {
847 announcer->SetFacingTo(4.714f);
851 }
852 for(
uint8 i = 0; i < 3; ++i )
854 {
856 c->GetMotionMaster()->MovePoint(0, 748.309f + 3.0f * cos(angle), 619.448f + 3.0f * std::sin(angle), 411.3f);
857 }
858
860 }
861 break;
863 {
864 for(
uint8 i = 0; i < 3; ++i )
866 {
869 c->SetImmuneToAll(false);
870 if (
Unit* target = c->SelectNearestTarget(200.0f))
871 c->AI()->AttackStart(target);
872 c->AI()->DoZoneInCombat();
873 }
875 }
876 break;
878 {
879 for(
uint8 i = 0; i < 3; ++i )
881 {
883 c->GetMotionMaster()->MovePoint(0, 748.309f + 3.0f * cos(angle), 619.448f + 3.0f * std::sin(angle), 411.3f);
884 }
885
887 }
888 break;
890 {
891 for(
uint8 i = 0; i < 3; ++i )
893 {
896 c->SetImmuneToAll(false);
897 if (
Unit* target = c->SelectNearestTarget(200.0f))
898 c->AI()->AttackStart(target);
899 c->AI()->DoZoneInCombat();
900 }
901 }
902 break;
904 {
905 for(
uint8 i = 0; i < 3; ++i )
907 {
909 c->GetMotionMaster()->MovePoint(0, 748.309f + 3.0f * cos(angle), 619.448f + 3.0f * std::sin(angle), 411.3f);
910 }
911
913 }
914 break;
916 {
917 for(
uint8 i = 0; i < 3; ++i )
919 {
922 c->SetImmuneToAll(false);
923 if (
Unit* target = c->SelectNearestTarget(200.0f))
924 c->AI()->AttackStart(target);
925 c->AI()->DoZoneInCombat();
926 }
927 }
928 break;
930 {
931 for(
uint8 i = 0; i < 3; ++i )
933 {
935 c->GetMotionMaster()->MovePoint(4, 748.309f + 3.0f * cos(angle), 619.448f + 3.0f * std::sin(angle), 411.3f);
936 }
937
939 }
940 break;
942 {
943 for(
uint8 i = 0; i < 3; ++i )
945 {
948 c->SetImmuneToAll(false);
949 if (
Unit* target = c->SelectNearestTarget(200.0f))
950 c->AI()->AttackStart(target);
951 c->AI()->DoZoneInCombat();
952 c->CastSpell(c, 67865, true);
953 }
954 }
955 break;
957 {
958 for(
uint8 i = 0; i < 3; ++i )
960 {
961 c->AI()->DoAction(1);
962 switch (i)
963 {
964 case 0:
965 c->GetMotionMaster()->MovePoint(5, 736.695f, 650.02f, 412.4f);
966 break;
967 case 1:
968 c->GetMotionMaster()->MovePoint(5, 756.32f, 650.05f, 412.4f);
969 break;
970 case 2:
971 c->GetMotionMaster()->MovePoint(5, 746.5f, 650.65f, 411.7f);
972 break;
973 }
974 }
975
977 }
978 break;
980 {
981 for(
uint8 i = 0; i < 3; ++i )
983 {
986 c->SetImmuneToAll(false);
987 if (
Unit* target = c->SelectNearestTarget(200.0f))
988 c->AI()->AttackStart(target);
989 c->AI()->DoZoneInCombat();
990 c->AI()->DoAction(2);
991 }
992 }
993 break;
995 {
998
1000 }
1001 break;
1003 {
1006 }
1007 break;
1009 {
1011 {
1013 {
1014 announcer->SetFacingToObject(gate);
1017 }
1018 }
1019
1020 for(
int8 i = 0; i < 3; ++i )
1021 {
1023 float x = pos.GetPositionX();
1024
1025 pos.m_positionX = x - 2.0f + (i - 1) * 10.0f;
1027 {
1028 pTrash->AI()->SetData(i, 0);
1030 }
1031 pos.m_positionX = x + (i - 1) * 10.0f;
1033 {
1034 pTrash->AI()->SetData(i, 0);
1036 }
1037 pos.m_positionX = x + 2.0f + (i - 1) * 10.0f;
1039 {
1040 pTrash->AI()->SetData(i, 0);
1042 }
1043 }
1045 }
1046 break;
1048 {
1050 announcer->GetMotionMaster()->MovePoint(0, 735.81f, 661.92f, 412.39f);
1052 boss->GetMotionMaster()->MovePoint(0, 746.881f, 660.263f, 411.7f);
1056 }
1057 break;
1059 {
1064 }
1065 break;
1067 {
1070 }
1071 break;
1073 {
1075 for(
uint8 i = 0; i < 3; ++i )
1076 for(
uint8 j = 0; j < 3; ++j )
1078 {
1081 c->SetImmuneToAll(false);
1082
1083 }
1086 }
1087 break;
1089 {
1091 {
1092 boss->GetMotionMaster()->MovePoint(0, 746.881f, 635.263f, 411.7f);
1093 }
1095 }
1096 break;
1098 {
1100 {
1103 boss->SetImmuneToAll(false);
1104 if (
Unit* target = boss->SelectNearestTarget(200.0f))
1105 boss->AI()->AttackStart(target);
1106 boss->AI()->DoZoneInCombat();
1107 }
1108 }
1109 break;
1111 {
1113 {
1114 boss->GetMotionMaster()->MovePoint(1, 747.13f, 628.037f, 411.2f);
1116 }
1117 }
1118 break;
1120 {
1123 {
1124 announcer->GetMotionMaster()->MovePoint(0, 743.14f, 628.77f, 411.2f);
1128 else
1130 announcer->SummonGameObject(chest, 746.59f, 618.49f, 411.09f, 1.42f, 0, 0, 0, 0, 90000000);
1131 }
1132
1135 }
1136 break;
1138 {
1140 {
1142 boss->DespawnOrUnsummon(3000);
1143 }
1144 }
1145 break;
1147 {
1150 {
1153 bk_vehicle->SetFacingTo(M_PI);
1154 if (
Vehicle* v = bk_vehicle->GetVehicleKit())
1155 if (
Unit* bk = v->GetPassenger(0))
1156 {
1158 bk->SendMovementFlagUpdate();
1159 if (bk->IsCreature())
1161 }
1162
1163 announcer->SetFacingToObject(bk_vehicle);
1165 }
1166 }
1167 break;
1169 {
1171 {
1172 Position exitPos = { 751.003357f, 638.145508f, 411.570129f, M_PI };
1173 bk->ExitVehicle();
1174 bk->GetMotionMaster()->MoveJump(exitPos, 2.0f, 2.0f);
1176 }
1178 }
1179 break;
1181 {
1183 {
1185 {
1186 bk->SetPosition(745.016f, 631.506f, 411.575f, bk->GetAngle(announcer));
1187 bk->SetHomePosition(*bk);
1188 bk->SetFacingToObject(announcer);
1189 announcer->SetFacingToObject(bk);
1191 bk->AddAura(68306, announcer);
1194 }
1195 }
1197 }
1198 break;
1200 {
1202 bk_vehicle->AI()->DoAction(1);
1203
1205 }
1206 break;
1208 {
1210 {
1212 bk->GetMotionMaster()->MovePoint(0, 746.81f, 623.15f, 411.42f);
1214 }
1216 if (announcer->IsAlive())
1219 }
1220 break;
1222 {
1224 {
1227 }
1229 }
1230 break;
1232 {
1234 {
1237 if (
Unit* target = bk->SelectNearestTarget(200.0f))
1238 bk->AI()->AttackStart(target);
1239 bk->AI()->DoZoneInCombat();
1240 bk->AI()->DoAction(1);
1241 }
1242 }
1243 break;
1244 }
1245 }
double rand_norm()
Definition: Random.cpp:77
std::int8_t int8
Definition: Define.h:105
@ REACT_AGGRESSIVE
Definition: Unit.h:550
@ UNIT_FLAG_NONE
Definition: UnitDefines.h:228
@ GO_PALETRESS_LOOT
Definition: trial_of_the_champion.h:180
@ GO_PALETRESS_LOOT_H
Definition: trial_of_the_champion.h:181
@ GO_EADRIC_LOOT
Definition: trial_of_the_champion.h:177
@ GO_EADRIC_LOOT_H
Definition: trial_of_the_champion.h:178
@ EVENT_BLACK_KNIGHT_SAY_TASK
Definition: trial_of_the_champion.h:100
@ EVENT_BLACK_KNIGHT_CAST_ANNOUNCER
Definition: trial_of_the_champion.h:97
@ EVENT_BLACK_KNIGHT_ATTACK
Definition: trial_of_the_champion.h:101
@ EVENT_GRAND_GROUP_2_ATTACK
Definition: trial_of_the_champion.h:76
@ EVENT_BLACK_KNIGHT_MOVE_FORWARD
Definition: trial_of_the_champion.h:99
@ EVENT_SUMMON_ARGENT_CHALLENGE
Definition: trial_of_the_champion.h:86
@ EVENT_SUMMON_GRAND_CHAMPION_1
Definition: trial_of_the_champion.h:69
@ EVENT_ARGENT_CHALLENGE_SAY_1
Definition: trial_of_the_champion.h:87
@ EVENT_GRAND_CHAMPIONS_ATTACK
Definition: trial_of_the_champion.h:82
@ EVENT_CLOSE_GATE
Definition: trial_of_the_champion.h:68
@ EVENT_ARGENT_CHALLENGE_ATTACK
Definition: trial_of_the_champion.h:91
@ EVENT_BLACK_KNIGHT_KILL_ANNOUNCER
Definition: trial_of_the_champion.h:98
@ EVENT_GRAND_CHAMPIONS_MOUNTS_ATTACK
Definition: trial_of_the_champion.h:80
@ EVENT_GRAND_GROUP_3_ATTACK
Definition: trial_of_the_champion.h:78
@ EVENT_ARGENT_CHALLENGE_SAY_2
Definition: trial_of_the_champion.h:88
@ EVENT_ARGENT_SOLDIER_GROUP_ATTACK
Definition: trial_of_the_champion.h:89
@ EVENT_GRAND_GROUP_1_ATTACK
Definition: trial_of_the_champion.h:74
@ EVENT_ARGENT_CHALLENGE_DISAPPEAR
Definition: trial_of_the_champion.h:94
@ EVENT_ARGENT_CHALLENGE_LEAVE_CHEST
Definition: trial_of_the_champion.h:93
@ EVENT_NULL
Definition: trial_of_the_champion.h:66
@ TEXT_GRATZ_SLAIN_CHAMPIONS
Definition: trial_of_the_champion.h:230
@ TEXT_BK_MEANING
Definition: trial_of_the_champion.h:234
@ TEXT_BEGIN
Definition: trial_of_the_champion.h:229
@ SAY_BK_INTRO_1
Definition: trial_of_the_champion.h:237
@ SAY_BK_INTRO_2
Definition: trial_of_the_champion.h:238
@ SAY_BK_INTRO_3
Definition: trial_of_the_champion.h:239
@ TEXT_WELCOME_2
Definition: trial_of_the_champion.h:228
@ SAY_PALETRESS_INTRO_2
Definition: trial_of_the_champion.h:219
@ SAY_PALETRESS_INTRO_1
Definition: trial_of_the_champion.h:218
@ SAY_EADRIC_INTRO
Definition: trial_of_the_champion.h:209
@ TEXT_YOU_MAY_BEGIN
Definition: trial_of_the_champion.h:231
@ SAY_KNIGHT_INTRO
Definition: trial_of_the_champion.h:206
@ VEHICLE_BLACK_KNIGHT
Definition: trial_of_the_champion.h:189
@ NPC_ARGENT_LIGHTWIELDER
Definition: trial_of_the_champion.h:137
@ NPC_EADRIC_H
Definition: trial_of_the_champion.h:133
@ NPC_ARGENT_MONK
Definition: trial_of_the_champion.h:138
@ NPC_PRIESTESS
Definition: blackrock_depths.h:100
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:17658