787 {
789 switch(
events.ExecuteEvent() )
790 {
792 break;
794 {
796 {
798 }
800 }
801 break;
803 {
808 }
809 break;
811 {
817 }
818 break;
820 {
822 do { number =
urand(0, 4); }
827 }
828 break;
830 {
832 }
833 break;
835 {
837 {
839 }
840
842 break;
843 }
845 {
847 {
848 announcer->SetFacingTo(4.714f);
852 }
853 for(
uint8 i = 0; i < 3; ++i )
855 {
857 c->GetMotionMaster()->MovePoint(0, 748.309f + 3.0f * cos(angle), 619.448f + 3.0f * std::sin(angle), 411.3f);
858 }
859
861 }
862 break;
864 {
865 for(
uint8 i = 0; i < 3; ++i )
867 {
870 c->SetImmuneToAll(false);
871 if(
Unit* target = c->SelectNearestTarget(200.0f) )
872 c->AI()->AttackStart(target);
873 c->AI()->DoZoneInCombat();
874 }
876 }
877 break;
879 {
880 for(
uint8 i = 0; i < 3; ++i )
882 {
884 c->GetMotionMaster()->MovePoint(0, 748.309f + 3.0f * cos(angle), 619.448f + 3.0f * std::sin(angle), 411.3f);
885 }
886
888 }
889 break;
891 {
892 for(
uint8 i = 0; i < 3; ++i )
894 {
897 c->SetImmuneToAll(false);
898 if(
Unit* target = c->SelectNearestTarget(200.0f) )
899 c->AI()->AttackStart(target);
900 c->AI()->DoZoneInCombat();
901 }
902 }
903 break;
905 {
906 for(
uint8 i = 0; i < 3; ++i )
908 {
910 c->GetMotionMaster()->MovePoint(0, 748.309f + 3.0f * cos(angle), 619.448f + 3.0f * std::sin(angle), 411.3f);
911 }
912
914 }
915 break;
917 {
918 for(
uint8 i = 0; i < 3; ++i )
920 {
923 c->SetImmuneToAll(false);
924 if(
Unit* target = c->SelectNearestTarget(200.0f) )
925 c->AI()->AttackStart(target);
926 c->AI()->DoZoneInCombat();
927 }
928 }
929 break;
931 {
932 for(
uint8 i = 0; i < 3; ++i )
934 {
936 c->GetMotionMaster()->MovePoint(4, 748.309f + 3.0f * cos(angle), 619.448f + 3.0f * std::sin(angle), 411.3f);
937 }
938
940 }
941 break;
943 {
944 for(
uint8 i = 0; i < 3; ++i )
946 {
949 c->SetImmuneToAll(false);
950 if(
Unit* target = c->SelectNearestTarget(200.0f) )
951 c->AI()->AttackStart(target);
952 c->AI()->DoZoneInCombat();
953 c->CastSpell(c, 67865, true);
954 }
955 }
956 break;
958 {
959 for(
uint8 i = 0; i < 3; ++i )
961 {
962 c->AI()->DoAction(1);
963 switch( i )
964 {
965 case 0:
966 c->GetMotionMaster()->MovePoint(5, 736.695f, 650.02f, 412.4f);
967 break;
968 case 1:
969 c->GetMotionMaster()->MovePoint(5, 756.32f, 650.05f, 412.4f);
970 break;
971 case 2:
972 c->GetMotionMaster()->MovePoint(5, 746.5f, 650.65f, 411.7f);
973 break;
974 }
975 }
976
978 }
979 break;
981 {
982 for(
uint8 i = 0; i < 3; ++i )
984 {
987 c->SetImmuneToAll(false);
988 if(
Unit* target = c->SelectNearestTarget(200.0f) )
989 c->AI()->AttackStart(target);
990 c->AI()->DoZoneInCombat();
991 c->AI()->DoAction(2);
992 }
993 }
994 break;
996 {
999
1001 }
1002 break;
1004 {
1007 }
1008 break;
1010 {
1012 {
1014 {
1015 announcer->SetFacingToObject(gate);
1018 }
1019 }
1020
1021 for(
int8 i = 0; i < 3; ++i )
1022 {
1024 float x = pos.GetPositionX();
1025
1026 pos.m_positionX = x - 2.0f + (i - 1) * 10.0f;
1028 {
1029 pTrash->AI()->SetData(i, 0);
1031 }
1032 pos.m_positionX = x + (i - 1) * 10.0f;
1034 {
1035 pTrash->AI()->SetData(i, 0);
1037 }
1038 pos.m_positionX = x + 2.0f + (i - 1) * 10.0f;
1040 {
1041 pTrash->AI()->SetData(i, 0);
1043 }
1044 }
1046 }
1047 break;
1049 {
1051 announcer->GetMotionMaster()->MovePoint(0, 735.81f, 661.92f, 412.39f);
1053 boss->GetMotionMaster()->MovePoint(0, 746.881f, 660.263f, 411.7f);
1057 }
1058 break;
1060 {
1065 }
1066 break;
1068 {
1071 }
1072 break;
1074 {
1076 for(
uint8 i = 0; i < 3; ++i )
1077 for(
uint8 j = 0; j < 3; ++j )
1079 {
1082 c->SetImmuneToAll(false);
1083
1084 }
1087 }
1088 break;
1090 {
1092 {
1093 boss->GetMotionMaster()->MovePoint(0, 746.881f, 635.263f, 411.7f);
1094 }
1096 }
1097 break;
1099 {
1101 {
1104 boss->SetImmuneToAll(false);
1105 if(
Unit* target = boss->SelectNearestTarget(200.0f) )
1106 boss->AI()->AttackStart(target);
1107 boss->AI()->DoZoneInCombat();
1108 }
1109 }
1110 break;
1112 {
1114 {
1115 boss->GetMotionMaster()->MovePoint(1, 747.13f, 628.037f, 411.2f);
1117 }
1118 }
1119 break;
1121 {
1124 {
1125 announcer->GetMotionMaster()->MovePoint(0, 743.14f, 628.77f, 411.2f);
1129 else
1131 announcer->SummonGameObject(chest, 746.59f, 618.49f, 411.09f, 1.42f, 0, 0, 0, 0, 90000000);
1132 }
1133
1136 }
1137 break;
1139 {
1141 {
1143 boss->DespawnOrUnsummon(3000);
1144 }
1145 }
1146 break;
1148 {
1151 {
1154 bk_vehicle->SetFacingTo(M_PI);
1155 if(
Vehicle* v = bk_vehicle->GetVehicleKit() )
1156 if(
Unit* bk = v->GetPassenger(0) )
1157 {
1159 bk->SendMovementFlagUpdate();
1162 }
1163
1164 announcer->SetFacingToObject(bk_vehicle);
1166 }
1167 }
1168 break;
1170 {
1172 {
1173 Position exitPos = { 751.003357f, 638.145508f, 411.570129f, M_PI };
1174 bk->ExitVehicle();
1175 bk->GetMotionMaster()->MoveJump(exitPos, 2.0f, 2.0f);
1177 }
1179 }
1180 break;
1182 {
1184 {
1186 {
1187 bk->SetPosition(745.016f, 631.506f, 411.575f, bk->GetAngle(announcer));
1188 bk->SetHomePosition(*bk);
1189 bk->SetFacingToObject(announcer);
1190 announcer->SetFacingToObject(bk);
1192 bk->AddAura(68306, announcer);
1195 }
1196 }
1198 }
1199 break;
1201 {
1203 bk_vehicle->AI()->DoAction(1);
1204
1206 }
1207 break;
1209 {
1211 {
1213 bk->GetMotionMaster()->MovePoint(0, 746.81f, 623.15f, 411.42f);
1215 }
1217 if (announcer->IsAlive())
1220 }
1221 break;
1223 {
1225 {
1228 }
1230 }
1231 break;
1233 {
1235 {
1238 if(
Unit* target = bk->SelectNearestTarget(200.0f) )
1239 bk->AI()->AttackStart(target);
1240 bk->AI()->DoZoneInCombat();
1241 bk->AI()->DoAction(1);
1242 }
1243 }
1244 break;
1245 }
1246 }
std::int8_t int8
Definition: Define.h:106
double rand_norm()
Definition: Random.cpp:77
@ TYPEID_UNIT
Definition: ObjectGuid.h:37
@ REACT_AGGRESSIVE
Definition: Unit.h:1037
@ UNIT_FLAG_NONE
Definition: Unit.h:447
@ NPC_PRIESTESS
Definition: blackrock_depths.h:100
@ GO_PALETRESS_LOOT
Definition: trial_of_the_champion.h:181
@ GO_PALETRESS_LOOT_H
Definition: trial_of_the_champion.h:182
@ GO_EADRIC_LOOT
Definition: trial_of_the_champion.h:178
@ GO_EADRIC_LOOT_H
Definition: trial_of_the_champion.h:179
@ EVENT_BLACK_KNIGHT_SAY_TASK
Definition: trial_of_the_champion.h:101
@ EVENT_BLACK_KNIGHT_CAST_ANNOUNCER
Definition: trial_of_the_champion.h:98
@ EVENT_BLACK_KNIGHT_ATTACK
Definition: trial_of_the_champion.h:102
@ EVENT_GRAND_GROUP_2_ATTACK
Definition: trial_of_the_champion.h:77
@ EVENT_BLACK_KNIGHT_MOVE_FORWARD
Definition: trial_of_the_champion.h:100
@ EVENT_SUMMON_ARGENT_CHALLENGE
Definition: trial_of_the_champion.h:87
@ EVENT_SUMMON_GRAND_CHAMPION_1
Definition: trial_of_the_champion.h:70
@ EVENT_ARGENT_CHALLENGE_SAY_1
Definition: trial_of_the_champion.h:88
@ EVENT_GRAND_CHAMPIONS_ATTACK
Definition: trial_of_the_champion.h:83
@ EVENT_CLOSE_GATE
Definition: trial_of_the_champion.h:69
@ EVENT_ARGENT_CHALLENGE_ATTACK
Definition: trial_of_the_champion.h:92
@ EVENT_BLACK_KNIGHT_KILL_ANNOUNCER
Definition: trial_of_the_champion.h:99
@ EVENT_GRAND_CHAMPIONS_MOUNTS_ATTACK
Definition: trial_of_the_champion.h:81
@ EVENT_GRAND_GROUP_3_ATTACK
Definition: trial_of_the_champion.h:79
@ EVENT_ARGENT_CHALLENGE_SAY_2
Definition: trial_of_the_champion.h:89
@ EVENT_ARGENT_SOLDIER_GROUP_ATTACK
Definition: trial_of_the_champion.h:90
@ EVENT_GRAND_GROUP_1_ATTACK
Definition: trial_of_the_champion.h:75
@ EVENT_ARGENT_CHALLENGE_DISAPPEAR
Definition: trial_of_the_champion.h:95
@ EVENT_ARGENT_CHALLENGE_LEAVE_CHEST
Definition: trial_of_the_champion.h:94
@ EVENT_NULL
Definition: trial_of_the_champion.h:67
@ TEXT_GRATZ_SLAIN_CHAMPIONS
Definition: trial_of_the_champion.h:231
@ TEXT_BK_MEANING
Definition: trial_of_the_champion.h:235
@ TEXT_BEGIN
Definition: trial_of_the_champion.h:230
@ SAY_BK_INTRO_1
Definition: trial_of_the_champion.h:238
@ SAY_BK_INTRO_2
Definition: trial_of_the_champion.h:239
@ SAY_BK_INTRO_3
Definition: trial_of_the_champion.h:240
@ TEXT_WELCOME_2
Definition: trial_of_the_champion.h:229
@ SAY_PALETRESS_INTRO_2
Definition: trial_of_the_champion.h:220
@ SAY_PALETRESS_INTRO_1
Definition: trial_of_the_champion.h:219
@ SAY_EADRIC_INTRO
Definition: trial_of_the_champion.h:210
@ TEXT_YOU_MAY_BEGIN
Definition: trial_of_the_champion.h:232
@ SAY_KNIGHT_INTRO
Definition: trial_of_the_champion.h:207
@ VEHICLE_BLACK_KNIGHT
Definition: trial_of_the_champion.h:190
@ NPC_ARGENT_LIGHTWIELDER
Definition: trial_of_the_champion.h:138
@ NPC_EADRIC_H
Definition: trial_of_the_champion.h:134
@ NPC_ARGENT_MONK
Definition: trial_of_the_champion.h:139
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