778 {
780 switch(
events.ExecuteEvent() )
781 {
783 break;
785 {
787 {
789 }
791 }
792 break;
794 {
799 }
800 break;
802 {
808 }
809 break;
811 {
813 do { number =
urand(0, 4); }
818 }
819 break;
821 {
823 }
824 break;
826 {
828 {
830 }
831
833 break;
834 }
836 {
838 {
839 announcer->SetFacingTo(4.714f);
843 }
844 for(
uint8 i = 0; i < 3; ++i )
846 {
848 c->GetMotionMaster()->MovePoint(0, 748.309f + 3.0f * cos(angle), 619.448f + 3.0f * std::sin(angle), 411.3f);
849 }
850
852 }
853 break;
855 {
856 for(
uint8 i = 0; i < 3; ++i )
858 {
861 c->SetImmuneToAll(false);
862 if(
Unit* target = c->SelectNearestTarget(200.0f) )
863 c->AI()->AttackStart(target);
864 c->AI()->DoZoneInCombat();
865 }
867 }
868 break;
870 {
871 for(
uint8 i = 0; i < 3; ++i )
873 {
875 c->GetMotionMaster()->MovePoint(0, 748.309f + 3.0f * cos(angle), 619.448f + 3.0f * std::sin(angle), 411.3f);
876 }
877
879 }
880 break;
882 {
883 for(
uint8 i = 0; i < 3; ++i )
885 {
888 c->SetImmuneToAll(false);
889 if(
Unit* target = c->SelectNearestTarget(200.0f) )
890 c->AI()->AttackStart(target);
891 c->AI()->DoZoneInCombat();
892 }
893 }
894 break;
896 {
897 for(
uint8 i = 0; i < 3; ++i )
899 {
901 c->GetMotionMaster()->MovePoint(0, 748.309f + 3.0f * cos(angle), 619.448f + 3.0f * std::sin(angle), 411.3f);
902 }
903
905 }
906 break;
908 {
909 for(
uint8 i = 0; i < 3; ++i )
911 {
914 c->SetImmuneToAll(false);
915 if(
Unit* target = c->SelectNearestTarget(200.0f) )
916 c->AI()->AttackStart(target);
917 c->AI()->DoZoneInCombat();
918 }
919 }
920 break;
922 {
923 for(
uint8 i = 0; i < 3; ++i )
925 {
927 c->GetMotionMaster()->MovePoint(4, 748.309f + 3.0f * cos(angle), 619.448f + 3.0f * std::sin(angle), 411.3f);
928 }
929
931 }
932 break;
934 {
935 for(
uint8 i = 0; i < 3; ++i )
937 {
940 c->SetImmuneToAll(false);
941 if(
Unit* target = c->SelectNearestTarget(200.0f) )
942 c->AI()->AttackStart(target);
943 c->AI()->DoZoneInCombat();
944 c->CastSpell(c, 67865, true);
945 }
946 }
947 break;
949 {
950 for(
uint8 i = 0; i < 3; ++i )
952 {
953 c->AI()->DoAction(1);
954 switch( i )
955 {
956 case 0:
957 c->GetMotionMaster()->MovePoint(5, 736.695f, 650.02f, 412.4f);
958 break;
959 case 1:
960 c->GetMotionMaster()->MovePoint(5, 756.32f, 650.05f, 412.4f);
961 break;
962 case 2:
963 c->GetMotionMaster()->MovePoint(5, 746.5f, 650.65f, 411.7f);
964 break;
965 }
966 }
967
969 }
970 break;
972 {
973 for(
uint8 i = 0; i < 3; ++i )
975 {
978 c->SetImmuneToAll(false);
979 if(
Unit* target = c->SelectNearestTarget(200.0f) )
980 c->AI()->AttackStart(target);
981 c->AI()->DoZoneInCombat();
982 c->AI()->DoAction(2);
983 }
984 }
985 break;
987 {
990
992 }
993 break;
995 {
998 }
999 break;
1001 {
1003 {
1005 {
1006 announcer->SetFacingToObject(gate);
1009 }
1011 {
1014 }
1015 else
1016 {
1019 }
1020 }
1021
1022 for(
int8 i = 0; i < 3; ++i )
1023 {
1025 float x = pos.GetPositionX();
1026
1027 pos.m_positionX = x - 2.0f + (i - 1) * 10.0f;
1029 {
1030 pTrash->AI()->SetData(i, 0);
1032 }
1033 pos.m_positionX = x + (i - 1) * 10.0f;
1035 {
1036 pTrash->AI()->SetData(i, 0);
1038 }
1039 pos.m_positionX = x + 2.0f + (i - 1) * 10.0f;
1041 {
1042 pTrash->AI()->SetData(i, 0);
1044 }
1045 }
1047 }
1048 break;
1050 {
1052 announcer->GetMotionMaster()->MovePoint(0, 735.81f, 661.92f, 412.39f);
1054 boss->GetMotionMaster()->MovePoint(0, 746.881f, 660.263f, 411.7f);
1058 }
1059 break;
1061 {
1066 }
1067 break;
1069 {
1072 }
1073 break;
1075 {
1077 for(
uint8 i = 0; i < 3; ++i )
1078 for(
uint8 j = 0; j < 3; ++j )
1080 {
1083 c->SetImmuneToAll(false);
1084
1085 }
1088 }
1089 break;
1091 {
1093 {
1094 boss->GetMotionMaster()->MovePoint(0, 746.881f, 635.263f, 411.7f);
1095 }
1097 }
1098 break;
1100 {
1102 {
1105 boss->SetImmuneToAll(false);
1106 if(
Unit* target = boss->SelectNearestTarget(200.0f) )
1107 boss->AI()->AttackStart(target);
1108 boss->AI()->DoZoneInCombat();
1109 }
1110 }
1111 break;
1113 {
1115 {
1116 boss->GetMotionMaster()->MovePoint(1, 747.13f, 628.037f, 411.2f);
1118 }
1119 }
1120 break;
1122 {
1125 {
1126 announcer->GetMotionMaster()->MovePoint(0, 743.14f, 628.77f, 411.2f);
1130 else
1132 announcer->SummonGameObject(chest, 746.59f, 618.49f, 411.09f, 1.42f, 0, 0, 0, 0, 90000000);
1133 }
1134
1137 }
1138 break;
1140 {
1142 {
1144 boss->DespawnOrUnsummon(3000);
1145 }
1146 }
1147 break;
1149 {
1152 {
1155 bk_vehicle->SetFacingTo(M_PI);
1156 if(
Vehicle* v = bk_vehicle->GetVehicleKit() )
1157 if(
Unit* bk = v->GetPassenger(0) )
1158 {
1160 bk->SendMovementFlagUpdate();
1163 }
1164
1165 announcer->SetFacingToObject(bk_vehicle);
1167 }
1168 }
1169 break;
1171 {
1173 {
1174 Position exitPos = { 751.003357f, 638.145508f, 411.570129f, M_PI };
1175 bk->ExitVehicle();
1176 bk->GetMotionMaster()->MoveJump(exitPos, 2.0f, 2.0f);
1178 }
1180 }
1181 break;
1183 {
1185 {
1187 {
1188 bk->SetPosition(745.016f, 631.506f, 411.575f, bk->GetAngle(announcer));
1189 bk->SetHomePosition(*bk);
1190 bk->SetFacingToObject(announcer);
1191 announcer->SetFacingToObject(bk);
1193 bk->AddAura(68306, announcer);
1196 }
1197 }
1199 }
1200 break;
1202 {
1204 bk_vehicle->AI()->DoAction(1);
1205
1207 }
1208 break;
1210 {
1212 {
1214 bk->GetMotionMaster()->MovePoint(0, 746.81f, 623.15f, 411.42f);
1216 }
1218 if (announcer->IsAlive())
1221 }
1222 break;
1224 {
1226 {
1229 }
1231 }
1232 break;
1234 {
1236 {
1239 if(
Unit* target = bk->SelectNearestTarget(200.0f) )
1240 bk->AI()->AttackStart(target);
1241 bk->AI()->DoZoneInCombat();
1242 bk->AI()->DoAction(1);
1243 }
1244 }
1245 break;
1246 }
1247 }
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:1025
@ UNIT_FLAG_NONE
Definition: Unit.h:447
@ NPC_PRIESTESS
Definition: blackrock_depths.h:100
@ GO_PALETRESS_LOOT
Definition: trial_of_the_champion.h:164
@ GO_PALETRESS_LOOT_H
Definition: trial_of_the_champion.h:165
@ GO_EADRIC_LOOT
Definition: trial_of_the_champion.h:161
@ GO_EADRIC_LOOT_H
Definition: trial_of_the_champion.h:162
@ 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_BK_RAFTERS
Definition: trial_of_the_champion.h:216
@ TEXT_BK_TASK
Definition: trial_of_the_champion.h:220
@ TEXT_GRATZ_SLAIN_CHAMPIONS
Definition: trial_of_the_champion.h:203
@ TEXT_CHEER_PALETRESS_1
Definition: trial_of_the_champion.h:209
@ TEXT_BK_MEANING
Definition: trial_of_the_champion.h:218
@ TEXT_BEGIN
Definition: trial_of_the_champion.h:202
@ TEXT_CHEER_EADRIC_2
Definition: trial_of_the_champion.h:207
@ TEXT_PALETRESS_SAY_2
Definition: trial_of_the_champion.h:212
@ TEXT_WELCOME_2
Definition: trial_of_the_champion.h:201
@ TEXT_EADRIC_SAY_1
Definition: trial_of_the_champion.h:208
@ TEXT_PALETRESS_SAY_1
Definition: trial_of_the_champion.h:211
@ TEXT_CHEER_EADRIC_1
Definition: trial_of_the_champion.h:206
@ TEXT_YOU_MAY_BEGIN
Definition: trial_of_the_champion.h:213
@ TEXT_BK_LICH
Definition: trial_of_the_champion.h:219
@ TEXT_BK_SPOILED
Definition: trial_of_the_champion.h:217
@ TEXT_CHEER_PALETRESS_2
Definition: trial_of_the_champion.h:210
@ VEHICLE_BLACK_KNIGHT
Definition: trial_of_the_champion.h:173
@ 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:17862