164{
166
167
169 {
172 return;
173 }
174
175
177
178 if (unit)
180 else if (gob)
182
184 LOG_DEBUG(
"sql.sql",
"SmartScript::ProcessAction: Invoker: {} ({})", tempInvoker->GetName(), tempInvoker->GetGUID().ToString());
185
187
190 if (unit)
191 invoker = unit;
192 else if (gob)
193 invoker = gob;
194
196
198 {
200 {
203
205 {
206 if (
IsCreature((target)) && !target->ToCreature()->IsPet())
207 {
209 {
212 }
213 else
215 break;
216 }
218 {
221 break;
222 }
223 }
224
225 if (!talkTarget)
227
228 if (!talker)
229 break;
230
232 {
234 break;
235 }
236
243 break;
244 }
246 {
248 {
252 {
255 }
256
257 LOG_DEBUG(
"sql.sql",
"SmartScript::ProcessAction:: SMART_ACTION_SIMPLE_TALK: talker: {} ({}), textGroupId: {}",
259 }
260 break;
261 }
263 {
265 {
267 {
268 target->ToUnit()->HandleEmoteCommand(e.
action.
emote.emote);
269 LOG_DEBUG(
"sql.sql",
"SmartScript::ProcessAction:: SMART_ACTION_PLAY_EMOTE: target: {} ({}), emote: {}",
270 target->GetName(), target->GetGUID().ToString(), e.
action.
emote.emote);
271 }
272 }
273 break;
274 }
276 {
278 {
280 {
283 else
285 LOG_DEBUG(
"sql.sql",
"SmartScript::ProcessAction:: SMART_ACTION_SOUND: target: {} ({}), sound: {}, onlyself: {}",
287 }
288 }
289 break;
290 }
292 {
300 for (unsigned int sound : sounds)
301 {
302 if (sound)
303 {
304 temp[count] = sound;
305 ++count;
306 }
307 }
308
309 if (count == 0)
310 {
311 break;
312 }
313
315 {
317 {
320 LOG_DEBUG(
"sql.sql",
"SmartScript::ProcessAction:: SMART_ACTION_RANDOM_SOUND: target: {} ({}), sound: {}, onlyself: {}",
322 }
323 }
324
325 break;
326 }
328 {
330
332 {
334 {
336
338 {
340 if (
Player* player = i->GetSource())
341 {
343 {
345 {
347 targets.push_back(player);
348 }
349 else
350 targets.push_back(player);
351 }
352 }
353 }
354 }
355 }
356 else
358
359 if (!targets.empty())
360 {
362 {
364 {
366 LOG_DEBUG(
"sql.sql",
"SmartScript::ProcessAction:: SMART_ACTION_MUSIC: target: {} ({}), sound: {}, onlySelf: {}, type: {}",
368 }
369 }
370 }
371 break;
372 }
374 {
376
378 {
380 {
382
384 {
386 if (
Player* player = i->GetSource())
387 {
389 {
391 {
393 targets.push_back(player);
394 }
395 else
396 targets.push_back(player);
397 }
398 }
399 }
400 }
401 }
402 else
404
405 if (targets.empty())
406 break;
407
415 for (unsigned int sound : sounds)
416 {
417 if (sound)
418 {
419 temp[count] = sound;
420 ++count;
421 }
422 }
423
424 if (count == 0)
425 {
426 break;
427 }
428
430 {
432 {
435 LOG_DEBUG(
"sql.sql",
"SmartScript::ProcessAction:: SMART_ACTION_RANDOM_MUSIC: target: {} ({}), sound: {}, onlyself: {}, type: {}",
437 }
438 }
439
440 break;
441 }
443 {
445 {
447 {
449 {
451 LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction:: SMART_ACTION_SET_FACTION: Creature entry {}, GuidLow {} set faction to {}",
453 }
454 else
455 {
457 {
458 if (target->ToCreature()->GetFaction() != ci->faction)
459 {
460 target->ToCreature()->SetFaction(ci->faction);
461 LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction:: SMART_ACTION_SET_FACTION: Creature entry {}, GuidLow {} set faction to {}",
462 target->GetEntry(), target->GetGUID().ToString(), ci->faction);
463 }
464 }
465 }
466 }
467 }
468 break;
469 }
471 {
473 {
475 continue;
476
478 {
479
481 {
483 {
486 LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction:: SMART_ACTION_MORPH_TO_ENTRY_OR_MODEL: Creature entry {}, GuidLow {} set displayid to {}",
488 }
489 }
490
491 else
492 {
494 LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction:: SMART_ACTION_MORPH_TO_ENTRY_OR_MODEL: Creature entry {}, GuidLow {} set displayid to {}",
496 }
497 }
498 else
499 {
500 target->ToCreature()->DeMorph();
501 LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction:: SMART_ACTION_MORPH_TO_ENTRY_OR_MODEL: Creature entry {}, GuidLow {} demorphs.",
502 target->GetEntry(), target->GetGUID().ToString());
503 }
504 }
505 break;
506 }
508 {
510 {
512 {
513 target->ToPlayer()->FailQuest(e.
action.
quest.quest);
514 LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction:: SMART_ACTION_FAIL_QUEST: Player guidLow {} fails quest {}",
515 target->GetGUID().ToString(), e.
action.
quest.quest);
516 }
517 }
518 break;
519 }
521 {
523 {
525 {
527 {
529 {
530 if (player->CanTakeQuest(q, true))
531 {
533 {
535 menu.SendQuestGiverQuestDetails(q,
me->
GetGUID(),
true);
536 LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction:: SMART_ACTION_OFFER_QUEST: Player guidLow {} - offering quest {}",
538 }
539 }
540 }
541 else
542 {
543 player->AddQuestAndCheckCompletion(q, nullptr);
544 LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction:: SMART_ACTION_OFFER_QUEST: Player guidLow {} - quest {} added",
546 }
547 }
548 }
549 }
550 break;
551 }
553 {
555 {
557 continue;
558
560 }
561 break;
562 }
564 {
565 std::vector<uint32> emotes;
567 std::back_inserter(emotes), [](
uint32 emote) { return emote != 0; });
568
570 {
572 {
574 target->ToUnit()->HandleEmoteCommand(emote);
575 LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction:: SMART_ACTION_RANDOM_EMOTE: Creature guidLow {} handle random emote {}",
576 target->GetGUID().ToString(), emote);
577 }
578 }
579 break;
580 }
582 {
584 break;
585
587 for (ThreatContainer::StorageType::const_iterator i = threatList.begin(); i != threatList.end(); ++i)
588 {
590 {
592 LOG_DEBUG(
"sql.sql",
"SmartScript::ProcessAction:: SMART_ACTION_THREAT_ALL_PCT: Creature {} modify threat for unit {}, value {}",
594 }
595 }
596 break;
597 }
599 {
601 break;
602
604 {
606 {
608 LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction:: SMART_ACTION_THREAT_SINGLE_PCT: Creature guidLow {} modify threat for unit {}, value {}",
610 }
611 }
612 break;
613 }
615 {
617 {
618
620 if (
Vehicle* vehicle = target->ToUnit()->GetVehicleKit())
621 for (auto & Seat : vehicle->Seats)
623 player->AreaExploredOrEventHappens(e.
action.
quest.quest);
624
626 {
627 target->ToPlayer()->AreaExploredOrEventHappens(e.
action.
quest.quest);
628
629 LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction:: SMART_ACTION_CALL_AREAEXPLOREDOREVENTHAPPENS: Player guidLow {} credited quest {}",
630 target->GetGUID().ToString(), e.
action.
quest.quest);
631 }
632 }
633 break;
634 }
636 {
637 if (targets.empty())
638 break;
639
641
644
647
648 bool failedSpellCast = false, successfulSpellCast = false;
649
651 {
652
655
657 continue;
658
659 if (caster && caster !=
me)
660 {
662 }
664 {
665
667 continue;
668
669
672 break;
673
674
676 continue;
677
678
681
687
689 bool isWithinMeleeRange = distanceToTarget <= meleeRange;
692
695
696
697 if (isWithinLOSInMap && isWithinMeleeRange && isRangedAttack && isTargetRooted && canCastSpell && !
me->
IsVehicle())
698 {
699 failedSpellCast = true;
700
702 continue;
703
704 float minDistance = std::max(meleeRange, spellMinRange) - distanceToTarget +
NOMINAL_MELEE_RANGE;
706 continue;
707 }
708
709
710 if (distanceToTarget > spellMaxRange && isWithinLOSInMap)
711 {
712 failedSpellCast = true;
713
715 continue;
716
718 continue;
719 }
720 else if (distanceToTarget < spellMinRange || !(isWithinLOSInMap || isSpellIgnoreLOS))
721 {
722 failedSpellCast = true;
723
725 continue;
726
728 continue;
729 }
730
733 {
736 else
738 }
739
742
744 {
745
747
749 else
750
752 }
753
754 if (spellCastFailed)
755 failedSpellCast = true;
756 else
757 successfulSpellCast = true;
758
759 LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction:: SMART_ACTION_CAST: Unit {} casts spell {} on target {} with castflags {}",
761 }
762 }
763
764
765 if (failedSpellCast && !successfulSpellCast)
766 {
768
769 return;
770 }
771
772 break;
773 }
775 {
776 if (targets.empty())
777 break;
778
781
784 {
786 {
788 }
789 else
790 {
792 }
793 }
794
796 {
798 if (!uTarget)
799 continue;
800
802 {
804 {
806 }
807
809 }
810 }
811 break;
812 }
814 {
815
817 if (!tempLastInvoker)
818 break;
819
820 if (targets.empty())
821 break;
822
825
827 {
829 continue;
830
831 if (!
IsUnit(tempLastInvoker))
832 continue;
833
835 {
837 {
839 }
840
843 {
845 {
847 }
848 else
849 {
851 }
852 }
853
855 LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction:: SMART_ACTION_INVOKER_CAST: Invoker {} casts spell {} on target {} with castflags {}",
857 }
858 else
859 {
860 LOG_DEBUG(
"scripts.ai",
"Spell {} not cast because it has flag SMARTCAST_AURA_NOT_PRESENT and the target {} already has the aura",
862 }
863 }
864 break;
865 }
867 {
869 {
871 {
873 LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction:: SMART_ACTION_ADD_AURA: Adding aura {} to unit {}",
875 }
876 }
877 break;
878 }
880 {
882 {
884 {
886
887
889 {
891 }
892
894 LOG_DEBUG(
"sql.sql",
"SmartScript::ProcessAction:: SMART_ACTION_ACTIVATE_GOBJECT. Gameobject {} activated",
go->
GetGUID().
ToString());
895 }
896 }
897
898 break;
899 }
901 {
903 {
905 {
906 target->ToGameObject()->ResetDoorOrButton();
907 LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction:: SMART_ACTION_RESET_GOBJECT. Gameobject {} (entry: {}) reset",
908 target->GetGUID().ToString(), target->GetEntry());
909 }
910 }
911 break;
912 }
914 {
916 {
918 {
920 LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction:: SMART_ACTION_SET_EMOTE_STATE. Unit {} set emotestate to {}",
921 target->GetGUID().ToString(), e.
action.
emote.emote);
922 }
923 }
924 break;
925 }
927 {
929 {
931 {
933 {
935 LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction:: SMART_ACTION_SET_UNIT_FLAG. Unit {} added flag {} to UNIT_FIELD_FLAGS",
937 }
938 else
939 {
941 LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction:: SMART_ACTION_SET_UNIT_FLAG. Unit {} added flag {} to UNIT_FIELD_FLAGS_2",
943 }
944 }
945 }
946 break;
947 }
949 {
951 {
953 {
955 {
957 LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction:: SMART_ACTION_REMOVE_UNIT_FLAG. Unit {} removed flag {} to UNIT_FIELD_FLAGS",
959 }
960 else
961 {
963 LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction:: SMART_ACTION_REMOVE_UNIT_FLAG. Unit {} removed flag {} to UNIT_FIELD_FLAGS_2",
965 }
966 }
967 }
968 break;
969 }
971 {
973 break;
974
976 LOG_DEBUG(
"sql.sql",
"SmartScript::ProcessAction:: SMART_ACTION_AUTO_ATTACK: Creature: {} bool on = {}",
978 break;
979 }
981 {
983 break;
984
987 LOG_DEBUG(
"sql.sql",
"SmartScript::ProcessAction:: SMART_ACTION_ALLOW_COMBAT_MOVEMENT: Creature {} bool on = {}",
989 break;
990 }
992 {
994 break;
995
997 LOG_DEBUG(
"sql.sql",
"SmartScript::ProcessAction:: SMART_ACTION_SET_EVENT_PHASE: Creature {} set event phase {}",
999 break;
1000 }
1002 {
1004 break;
1005
1008 LOG_DEBUG(
"sql.sql",
"SmartScript::ProcessAction:: SMART_ACTION_INC_EVENT_PHASE: Creature {} inc event phase by {}, "
1010 break;
1011 }
1013 {
1015 break;
1016
1019 if (target->ToCreature()->IsAIEnabled)
1020 target->ToCreature()->AI()->EnterEvadeMode();
1021
1022 break;
1023 }
1025 {
1026
1028 break;
1029
1032 {
1035 }
1036 LOG_DEBUG(
"sql.sql",
"SmartScript::ProcessAction:: SMART_ACTION_FLEE_FOR_ASSIST: Creature {} DoFleeToGetAssistance",
me->
GetGUID().
ToString());
1037 break;
1038 }
1040 {
1042 break;
1043
1045 break;
1046 }
1048 {
1050 {
1052 continue;
1053
1055
1058 {
1060 LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction: SMART_ACTION_CALL_GROUPEVENTHAPPENS: Player {}, group credit for quest {}",
1062 }
1063
1064
1066 {
1067 for (auto& Seat : vehicle->Seats)
1068 {
1070 {
1072 }
1073 }
1074 }
1075 }
1076 break;
1077 }
1079 {
1081 {
1083 continue;
1084
1086 {
1088 {
1091 }
1092 else
1094 }
1095 else
1096 target->ToUnit()->RemoveAllAuras();
1097
1098 LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction: SMART_ACTION_REMOVEAURASFROMSPELL: Unit {}, spell {}",
1100 }
1101 break;
1102 }
1104 {
1106 break;
1107
1109 {
1111 break;
1112 }
1113
1115 {
1117 {
1120 LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction: SMART_ACTION_FOLLOW: Creature {} following target {}",
1122 break;
1123 }
1124 }
1125 break;
1126 }
1128 {
1130 break;
1131
1132 std::vector<uint32> phases;
1134 std::back_inserter(phases), [](
uint32 phase) { return phase != 0; });
1135
1138 LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction: SMART_ACTION_RANDOM_PHASE: Creature {} sets event phase to {}",
1140 break;
1141 }
1143 {
1145 break;
1146
1149 LOG_DEBUG(
"sql.sql",
"SmartScript::ProcessAction: SMART_ACTION_RANDOM_PHASE_RANGE: Creature {} sets event phase to {}",
1151 break;
1152 }
1154 {
1156 {
1158 LOG_DEBUG(
"sql.sql",
"SmartScript::ProcessAction: SMART_ACTION_CALL_KILLEDMONSTER: (trigger == true) Player {}, Killcredit: {}",
1160 }
1162 {
1164 break;
1165
1167 {
1169 LOG_DEBUG(
"sql.sql",
"SmartScript::ProcessAction: SMART_ACTION_CALL_KILLEDMONSTER: Player {}, Killcredit: {}",
1171 }
1172 }
1173 else
1174 {
1176 {
1178 continue;
1179
1181 if (!player)
1182 continue;
1183
1185 LOG_DEBUG(
"sql.sql",
"SmartScript::ProcessAction: SMART_ACTION_CALL_KILLEDMONSTER: Player {}, Killcredit: {}",
1187 }
1188 }
1189 break;
1190 }
1192 {
1194 if (!obj)
1195 obj = unit;
1196
1197 if (!obj)
1198 break;
1199
1201 if (!instance)
1202 {
1203 LOG_ERROR(
"scripts.ai.sai",
"SmartScript: Event {} attempt to set instance data without instance script. EntryOrGuid {}", e.
GetEventType(), e.
entryOrGuid);
1204 break;
1205 }
1206
1208 {
1209 case 0:
1210 {
1213 } break;
1214 case 1:
1215 {
1218 } break;
1219 default:
1220 {
1221 break;
1222 }
1223 }
1224 break;
1225 }
1227 {
1229 if (!obj)
1230 obj = unit;
1231
1232 if (!obj)
1233 break;
1234
1236 if (!instance)
1237 {
1239 break;
1240 }
1241
1242 if (targets.empty())
1243 break;
1244
1246 LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction: SMART_ACTION_SET_INST_DATA64: Field: {}, data: {}",
1248 break;
1249 }
1251 {
1255 break;
1256 }
1258 {
1260 {
1262 {
1264 {
1265
1267 {
1268 me->KillSelf();
1269 LOG_DEBUG("sql.sql", "SmartScript::ProcessAction: SMART_ACTION_DIE: Creature {}", me->GetGUID().ToString());
1270 }
1272 }
1273 }
1275 {
1278 }
1279 break;
1280 }
1282 {
1283 if (targets.empty())
1284 break;
1285
1287 {
1290
1294 {
1298 }
1299 }
1300 else
1301 {
1303 {
1305 {
1306 target->ToCreature()->SetInCombatWithZone();
1307 LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction: SMART_ACTION_SET_IN_COMBAT_WITH_ZONE: Creature {}, target: {}",
1309 }
1310 }
1311 }
1312
1313 break;
1314 }
1316 {
1318 {
1320 {
1323 {
1326 }
1327 LOG_DEBUG(
"scripts.ai",
"SmartScript::ProcessAction: SMART_ACTION_CALL_FOR_HELP: Creature {}, target: {}",
1329 }
1330 }
1331 break;
1332 }
1334 {
1336 {
1338 LOG_DEBUG(
"sql.sql",
"SmartScript::ProcessAction: SMART_ACTION_SET_SHEATH: Creature {}, State: {}",
1340 }
1341 break;
1342 }
1344 {
1346 {
1348 {
1350 LOG_ERROR(
"sql.sql",
"SmartScript: SMART_ACTION_FORCE_DESPAWN has removeObjectFromWorld set. delay and forceRespawnTimer ignored.");
1351
1353 creature->AddObjectToRemoveList();
1356 }
1357 else
1358 {
1360
1361
1362 if (despawnDelay <= 0ms)
1363 despawnDelay = 1ms;
1364
1367 creature->DespawnOrUnsummon(despawnDelay, forceRespawnTimer);
1370 }
1371 }
1372
1373 break;
1374 }
1376 {
1378 {
1383 }
1384 break;
1385 }
1387 {
1389 {
1391 continue;
1392
1394 {
1396 {
1399 }
1400 else
1402 }
1403 else
1404 target->ToUnit()->Dismount();
1405 }
1406 break;
1407 }
1409 {
1411 {
1413 {
1415 if (!ai)
1416 continue;
1417
1420 else
1422 }
1423 }
1424 break;
1425 }
1427 {
1429 {
1431 {
1433
1435 {
1438 else
1440 }
1441 else
1443 }
1445 {
1447
1449 {
1452 else
1454 }
1455 else
1457 }
1458 }
1459 break;
1460 }
1462 {
1464 break;
1465
1466 float x, y, z;
1469 break;
1470 }
1472 {
1474 break;
1475
1477 break;
1478 }
1480 {
1484
1485 break;
1486 }
1488 {
1491 break;
1492 }
1494 {
1496 break;
1497
1498 if (targets.empty())
1499 break;
1500
1501
1504 break;
1505 }
1507 {
1511 break;
1512 }
1514 {
1516 bool preferUnit = flags.HasFlag(SmartActionSummonCreatureFlags::PreferUnit);
1518 if (!summoner)
1519 break;
1520
1521 bool personalSpawn = flags.HasFlag(SmartActionSummonCreatureFlags::PersonalSpawn);
1522
1524 {
1529 {
1532 else
1535 {
1537 summon->AI()->AttackStart(unit);
1539 summon->AI()->AttackStart(
me);
1540 }
1541 }
1542 break;
1543 }
1544
1545 float x, y, z, o;
1547 {
1548 target->GetPosition(x, y, z, o);
1554 {
1556 summon->AI()->AttackStart(unit);
1558 summon->AI()->AttackStart(target->ToUnit());
1560 summon->AI()->AttackStart(
me);
1561 }
1562 }
1563
1565 break;
1566
1568 {
1570 summon->AI()->AttackStart(unit);
1572 summon->AI()->AttackStart(
me);
1573 }
1574 break;
1575 }
1577 {
1579 break;
1580
1581 if (!targets.empty())
1582 {
1583 float x, y, z, o;
1585 {
1586
1587
1588
1589
1590 target->GetPosition(x, y, z, o);
1597 else
1599 }
1600 }
1601
1603 break;
1604
1606 break;
1607 }
1609 {
1611 {
1613 continue;
1614
1615 Unit::Kill(target->ToUnit(), target->ToUnit());
1616 }
1617
1618 break;
1619 }
1621 {
1623 break;
1624 }
1626 {
1628 {
1630 continue;
1631
1633 }
1634 break;
1635 }
1637 {
1639 {
1641 continue;
1642
1644 }
1645 break;
1646 }
1648 {
1650 break;
1651 }
1653 {
1655 {
1660 }
1661 break;
1662 }
1664 {
1666 break;
1667
1669
1672
1673
1675 break;
1676 }
1678 {
1680 {
1682 {
1683 if (
IsSmart(target->ToCreature()))
1685 else
1687 }
1688 }
1689
1690 break;
1691 }
1693 {
1695 break;
1696
1698 break;
1699 }
1701 {
1702 if (!targets.empty())
1703 {
1705 {
1707 {
1710 else
1711 LOG_ERROR(
"sql.sql",
"SmartScript: Action target for SMART_ACTION_SET_COUNTER is not using SmartAI, skipping");
1712 }
1714 {
1717 else
1718 LOG_ERROR(
"sql.sql",
"SmartScript: Action target for SMART_ACTION_SET_COUNTER is not using SmartGameObjectAI, skipping");
1719 }
1720 }
1721 }
1722 else
1724 break;
1725 }
1727 {
1729 break;
1730
1734
1736 {
1738 {
1740 break;
1741 }
1742 }
1743
1746
1751 break;
1752 }
1754 {
1756 break;
1757
1760 break;
1761 }
1763 {
1765 break;
1766
1771 break;
1772 }
1774 {
1776 break;
1777
1779 break;
1780 }
1782 {
1784 break;
1785
1787 {
1788 float randomOri =
frand(0.0f, 2 * M_PI);
1792 break;
1793 }
1794
1796 {
1801 break;
1802 }
1803
1805 {
1809 }
1811 {
1815 }
1816 else if (!targets.empty())
1817 {
1821 }
1822
1823 break;
1824 }
1826 {
1828 {
1830 continue;
1831
1833 }
1834 break;
1835 }
1837 {
1839 break;
1840
1842
1844 {
1846 {
1850 trans->CalculatePassengerPosition(dest.x, dest.y, dest.z);
1851
1854
1855 break;
1856 }
1858 {
1860 {
1869 true,
1870 true,
1872 );
1873
1874 }
1875
1876 break;
1877 }
1878
1879 default:
1880 {
1881
1882 if (targets.empty())
1883 return;
1884 else
1886
1887 float x, y, z;
1889
1894
1896
1897 break;
1898 }
1899 }
1900
1901 break;
1902 }
1904 {
1906 {
1908 {
1911 }
1912 }
1913
1914 break;
1915 }
1917 {
1919 {
1923 {
1924
1927 else
1929 }
1930 }
1931 break;
1932 }
1934 {
1938 break;
1939 }
1941 {
1943 {
1945 {
1946 std::array<uint32, MAX_EQUIPMENT_ITEMS> slot;
1948 {
1950 if (!eInfo)
1951 {
1952 LOG_ERROR(
"sql.sql",
"SmartScript: SMART_ACTION_EQUIP uses non-existent equipment info id {} for creature {}", equipId,
npc->GetEntry());
1953 break;
1954 }
1955
1956 npc->SetCurrentEquipmentId(equipId);
1957
1958 std::copy(std::begin(eInfo->
ItemEntry), std::end(eInfo->
ItemEntry), std::begin(slot));
1959 }
1960 else
1962
1966 }
1967 }
1968 break;
1969 }
1971 {
1976
1981
1985
1989
1997 break;
1998 }
2001
2002
2005 break;
2008 break;
2010 {
2012 {
2014 {
2021 break;
2022 }
2024 {
2031 break;
2032 }
2033 }
2034
2035 break;
2036 }
2039 break;
2042 break;
2044 {
2046 break;
2047
2050
2053 if (
IsSmart(creature) && creature->GetVictim())
2055 creature->GetMotionMaster()->MoveChase(creature->GetVictim(), attackDistance, attackAngle);
2056
2057 break;
2058 }
2060 {
2062 {
2064 break;
2065 }
2066
2068 {
2070 {
2073 }
2075 {
2078 }
2079 }
2080 break;
2081 }
2083 {
2087 break;
2088 }
2090 {
2094 break;
2095 }
2097 {
2101 break;
2102 }
2104 {
2105 if (targets.empty())
2106 break;
2107
2109 GetTargets(casters,
CreateSmartEvent(
SMART_EVENT_UPDATE_IC, 0, 0, 0, 0, 0, 0, 0,
SMART_ACTION_NONE, 0, 0, 0, 0, 0, 0, (
SMARTAI_TARGETS)e.
action.
crossCast.
targetType, e.
action.
crossCast.
targetParam1, e.
action.
crossCast.
targetParam2, e.
action.
crossCast.
targetParam3, 0, 0), unit);
2110
2112 {
2114 continue;
2115
2117
2118 bool interruptedSpell = false;
2119
2121 {
2123 continue;
2124
2126 {
2128 {
2130 interruptedSpell = true;
2131 }
2132
2134 }
2135 else
2137 }
2138 }
2139 break;
2140 }
2142 {
2143 std::vector<uint32> actionLists;
2145 std::back_inserter(actionLists), [](
uint32 actionList) { return actionList != 0; });
2146
2149 {
2151 break;
2152 }
2153
2155 {
2157 {
2160 }
2162 {
2165 }
2166 }
2167 break;
2168 }
2170 {
2173 {
2175 break;
2176 }
2177
2179 {
2181 {
2184 }
2186 {
2189 }
2190 }
2191 break;
2192 }
2194 {
2198 break;
2199 }
2201 {
2202 bool foundTarget = false;
2203
2205 {
2207 {
2208 foundTarget = true;
2209
2212 else
2214 }
2215 }
2216
2218 {
2221 else
2223 }
2224 break;
2225 }
2227 {
2231 break;
2232 }
2234 {
2238 break;
2239 }
2241 {
2245 break;
2246 }
2248 {
2252 break;
2253 }
2255 {
2259 break;
2260 }
2262 {
2266 break;
2267 }
2269 {
2273 break;
2274 }
2276 {
2278 {
2280 {
2285 }
2286
2287 break;
2288 }
2289
2290 if (targets.empty())
2291 break;
2292
2293
2295 {
2299 }
2300 else
2301 {
2304 {
2307 }
2308 }
2309
2310 break;
2311 }
2313 {
2317 break;
2318 }
2320 {
2324 break;
2325 }
2327 {
2329
2330 if (!ref)
2331 ref = unit;
2332
2333 if (!ref)
2334 break;
2335
2337 if (!storedTargets)
2338 break;
2339
2341 {
2343 {
2346 else
2347 LOG_ERROR(
"sql.sql",
"SmartScript: Action target for SMART_ACTION_SEND_TARGET_TO_TARGET is not using SmartAI, skipping");
2348 }
2350 {
2353 else
2354 LOG_ERROR(
"sql.sql",
"SmartScript: Action target for SMART_ACTION_SEND_TARGET_TO_TARGET is not using SmartGameObjectAI, skipping");
2355 }
2356 }
2357 break;
2358 }
2360 {
2362 break;
2363
2364 LOG_DEBUG(
"sql.sql",
"SmartScript::ProcessAction:: SMART_ACTION_SEND_GOSSIP_MENU: gossipMenuId {}, gossipNpcTextId {}",
2366
2369 {
2372 else
2374
2376 }
2377
2378 break;
2379 }
2381 {
2382 if (!targets.empty())
2383 {
2384 float x, y, z, o;
2387 {
2389 {
2392 }
2393 else
2395 }
2396 }
2398 {
2400 {
2401 float x, y, z, o;
2404 }
2405 else
2407 }
2408 break;
2409 }
2411 {
2415
2416 break;
2417 }
2419 {
2423 break;
2424 }
2426 {
2430 break;
2431 }
2433 {
2437 break;
2438 }
2440 {
2444 break;
2445 }
2447 {
2448 std::list<TempSummon*> summonList;
2450
2451 for (std::list<TempSummon*>::const_iterator itr = summonList.begin(); itr != summonList.end(); ++itr)
2452 {
2454 (*itr)->AI()->AttackStart(unit);
2456 (*itr)->AI()->AttackStart(
me);
2457 }
2458
2459 break;
2460 }
2462 {
2466 break;
2467 }
2469 {
2473 break;
2474 }
2476 {
2480 break;
2481 }
2483 {
2486 {
2487 LOG_ERROR(
"scripts.ai.sai",
"SmartScript::ProcessAction: At case SMART_ACTION_GAME_EVENT_STOP, inactive event (id: {})", eventId);
2488 break;
2489 }
2491 break;
2492 }
2494 {
2497 {
2498 LOG_ERROR(
"scripts.ai.sai",
"SmartScript::ProcessAction: At case SMART_ACTION_GAME_EVENT_START, already activated event (id: {})", eventId);
2499 break;
2500 }
2502 break;
2503 }
2505 {
2506 std::vector<uint32> waypoints;
2508 std::back_inserter(waypoints), [](
uint32 wp) { return wp != 0; });
2509
2510 float distanceToClosest = std::numeric_limits<float>::max();
2512
2514 {
2516 {
2518 {
2519 for (
uint32 wp : waypoints)
2520 {
2522 if (!path || path->empty())
2523 continue;
2524
2525 auto itrWp = path->find(0);
2526 if (itrWp != path->end())
2527 {
2529 {
2530 float distToThisPath = creature->GetDistance(wp->x, wp->y, wp->z);
2531 if (distToThisPath < distanceToClosest)
2532 {
2533 distanceToClosest = distToThisPath;
2534 closestWp = wp;
2535 }
2536 }
2537 }
2538 }
2539
2540 if (closestWp)
2542 }
2543 }
2544 }
2545 break;
2546 }
2548 {
2552
2553 break;
2554 }
2556 {
2559 {
2562 }
2563
2564 break;
2565 }
2567 {
2571
2572 break;
2573 }
2575 {
2579 break;
2580 }
2582 {
2586 break;
2587 }
2589 {
2593 break;
2594 }
2596 {
2600 break;
2601 }
2603 {
2606 break;
2607 }
2609 {
2613 break;
2614 }
2616 {
2620 break;
2621 }
2623 {
2627
2628 break;
2629 }
2631 {
2635 break;
2636 }
2638 {
2642
2643 break;
2644 }
2646 {
2648 break;
2649 }
2651 {
2655 break;
2656 }
2658 {
2660 {
2662 {
2667 }
2668 }
2669 break;
2670 }
2672 {
2676
2677 break;
2678 }
2680 {
2684 {
2686 break;
2687 }
2688
2689 break;
2690 }
2692 {
2695 break;
2696 }
2698 {
2700
2701 if (!targets.empty())
2705
2706 break;
2707 }
2709 {
2711 break;
2712
2714 {
2716 {
2718 {
2720 }
2721
2723 {
2724
2725
2726
2727 bool _allowMove = false;
2730
2735 _allowMove = true;
2736
2738 }
2739
2741 {
2750 }
2751 }
2752 }
2753 break;
2754 }
2756 {
2758 break;
2759
2760 if (targets.empty())
2761 break;
2762
2764
2769
2770
2771
2772
2773
2774 float factor = std::exp(k * delta_phi);
2775
2776
2777 float summonRadius = a;
2778
2780 {
2781
2782
2784
2785 do
2786 {
2788 summonPosition.RelocatePolarOffset(phi, summonRadius);
2789
2791
2792 phi += delta_phi;
2793 summonRadius *= factor;
2794 } while (summonRadius <= r_max);
2795 }
2796
2797 break;
2798 }
2800 {
2802 break;
2803
2805
2808
2810 {
2811 float deltaAngle = 0.0f;
2812 if (radius > 0)
2813 deltaAngle = distInARow / radius;
2814
2816 if (deltaAngle > 0)
2817 count += coneAngle / deltaAngle;
2818
2819 float currentAngle = -static_cast<float>(count) * deltaAngle / 2.0f;
2820
2823 else if (!targets.empty())
2824 {
2826 }
2827
2828 for (
uint32 index = 0; index < count; ++index)
2829 {
2831 spawnPosition.RelocatePolarOffset(currentAngle, radius);
2832 currentAngle += deltaAngle;
2833
2835 }
2836 }
2837
2838 break;
2839 }
2841 {
2843 {
2845 {
2846 playerTarget->RemoveArenaSpellCooldowns();
2847 playerTarget->RemoveAurasDueToSpell(57724);
2848 playerTarget->RemoveAurasDueToSpell(57723);
2849 playerTarget->RemoveAurasDueToSpell(2825);
2850 playerTarget->RemoveAurasDueToSpell(32182);
2851 }
2852 }
2853
2854 break;
2855 }
2857 {
2860 {
2861 if (targets.empty())
2862 break;
2863
2865 {
2867 {
2869 {
2870 unitTarget->AI()->DoAction(actionId);
2871 }
2872 }
2874 {
2875 gobjTarget->AI()->DoAction(actionId);
2876 }
2877 }
2878
2879 }
2880 else
2881 {
2884 {
2885 instanceScript = baseObj->GetInstanceScript();
2886 }
2887
2889 {
2891 }
2892
2893 if (instanceScript)
2894 {
2895 instanceScript->
DoAction(actionId);
2896 }
2897 }
2898 break;
2899 }
2901 {
2903 break;
2904
2906 break;
2907 }
2909 {
2911 {
2914 }
2915 break;
2916 }
2918 {
2922 break;
2923 }
2925 {
2928 float speed = float(speedInteger) + float(speedFraction) / std::pow(10, std::floor(std::log10(float(speedFraction ? speedFraction : 1)) + 1));
2929
2933
2934 break;
2935 }
2937 {
2939 {
2941 continue;
2942
2944 }
2945 break;
2946 }
2948 {
2950 {
2952
2954 {
2956 {
2957 guidToSend = invoker->
GetGUID();
2958 }
2959 }
2960
2962 {
2964 }
2966 {
2968 }
2969 }
2970 break;
2971 }
2973 {
2974
2976 {
2977 case 0:
2978 {
2980 {
2982 {
2985 c->DespawnOrUnsummon();
2986 }
2987 }
2988 break;
2989 }
2990 case 1:
2991 {
2993 {
2995 {
2997 c->Respawn(true);
2999 }
3000 }
3001 break;
3002 }
3003 case 2:
3004 {
3006 {
3008 {
3010
3011
3014 else
3015 c->Respawn(true);
3016
3017
3020
3021
3024 }
3025 }
3026 break;
3027 }
3028 default:
3029 break;
3030 }
3031 break;
3032 }
3034 {
3036
3038 {
3040 {
3042 }
3043 }
3044 break;
3045 }
3047 {
3049 break;
3050
3052
3055
3057 {
3059 {
3063 }
3064 break;
3065 }
3066
3068 {
3069 float currentAngle = startAngle + (itr * stepAngle);
3071 }
3072
3073 break;
3074 }
3076 {
3078 {
3080 {
3083 }
3084 }
3085 break;
3086 }
3088 {
3090 {
3094
3095 break;
3096 }
3097
3098 uint8 membCount = targets.size();
3102 {
3104 {
3105 float angle = (membCount > 4 ? (M_PI * 2)/membCount : (M_PI / 2));
3107 {
3109 {
3111 itr++;
3112 }
3113 }
3114 break;
3115 }
3117 {
3119 {
3121 {
3123 itr++;
3124 }
3125 }
3126 break;
3127 }
3129 {
3131 {
3133 {
3135 itr++;
3136 }
3137 }
3138 break;
3139 }
3141 {
3143 {
3145 {
3147 itr++;
3148 }
3149 }
3150 break;
3151 }
3153 {
3155 {
3157 {
3159 itr++;
3160 }
3161 }
3162 break;
3163 }
3165 {
3167 {
3169 {
3171 itr++;
3172 }
3173 }
3174 break;
3175 }
3176 default:
3177 break;
3178 }
3179
3180 break;
3181 }
3183 {
3185 {
3186 case 0:
3187 {
3190
3191 break;
3192 }
3193 case 1:
3194 {
3197
3198 break;
3199 }
3200 case 2:
3201 {
3204
3205 break;
3206 }
3207 case 3:
3208 {
3210 GetTargets(facingTargets,
CreateSmartEvent(
SMART_EVENT_UPDATE_IC, 0, 0, 0, 0, 0, 0, 0,
SMART_ACTION_NONE, 0, 0, 0, 0, 0, 0, (
SMARTAI_TARGETS)e.
action.
orientationTarget.
targetType, e.
action.
orientationTarget.
targetParam1, e.
action.
orientationTarget.
targetParam2, e.
action.
orientationTarget.
targetParam3, e.
action.
orientationTarget.
targetParam4, 0), unit);
3211
3215
3216 break;
3217 }
3218 default:
3219 break;
3220 }
3221 break;
3222 }
3224 {
3226 {
3228 {
3230 {
3233 }
3234 }
3235 }
3236
3237 break;
3238 }
3240 {
3242 {
3244 {
3246 {
3250 }
3251 }
3252 }
3253
3254 break;
3255 }
3257 {
3261
3262 break;
3263 }
3265 {
3269
3270 break;
3271 }
3273 {
3277
3278 break;
3279 }
3281 {
3283 break;
3284 }
3285 default:
3287 break;
3288 }
3289
3291 {
3293 if (linked.has_value() && linked.value().get().GetEventType() ==
SMART_EVENT_LINK)
3294 executionStack.emplace_back(SmartScriptFrame{ linked.value(), unit, var0, var1, bvar, spell, gob });
3295 else
3297 }
3298}
#define DEFAULT_LOCALE
Definition: Common.h:79
std::chrono::milliseconds Milliseconds
Milliseconds shorthand typedef.
Definition: Duration.h:27
std::chrono::seconds Seconds
Seconds shorthand typedef.
Definition: Duration.h:30
float frand(float min, float max)
Definition: Random.cpp:57
uint32 urand(uint32 min, uint32 max)
Definition: Random.cpp:44
std::int8_t int8
Definition: Define.h:105
phase
Definition: boss_skadi.cpp:103
@ GAMEOBJECT_TYPE_DOOR
Definition: SharedDefines.h:1560
@ POWER_MANA
Definition: SharedDefines.h:269
@ CHAT_MSG_MONSTER_EMOTE
Definition: SharedDefines.h:3168
@ CHAT_MSG_ADDON
Definition: SharedDefines.h:3151
@ LANG_UNIVERSAL
Definition: SharedDefines.h:735
@ LANG_ADDON
Definition: SharedDefines.h:753
@ SPELL_ATTR2_IGNORE_LINE_OF_SIGHT
Definition: SharedDefines.h:458
@ TEAM_NEUTRAL
Definition: SharedDefines.h:762
SpellCastResult
Definition: SharedDefines.h:948
@ SPELL_FAILED_OUT_OF_RANGE
Definition: SharedDefines.h:1046
@ SPELL_CAST_OK
Definition: SharedDefines.h:1138
@ SPELL_FAILED_SPELL_IN_PROGRESS
Definition: SharedDefines.h:1054
#define sObjectMgr
Definition: ObjectMgr.h:1635
#define CAST_AI(a, b)
Definition: UnitAI.h:26
#define ENSURE_AI(a, b)
Definition: UnitAI.h:27
@ SMART_EVENT_FLAG_TEMP_IGNORE_CHANCE_ROLL
Definition: SmartScriptMgr.h:1929
SMARTAI_TARGETS
Definition: SmartScriptMgr.h:1519
@ SMART_TARGET_RANDOM_POINT
Definition: SmartScriptMgr.h:1558
#define sSmartWaypointMgr
Definition: SmartScriptMgr.h:2229
SMART_ACTION
Definition: SmartScriptMgr.h:557
@ SMART_ACTION_REMOVE_TIMED_EVENT
Definition: SmartScriptMgr.h:632
@ SMART_ACTION_NONE
Definition: SmartScriptMgr.h:558
@ SMART_ACTION_SET_GO_FLAG
Definition: SmartScriptMgr.h:662
@ SMART_ACTION_WP_RESUME
Definition: SmartScriptMgr.h:623
@ SMART_ACTION_UPDATE_TEMPLATE
Definition: SmartScriptMgr.h:594
@ SMART_ACTION_SET_HEALTH_REGEN
Definition: SmartScriptMgr.h:660
@ SMART_ACTION_ACTIVATE_GOBJECT
Definition: SmartScriptMgr.h:567
@ SMART_ACTION_GAME_EVENT_START
Definition: SmartScriptMgr.h:670
@ SMART_ACTION_CALL_RANDOM_RANGE_TIMED_ACTIONLIST
Definition: SmartScriptMgr.h:646
@ SMART_ACTION_REMOVE_UNIT_FIELD_BYTES_1
Definition: SmartScriptMgr.h:649
@ SMART_ACTION_SET_INST_DATA64
Definition: SmartScriptMgr.h:593
@ SMART_ACTION_SET_FACTION
Definition: SmartScriptMgr.h:560
@ SMART_ACTION_THREAT_SINGLE_PCT
Definition: SmartScriptMgr.h:571
@ SMART_ACTION_OFFER_QUEST
Definition: SmartScriptMgr.h:565
@ SMART_ACTION_REMOVE_ALL_GAMEOBJECTS
Definition: SmartScriptMgr.h:684
@ SMART_ACTION_RISE_UP
Definition: SmartScriptMgr.h:672
@ SMART_ACTION_SET_INGAME_PHASE_MASK
Definition: SmartScriptMgr.h:602
@ SMART_ACTION_SET_UNIT_FIELD_BYTES_1
Definition: SmartScriptMgr.h:648
@ SMART_ACTION_CLOSE_GOSSIP
Definition: SmartScriptMgr.h:630
@ SMART_ACTION_DISABLE_EVADE
Definition: SmartScriptMgr.h:675
@ SMART_ACTION_CONE_SUMMON
Definition: SmartScriptMgr.h:722
@ SMART_ACTION_ADD_GO_FLAG
Definition: SmartScriptMgr.h:663
@ SMART_ACTION_ADD_DYNAMIC_FLAG
Definition: SmartScriptMgr.h:653
@ SMART_ACTION_KILL_UNIT
Definition: SmartScriptMgr.h:609
@ SMART_ACTION_LOAD_EQUIPMENT
Definition: SmartScriptMgr.h:682
@ SMART_ACTION_CALL_AREAEXPLOREDOREVENTHAPPENS
Definition: SmartScriptMgr.h:573
@ SMART_ACTION_ATTACK_START
Definition: SmartScriptMgr.h:607
@ SMART_ACTION_MOVEMENT_RESUME
Definition: SmartScriptMgr.h:739
@ SMART_ACTION_SET_UNIT_FLAG
Definition: SmartScriptMgr.h:576
@ SMART_ACTION_NO_ENVIRONMENT_UPDATE
Definition: SmartScriptMgr.h:715
@ SMART_ACTION_CALL_GROUPEVENTHAPPENS
Definition: SmartScriptMgr.h:584
@ SMART_ACTION_MOUNT_TO_ENTRY_OR_MODEL
Definition: SmartScriptMgr.h:601
@ SMART_ACTION_INVOKER_CAST
Definition: SmartScriptMgr.h:692
@ SMART_ACTION_MOVEMENT_STOP
Definition: SmartScriptMgr.h:737
@ SMART_ACTION_SET_SCALE
Definition: SmartScriptMgr.h:730
@ SMART_ACTION_JUMP_TO_POS
Definition: SmartScriptMgr.h:655
@ SMART_ACTION_CALL_RANDOM_TIMED_ACTIONLIST
Definition: SmartScriptMgr.h:645
@ SMART_ACTION_SEND_GOSSIP_MENU
Definition: SmartScriptMgr.h:656
@ SMART_ACTION_SET_COUNTER
Definition: SmartScriptMgr.h:621
@ SMART_ACTION_FLEE_FOR_ASSIST
Definition: SmartScriptMgr.h:583
@ SMART_ACTION_EQUIP
Definition: SmartScriptMgr.h:629
@ SMART_ACTION_SET_ROOT
Definition: SmartScriptMgr.h:661
@ SMART_ACTION_ATTACK_STOP
Definition: SmartScriptMgr.h:727
@ SMART_ACTION_SUMMON_GO
Definition: SmartScriptMgr.h:608
@ SMART_ACTION_SET_HOVER
Definition: SmartScriptMgr.h:709
@ SMART_ACTION_WP_PAUSE
Definition: SmartScriptMgr.h:612
@ SMART_ACTION_SIMPLE_TALK
Definition: SmartScriptMgr.h:642
@ SMART_ACTION_STOP_MOTION
Definition: SmartScriptMgr.h:714
@ SMART_ACTION_VORTEX_SUMMON
Definition: SmartScriptMgr.h:724
@ SMART_ACTION_WORLD_SCRIPT
Definition: SmartScriptMgr.h:740
@ SMART_ACTION_MUSIC
Definition: SmartScriptMgr.h:718
@ SMART_ACTION_SET_ORIENTATION_TARGET
Definition: SmartScriptMgr.h:734
@ SMART_ACTION_SET_UNIT_MOVEMENT_FLAGS
Definition: SmartScriptMgr.h:706
@ SMART_ACTION_ADD_AURA
Definition: SmartScriptMgr.h:633
@ SMART_ACTION_THREAT_ALL_PCT
Definition: SmartScriptMgr.h:572
@ SMART_ACTION_RESPAWN_TARGET
Definition: SmartScriptMgr.h:628
@ SMART_ACTION_FOLLOW_GROUP
Definition: SmartScriptMgr.h:733
@ SMART_ACTION_SOUND
Definition: SmartScriptMgr.h:562
@ SMART_ACTION_MOVE_TO_POS_TARGET
Definition: SmartScriptMgr.h:703
@ SMART_ACTION_SET_MOVEMENT_SPEED
Definition: SmartScriptMgr.h:694
@ SMART_ACTION_PLAY_CINEMATIC
Definition: SmartScriptMgr.h:693
@ SMART_ACTION_ADD_NPC_FLAG
Definition: SmartScriptMgr.h:640
@ SMART_ACTION_EVADE
Definition: SmartScriptMgr.h:582
@ SMART_ACTION_FAIL_QUEST
Definition: SmartScriptMgr.h:564
@ SMART_ACTION_INTERRUPT_SPELL
Definition: SmartScriptMgr.h:650
@ SMART_ACTION_ADD_POWER
Definition: SmartScriptMgr.h:667
@ SMART_ACTION_REMOVE_DYNAMIC_FLAG
Definition: SmartScriptMgr.h:654
@ SMART_ACTION_WAYPOINT_DATA_START
Definition: SmartScriptMgr.h:735
@ SMART_ACTION_RANDOM_SOUND
Definition: SmartScriptMgr.h:673
@ SMART_ACTION_RANDOM_MUSIC
Definition: SmartScriptMgr.h:719
@ SMART_ACTION_SET_COMBAT_DISTANCE
Definition: SmartScriptMgr.h:707
@ SMART_ACTION_SET_POWER
Definition: SmartScriptMgr.h:666
@ SMART_ACTION_SEND_TARGET_TO_TARGET
Definition: SmartScriptMgr.h:658
@ SMART_ACTION_REMOVE_POWER
Definition: SmartScriptMgr.h:668
@ SMART_ACTION_ADD_IMMUNITY
Definition: SmartScriptMgr.h:710
@ SMART_ACTION_SET_DYNAMIC_FLAG
Definition: SmartScriptMgr.h:652
@ SMART_ACTION_FALL
Definition: SmartScriptMgr.h:712
@ SMART_ACTION_GO_SET_GO_STATE
Definition: SmartScriptMgr.h:676
@ SMART_ACTION_CUSTOM_CAST
Definition: SmartScriptMgr.h:721
@ SMART_ACTION_REMOVE_ITEM
Definition: SmartScriptMgr.h:615
@ SMART_ACTION_SEND_GO_CUSTOM_ANIM
Definition: SmartScriptMgr.h:651
@ SMART_ACTION_MORPH_TO_ENTRY_OR_MODEL
Definition: SmartScriptMgr.h:561
@ SMART_ACTION_REMOVE_UNIT_FLAG
Definition: SmartScriptMgr.h:577
@ SMART_ACTION_RANDOM_PHASE
Definition: SmartScriptMgr.h:588
@ SMART_ACTION_SET_EMOTE_STATE
Definition: SmartScriptMgr.h:575
@ SMART_ACTION_CROSS_CAST
Definition: SmartScriptMgr.h:644
@ SMART_ACTION_WP_STOP
Definition: SmartScriptMgr.h:613
@ SMART_ACTION_GAME_EVENT_STOP
Definition: SmartScriptMgr.h:669
@ SMART_ACTION_SCRIPTED_SPAWN
Definition: SmartScriptMgr.h:729
@ SMART_ACTION_CALL_SCRIPT_RESET
Definition: SmartScriptMgr.h:636
@ SMART_ACTION_CU_ENCOUNTER_START
Definition: SmartScriptMgr.h:725
@ SMART_ACTION_WP_START
Definition: SmartScriptMgr.h:611
@ SMART_ACTION_COMBAT_STOP
Definition: SmartScriptMgr.h:585
@ SMART_ACTION_EXIT_VEHICLE
Definition: SmartScriptMgr.h:705
@ SMART_ACTION_SET_HEALTH_PCT
Definition: SmartScriptMgr.h:696
@ SMART_ACTION_AUTO_ATTACK
Definition: SmartScriptMgr.h:578
@ SMART_ACTION_SET_INVINCIBILITY_HP_LEVEL
Definition: SmartScriptMgr.h:600
@ SMART_ACTION_SET_VISIBILITY
Definition: SmartScriptMgr.h:605
@ SMART_ACTION_RANDOM_PHASE_RANGE
Definition: SmartScriptMgr.h:589
@ SMART_ACTION_MOVEMENT_PAUSE
Definition: SmartScriptMgr.h:738
@ SMART_ACTION_GO_SET_LOOT_STATE
Definition: SmartScriptMgr.h:657
@ SMART_ACTION_PLAYER_TALK
Definition: SmartScriptMgr.h:723
@ SMART_ACTION_SELF_CAST
Definition: SmartScriptMgr.h:643
@ SMART_ACTION_SET_SWIM
Definition: SmartScriptMgr.h:619
@ SMART_ACTION_SET_SIGHT_DIST
Definition: SmartScriptMgr.h:679
@ SMART_ACTION_SET_INST_DATA
Definition: SmartScriptMgr.h:592
@ SMART_ACTION_REMOVE_GO_FLAG
Definition: SmartScriptMgr.h:664
@ SMART_ACTION_LOAD_GRID
Definition: SmartScriptMgr.h:717
@ SMART_ACTION_CALL_FOR_HELP
Definition: SmartScriptMgr.h:597
@ SMART_ACTION_SUMMON_RADIAL
Definition: SmartScriptMgr.h:731
@ SMART_ACTION_ADD_THREAT
Definition: SmartScriptMgr.h:681
@ SMART_ACTION_DISMOUNT
Definition: SmartScriptMgr.h:708
@ SMART_ACTION_TELEPORT
Definition: SmartScriptMgr.h:620
@ SMART_ACTION_PLAYMOVIE
Definition: SmartScriptMgr.h:626
@ SMART_ACTION_TRIGGER_RANDOM_TIMED_EVENT
Definition: SmartScriptMgr.h:683
@ SMART_ACTION_FOLLOW
Definition: SmartScriptMgr.h:587
@ SMART_ACTION_PLAY_EMOTE
Definition: SmartScriptMgr.h:563
@ SMART_ACTION_SET_CORPSE_DELAY
Definition: SmartScriptMgr.h:674
@ SMART_ACTION_WAYPOINT_DATA_RANDOM
Definition: SmartScriptMgr.h:736
@ SMART_ACTION_SET_GUID
Definition: SmartScriptMgr.h:728
@ SMART_ACTION_SET_SHEATH
Definition: SmartScriptMgr.h:598
@ SMART_ACTION_SET_ORIENTATION
Definition: SmartScriptMgr.h:624
@ SMART_ACTION_SET_NPC_FLAG
Definition: SmartScriptMgr.h:639
@ SMART_ACTION_MOVE_TO_POS
Definition: SmartScriptMgr.h:627
@ SMART_ACTION_RANDOM_EMOTE
Definition: SmartScriptMgr.h:568
@ SMART_ACTION_INC_EVENT_PHASE
Definition: SmartScriptMgr.h:581
@ SMART_ACTION_CREATE_TIMED_EVENT
Definition: SmartScriptMgr.h:625
@ SMART_ACTION_SET_EVENT_FLAG_RESET
Definition: SmartScriptMgr.h:713
@ SMART_ACTION_DIE
Definition: SmartScriptMgr.h:595
@ SMART_ACTION_RESET_SCRIPT_BASE_OBJECT
Definition: SmartScriptMgr.h:635
@ SMART_ACTION_REMOVE_NPC_FLAG
Definition: SmartScriptMgr.h:641
@ SMART_ACTION_SET_FLY
Definition: SmartScriptMgr.h:618
@ SMART_ACTION_INSTALL_AI_TEMPLATE
Definition: SmartScriptMgr.h:616
@ SMART_ACTION_SUMMON_CREATURE
Definition: SmartScriptMgr.h:570
@ SMART_ACTION_CALL_TIMED_ACTIONLIST
Definition: SmartScriptMgr.h:638
@ SMART_ACTION_SET_IN_COMBAT_WITH_ZONE
Definition: SmartScriptMgr.h:596
@ SMART_ACTION_DO_ACTION
Definition: SmartScriptMgr.h:726
@ SMART_ACTION_SET_HOME_POS
Definition: SmartScriptMgr.h:659
@ SMART_ACTION_ADD_ITEM
Definition: SmartScriptMgr.h:614
@ SMART_ACTION_SET_ACTIVE
Definition: SmartScriptMgr.h:606
@ SMART_ACTION_SET_RANGED_MOVEMENT
Definition: SmartScriptMgr.h:637
@ SMART_ACTION_ACTIVATE_TAXI
Definition: SmartScriptMgr.h:610
@ SMART_ACTION_START_CLOSEST_WAYPOINT
Definition: SmartScriptMgr.h:671
@ SMART_ACTION_SUMMON_CREATURE_GROUP
Definition: SmartScriptMgr.h:665
@ SMART_ACTION_REMOVE_IMMUNITY
Definition: SmartScriptMgr.h:711
@ SMART_ACTION_PLAY_SPELL_VISUAL
Definition: SmartScriptMgr.h:732
@ SMART_ACTION_SET_REACT_STATE
Definition: SmartScriptMgr.h:566
@ SMART_ACTION_RANDOM_MOVE
Definition: SmartScriptMgr.h:647
@ SMART_ACTION_OVERRIDE_SCRIPT_BASE_OBJECT
Definition: SmartScriptMgr.h:634
@ SMART_ACTION_TRIGGER_TIMED_EVENT
Definition: SmartScriptMgr.h:631
@ SMART_ACTION_REMOVEAURASFROMSPELL
Definition: SmartScriptMgr.h:586
@ SMART_ACTION_FLEE
Definition: SmartScriptMgr.h:680
@ SMART_ACTION_ZONE_UNDER_ATTACK
Definition: SmartScriptMgr.h:716
@ FOLLOW_TYPE_CIRCLE
Definition: SmartScriptMgr.h:1947
@ FOLLOW_TYPE_SEMI_CIRCLE_BEHIND
Definition: SmartScriptMgr.h:1948
@ FOLLOW_TYPE_SEMI_CIRCLE_FRONT
Definition: SmartScriptMgr.h:1949
@ FOLLOW_TYPE_COLUMN
Definition: SmartScriptMgr.h:1951
@ FOLLOW_TYPE_ANGULAR
Definition: SmartScriptMgr.h:1952
@ FOLLOW_TYPE_LINE
Definition: SmartScriptMgr.h:1950
SMART_EVENT
Definition: SmartScriptMgr.h:117
@ SMART_EVENT_TIMED_EVENT_TRIGGERED
Definition: SmartScriptMgr.h:177
@ SMART_EVENT_LINK
Definition: SmartScriptMgr.h:179
@ SMART_EVENT_WAYPOINT_REACHED
Definition: SmartScriptMgr.h:158
SmartActionSummonCreatureFlags
Definition: SmartScriptMgr.h:746
@ SMART_ESCORT_TARGETS
Definition: SmartScriptMgr.h:59
std::unordered_map< uint32, WayPoint * > WPPath
Definition: SmartScriptMgr.h:1992
@ SMARTCAST_TRIGGERED
Definition: SmartScriptMgr.h:1935
@ SMARTCAST_COMBAT_MOVE
Definition: SmartScriptMgr.h:1940
@ SMARTCAST_INTERRUPT_PREVIOUS
Definition: SmartScriptMgr.h:1934
@ SMARTCAST_AURA_NOT_PRESENT
Definition: SmartScriptMgr.h:1939
@ SMARTCAST_THREATLIST_NOT_SINGLE
Definition: SmartScriptMgr.h:1941
@ SMARTCAST_TARGET_POWER_MANA
Definition: SmartScriptMgr.h:1942
void SendGossipMenuFor(Player *player, uint32 npcTextID, ObjectGuid const guid)
Definition: ScriptedGossip.cpp:45
void ClearGossipMenuFor(Player *player)
Definition: ScriptedGossip.cpp:22
EncounterState
Definition: InstanceScript.h:56
@ SPELLVALUE_BASE_POINT1
Definition: SpellDefines.h:114
@ SPELLVALUE_BASE_POINT2
Definition: SpellDefines.h:115
@ SPELLVALUE_BASE_POINT0
Definition: SpellDefines.h:113
TriggerCastFlags
Definition: SpellDefines.h:132
@ TRIGGERED_FULL_MASK
Will return SPELL_FAILED_DONT_REPORT in CheckCast functions.
Definition: SpellDefines.h:150
@ TRIGGERED_NONE
Definition: SpellDefines.h:133
@ AURA_REMOVE_BY_EXPIRE
Definition: SpellAuraDefines.h:395
#define sSpellMgr
Definition: SpellMgr.h:825
@ BROADCAST_TEXT_CALL_FOR_HELP
Definition: Language.h:24
@ BROADCAST_TEXT_FLEE_FOR_ASSIST
Definition: Language.h:25
@ TEXT_RANGE_NORMAL
Definition: CreatureTextMgr.h:29
#define sGameEventMgr
Definition: GameEventMgr.h:186
#define sWorldState
Definition: WorldState.h:94
WorldStateEvent
Definition: WorldState.h:40
LootState
Definition: GameObject.h:109
@ GO_READY
Definition: GameObject.h:111
GOState
Definition: GameObjectData.h:688
#define NOMINAL_MELEE_RANGE
Definition: ObjectDefines.h:48
TempSummonType
Definition: Object.h:45
@ TEMPSUMMON_TIMED_DESPAWN
Definition: Object.h:48
@ TEMPSUMMON_CORPSE_DESPAWN
Definition: Object.h:50
@ UNIT_FIELD_FLAGS_2
Definition: UpdateFields.h:118
@ UNIT_VIRTUAL_ITEM_SLOT_ID
Definition: UpdateFields.h:116
@ UNIT_FIELD_FLAGS
Definition: UpdateFields.h:117
@ UNIT_NPC_EMOTESTATE
Definition: UpdateFields.h:140
@ UNIT_FIELD_BYTES_1
Definition: UpdateFields.h:131
@ UNIT_DYNAMIC_FLAGS
Definition: UpdateFields.h:136
@ GAMEOBJECT_FLAGS
Definition: UpdateFields.h:399
ReactStates
Definition: Unit.h:547
@ MOVEMENTFLAG_ONTRANSPORT
Definition: UnitDefines.h:353
NPCFlags
Non Player Character flags.
Definition: UnitDefines.h:292
SheathState
Definition: UnitDefines.h:104
@ UNIT_STATE_LOST_CONTROL
Definition: UnitDefines.h:191
@ UNIT_STATE_ROOT
Definition: UnitDefines.h:159
@ UNIT_STATE_NO_ENVIRONMENT_UPD
Definition: UnitDefines.h:177
UnitMoveType
Definition: UnitDefines.h:327
@ MOVE_RUN
Definition: UnitDefines.h:329
@ UNIT_FLAG_SILENCED
Definition: UnitDefines.h:242
#define MAX_EQUIPMENT_ITEMS
Definition: CreatureData.h:35
npc
Definition: BattlegroundSA.h:75
@ MOTION_SLOT_CONTROLLED
Definition: MotionMaster.h:65
@ MOTION_SLOT_ACTIVE
Definition: MotionMaster.h:64
std::string ToString(Type &&val, Params &&... params)
Definition: StringConvert.h:250
auto SelectRandomContainerElement(C const &container) -> typename std::add_const< decltype(*std::begin(container))>::type &
Definition: Containers.h:133
Player * GetPlayer(Map const *, ObjectGuid const guid)
Definition: ObjectAccessor.cpp:220
bool IsEmpty() const
Definition: LinkedList.h:97
Definition: LinkedList.h:139
Definition: EnumFlag.h:66
void AddEventAtOffset(BasicEvent *event, Milliseconds offset)
Definition: EventProcessor.h:107
Definition: GameObjectAI.h:33
virtual void SetData(uint32, uint32)
Definition: GameObjectAI.h:62
virtual void SetData(uint32, uint32)
Definition: UnitAI.h:214
virtual void AttackStart(Unit *)
Definition: UnitAI.cpp:27
Definition: CreatureAI.h:70
void SetInvincibilityHpLevel(uint32 level)
Definition: SmartAI.h:185
void IncPhase(uint32 p)
Definition: SmartScript.cpp:5363
void StoreTargetList(ObjectVector const &targets, uint32 id)
Definition: SmartScript.h:93
void RetryLater(SmartScriptHolder &e, bool ignoreChanceRoll=false)
Definition: SmartScript.cpp:5051
void StoreCounter(uint32 id, uint32 value, uint32 reset, uint32 subtract)
Definition: SmartScript.h:108
std::optional< std::reference_wrapper< SmartScriptHolder > > FindLinkedEvent(uint32 link)
Definition: SmartScript.h:267
std::deque< SmartScriptFrame > executionStack
Definition: SmartScript.h:284
void SetPhaseReset(bool allow)
Definition: SmartScript.h:205
void GetTargets(ObjectVector &targets, SmartScriptHolder const &e, WorldObject *invoker=nullptr) const
Definition: SmartScript.cpp:3427
void OnReset()
Definition: SmartScript.cpp:109
void InstallTemplate(SmartScriptHolder const &e)
Definition: SmartScript.cpp:3315
ObjectGuid goOrigGUID
Definition: SmartScript.h:227
void DecPhase(uint32 p)
Definition: SmartScript.cpp:5369
ObjectGuid meOrigGUID
Definition: SmartScript.h:225
Definition: SmartScriptMgr.h:33
uint32 id
Definition: SmartScriptMgr.h:44
Definition: SmartScriptMgr.h:224
uint32 repeatMin
Definition: SmartScriptMgr.h:235
uint32 repeatMax
Definition: SmartScriptMgr.h:236
Definition: SmartScriptMgr.h:757
struct SmartAction::@75::@193 worldStateScript
struct SmartAction::@75::@98 combatMove
uint32 followState
Definition: SmartScriptMgr.h:1454
uint32 visualId
Definition: SmartScriptMgr.h:1449
uint32 targetParam2
Definition: SmartScriptMgr.h:860
struct SmartAction::@75::@100 incEventPhase
struct SmartAction::@75::@106 killedMonster
struct SmartAction::@75::@163 combatDistance
std::array< uint32, SMART_ACTION_PARAM_COUNT > emotes
Definition: SmartScriptMgr.h:843
struct SmartAction::@75::@166 setHomePos
uint32 repeatMax
Definition: SmartScriptMgr.h:1119
uint32 phaseMin
Definition: SmartScriptMgr.h:945
uint32 targetsLimit
Definition: SmartScriptMgr.h:851
SAIBool transport
Definition: SmartScriptMgr.h:1213
struct SmartAction::@75::@82 randomSound
uint32 newPower
Definition: SmartScriptMgr.h:1271
struct SmartAction::@75::@120 summonGO
uint32 startAngle
Definition: SmartScriptMgr.h:1442
SAIBool reset
Definition: SmartScriptMgr.h:1104
std::array< uint32, SMART_ACTION_PARAM_COUNT > actionLists
Definition: SmartScriptMgr.h:1167
uint32 delay
Definition: SmartScriptMgr.h:990
uint32 random
Definition: SmartScriptMgr.h:1337
struct SmartAction::@75::@182 cinematic
uint32 quickChange
Definition: SmartScriptMgr.h:1336
uint32 targetParam4
Definition: SmartScriptMgr.h:1466
SAIBool root
Definition: SmartScriptMgr.h:1248
uint32 dist
Definition: SmartScriptMgr.h:930
uint32 group
Definition: SmartScriptMgr.h:1263
SAIBool disable
Definition: SmartScriptMgr.h:1391
struct SmartAction::@75::@167 loadEquipment
struct SmartAction::@75::@111 callHelp
uint32 spell
Definition: SmartScriptMgr.h:848
std::array< uint32, SMART_ACTION_PARAM_COUNT > wps
Definition: SmartScriptMgr.h:1286
uint32 minHP
Definition: SmartScriptMgr.h:997
SAIBool force
Definition: SmartScriptMgr.h:1313
uint32 flags
Definition: SmartScriptMgr.h:857
struct SmartAction::@75::@97 autoAttack
uint32 distanceBetweenSummons
Definition: SmartScriptMgr.h:1352
uint32 data
Definition: SmartScriptMgr.h:957
struct SmartAction::@75::@105 randomPhaseRange
struct SmartAction::@75::@168 randomTimedEvent
uint32 powerType
Definition: SmartScriptMgr.h:1270
SAIBool regenHealth
Definition: SmartScriptMgr.h:1243
uint32 entry
Definition: SmartScriptMgr.h:932
struct SmartAction::@75::@184 scriptSpawn
struct SmartAction::@75::@177 doAction
struct SmartAction::@75::@91 crossCast
struct SmartAction::@75::@129 setSwim
uint32 quest
Definition: SmartScriptMgr.h:827
struct SmartAction::@75::@78 simpleTalk
struct SmartAction::@75::@175 castCustom
uint32 triggerFlags
Definition: SmartScriptMgr.h:850
struct SmartAction::@75::@87 questOffer
uint32 bp1
Definition: SmartScriptMgr.h:1367
uint32 distance
Definition: SmartScriptMgr.h:790
SAIBool removeObjectFromWorld
Definition: SmartScriptMgr.h:992
uint32 min
Definition: SmartScriptMgr.h:1116
SAIBool withDelayed
Definition: SmartScriptMgr.h:1178
SAIBool withInstant
Definition: SmartScriptMgr.h:1180
uint32 spawnTimerMax
Definition: SmartScriptMgr.h:1426
uint32 subtract
Definition: SmartScriptMgr.h:1105
struct SmartAction::@75::@110 die
uint32 a
Definition: SmartScriptMgr.h:1376
struct SmartAction::@75::@104 randomPhase
struct SmartAction::@75::@133 timeEvent
SAIBool invokerGUID
Definition: SmartScriptMgr.h:1418
uint32 percent
Definition: SmartScriptMgr.h:998
uint32 dec
Definition: SmartScriptMgr.h:914
uint32 milliseconds
Definition: SmartScriptMgr.h:974
struct SmartAction::@75::@125 item
uint32 summonEntry
Definition: SmartScriptMgr.h:1349
struct SmartAction::@75::@84 randomMusic
struct SmartAction::@75::@152 sendTargetToTarget
uint32 followType
Definition: SmartScriptMgr.h:1455
uint32 instanceTarget
Definition: SmartScriptMgr.h:1386
uint32 credit
Definition: SmartScriptMgr.h:933
uint32 controlled
Definition: SmartScriptMgr.h:1214
uint32 alternative
Definition: SmartScriptMgr.h:866
struct SmartAction::@75::@169 setHover
uint32 targetParam1
Definition: SmartScriptMgr.h:859
uint32 mapID
Definition: SmartScriptMgr.h:1097
uint32 stopMovement
Definition: SmartScriptMgr.h:1343
struct SmartAction::@75::@134 movie
struct SmartAction::@75::@94 summonCreature
uint32 charges
Definition: SmartScriptMgr.h:925
struct SmartAction::@75::@113 forceDespawn
struct SmartAction::@75::@185 setScale
struct SmartAction::@75::@103 follow
struct SmartAction::@75::@173 coneSummon
struct SmartAction::@75::@187 spellVisual
uint32 model
Definition: SmartScriptMgr.h:783
struct SmartAction::@75::@191 wpDataRandom
uint32 duration
Definition: SmartScriptMgr.h:765
struct SmartAction::@75::@164 sightDistance
SAIBool attackInvoker
Definition: SmartScriptMgr.h:879
SAIBool useTalkTarget
Definition: SmartScriptMgr.h:766
SAIBool run
Definition: SmartScriptMgr.h:1042
uint32 value
Definition: SmartScriptMgr.h:1103
struct SmartAction::@75::@140 timedActionList
uint32 movementExpired
Definition: SmartScriptMgr.h:1344
struct SmartAction::@75::@117 moveRandom
struct SmartAction::@75::@150 sendGossipMenu
uint32 targetParam3
Definition: SmartScriptMgr.h:861
uint32 respawnDelay
Definition: SmartScriptMgr.h:1427
SAIBool swim
Definition: SmartScriptMgr.h:1092
uint32 combatReach
Definition: SmartScriptMgr.h:1216
uint32 sound2
Definition: SmartScriptMgr.h:796
uint32 spawnPos
Definition: SmartScriptMgr.h:1307
struct SmartAction::@75::@92 activateObject
struct SmartAction::@75::@161 gameEventStart
struct SmartAction::@75::@186 radialSummon
struct SmartAction::@75::@179 corpseDelay
struct SmartAction::@75::@183 setGuid
uint32 pathId2
Definition: SmartScriptMgr.h:1478
uint32 creature
Definition: SmartScriptMgr.h:782
struct SmartAction::@75::@190 wpData
struct SmartAction::@75::@156 goFlag
uint32 spawnTimerMin
Definition: SmartScriptMgr.h:1425
struct SmartAction::@75::@132 storeTargets
struct SmartAction::@75::@114 invincHP
uint32 angle
Definition: SmartScriptMgr.h:931
uint32 field
Definition: SmartScriptMgr.h:956
uint32 range
Definition: SmartScriptMgr.h:871
struct SmartAction::@75::@95 threatPCT
struct SmartAction::@75::@89 randomEmote
struct SmartAction::@75::@170 immunity
uint32 flag
Definition: SmartScriptMgr.h:1137
uint32 sound3
Definition: SmartScriptMgr.h:797
uint32 targetsummon
Definition: SmartScriptMgr.h:1031
struct SmartAction::@75::@145 jump
struct SmartAction::@75::@151 setGoLootState
struct SmartAction::@75::@188 followGroup
uint32 chance
Definition: SmartScriptMgr.h:1120
struct SmartAction::@75::@131 setCounter
uint32 state
Definition: SmartScriptMgr.h:838
struct SmartAction::@75::@139 delunitByte
struct SmartAction::@75::@90 cast
uint32 byte1
Definition: SmartScriptMgr.h:1148
struct SmartAction::@75::@155 setRoot
struct SmartAction::@75::@108 setInstanceData64
struct SmartAction::@75::@180 movementSpeed
uint32 sound1
Definition: SmartScriptMgr.h:795
struct SmartAction::@75::@80 morphOrMount
struct SmartAction::@75::@116 setData
SAIBool updateLevel
Definition: SmartScriptMgr.h:969
uint32 forceRespawnTimer
Definition: SmartScriptMgr.h:991
uint32 speed
Definition: SmartScriptMgr.h:1086
uint32 sound4
Definition: SmartScriptMgr.h:798
struct SmartAction::@75::@147 flee
uint32 targetType
Definition: SmartScriptMgr.h:858
uint32 repetitions
Definition: SmartScriptMgr.h:1441
uint32 aliveState
Definition: SmartScriptMgr.h:935
SAIBool onlySelf
Definition: SmartScriptMgr.h:789
uint32 attackScriptOwner
Definition: SmartScriptMgr.h:880
uint32 speedxy
Definition: SmartScriptMgr.h:1190
uint32 pointId
Definition: SmartScriptMgr.h:1212
SAIBool attack
Definition: SmartScriptMgr.h:898
uint32 repeatMin
Definition: SmartScriptMgr.h:1118
struct SmartAction::@75::@122 wpStart
uint32 anim
Definition: SmartScriptMgr.h:1185
uint32 scale
Definition: SmartScriptMgr.h:1434
SAIBool fly
Definition: SmartScriptMgr.h:1085
struct SmartAction::@75::@189 orientationTarget
uint32 textGroupID
Definition: SmartScriptMgr.h:764
uint32 castFlags
Definition: SmartScriptMgr.h:849
std::array< uint32, SMART_ACTION_PARAM_COUNT > phases
Definition: SmartScriptMgr.h:940
struct SmartAction::@75::@118 visibility
uint32 spell_id
Definition: SmartScriptMgr.h:1179
SAIBool dontDespawn
Definition: SmartScriptMgr.h:1429
struct SmartAction::@75::@172 stopMotion
struct SmartAction::@75::@174 playerTalk
uint32 turnAngle
Definition: SmartScriptMgr.h:1338
uint32 textId
Definition: SmartScriptMgr.h:1359
uint32 gossipMenuId
Definition: SmartScriptMgr.h:1221
struct SmartAction::@75::@121 taxi
uint32 speedz
Definition: SmartScriptMgr.h:1191
SAIBool repeat
Definition: SmartScriptMgr.h:1044
uint32 gossipNpcTextId
Definition: SmartScriptMgr.h:1222
uint32 mask
Definition: SmartScriptMgr.h:1003
uint32 pathId1
Definition: SmartScriptMgr.h:1477
struct SmartAction::@75::@162 closestWaypointFromList
uint32 phi_delta
Definition: SmartScriptMgr.h:1379
uint32 count
Definition: SmartScriptMgr.h:1065
struct SmartAction::@75::@112 setSheath
uint32 inc
Definition: SmartScriptMgr.h:913
uint32 phaseMax
Definition: SmartScriptMgr.h:946
struct SmartAction::@75::@130 teleport
uint32 timer
Definition: SmartScriptMgr.h:1396
struct SmartAction::@75::@176 summonVortex
uint32 ContactDistance
Definition: SmartScriptMgr.h:1215
struct SmartAction::@75::@181 setHealthPct
struct SmartAction::@75::@79 faction
struct SmartAction::@75::@135 equip
uint32 k
Definition: SmartScriptMgr.h:1377
uint32 distanceBetweenRings
Definition: SmartScriptMgr.h:1351
struct SmartAction::@75::@171 orientation
uint32 coneLength
Definition: SmartScriptMgr.h:1353
uint32 counterId
Definition: SmartScriptMgr.h:1102
SAIBool withEmote
Definition: SmartScriptMgr.h:980
struct SmartAction::@75::@146 movementFlag
uint32 param
Definition: SmartScriptMgr.h:1490
uint32 max
Definition: SmartScriptMgr.h:1117
uint32 selfJump
Definition: SmartScriptMgr.h:1192
uint32 maxId
Definition: SmartScriptMgr.h:1319
struct SmartAction::@75::@143 interruptSpellCasting
uint32 r_max
Definition: SmartScriptMgr.h:1378
struct SmartAction::@75::@136 unitFlag
uint32 speedFraction
Definition: SmartScriptMgr.h:1403
struct SmartAction::@75::@153 setRangedMovement
struct SmartAction::@75::@88 react
struct SmartAction::@75::@119 setActive
SAIBool fail
Definition: SmartScriptMgr.h:1059
struct SmartAction::@75::@124 wpStop
SAIBool directAdd
Definition: SmartScriptMgr.h:833
struct SmartAction::@75::@157 goState
uint32 bp2
Definition: SmartScriptMgr.h:1368
uint32 disableGravity
Definition: SmartScriptMgr.h:1087
uint32 sound
Definition: SmartScriptMgr.h:788
uint32 threatINC
Definition: SmartScriptMgr.h:886
struct SmartAction::@75::@138 setunitByte
struct SmartAction::@75::@178 disableEvade
struct SmartAction::@75::@158 creatureGroup
struct SmartAction::@75::@160 gameEventStop
uint32 coneAngle
Definition: SmartScriptMgr.h:1354
uint32 summonDuration
Definition: SmartScriptMgr.h:1350
struct SmartAction::@75::@148 RespawnTarget
uint32 threatDEC
Definition: SmartScriptMgr.h:887
uint32 stepAngle
Definition: SmartScriptMgr.h:1443
uint32 reactState
Definition: SmartScriptMgr.h:1047
uint32 speedInteger
Definition: SmartScriptMgr.h:1402
struct SmartAction::@75::@109 updateTemplate
struct SmartAction::@75::@77 talk
uint32 index
Definition: SmartScriptMgr.h:1419
struct SmartAction::@75::@123 wpPause
struct SmartAction::@75::@83 music
uint32 actionId
Definition: SmartScriptMgr.h:1384
uint32 despawnTime
Definition: SmartScriptMgr.h:1030
struct SmartAction::@75::@128 setFly
uint32 goRespawnTime
Definition: SmartScriptMgr.h:1207
struct SmartAction::@75::@115 ingamePhaseMask
uint32 factionID
Definition: SmartScriptMgr.h:777
uint32 eventId
Definition: SmartScriptMgr.h:1489
uint32 pathId
Definition: SmartScriptMgr.h:1471
SAIBool move
Definition: SmartScriptMgr.h:903
struct SmartAction::@75::@144 sendGoCustomAnim
struct SmartAction::@75::@149 moveToPos
std::array< uint32, MAX_EQUIPMENT_ITEMS > slots
Definition: SmartScriptMgr.h:1132
struct SmartAction::@75::@127 setRun
struct SmartAction::@75::@99 setEventPhase
uint32 movementType
Definition: SmartScriptMgr.h:1401
struct SmartAction::@75::@107 setInstanceData
uint32 questID
Definition: SmartScriptMgr.h:832
uint32 bp3
Definition: SmartScriptMgr.h:1369
uint32 pathID
Definition: SmartScriptMgr.h:1043
uint32 emote
Definition: SmartScriptMgr.h:822
struct SmartAction::@75::@102 removeAura
uint32 id
Definition: SmartScriptMgr.h:1037
uint32 minId
Definition: SmartScriptMgr.h:1318
uint32 phase
Definition: SmartScriptMgr.h:908
struct SmartAction::@75::@159 power
uint32 sheath
Definition: SmartScriptMgr.h:985
uint32 isNegative
Definition: SmartScriptMgr.h:1385
struct SmartAction::@75::@154 setHealthRegen
uint32 creditType
Definition: SmartScriptMgr.h:934
struct SmartAction::@75::@141 randTimedActionList
float o
Definition: SmartScriptMgr.h:1581
uint32 maxDist
Definition: SmartScriptMgr.h:1587
uint32 range
Definition: SmartScriptMgr.h:1708
float x
Definition: SmartScriptMgr.h:1581
uint32 self
Definition: SmartScriptMgr.h:1710
uint32 amount
Definition: SmartScriptMgr.h:1709
struct SmartTarget::@195::@199 unitRange
float y
Definition: SmartScriptMgr.h:1581
float z
Definition: SmartScriptMgr.h:1581
struct SmartTarget::@195::@216 randomPoint
bool runOnce
Definition: SmartScriptMgr.h:1980
uint32 link
Definition: SmartScriptMgr.h:1965
uint32 event_id
Definition: SmartScriptMgr.h:1964
int32 entryOrGuid
Definition: SmartScriptMgr.h:1962
uint32 GetScriptType() const
Definition: SmartScriptMgr.h:1972
uint32 GetTargetType() const
Definition: SmartScriptMgr.h:1975
uint32 GetActionType() const
Definition: SmartScriptMgr.h:1974
float GetThreatListSize() const
Definition: ThreatMgr.h:221
void ModifyThreatByPercent(Unit *victim, int32 percent)
Definition: ThreatMgr.cpp:508
void SetHomePosition(float x, float y, float z, float o)
Definition: Creature.h:336
void Respawn(bool force=false)
Definition: Creature.cpp:2035
void GetRespawnPosition(float &x, float &y, float &z, float *ori=nullptr, float *dist=nullptr) const
Definition: Creature.cpp:2940
bool SetDisableGravity(bool disable, bool packetOnly=false, bool updateAnimationTier=true) override
Enable or disable the creature's fly mode by adding or removing: MOVEMENTFLAG_FLYING....
Definition: Creature.cpp:3205
void GetHomePosition(float &x, float &y, float &z, float &ori) const
Definition: Creature.h:338
void LoadEquipment(int8 id=1, bool force=false)
Definition: Creature.cpp:1798
void SendZoneUnderAttackMessage(Player *attacker)
Send a message to LocalDefense channel for players opposition team in the zone.
Definition: Creature.cpp:2801
void GetTransportHomePosition(float &x, float &y, float &z, float &ori) const
Definition: Creature.h:343
float m_SightDistance
Definition: Creature.h:371
void DoFleeToGetAssistance()
Definition: Creature.cpp:1056
float m_CombatDistance
Definition: Creature.h:371
bool IsRooted() const
Definition: Creature.h:83
void SetCorpseDelay(uint32 delay)
Definition: Creature.h:70
void SetRegeneratingHealth(bool enable)
Definition: Creature.h:318
void SetReactState(ReactStates state)
A creature can have 3 ReactStates : Agressive, Passive, Neutral.
Definition: Creature.h:94
void LoadPath(uint32 pathid)
Definition: Creature.h:347
Definition: CreatureData.h:169
uint32 CreatureDisplayID
Definition: CreatureData.h:179
float DisplayScale
Definition: CreatureData.h:180
Definition: CreatureData.h:360
uint32 ItemEntry[MAX_EQUIPMENT_ITEMS]
Definition: CreatureData.h:361
Definition: GossipDef.h:259
void SendCloseGossip()
Definition: GossipDef.cpp:239
void SetGoState(GOState state)
Definition: GameObject.cpp:2479
void UseDoorOrButton(uint32 time_to_restore=0, bool alternative=false, Unit *user=nullptr)
Definition: GameObject.cpp:1431
bool isSpawnedByDefault() const
Definition: GameObject.h:195
void SetLootState(LootState s, Unit *unit=nullptr)
Definition: GameObject.cpp:2444
void SetRespawnTime(int32 respawn)
Definition: GameObject.cpp:1305
GameobjectTypes GetGoType() const
Definition: GameObject.h:203
void Respawn()
Definition: GameObject.cpp:1320
void SendCustomAnim(uint32 anim)
Definition: GameObject.cpp:2152
void DespawnOrUnsummon(Milliseconds delay=0ms, Seconds forcedRespawnTime=0s)
Definition: GameObject.cpp:935
void CastSpell(Unit *target, uint32 spell)
Definition: GameObject.cpp:2087
void SetFlag(uint16 index, uint32 newFlag)
Definition: Object.cpp:845
void RemoveFlag(uint16 index, uint32 oldFlag)
Definition: Object.cpp:860
void RemoveByteFlag(uint16 index, uint8 offset, uint8 newFlag)
Definition: Object.cpp:930
bool HasFlag(uint16 index, uint32 flag) const
Definition: Object.cpp:889
virtual void SetObjectScale(float scale)
Definition: Object.h:119
void SetUInt32Value(uint16 index, uint32 value)
Definition: Object.cpp:650
void SetByteFlag(uint16 index, uint8 offset, uint8 newFlag)
Definition: Object.cpp:911
TempSummon * SummonCreature(uint32 id, const Position &pos, TempSummonType spwtype=TEMPSUMMON_MANUAL_DESPAWN, uint32 despwtime=0, uint32 vehId=0, SummonPropertiesEntry const *properties=nullptr, bool visibleBySummonerOnly=false) const
Definition: Object.cpp:2366
Map * FindMap() const
Definition: Object.h:537
InstanceScript * GetInstanceScript() const
Definition: Object.cpp:1203
bool IsWithinLOSInMap(WorldObject const *obj, VMAP::ModelIgnoreFlags ignoreFlags=VMAP::ModelIgnoreFlags::Nothing, LineOfSightChecks checks=LINEOFSIGHT_ALL_CHECKS, Optional< float > collisionHeight={ }, Optional< float > combatReach={ }) const
Definition: Object.cpp:1358
void GetNearPoint(WorldObject const *searcher, float &x, float &y, float &z, float searcher_size, float distance2d, float absAngle, float controlZ=0, Position const *startPos=nullptr) const
Definition: Object.cpp:2637
bool GetClosePoint(float &x, float &y, float &z, float size, float distance2d=0, float angle=0, WorldObject const *forWho=nullptr, bool force=false) const
Definition: Object.cpp:2710
std::string const & GetName() const
Definition: Object.h:463
void AddObjectToRemoveList()
Definition: Object.cpp:2160
EventProcessor m_Events
Definition: Object.h:642
float GetDistance(WorldObject const *obj) const
Definition: Object.cpp:1256
uint32 GetAreaId() const
Definition: Object.cpp:3165
uint32 GetZoneId() const
Definition: Object.cpp:3157
float GetObjectSize() const
Definition: Object.cpp:2782
GameObject * SummonGameObject(uint32 entry, float x, float y, float z, float ang, float rotation0, float rotation1, float rotation2, float rotation3, uint32 respawnTime, bool checkTransport=true, GOSummonType summonType=GO_SUMMON_TIMED_OR_CORPSE_DESPAWN)
Definition: Object.cpp:2380
void GetRandomPoint(const Position &srcPos, float distance, float &rand_x, float &rand_y, float &rand_z) const
Definition: Object.cpp:1513
void SummonCreatureGroup(uint8 group, std::list< TempSummon * > *list=nullptr)
Definition: Object.cpp:2443
virtual float GetCombatReach() const
Definition: Object.h:441
Creature * SummonTrigger(float x, float y, float z, float ang, uint32 dur, bool setLevel=false, CreatureAI *(*GetAI)(Creature *)=nullptr)
Definition: Object.cpp:2415
static ObjectGuid const Empty
Definition: ObjectGuid.h:120
std::string ToString() const
Definition: ObjectGuid.cpp:47
Definition: Position.h:27
float m_positionZ
Definition: Position.h:57
float m_positionX
Definition: Position.h:55
float GetPositionZ() const
Definition: Position.h:118
float m_positionY
Definition: Position.h:56
float GetOrientation() const
Definition: Position.h:119
void SetOrientation(float orientation)
Definition: Position.h:111
float GetPositionX() const
Definition: Position.h:116
void GetPosition(float &x, float &y) const
Definition: Position.h:121
float GetPositionY() const
Definition: Position.h:117
void RelocatePolarOffset(float angle, float dist, float z=0.0f)
Definition: Position.cpp:34
float GetAngle(const Position *pos) const
Definition: Position.cpp:78
void GroupEventHappens(uint32 questId, WorldObject const *pEventObject)
Definition: PlayerQuest.cpp:1817
bool ActivateTaxiPathTo(std::vector< uint32 > const &nodes, Creature *npc=nullptr, uint32 spellid=1)
Definition: Player.cpp:10265
void SendCinematicStart(uint32 CinematicSequenceId) const
Definition: Player.cpp:5728
void Yell(std::string_view text, Language language, WorldObject const *=nullptr) override
Handles yelled message in regular chat based on declared language and in config pre-defined Range.
Definition: Player.cpp:9390
void Say(std::string_view text, Language language, WorldObject const *=nullptr) override
Handles said message in regular chat based on declared language and in config pre-defined Range.
Definition: Player.cpp:9370
void PrepareGossipMenu(WorldObject *source, uint32 menuId=0, bool showQuests=false)
Definition: PlayerGossip.cpp:32
PlayerMenu * PlayerTalkClass
Definition: Player.h:2239
void RewardPlayerAndGroupAtEvent(uint32 creature_id, WorldObject *pRewardSource)
Definition: Player.cpp:12769
uint8 getGender() const
Definition: Unit.h:805
void SetFacingTo(float ori)
Definition: Unit.cpp:20527
void CombatStop(bool includingCast=false)
Definition: Unit.cpp:10436
float GetSpeed(UnitMoveType mtype) const
Definition: Unit.cpp:14424
void ApplySpellImmune(uint32 spellId, uint32 op, uint32 type, bool apply, SpellImmuneBlockType blockType=SPELL_BLOCK_TYPE_ALL)
Definition: Unit.cpp:13389
void InterruptNonMeleeSpells(bool withDelayed, uint32 spellid=0, bool withInstant=true, bool bySelf=false)
Definition: Unit.cpp:4129
void RemoveAllGameObjects()
Definition: Unit.cpp:6263
float GetSpellMinRangeForTarget(Unit const *target, SpellInfo const *spellInfo) const
Definition: Unit.cpp:15167
void AddThreat(Unit *victim, float fThreat, SpellSchoolMask schoolMask=SPELL_SCHOOL_MASK_NORMAL, SpellInfo const *threatSpell=nullptr)
Definition: Unit.cpp:14653
Player * GetCharmerOrOwnerPlayerOrPlayerItself() const
Definition: Unit.cpp:10616
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
void SetPower(Powers power, uint32 val, bool withPowerUpdate=true, bool fromRegenerate=false)
Definition: Unit.cpp:15566
MotionMaster * GetMotionMaster()
Definition: Unit.h:1620
void Dismount()
Definition: Unit.cpp:13524
void SetUnitMovementFlags(uint32 f)
Definition: Unit.h:738
void ResumeMovement(uint32 timer=0, uint8 slot=0)
Definition: Unit.cpp:16680
SpellCastResult CastCustomSpell(Unit *victim, uint32 spellId, int32 const *bp0, int32 const *bp1, int32 const *bp2, bool triggered, Item *castItem=nullptr, AuraEffect const *triggeredByAura=nullptr, ObjectGuid originalCaster=ObjectGuid::Empty)
Definition: Unit.cpp:1224
void SetInCombatWith(Unit *enemy, uint32 duration=0)
Definition: Unit.cpp:13581
void SetFacingToObject(WorldObject *object)
Definition: Unit.cpp:20537
bool IsAlive() const
Definition: Unit.h:1654
void StopMoving()
Definition: Unit.cpp:16650
void RemoveNpcFlag(NPCFlags flags)
Definition: Unit.h:727
void SendPlaySpellVisual(uint32 id)
Definition: Unit.cpp:18911
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint8 reqEffMask=0) const
Definition: Unit.cpp:5698
void AddUnitState(uint32 f)
Definition: Unit.h:700
virtual void SetSheath(SheathState sheathed)
Definition: Unit.h:1639
float GetSpellMaxRangeForTarget(Unit const *target, SpellInfo const *spellInfo) const
Definition: Unit.cpp:15147
void SetControlled(bool apply, UnitState state, Unit *source=nullptr, bool isFear=false)
Definition: Unit.cpp:18034
bool HasUnitMovementFlag(uint32 f) const
Definition: Unit.h:736
TransportBase * GetDirectTransport() const
Definition: Unit.cpp:18767
void SendMovementFlagUpdate(bool self=false)
Definition: Unit.cpp:16704
void SetNpcFlag(NPCFlags flags)
Definition: Unit.h:726
virtual bool SetHover(bool enable, bool packetOnly=false, bool updateAnimationTier=true)
Definition: Unit.cpp:20673
SpellCastResult CastSpell(SpellCastTargets const &targets, SpellInfo const *spellInfo, CustomSpellValues const *value, TriggerCastFlags triggerFlags=TRIGGERED_NONE, Item *castItem=nullptr, AuraEffect const *triggeredByAura=nullptr, ObjectGuid originalCaster=ObjectGuid::Empty)
Definition: Unit.cpp:1167
void SetSpeed(UnitMoveType mtype, float rate, bool forced=false)
Definition: Unit.cpp:14429
ObjectGuid GetTransGUID() const override
Definition: Unit.cpp:18756
bool IsAIEnabled
Definition: Unit.h:1962
bool HasUnitState(const uint32 f) const
Definition: Unit.h:701
float GetPowerPct(Powers power) const
Definition: Unit.h:1058
void SetUInt32Value(uint16 index, uint32 value)
Definition: Unit.cpp:21316
float GetMeleeRange(Unit const *target) const
Definition: Unit.cpp:679
virtual void PauseMovement(uint32 timer=0, uint8 slot=0)
Disable the unit movement by clearing UNIT_STATE_MOVING and stopping the spline.
Definition: Unit.cpp:16669
uint32 GetPower(Powers power) const
Definition: Unit.h:1056
void KillSelf(bool durabilityLoss=true, WeaponAttackType attackType=BASE_ATTACK, SpellInfo const *spellProto=nullptr, Spell const *spell=nullptr)
Definition: Unit.h:1159
void SetInFront(WorldObject const *target)
Definition: Unit.cpp:20521
void ReplaceAllNpcFlags(NPCFlags flags)
Definition: Unit.h:728
bool AttackStop()
Force the unit to stop attacking. This will clear UNIT_STATE_MELEE_ATTACKING, Interrupt current spell...
Definition: Unit.cpp:10403
bool isDead() const
Definition: Unit.h:1656
void ExitVehicle(Position const *exitPosition=nullptr)
Definition: Unit.cpp:19735
Definition: VehicleDefines.h:130
static CreatureModel const * ChooseDisplayId(CreatureTemplate const *cinfo, CreatureData const *data=nullptr)
Definition: ObjectMgr.cpp:1647
virtual bool SetBossState(uint32 id, EncounterState state)
Definition: InstanceScript.cpp:373
virtual void DoAction(int32)
Definition: InstanceScript.h:267
static std::string GetBossStateName(uint8 state)
Definition: InstanceScript.cpp:808
void LoadGrid(float x, float y)
Definition: Map.cpp:495
PlayerList const & GetPlayers() const
Definition: Map.h:484
Definition: MapRefMgr.h:26
iterator begin()
Definition: MapRefMgr.h:36
iterator end()
Definition: MapRefMgr.h:37
virtual void SetData(uint32, uint32)
Definition: ZoneScript.h:52
virtual void SetGuidData(uint32, ObjectGuid)
Definition: ZoneScript.h:45
void MoveFollow(Unit *target, float dist, float angle, MovementSlot slot=MOTION_SLOT_ACTIVE, bool inheritWalkState=true)
The unit will follow this target. Doesn't work with UNIT_FLAG_DISABLE_MOVE.
Definition: MotionMaster.cpp:409
void MovementExpired(bool reset=true)
Definition: MotionMaster.h:180
void MovePoint(uint32 id, const Position &pos, bool generatePath=true, bool forceDestination=true)
Definition: MotionMaster.h:213
void MoveJump(Position const &pos, float speedXY, float speedZ, uint32 id=0)
Definition: MotionMaster.h:229
void MovePath(uint32 path_id, bool repeatable)
Move the unit following a specific path. Doesn't work with UNIT_FLAG_DISABLE_MOVE.
Definition: MotionMaster.cpp:852
void MoveIdle()
Definition: MotionMaster.cpp:232
void MoveFall(uint32 id=0, bool addFlagForNPC=false)
The unit will fall. Used when in the air. Doesn't work with UNIT_FLAG_DISABLE_MOVE.
Definition: MotionMaster.cpp:627
void MoveFleeing(Unit *enemy, uint32 time=0)
Enable the target's fleeing movement. Doesn't work with UNIT_FLAG_DISABLE_MOVE.
Definition: MotionMaster.cpp:746
void MoveRandom(float wanderDistance=0.0f)
Enable a random movement in desired range around the unit. Doesn't work with UNIT_FLAG_DISABLE_MOVE.
Definition: MotionMaster.cpp:242
Definition: QuestDef.h:210
Player session in the World.
Definition: WorldSession.h:330
Definition: SpellAuras.h:87
Definition: SpellDefines.h:165
void AddSpellMod(SpellValueMod mod, int32 value)
Definition: SpellDefines.h:167
Definition: SpellInfo.h:316
float GetMinRange(bool positive=false) const
Definition: SpellInfo.cpp:2314
SpellSchoolMask GetSchoolMask() const
Definition: SpellInfo.cpp:1987
bool HasAttribute(SpellAttr0 attribute) const
Definition: SpellInfo.h:415
float GetMaxRange(bool positive=false, Unit *caster=nullptr, Spell *spell=nullptr) const
Definition: SpellInfo.cpp:2323
int32 CalcPowerCost(Unit const *caster, SpellSchoolMask schoolMask, Spell *spell=nullptr) const
Definition: SpellInfo.cpp:2401
Definition: ChatTextBuilder.h:31