Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Loading...
Searching...
No Matches
SmartScriptMgr.h
Go to the documentation of this file.
1/*
2* This file is part of Project SkyFire https://www.projectskyfire.org.
3* See LICENSE.md file for Copyright information
4*/
5
6#ifndef SKYFIRE_SMARTSCRIPTMGR_H
7#define SKYFIRE_SMARTSCRIPTMGR_H
8
9#include "Common.h"
10#include "Creature.h"
11#include "CreatureAI.h"
12#include "DB2Stores.h"
13#include "Platform/Singleton.h"
14#include "Spell.h"
15#include "Unit.h"
16
18{
19 WayPoint(uint32 _id, float _x, float _y, float _z)
20 {
21 id = _id;
22 x = _x;
23 y = _y;
24 z = _z;
25 }
26
28 float x;
29 float y;
30 float z;
31};
32
46
58
68
70{
71 SMART_EVENT_UPDATE_IC = 0, // InitialMin, InitialMax, RepeatMin, RepeatMax
72 SMART_EVENT_UPDATE_OOC = 1, // InitialMin, InitialMax, RepeatMin, RepeatMax
73 SMART_EVENT_HEALT_PCT = 2, // HPMin%, HPMax%, RepeatMin, RepeatMax
74 SMART_EVENT_MANA_PCT = 3, // ManaMin%, ManaMax%, RepeatMin, RepeatMax
75 SMART_EVENT_AGGRO = 4, // NONE
76 SMART_EVENT_KILL = 5, // CooldownMin0, CooldownMax1, playerOnly2, else creature entry3
77 SMART_EVENT_DEATH = 6, // NONE
78 SMART_EVENT_EVADE = 7, // NONE
79 SMART_EVENT_SPELLHIT = 8, // SpellID, School, CooldownMin, CooldownMax
80 SMART_EVENT_RANGE = 9, // MinDist, MaxDist, RepeatMin, RepeatMax
81 SMART_EVENT_OOC_LOS = 10, // NoHostile, MaxRnage, CooldownMin, CooldownMax
82 SMART_EVENT_RESPAWN = 11, // type, MapId, ZoneId
83 SMART_EVENT_TARGET_HEALTH_PCT = 12, // HPMin%, HPMax%, RepeatMin, RepeatMax
84 SMART_EVENT_VICTIM_CASTING = 13, // RepeatMin, RepeatMax, spellid
85 SMART_EVENT_FRIENDLY_HEALTH = 14, // HPDeficit, Radius, RepeatMin, RepeatMax
86 SMART_EVENT_FRIENDLY_IS_CC = 15, // Radius, RepeatMin, RepeatMax
87 SMART_EVENT_FRIENDLY_MISSING_BUFF = 16, // SpellId, Radius, RepeatMin, RepeatMax
88 SMART_EVENT_SUMMONED_UNIT = 17, // CreatureId(0 all), CooldownMin, CooldownMax
89 SMART_EVENT_TARGET_MANA_PCT = 18, // ManaMin%, ManaMax%, RepeatMin, RepeatMax
90 SMART_EVENT_ACCEPTED_QUEST = 19, // QuestID(0any)
91 SMART_EVENT_REWARD_QUEST = 20, // QuestID(0any)
93 SMART_EVENT_RECEIVE_EMOTE = 22, // EmoteId, CooldownMin, CooldownMax, condition, val1, val2, val3
94 SMART_EVENT_HAS_AURA = 23, // Param1 = SpellID, Param2 = Stack amount, Param3/4 RepeatMin, RepeatMax
95 SMART_EVENT_TARGET_BUFFED = 24, // Param1 = SpellID, Param2 = Stack amount, Param3/4 RepeatMin, RepeatMax
96 SMART_EVENT_RESET = 25, // Called after combat, when the creature respawn and spawn.
97 SMART_EVENT_IC_LOS = 26, // NoHostile, MaxRnage, CooldownMin, CooldownMax
98 SMART_EVENT_PASSENGER_BOARDED = 27, // CooldownMin, CooldownMax
99 SMART_EVENT_PASSENGER_REMOVED = 28, // CooldownMin, CooldownMax
102 SMART_EVENT_SPELLHIT_TARGET = 31, // SpellID, School, CooldownMin, CooldownMax
103 SMART_EVENT_DAMAGED = 32, // MinDmg, MaxDmg, CooldownMin, CooldownMax
104 SMART_EVENT_DAMAGED_TARGET = 33, // MinDmg, MaxDmg, CooldownMin, CooldownMax
105 SMART_EVENT_MOVEMENTINFORM = 34, // MovementType(any), PointID
106 SMART_EVENT_SUMMON_DESPAWNED = 35, // Entry, CooldownMin, CooldownMax
109 SMART_EVENT_DATA_SET = 38, // Id, Value, CooldownMin, CooldownMax
110 SMART_EVENT_WAYPOINT_START = 39, // PointId(0any), pathID(0any)
111 SMART_EVENT_WAYPOINT_REACHED = 40, // PointId(0any), pathID(0any)
116 SMART_EVENT_INSTANCE_PLAYER_ENTER = 45, // Team (0 any), CooldownMin, CooldownMax
117 SMART_EVENT_AREATRIGGER_ONTRIGGER = 46, // TriggerId(0 any)
123 SMART_EVENT_TEXT_OVER = 52, // GroupId from creature_text, creature entry who talks (0 any)
124 SMART_EVENT_RECEIVE_HEAL = 53, // MinHeal, MaxHeal, CooldownMin, CooldownMax
126 SMART_EVENT_WAYPOINT_PAUSED = 55, // PointId(0any), pathID(0any)
127 SMART_EVENT_WAYPOINT_RESUMED = 56, // PointId(0any), pathID(0any)
128 SMART_EVENT_WAYPOINT_STOPPED = 57, // PointId(0any), pathID(0any)
129 SMART_EVENT_WAYPOINT_ENDED = 58, // PointId(0any), pathID(0any)
131 SMART_EVENT_UPDATE = 60, // InitialMin, InitialMax, RepeatMin, RepeatMax
132 SMART_EVENT_LINK = 61, // INTERNAL USAGE, no params, used to link together multiple events, does not use any extra resources to iterate event lists needlessly
133 SMART_EVENT_GOSSIP_SELECT = 62, // menuID, actionID
137 SMART_EVENT_DUMMY_EFFECT = 66, // spellId, effectIndex
138 SMART_EVENT_IS_BEHIND_TARGET = 67, // cooldownMin, CooldownMax
139 SMART_EVENT_GAME_EVENT_START = 68, // game_event.Entry
140 SMART_EVENT_GAME_EVENT_END = 69, // game_event.Entry
143 SMART_EVENT_ACTION_DONE = 72, // eventId (SharedDefines.EventId)
144 SMART_EVENT_ON_SPELLCLICK = 73, // clicker (unit)
145 SMART_EVENT_FRIENDLY_HEALTH_PCT = 74, // minHpPct, maxHpPct, repeatMin, repeatMax
146
148};
149
151{
156 union
157 {
158 struct
159 {
165
166 struct
167 {
173
174 struct
175 {
181
182 struct
183 {
190
191 struct
192 {
197
198 struct
199 {
203
204 struct
205 {
210
211 struct
212 {
218
219 struct
220 {
225
226 struct
227 {
233
234 struct
235 {
240
241 struct
242 {
245
246 struct
247 {
252
253 struct
254 {
260
261 struct
262 {
268
269 struct
270 {
271 uint32 type;
274
275 struct
276 {
277 uint32 id;
282
283 struct
284 {
288
289 struct
290 {
293
294 struct
295 {
298
299 struct
300 {
305
306 struct
307 {
308 uint32 id;
310
311 struct
312 {
316
317 struct
318 {
319 uint32 id;
321
322 struct
323 {
327
328 struct
329 {
333
334 struct
335 {
339
340 struct
341 {
344
345 struct
346 {
349
350 struct
351 {
354
355 struct
356 {
359
360 struct
361 {
367
368 struct
369 {
376 };
377};
378
386
388{
389 SMART_ACTION_NONE = 0, // No action
390 SMART_ACTION_TALK = 1, // groupID from creature_text, duration to wait before TEXT_OVER event is triggered
391 SMART_ACTION_SET_FACTION = 2, // FactionId (or 0 for default)
392 SMART_ACTION_MORPH_TO_ENTRY_OR_MODEL = 3, // Creature_template entry(param1) OR ModelId (param2) (or 0 for both to demorph)
393 SMART_ACTION_SOUND = 4, // SoundId, onlySelf
399 SMART_ACTION_RANDOM_EMOTE = 10, // EmoteId1, EmoteId2, EmoteId3...
400 SMART_ACTION_CAST = 11, // SpellId, CastFlags
401 SMART_ACTION_SUMMON_CREATURE = 12, // CreatureID, summonType, duration in ms, attackInvoker
407 SMART_ACTION_SET_UNIT_FLAG = 18, // Flags (may be more than one field OR'd together), Target
408 SMART_ACTION_REMOVE_UNIT_FLAG = 19, // Flags (may be more than one field OR'd together), Target
409 SMART_ACTION_AUTO_ATTACK = 20, // AllowAttackState (0 = stop attack, anything else means continue attacking)
410 SMART_ACTION_ALLOW_COMBAT_MOVEMENT = 21, // AllowCombatMovement (0 = stop combat based movement, anything else continue attacking)
412 SMART_ACTION_INC_EVENT_PHASE = 23, // Value (may be negative to decrement phase, should not be 0)
413 SMART_ACTION_EVADE = 24, // No Params
417 SMART_ACTION_REMOVEAURASFROMSPELL = 28, // Spellid, 0 removes all auras
418 SMART_ACTION_FOLLOW = 29, // Distance (0 = default), Angle (0 = default), EndCreatureEntry, credit, creditType (0monsterkill, 1event)
419 SMART_ACTION_RANDOM_PHASE = 30, // PhaseId1, PhaseId2, PhaseId3...
420 SMART_ACTION_RANDOM_PHASE_RANGE = 31, // PhaseMin, PhaseMax
423 SMART_ACTION_SET_INST_DATA = 34, // Field, Data
425 SMART_ACTION_UPDATE_TEMPLATE = 36, // Entry, Team
426 SMART_ACTION_DIE = 37, // No Params
428 SMART_ACTION_CALL_FOR_HELP = 39, // Radius, With Emote
429 SMART_ACTION_SET_SHEATH = 40, // Sheath (0-unarmed, 1-melee, 2-ranged)
431 SMART_ACTION_SET_INVINCIBILITY_HP_LEVEL = 42, // MinHpValue(+pct, -flat)
432 SMART_ACTION_MOUNT_TO_ENTRY_OR_MODEL = 43, // Creature_template entry(param1) OR ModelId (param2) (or 0 for both to dismount)
434 SMART_ACTION_SET_DATA = 45, // Field, Data (only creature @todo)
439 SMART_ACTION_SUMMON_GO = 50, // GameObjectID, DespawnTime in ms,
442 SMART_ACTION_WP_START = 53, // run/walk, pathID, canRepeat, quest, despawntime, reactState
444 SMART_ACTION_WP_STOP = 55, // despawnTime, quest, fail?
445 SMART_ACTION_ADD_ITEM = 56, // itemID, count
446 SMART_ACTION_REMOVE_ITEM = 57, // itemID, count
451 SMART_ACTION_TELEPORT = 62, // mapID,
456 SMART_ACTION_CREATE_TIMED_EVENT = 67, // id, InitialMin, InitialMax, RepeatMin(only if it repeats), RepeatMax(only if it repeats), chance
458 SMART_ACTION_MOVE_TO_POS = 69, // PointId, xyz
460 SMART_ACTION_EQUIP = 71, // entry, slotmask slot1, slot2, slot3 , only slots with mask set will be sent to client, bits are 1, 2, 4, leaving mask 0 is defaulted to mask 7 (send all), slots1-3 are only used if no entry is set
464 SMART_ACTION_ADD_AURA = 75, // spellid, targets
465 SMART_ACTION_OVERRIDE_SCRIPT_BASE_OBJECT = 76, // WARNING: CAN CRASH CORE, do not use if you dont know what you are doing
468 SMART_ACTION_SET_RANGED_MOVEMENT = 79, // Distance, angle
469 SMART_ACTION_CALL_TIMED_ACTIONLIST = 80, // ID (overwrites already running actionlist), stop after combat?(0/1), timer update type(0-OOC, 1-IC, 2-ALWAYS)
473 SMART_ACTION_SIMPLE_TALK = 84, // groupID, can be used to make players say groupID, Text_over event is not triggered, whisper can not be used (Target units will say the text)
474 SMART_ACTION_INVOKER_CAST = 85, // spellID, castFlags, if avaliable, last used invoker will cast spellId with castFlags on targets
475 SMART_ACTION_CROSS_CAST = 86, // spellID, castFlags, CasterTargetType, CasterTarget param1, CasterTarget param2, CasterTarget param3, ( + the origonal target fields as Destination target), CasterTargets will cast spellID on all Targets (use with caution if targeting multiple * multiple units)
486 SMART_ACTION_JUMP_TO_POS = 97, // speedXY, speedZ, targetX, targetY, targetZ
487 SMART_ACTION_SEND_GOSSIP_MENU = 98, // menuId, optionId
492 SMART_ACTION_SET_ROOT = 103, // off/on
496 SMART_ACTION_SUMMON_CREATURE_GROUP = 107, // Group, attackInvoker
497 SMART_ACTION_SET_POWER = 108, // PowerType, newPower
498 SMART_ACTION_ADD_POWER = 109, // PowerType, newPower
499 SMART_ACTION_REMOVE_POWER = 110, // PowerType, newPower
500 SMART_ACTION_GAME_EVENT_STOP = 111, // GameEventId
501 SMART_ACTION_GAME_EVENT_START = 112, // GameEventId
502 SMART_ACTION_SET_HEALTH = 113, // HealthMode, value.
504 SMART_ACTION_RANDOM_SOUND = 115, // soundId1, soundId2, soundId3, soundId4, soundId5, onlySelf
505
507};
508
510{
512
513 union
514 {
515 struct
516 {
520
521 struct
522 {
525
526 struct
527 {
531
532 struct
533 {
537
538 struct
539 {
542
543 struct
544 {
547
548 struct
549 {
552
553 struct
554 {
562
563 struct
564 {
572
573 struct
574 {
580
581 struct
582 {
586
587 struct
588 {
596
597 struct
598 {
606
607 struct
608 {
611
612 struct
613 {
616
617 struct
618 {
621
622 struct
623 {
627
628 struct
629 {
632
633 struct
634 {
641
642 struct
643 {
651
652 struct
653 {
657
658 struct
659 {
662
663 struct
664 {
668
669 struct
670 {
673
674 struct
675 {
679
680 struct
681 {
685
686 struct
687 {
690
691 struct
692 {
695
696 struct
697 {
701
702 struct
703 {
707
708 struct
709 {
711 uint32 data;
713
714 struct
715 {
718
719 struct
720 {
723
724 struct
725 {
729
730 struct
731 {
734
735 struct
736 {
737 uint32 id;
739
740 struct
741 {
749
750 struct
751 {
754
755 struct
756 {
761
762 struct
763 {
767
768 struct
769 {
770 uint32 id;
777
778 struct
779 {
780 uint32 run;
782
783 struct
784 {
787
788 struct
789 {
792
793 struct
794 {
797
798 struct
799 {
800 uint32 id;
803
804 struct
805 {
806 uint32 id;
808
809 struct
810 {
811 uint32 id;
818
819 struct
820 {
823
824 struct
825 {
832
833 struct
834 {
836 uint32 type;
838
839 struct
840 {
842 uint32 type;
844
845 struct
846 {
848 uint32 type;
850
851 struct
852 {
855
856 struct
857 {
858 uint32 id;
861
862 struct
863 {
871
872 struct
873 {
878
879 struct
880 {
883
884 struct
885 {
889
890 struct
891 {
894
895 struct
896 {
899
900 struct
901 {
905
906 struct
907 {
911
912 struct
913 {
916
917 struct
918 {
919 uint32 id;
921
922 struct
923 {
927
928 struct
929 {
932
933 struct
934 {
937
938 struct
939 {
940 uint32 flag;
942
943 struct
944 {
948
949 struct
950 {
954
955 struct
956 {
957 uint32 id;
959
960 struct
961 {
962 uint32 id;
964
965 struct
966 {
971
972 struct
973 {
981
982 struct
983 {
991
994
995 struct
996 {
1000 uint32 param4;
1001 uint32 param5;
1002 uint32 param6;
1004 };
1005};
1006
1008{
1009 SMARTAI_TEMPLATE_BASIC = 0, //nothing is preset
1010 SMARTAI_TEMPLATE_CASTER = 1, //spellid, repeatMin, repeatMax, range, manaPCT +JOIN: target_param1 as castFlag
1011 SMARTAI_TEMPLATE_TURRET = 2, //spellid, repeatMin, repeatMax +JOIN: target_param1 as castFlag
1013 SMARTAI_TEMPLATE_CAGED_GO_PART = 4, //creatureID, give credit at point end?,
1014 SMARTAI_TEMPLATE_CAGED_NPC_PART = 5, //gameObjectID, despawntime, run?, dist, TextGroupID
1016};
1017
1019{
1020 SMART_TARGET_NONE = 0, // NONE, defaulting to invoket
1021 SMART_TARGET_SELF = 1, // Self cast
1022 SMART_TARGET_VICTIM = 2, // Our current target (ie: highest aggro)
1023 SMART_TARGET_HOSTILE_SECOND_AGGRO = 3, // Second highest aggro
1024 SMART_TARGET_HOSTILE_LAST_AGGRO = 4, // Dead last on aggro
1025 SMART_TARGET_HOSTILE_RANDOM = 5, // Just any random target on our threat list
1026 SMART_TARGET_HOSTILE_RANDOM_NOT_TOP = 6, // Any random target except top threat
1027 SMART_TARGET_ACTION_INVOKER = 7, // Unit who caused this Event to occur
1028 SMART_TARGET_POSITION = 8, // use xyz from event params
1029 SMART_TARGET_CREATURE_RANGE = 9, // CreatureEntry(0any), minDist, maxDist
1030 SMART_TARGET_CREATURE_GUID = 10, // guid, entry
1031 SMART_TARGET_CREATURE_DISTANCE = 11, // CreatureEntry(0any), maxDist
1032 SMART_TARGET_STORED = 12, // id, uses pre-stored target(list)
1033 SMART_TARGET_GAMEOBJECT_RANGE = 13, // entry(0any), min, max
1034 SMART_TARGET_GAMEOBJECT_GUID = 14, // guid, entry
1035 SMART_TARGET_GAMEOBJECT_DISTANCE = 15, // entry(0any), maxDist
1036 SMART_TARGET_INVOKER_PARTY = 16, // invoker's party members
1039 SMART_TARGET_CLOSEST_CREATURE = 19, // CreatureEntry(0any), maxDist, dead?
1040 SMART_TARGET_CLOSEST_GAMEOBJECT = 20, // entry(0any), maxDist
1042 SMART_TARGET_ACTION_INVOKER_VEHICLE = 22, // Unit's vehicle who caused this Event to occur
1043 SMART_TARGET_OWNER_OR_SUMMONER = 23, // Unit's owner or summoner
1044 SMART_TARGET_THREAT_LIST = 24, // All units on creature's threat list
1045 SMART_TARGET_CLOSEST_ENEMY = 25, // maxDist, playerOnly
1046 SMART_TARGET_CLOSEST_FRIENDLY = 26, // maxDist, playerOnly
1047
1049};
1050
1052{
1053 SmartTarget(SMARTAI_TARGETS t = SMART_TARGET_NONE, uint32 p1 = 0, uint32 p2 = 0, uint32 p3 = 0) : x(0.0f), y(0.0f), z(0.0f), o(0.0f)
1054 {
1055 type = t;
1056 raw.param1 = p1;
1057 raw.param2 = p2;
1058 raw.param3 = p3;
1059 }
1061 float x, y, z, o;
1062 union
1063 {
1064 struct
1065 {
1070
1071 struct
1072 {
1076
1077 struct
1078 {
1082
1083 struct
1084 {
1085 uint32 dist;
1087
1088 struct
1089 {
1093
1094 struct
1095 {
1098
1099 struct
1100 {
1101 uint32 entry;
1105
1106 struct
1107 {
1108 uint32 dbGuid;
1109 uint32 entry;
1111
1112 struct
1113 {
1114 uint32 entry;
1115 uint32 dist;
1117
1118 struct
1119 {
1122
1123 struct
1124 {
1125 uint32 entry;
1126 uint32 dist;
1129
1130 struct
1131 {
1135
1136 struct
1137 {
1141
1142 struct
1143 {
1148 };
1149};
1150
1160
1175
1189
1203
1205{
1281};
1282
1298
1300{
1301 SMARTCAST_INTERRUPT_PREVIOUS = 0x01, //Interrupt any spell casting
1302 SMARTCAST_TRIGGERED = 0x02, //Triggered (this makes spell cost zero mana and have no cast time)
1303 //CAST_FORCE_CAST = 0x04, //Forces cast even if creature is out of mana or out of range
1304 //CAST_NO_MELEE_IF_OOM = 0x08, //Prevents creature from entering melee if out of mana or out of range
1305 //CAST_FORCE_TARGET_SELF = 0x10, //Forces the target to cast this spell on itself
1306 SMARTCAST_AURA_NOT_PRESENT = 0x20 //Only casts the spell if the target does not have an aura from the spell
1307};
1308
1309// one line in DB is one event
1335
1337
1338typedef std::list<WorldObject*> ObjectList;
1340
1342{
1343 friend class Skyfire::Singleton<SmartWaypointMgr, Skyfire::NullMutex>;
1345public:
1347
1348 void LoadFromDB();
1349
1351 {
1352 if (waypoint_map.find(id) != waypoint_map.end())
1353 return waypoint_map[id];
1354 else return 0;
1355 }
1356
1357private:
1359};
1360
1361// all events for a single entry
1362typedef std::vector<SmartScriptHolder> SmartAIEventList;
1363
1364// all events for all entries / guids
1366
1367// Helper Stores
1368typedef std::map<uint32 /*entry*/, std::pair<uint32 /*spellId*/, SpellEffIndex /*effIndex*/> > CacheSpellContainer;
1369typedef std::pair<CacheSpellContainer::const_iterator, CacheSpellContainer::const_iterator> CacheSpellContainerBounds;
1370
1372{
1373 friend class Skyfire::Singleton<SmartAIMgr, Skyfire::NullMutex>;
1375public:
1377
1378 void LoadSmartAIFromDB();
1379
1381 {
1382 SmartAIEventList temp;
1383 if (mEventMap[uint32(type)].find(entry) != mEventMap[uint32(type)].end())
1384 return mEventMap[uint32(type)][entry];
1385 else
1386 {
1387 if (entry > 0)//first search is for guid (negative), do not drop error if not found
1388 SF_LOG_DEBUG("scripts.ai", "SmartAIMgr::GetScript: Could not load Script for Entry %d ScriptType %u.", entry, uint32(type));
1389 return temp;
1390 }
1391 }
1392
1393private:
1394 //event stores
1396
1398 bool IsTargetValid(SmartScriptHolder const& e);
1399
1400 /*inline bool IsTargetValid(SmartScriptHolder e, int32 target)
1401 {
1402 if (target < SMART_TARGET_NONE || target >= SMART_TARGET_END)
1403 {
1404 SF_LOG_ERROR("sql.sql", "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses invalid Target type %d, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), target);
1405 return false;
1406 }
1407 return true;
1408 }*/
1409
1411 {
1412 if (max < min)
1413 {
1414 SF_LOG_ERROR("sql.sql", "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses min/max params wrong (%u/%u), skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), min, max);
1415 return false;
1416 }
1417 return true;
1418 }
1419
1420 /*inline bool IsPercentValid(SmartScriptHolder e, int32 pct)
1421 {
1422 if (pct < -100 || pct > 100)
1423 {
1424 SF_LOG_ERROR("sql.sql", "SmartAIMgr: Entry %d SourceType %u Event %u Action %u has invalid Percent set (%d), skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), pct);
1425 return false;
1426 }
1427 return true;
1428 }*/
1429
1430 bool NotNULL(SmartScriptHolder const& e, uint32 data)
1431 {
1432 if (!data)
1433 {
1434 SF_LOG_ERROR("sql.sql", "SmartAIMgr: Entry %d SourceType %u Event %u Action %u Parameter can not be NULL, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType());
1435 return false;
1436 }
1437 return true;
1438 }
1439
1441 {
1442 if (!sObjectMgr->GetCreatureTemplate(entry))
1443 {
1444 SF_LOG_ERROR("sql.sql", "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Creature entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), entry);
1445 return false;
1446 }
1447 return true;
1448 }
1449
1451 {
1452 if (!sObjectMgr->GetQuestTemplate(entry))
1453 {
1454 SF_LOG_ERROR("sql.sql", "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Quest entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), entry);
1455 return false;
1456 }
1457 return true;
1458 }
1459
1461 {
1462 if (!sObjectMgr->GetGameObjectTemplate(entry))
1463 {
1464 SF_LOG_ERROR("sql.sql", "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent GameObject entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), entry);
1465 return false;
1466 }
1467 return true;
1468 }
1469
1471 {
1472 if (!sSpellMgr->GetSpellInfo(entry))
1473 {
1474 SF_LOG_ERROR("sql.sql", "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Spell entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), entry);
1475 return false;
1476 }
1477 return true;
1478 }
1479
1481 {
1482 if (!sItemStore.LookupEntry(entry))
1483 {
1484 SF_LOG_ERROR("sql.sql", "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Item entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), entry);
1485 return false;
1486 }
1487 return true;
1488 }
1489
1491 {
1492 if (!sEmotesTextStore.LookupEntry(entry))
1493 {
1494 SF_LOG_ERROR("sql.sql", "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Text Emote entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), entry);
1495 return false;
1496 }
1497 return true;
1498 }
1499
1501 {
1502 if (!sEmotesStore.LookupEntry(entry))
1503 {
1504 SF_LOG_ERROR("sql.sql", "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Emote entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), entry);
1505 return false;
1506 }
1507 return true;
1508 }
1509
1511 {
1512 if (!sAreaTriggerStore.LookupEntry(entry))
1513 {
1514 SF_LOG_ERROR("sql.sql", "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent AreaTrigger entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), entry);
1515 return false;
1516 }
1517 return true;
1518 }
1519
1521 {
1522 if (!sSoundEntriesStore.LookupEntry(entry))
1523 {
1524 SF_LOG_ERROR("sql.sql", "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Sound entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), entry);
1525 return false;
1526 }
1527 return true;
1528 }
1529
1530 //bool IsTextValid(SmartScriptHolder const& e, uint32 id);
1531
1532 // Helpers
1533 void LoadHelperStores();
1534 void UnLoadHelperStores();
1541};
1542
1543#define sSmartScriptMgr Skyfire::Singleton<SmartAIMgr, Skyfire::NullMutex>::instance()
1544#define sSmartWaypointMgr Skyfire::Singleton<SmartWaypointMgr, Skyfire::NullMutex>::instance()
1545#endif
DB2Storage< ItemEntry > sItemStore(Itemfmt, &DB2Utilities::HasItemEntry, &DB2Utilities::WriteItemDbReply)
DBCStorage< AreaTriggerEntry > sAreaTriggerStore(AreaTriggerEntryfmt)
DBCStorage< SoundEntriesEntry > sSoundEntriesStore(SoundEntriesfmt)
DBCStorage< EmotesTextEntry > sEmotesTextStore(EmotesTextEntryfmt)
DBCStorage< EmotesEntry > sEmotesStore(EmotesEntryfmt)
std::int32_t int32
Definition Define.h:73
std::uint32_t uint32
Definition Define.h:77
#define SF_LOG_DEBUG(filterType__,...)
Definition Log.h:134
#define SF_LOG_ERROR(filterType__,...)
Definition Log.h:143
#define sObjectMgr
Definition ObjectMgr.h:1617
SpellEffIndex
SmartScriptType
@ SMART_SCRIPT_TYPE_TIMED_ACTIONLIST
@ SMART_SCRIPT_TYPE_MAX
@ SMART_SCRIPT_TYPE_INSTANCE
@ SMART_SCRIPT_TYPE_CREATURE
@ SMART_SCRIPT_TYPE_GOSSIP
@ SMART_SCRIPT_TYPE_GAMEOBJECT
@ SMART_SCRIPT_TYPE_AREATRIGGER
@ SMART_SCRIPT_TYPE_SPELL
@ SMART_SCRIPT_TYPE_TRANSPORT
@ SMART_SCRIPT_TYPE_EVENT
@ SMART_SCRIPT_TYPE_QUEST
SMARTAI_TEMPLATE
@ SMARTAI_TEMPLATE_CAGED_GO_PART
@ SMARTAI_TEMPLATE_CAGED_NPC_PART
@ SMARTAI_TEMPLATE_BASIC
@ SMARTAI_TEMPLATE_END
@ SMARTAI_TEMPLATE_CASTER
@ SMARTAI_TEMPLATE_PASSIVE
@ SMARTAI_TEMPLATE_TURRET
std::vector< SmartScriptHolder > SmartAIEventList
SmartEventFlags
@ SMART_EVENT_FLAG_RESERVED_5
@ SMART_EVENT_FLAG_DIFFICULTY_ALL
@ SMART_EVENT_FLAG_DIFFICULTY_3
@ SMART_EVENT_FLAG_DONT_RESET
@ SMART_EVENT_FLAG_DEBUG_ONLY
@ SMART_EVENT_FLAGS_ALL
@ SMART_EVENT_FLAG_RESERVED_6
@ SMART_EVENT_FLAG_DIFFICULTY_2
@ SMART_EVENT_FLAG_DIFFICULTY_1
@ SMART_EVENT_FLAG_DIFFICULTY_0
@ SMART_EVENT_FLAG_NOT_REPEATABLE
SMARTAI_TARGETS
@ SMART_TARGET_CLOSEST_CREATURE
@ SMART_TARGET_CREATURE_DISTANCE
@ SMART_TARGET_HOSTILE_RANDOM_NOT_TOP
@ SMART_TARGET_INVOKER_PARTY
@ SMART_TARGET_CLOSEST_FRIENDLY
@ SMART_TARGET_CLOSEST_GAMEOBJECT
@ SMART_TARGET_GAMEOBJECT_RANGE
@ SMART_TARGET_CREATURE_GUID
@ SMART_TARGET_PLAYER_RANGE
@ SMART_TARGET_VICTIM
@ SMART_TARGET_GAMEOBJECT_DISTANCE
@ SMART_TARGET_CREATURE_RANGE
@ SMART_TARGET_CLOSEST_PLAYER
@ SMART_TARGET_HOSTILE_RANDOM
@ SMART_TARGET_GAMEOBJECT_GUID
@ SMART_TARGET_HOSTILE_SECOND_AGGRO
@ SMART_TARGET_OWNER_OR_SUMMONER
@ SMART_TARGET_SELF
@ SMART_TARGET_END
@ SMART_TARGET_ACTION_INVOKER
@ SMART_TARGET_POSITION
@ SMART_TARGET_HOSTILE_LAST_AGGRO
@ SMART_TARGET_ACTION_INVOKER_VEHICLE
@ SMART_TARGET_THREAT_LIST
@ SMART_TARGET_CLOSEST_ENEMY
@ SMART_TARGET_NONE
@ SMART_TARGET_PLAYER_DISTANCE
@ SMART_TARGET_STORED
std::map< uint32, std::pair< uint32, SpellEffIndex > > CacheSpellContainer
const uint32 SmartPhaseMask[SMART_EVENT_PHASE_COUNT][2]
const uint32 SmartAIEventMask[SMART_EVENT_END][2]
SMART_SCRIPT_RESPAWN_CONDITION
@ SMART_SCRIPT_RESPAWN_CONDITION_END
@ SMART_SCRIPT_RESPAWN_CONDITION_NONE
@ SMART_SCRIPT_RESPAWN_CONDITION_AREA
@ SMART_SCRIPT_RESPAWN_CONDITION_MAP
UNORDERED_MAP< uint32, WayPoint * > WPPath
SmartAITypeMaskId
@ SMART_SCRIPT_TYPE_MASK_SPELL
@ SMART_SCRIPT_TYPE_MASK_EVENT
@ SMART_SCRIPT_TYPE_MASK_QUEST
@ SMART_SCRIPT_TYPE_MASK_TIMED_ACTIONLIST
@ SMART_SCRIPT_TYPE_MASK_CREATURE
@ SMART_SCRIPT_TYPE_MASK_INSTANCE
@ SMART_SCRIPT_TYPE_MASK_AREATRIGGER
@ SMART_SCRIPT_TYPE_MASK_GOSSIP
@ SMART_SCRIPT_TYPE_MASK_GAMEOBJECT
@ SMART_SCRIPT_TYPE_MASK_TRANSPORT
SMART_ACTION
@ SMART_ACTION_REMOVE_TIMED_EVENT
@ SMART_ACTION_NONE
@ SMART_ACTION_ADD_QUEST
@ SMART_ACTION_SET_GO_FLAG
@ SMART_ACTION_WP_RESUME
@ SMART_ACTION_UPDATE_TEMPLATE
@ SMART_ACTION_STORE_TARGET_LIST
@ SMART_ACTION_SET_HEALTH_REGEN
@ SMART_ACTION_ACTIVATE_GOBJECT
@ SMART_ACTION_FORCE_DESPAWN
@ SMART_ACTION_GAME_EVENT_START
@ SMART_ACTION_UNUSED_16
@ SMART_ACTION_CALL_RANDOM_RANGE_TIMED_ACTIONLIST
@ SMART_ACTION_SET_INST_DATA64
@ SMART_ACTION_SET_FACTION
@ SMART_ACTION_THREAT_SINGLE_PCT
@ SMART_ACTION_SET_INGAME_PHASE_MASK
@ SMART_ACTION_CLOSE_GOSSIP
@ SMART_ACTION_ADD_GO_FLAG
@ SMART_ACTION_ADD_DYNAMIC_FLAG
@ SMART_ACTION_KILL_UNIT
@ SMART_ACTION_END
@ SMART_ACTION_CALL_AREAEXPLOREDOREVENTHAPPENS
@ SMART_ACTION_ATTACK_START
@ SMART_ACTION_SET_UNIT_FLAG
@ SMART_ACTION_CALL_GROUPEVENTHAPPENS
@ SMART_ACTION_MOUNT_TO_ENTRY_OR_MODEL
@ SMART_ACTION_INVOKER_CAST
@ SMART_ACTION_JUMP_TO_POS
@ SMART_ACTION_CALL_RANDOM_TIMED_ACTIONLIST
@ SMART_ACTION_SEND_GOSSIP_MENU
@ SMART_ACTION_FLEE_FOR_ASSIST
@ SMART_ACTION_EQUIP
@ SMART_ACTION_SET_ROOT
@ SMART_ACTION_SUMMON_GO
@ SMART_ACTION_WP_PAUSE
@ SMART_ACTION_SIMPLE_TALK
@ SMART_ACTION_CAST
@ SMART_ACTION_ALLOW_COMBAT_MOVEMENT
@ SMART_ACTION_ADD_AURA
@ SMART_ACTION_THREAT_ALL_PCT
@ SMART_ACTION_STORE_VARIABLE_DECIMAL
@ SMART_ACTION_SET_HEALTH
@ SMART_ACTION_RESPAWN_TARGET
@ SMART_ACTION_SOUND
@ SMART_ACTION_ADD_NPC_FLAG
@ SMART_ACTION_EVADE
@ SMART_ACTION_UNUSED
@ SMART_ACTION_FAIL_QUEST
@ SMART_ACTION_INTERRUPT_SPELL
@ SMART_ACTION_ADD_POWER
@ SMART_ACTION_REMOVE_DYNAMIC_FLAG
@ SMART_ACTION_RANDOM_SOUND
@ SMART_ACTION_SET_POWER
@ SMART_ACTION_MOVE_FORWARD
@ SMART_ACTION_SEND_TARGET_TO_TARGET
@ SMART_ACTION_REMOVE_POWER
@ SMART_ACTION_SET_DYNAMIC_FLAG
@ SMART_ACTION_REMOVE_ITEM
@ SMART_ACTION_SEND_GO_CUSTOM_ANIM
@ SMART_ACTION_MORPH_TO_ENTRY_OR_MODEL
@ SMART_ACTION_REMOVE_UNIT_FLAG
@ SMART_ACTION_RANDOM_PHASE
@ SMART_ACTION_SET_EMOTE_STATE
@ SMART_ACTION_CROSS_CAST
@ SMART_ACTION_WP_STOP
@ SMART_ACTION_GAME_EVENT_STOP
@ SMART_ACTION_CALL_KILLEDMONSTER
@ SMART_ACTION_TALK
@ SMART_ACTION_CALL_SCRIPT_RESET
@ SMART_ACTION_SET_DATA
@ SMART_ACTION_WP_START
@ SMART_ACTION_COMBAT_STOP
@ SMART_ACTION_SET_RUN
@ SMART_ACTION_AUTO_ATTACK
@ SMART_ACTION_SET_INVINCIBILITY_HP_LEVEL
@ SMART_ACTION_SET_VISIBILITY
@ SMART_ACTION_RANDOM_PHASE_RANGE
@ SMART_ACTION_GO_SET_LOOT_STATE
@ SMART_ACTION_SET_SWIM
@ SMART_ACTION_SET_INST_DATA
@ SMART_ACTION_REMOVE_GO_FLAG
@ SMART_ACTION_CALL_FOR_HELP
@ SMART_ACTION_TELEPORT
@ SMART_ACTION_PLAYMOVIE
@ SMART_ACTION_FOLLOW
@ SMART_ACTION_PLAY_EMOTE
@ SMART_ACTION_SET_EVENT_PHASE
@ SMART_ACTION_SET_SHEATH
@ SMART_ACTION_SET_ORIENTATION
@ SMART_ACTION_SET_NPC_FLAG
@ SMART_ACTION_REMOVE_UNIT_FIELD_ANIM_TIER
@ SMART_ACTION_MOVE_TO_POS
@ SMART_ACTION_RANDOM_EMOTE
@ SMART_ACTION_INC_EVENT_PHASE
@ SMART_ACTION_CREATE_TIMED_EVENT
@ SMART_ACTION_DIE
@ SMART_ACTION_RESET_SCRIPT_BASE_OBJECT
@ SMART_ACTION_REMOVE_NPC_FLAG
@ SMART_ACTION_SET_FLY
@ SMART_ACTION_INSTALL_AI_TEMPLATE
@ SMART_ACTION_SUMMON_CREATURE
@ SMART_ACTION_RESET_GOBJECT
@ SMART_ACTION_CALL_TIMED_ACTIONLIST
@ SMART_ACTION_SET_IN_COMBAT_WITH_ZONE
@ SMART_ACTION_SET_UNIT_FIELD_ANIM_TIER
@ SMART_ACTION_SET_HOME_POS
@ SMART_ACTION_ADD_ITEM
@ SMART_ACTION_SET_ACTIVE
@ SMART_ACTION_SET_RANGED_MOVEMENT
@ SMART_ACTION_ACTIVATE_TAXI
@ SMART_ACTION_SUMMON_CREATURE_GROUP
@ SMART_ACTION_SET_REACT_STATE
@ SMART_ACTION_RANDOM_MOVE
@ SMART_ACTION_OVERRIDE_SCRIPT_BASE_OBJECT
@ SMART_ACTION_TRIGGER_TIMED_EVENT
@ SMART_ACTION_REMOVEAURASFROMSPELL
SMART_EVENT
@ SMART_EVENT_IC_LOS
@ SMART_EVENT_EVADE
@ SMART_EVENT_ACTION_DONE
@ SMART_EVENT_SUMMON_DESPAWNED
@ SMART_EVENT_SPELLHIT
@ SMART_EVENT_RECEIVE_EMOTE
@ SMART_EVENT_FRIENDLY_HEALTH_PCT
@ SMART_EVENT_QUEST_FAIL
@ SMART_EVENT_DATA_SET
@ SMART_EVENT_RECEIVE_HEAL
@ SMART_EVENT_DUMMY_EFFECT
@ SMART_EVENT_TIMED_EVENT_TRIGGERED
@ SMART_EVENT_CHARMED_TARGET
@ SMART_EVENT_TARGET_MANA_PCT
@ SMART_EVENT_QUEST_COMPLETION
@ SMART_EVENT_JUST_CREATED
@ SMART_EVENT_AREATRIGGER_ONTRIGGER
@ SMART_EVENT_ON_SPELLCLICK
@ SMART_EVENT_MOVEMENTINFORM
@ SMART_EVENT_RANGE
@ SMART_EVENT_MANA_PCT
@ SMART_EVENT_PASSENGER_REMOVED
@ SMART_EVENT_INSTANCE_PLAYER_ENTER
@ SMART_EVENT_LINK
@ SMART_EVENT_WAYPOINT_PAUSED
@ SMART_EVENT_REACHED_HOME
@ SMART_EVENT_TRANSPORT_ADDCREATURE
@ SMART_EVENT_REWARD_QUEST
@ SMART_EVENT_END
@ SMART_EVENT_GO_EVENT_INFORM
@ SMART_EVENT_UPDATE_IC
@ SMART_EVENT_RESET
@ SMART_EVENT_JUST_SUMMONED
@ SMART_EVENT_CHARMED
@ SMART_EVENT_AI_INIT
@ SMART_EVENT_WAYPOINT_START
@ SMART_EVENT_SPELLHIT_TARGET
@ SMART_EVENT_GAME_EVENT_START
@ SMART_EVENT_KILL
@ SMART_EVENT_TRANSPORT_REMOVE_PLAYER
@ SMART_EVENT_GOSSIP_HELLO
@ SMART_EVENT_GOSSIP_SELECT
@ SMART_EVENT_CORPSE_REMOVED
@ SMART_EVENT_QUEST_OBJ_COPLETETION
@ SMART_EVENT_PASSENGER_BOARDED
@ SMART_EVENT_UPDATE
@ SMART_EVENT_TRANSPORT_ADDPLAYER
@ SMART_EVENT_WAYPOINT_ENDED
@ SMART_EVENT_IS_BEHIND_TARGET
@ SMART_EVENT_UPDATE_OOC
@ SMART_EVENT_ACCEPTED_QUEST
@ SMART_EVENT_FRIENDLY_MISSING_BUFF
@ SMART_EVENT_WAYPOINT_RESUMED
@ SMART_EVENT_WAYPOINT_REACHED
@ SMART_EVENT_TARGET_BUFFED
@ SMART_EVENT_RESPAWN
@ SMART_EVENT_QUEST_ACCEPTED
@ SMART_EVENT_HEALT_PCT
@ SMART_EVENT_FRIENDLY_HEALTH
@ SMART_EVENT_QUEST_REWARDED
@ SMART_EVENT_TEXT_OVER
@ SMART_EVENT_DEATH
@ SMART_EVENT_TRANSPORT_RELOCATE
@ SMART_EVENT_GAME_EVENT_END
@ SMART_EVENT_DAMAGED
@ SMART_EVENT_FOLLOW_COMPLETED
@ SMART_EVENT_WAYPOINT_STOPPED
@ SMART_EVENT_FRIENDLY_IS_CC
@ SMART_EVENT_GO_STATE_CHANGED
@ SMART_EVENT_OOC_LOS
@ SMART_EVENT_AGGRO
@ SMART_EVENT_TARGET_HEALTH_PCT
@ SMART_EVENT_VICTIM_CASTING
@ SMART_EVENT_DAMAGED_TARGET
@ SMART_EVENT_HAS_AURA
@ SMART_EVENT_SUMMONED_UNIT
SMART_EVENT_PHASE_BITS
@ SMART_EVENT_PHASE_4_BIT
@ SMART_EVENT_PHASE_3_BIT
@ SMART_EVENT_PHASE_6_BIT
@ SMART_EVENT_PHASE_2_BIT
@ SMART_EVENT_PHASE_1_BIT
@ SMART_EVENT_PHASE_ALL
@ SMART_EVENT_PHASE_5_BIT
@ SMART_EVENT_PHASE_ALWAYS_BIT
@ SMART_ESCORT_LAST_OOC_POINT
@ SMART_RANDOM_POINT
@ SMART_ACTION_PARAM_COUNT
@ SMART_EVENT_PARAM_COUNT
@ SMART_ESCORT_TARGETS
@ SMART_SUMMON_COUNTER
UNORDERED_MAP< uint32, ObjectList * > ObjectListMap
SmartCastFlags
@ SMARTCAST_TRIGGERED
@ SMARTCAST_INTERRUPT_PREVIOUS
@ SMARTCAST_AURA_NOT_PRESENT
std::list< WorldObject * > ObjectList
SMART_EVENT_PHASE
@ SMART_EVENT_PHASE_COUNT
@ SMART_EVENT_PHASE_4
@ SMART_EVENT_PHASE_1
@ SMART_EVENT_PHASE_3
@ SMART_EVENT_PHASE_2
@ SMART_EVENT_PHASE_5
@ SMART_EVENT_PHASE_6
@ SMART_EVENT_PHASE_ALWAYS
@ SMART_EVENT_PHASE_MAX
const uint32 SmartAITypeMask[SMART_SCRIPT_TYPE_MAX][2]
UNORDERED_MAP< int32, SmartAIEventList > SmartAIEventMap
std::pair< CacheSpellContainer::const_iterator, CacheSpellContainer::const_iterator > CacheSpellContainerBounds
#define sSpellMgr
Definition SpellMgr.h:744
#define UNORDERED_MAP
static float waypoint[6][3]
Definition boss_alar.cpp:36
SmartAIEventMap mEventMap[SMART_SCRIPT_TYPE_MAX]
CacheSpellContainer SummonCreatureSpellStore
void UnLoadHelperStores()
CacheSpellContainerBounds GetSummonCreatureSpellContainerBounds(uint32 creatureEntry) const
SmartAIEventList GetScript(int32 entry, SmartScriptType type)
bool IsTextEmoteValid(SmartScriptHolder const &e, uint32 entry)
bool IsTargetValid(SmartScriptHolder const &e)
bool NotNULL(SmartScriptHolder const &e, uint32 data)
void LoadHelperStores()
bool IsSoundValid(SmartScriptHolder const &e, uint32 entry)
bool IsEventValid(SmartScriptHolder &e)
bool IsGameObjectValid(SmartScriptHolder const &e, uint32 entry)
bool IsMinMaxValid(SmartScriptHolder const &e, uint32 min, uint32 max)
CacheSpellContainer SummonGameObjectSpellStore
bool IsQuestValid(SmartScriptHolder const &e, uint32 entry)
bool IsCreatureValid(SmartScriptHolder const &e, uint32 entry)
bool IsAreaTriggerValid(SmartScriptHolder const &e, uint32 entry)
CacheSpellContainerBounds GetSummonGameObjectSpellContainerBounds(uint32 gameObjectEntry) const
void LoadSmartAIFromDB()
CacheSpellContainerBounds GetKillCreditSpellContainerBounds(uint32 killCredit) const
bool IsItemValid(SmartScriptHolder const &e, uint32 entry)
CacheSpellContainer KillCreditSpellStore
bool IsEmoteValid(SmartScriptHolder const &e, uint32 entry)
bool IsSpellValid(SmartScriptHolder const &e, uint32 entry)
UNORDERED_MAP< uint32, WPPath * > waypoint_map
WPPath * GetPath(uint32 id)
struct SmartAction::@137136306204214247065175315134144360247331017331::@063217247236027134221310037325112126070263107200 installTtemplate
uint32 healthpointmod
uint32 targetParam2
struct SmartAction::@137136306204214247065175315134144360247331017331::@223221030233146165101047364315320356273243300160 killedMonster
struct SmartAction::@137136306204214247065175315134144360247331017331::@362126153056054377271167251121034140104172033254 sendTargetToTarget
struct SmartAction::@137136306204214247065175315134144360247331017331::@056037146104051216040022366365070022176220102015 setEventPhase
struct SmartAction::@137136306204214247065175315134144360247331017331::@202121053104314201255122102201207263246120035036 setRangedMovement
struct SmartAction::@137136306204214247065175315134144360247331017331::@225326137357300251213255332357005062365342332334 taxi
struct SmartAction::@137136306204214247065175315134144360247331017331::@125305003154321137305003172072215042325305172115 setSwim
struct SmartAction::@137136306204214247065175315134144360247331017331::@060034074041231021271064302073333205055004107143 enterVehicle
struct SmartAction::@137136306204214247065175315134144360247331017331::@032247343121317314325033254113252354347071044324 timedActionList
struct SmartAction::@137136306204214247065175315134144360247331017331::@263337113206264100344005071314123271031160215224 incEventPhase
struct SmartAction::@137136306204214247065175315134144360247331017331::@304176335340345231335031241366365374157177170315 addUnitFlag
struct SmartAction::@137136306204214247065175315134144360247331017331::@262062362063376054103076310127135246225346312115 follow
struct SmartAction::@137136306204214247065175315134144360247331017331::@323250253076201247247032355216135323066263226166 summonGO
struct SmartAction::@137136306204214247065175315134144360247331017331::@260014043352000167110056244356272120365357113047 power
int32 healthpointpercent
struct SmartAction::@137136306204214247065175315134144360247331017331::@211024050222126232204263041344063334075351151253 storeVar
struct SmartAction::@137136306204214247065175315134144360247331017331::@056307337001341304225116105052047116305102131322 ingamePhaseId
struct SmartAction::@137136306204214247065175315134144360247331017331::@023276076022007070341053170160156071313157015060 moveRandom
struct SmartAction::@137136306204214247065175315134144360247331017331::@146025204151373170035336166324347315111301135304 goFlag
uint32 targetParam1
struct SmartAction::@137136306204214247065175315134144360247331017331::@322335154115274224237056033042154141310270174273 randTimedActionList
struct SmartAction::@137136306204214247065175315134144360247331017331::@312023305216037355162221347243201252312370300333 unitFlag
struct SmartAction::@137136306204214247065175315134144360247331017331::@170222221015243003166361030047273347230060275030 setInstanceData64
struct SmartAction::@137136306204214247065175315134144360247331017331::@105154066270000205250254221004375132270204111257 faction
struct SmartAction::@137136306204214247065175315134144360247331017331::@237106077034177101205127163210006223365202222163 talk
struct SmartAction::@137136306204214247065175315134144360247331017331::@013257352102053165303132060302205025211375037125 setHealthRegen
struct SmartAction::@137136306204214247065175315134144360247331017331::@232263171056172116357036326052343214356025224311 setRun
struct SmartAction::@137136306204214247065175315134144360247331017331::@275255223343355134011263135140247005064156134156 removeAura
struct SmartAction::@137136306204214247065175315134144360247331017331::@106331226105025351167175306102157241205132176043 threatPCT
struct SmartAction::@137136306204214247065175315134144360247331017331::@017017301336332264150073045027362135176250171251 delunitByte
struct SmartAction::@137136306204214247065175315134144360247331017331::@340117101002077274057262132157002056007011042371 item
uint32 targetParam3
struct SmartAction::@137136306204214247065175315134144360247331017331::@321334216220214152324067135252322006365237051372 summonCreature
struct SmartAction::@137136306204214247065175315134144360247331017331::@102027324320366347114036112231276256216375356341 forceDespawn
struct SmartAction::@137136306204214247065175315134144360247331017331::@234064157343222026123004206306000221273052034177 interruptSpellCasting
struct SmartAction::@137136306204214247065175315134144360247331017331::@327043224271174220045213146224240101337012120173 combatMove
struct SmartAction::@137136306204214247065175315134144360247331017331::@253050363250105135033216017175137100101324053136 flee
struct SmartAction::@137136306204214247065175315134144360247331017331::@271373373116125344236343321340152150140162062203 updateTemplate
struct SmartAction::@137136306204214247065175315134144360247331017331::@237127210277144266063211043133264370366070237302 storeTargets
struct SmartAction::@137136306204214247065175315134144360247331017331::@275214002000035051002312305231375170105074073031 react
struct SmartAction::@137136306204214247065175315134144360247331017331::@222323075055020043337006115334025200027336144060 setGoLootState
struct SmartAction::@137136306204214247065175315134144360247331017331::@244305372364075262301351325221332130061212111120 equip
struct SmartAction::@137136306204214247065175315134144360247331017331::@030016163313022245256210315150151222345056203275 randomPhaseRange
SMART_ACTION type
struct SmartAction::@137136306204214247065175315134144360247331017331::@364140021337216071013031072126362152213217361022 gameEventStart
struct SmartAction::@137136306204214247065175315134144360247331017331::@315246215121200135004247035047355266071336045044 unused
struct SmartAction::@137136306204214247065175315134144360247331017331::@231234170206337120370317003230107262076077176377 sethealthpointorpercent
struct SmartAction::@137136306204214247065175315134144360247331017331::@366346013116331267251301000101176066154005153314 wpStart
uint32 gossipMenuId
uint32 gossipNpcTextId
struct SmartAction::@137136306204214247065175315134144360247331017331::@252203015076101372213105211340142002040360102025 jump
struct SmartAction::@137136306204214247065175315134144360247331017331::@053047050057114047035035162205275317245206006202 visibility
struct SmartAction::@137136306204214247065175315134144360247331017331::@304307032125035107043074211115267356000271173275 invincHP
struct SmartAction::@137136306204214247065175315134144360247331017331::@077320174144025067034346062363121331330116113042 sendGossipMenu
struct SmartAction::@137136306204214247065175315134144360247331017331::@125064266206015146053042115264002074265057332210 RespawnTarget
struct SmartAction::@137136306204214247065175315134144360247331017331::@154353352031206117237307025011150000165343160075 gameEventStop
struct SmartAction::@137136306204214247065175315134144360247331017331::@017204072246217361054270126345157054047267131155 timeEvent
struct SmartAction::@137136306204214247065175315134144360247331017331::@113375321062033017213200334254054264335370016350 setRoot
struct SmartAction::@137136306204214247065175315134144360247331017331::@012013052354341222130370041241340206147214340017 active
struct SmartAction::@137136306204214247065175315134144360247331017331::@070027157377176027211043175361120005242332321041 cast
struct SmartAction::@137136306204214247065175315134144360247331017331::@361253355005363233353246257362125371204257066324 wpStop
struct SmartAction::@137136306204214247065175315134144360247331017331::@072015025131263067117155164031252072143036172206 setFly
struct SmartAction::@137136306204214247065175315134144360247331017331::@034027334375127044264311057312165257123120035111 setSheath
uint32 attackInvoker
struct SmartAction::@137136306204214247065175315134144360247331017331::@047257325033252011304017203222214205224131346024 randomEmote
struct SmartAction::@137136306204214247065175315134144360247331017331::@146067006045202033167137301332374134247215001225 morphOrMount
struct SmartAction::@137136306204214247065175315134144360247331017331::@320043347275246262060367004235031264114360145130 removeUnitFlag
struct SmartAction::@137136306204214247065175315134144360247331017331::@134276106155246334274174066250006371264262265141 movie
struct SmartAction::@137136306204214247065175315134144360247331017331::@314010003225126163310372071105334257143315207166 MoveToPos
struct SmartAction::@137136306204214247065175315134144360247331017331::@155372325360324370022313255343031333045270217002 setInstanceData
struct SmartAction::@137136306204214247065175315134144360247331017331::@124325320104077343177176052310130023304351310216 randomSound
struct SmartAction::@137136306204214247065175315134144360247331017331::@036364267355312211235014262213357013044042051306 callHelp
struct SmartAction::@137136306204214247065175315134144360247331017331::@017345322206322315133100210307152010072305326222 teleport
uint32 goRespawnTime
struct SmartAction::@137136306204214247065175315134144360247331017331::@247156106221324315321034033112331371231160171352 setunitByte
struct SmartAction::@137136306204214247065175315134144360247331017331::@110372216333363233013275026147121341347021271102 raw
struct SmartAction::@137136306204214247065175315134144360247331017331::@216226275100333317146042116304160061113317344104 randomPhase
struct SmartAction::@137136306204214247065175315134144360247331017331::@211003267135025237246004137032245170325052026370 sendGoCustomAnim
struct SmartAction::@137136306204214247065175315134144360247331017331::@375336150123327052355224140114304021206245264240 wpPause
struct SmartAction::@137136306204214247065175315134144360247331017331::@231354224040032224162034026304373127302354021157 creatureGroup
struct SmartAction::@137136306204214247065175315134144360247331017331::@073131015240006350100116003135343265143231067154 setData
struct SmartAction::@137136306204214247065175315134144360247331017331::@111103063200063043211267272370026157313266151007 autoAttack
struct SmartEvent::@166073203170024010224000246043245045265275236352::@143126243136311247350047021112211341032326317160 transportRelocate
struct SmartEvent::@166073203170024010224000246043245045265275236352::@205334221103210356102216306336035204273105217373 doAction
struct SmartEvent::@166073203170024010224000246043245045265275236352::@035124263137161112271324316211040076034364300254 friendlyHealthPct
uint32 event_flags
uint32 event_phase_mask
struct SmartEvent::@166073203170024010224000246043245045265275236352::@151214011253067366266013227241263175352330107015 spellHit
struct SmartEvent::@166073203170024010224000246043245045265275236352::@153240210013057316073206114055356342200322004153 areatrigger
struct SmartEvent::@166073203170024010224000246043245045265275236352::@331123367372304044150027144120234260063243315361 raw
struct SmartEvent::@166073203170024010224000246043245045265275236352::@071217147231100355344130024153246046254076175303 minMax
struct SmartEvent::@166073203170024010224000246043245045265275236352::@014244365015242120343050241027342311345320231372 kill
uint32 cooldownMax
struct SmartEvent::@166073203170024010224000246043245045265275236352::@221026305077317174075143035236341220146202106111 summoned
struct SmartEvent::@166073203170024010224000246043245045265275236352::@346027276323067131151203154341341353172275342001 textOver
struct SmartEvent::@166073203170024010224000246043245045265275236352::@202207111237273327363141057053252156066031227127 targetCasting
struct SmartEvent::@166073203170024010224000246043245045265275236352::@362275236245375345071356133116337307370006121222 goStateChanged
struct SmartEvent::@166073203170024010224000246043245045265275236352::@143336307355047137005241062216153351167151345337 transportAddCreature
struct SmartEvent::@166073203170024010224000246043245045265275236352::@374352063271056252122325060177325011004327327320 dummy
struct SmartEvent::@166073203170024010224000246043245045265275236352::@036062037237250315331173245260257302314063326326 targetAura
struct SmartEvent::@166073203170024010224000246043245045265275236352::@317215266053337235107156201003013251003136307007 dataSet
struct SmartEvent::@166073203170024010224000246043245045265275236352::@334243344311240353276325365000066230155007140117 timedEvent
struct SmartEvent::@166073203170024010224000246043245045265275236352::@126332302352372325113370275237377071315133246044 instancePlayerEnter
struct SmartEvent::@166073203170024010224000246043245045265275236352::@316052106375244313267206021344134155050363137163 gameEvent
uint32 event_chance
struct SmartEvent::@166073203170024010224000246043245045265275236352::@307010223035152345021275132122032265112355252253 eventInform
uint32 creatureEntry
struct SmartEvent::@166073203170024010224000246043245045265275236352::@231361362314252335147144320331135255146044361230 friendlyHealth
struct SmartEvent::@166073203170024010224000246043245045265275236352::@176246375035351301250241104017222341335356255101 minMaxRepeat
struct SmartEvent::@166073203170024010224000246043245045265275236352::@215225270007231027007174002122072040103111365225 aura
struct SmartEvent::@166073203170024010224000246043245045265275236352::@334366012233311313242122122157342315242332057236 gossip
struct SmartEvent::@166073203170024010224000246043245045265275236352::@153222357016331217240244030161351100040203125306 missingBuff
uint32 gameEventId
uint32 playerOnly
uint32 textGroupID
uint32 cooldownMin
struct SmartEvent::@166073203170024010224000246043245045265275236352::@133146201062172166200111053367224171220224362315 movementInform
struct SmartEvent::@166073203170024010224000246043245045265275236352::@010250233120134241015123153125242336170064340121 friendlyCC
struct SmartEvent::@166073203170024010224000246043245045265275236352::@140352011036232354166330333342335043070367211016 respawn
struct SmartEvent::@166073203170024010224000246043245045265275236352::@206071060360274252071246267136154353111152272204 los
SMART_EVENT type
struct SmartEvent::@166073203170024010224000246043245045265275236352::@201273004001225050106107035207231367176035206120 behindTarget
uint32 GetScriptType() const
uint32 GetEventType() const
uint32 GetTargetType() const
SmartScriptType source_type
uint32 GetActionType() const
struct SmartTarget::@333075361354170120173166243340237372226003166270::@110256257245272044322021152036011326202127237137 playerRange
struct SmartTarget::@333075361354170120173166243340237372226003166270::@245074100075004133116202301110122270342210362333 stored
struct SmartTarget::@333075361354170120173166243340237372226003166270::@331304071055133014342035021265106076261007323121 raw
struct SmartTarget::@333075361354170120173166243340237372226003166270::@164140207365237140026212144235174166326315355055 closestAttackable
struct SmartTarget::@333075361354170120173166243340237372226003166270::@252242265355222362137233075236171264264255250353 goDistance
struct SmartTarget::@333075361354170120173166243340237372226003166270::@336062220142255354121274120211064254344004061316 closest
SmartTarget(SMARTAI_TARGETS t=SMART_TARGET_NONE, uint32 p1=0, uint32 p2=0, uint32 p3=0)
struct SmartTarget::@333075361354170120173166243340237372226003166270::@002214221374016261141032233225077144161065220344 unitGUID
SMARTAI_TARGETS type
struct SmartTarget::@333075361354170120173166243340237372226003166270::@172360030245270120053010162234377345135043301307 unitDistance
struct SmartTarget::@333075361354170120173166243340237372226003166270::@333153342272102313242245202311020165275131037122 goRange
struct SmartTarget::@333075361354170120173166243340237372226003166270::@223015015133317307303007275055050316270341240277 position
struct SmartTarget::@333075361354170120173166243340237372226003166270::@262226145054070224013345240063324147141336277263 playerDistance
struct SmartTarget::@333075361354170120173166243340237372226003166270::@350332235033377264000372176067130337053021314362 closestFriendly
struct SmartTarget::@333075361354170120173166243340237372226003166270::@067073135241122173103324205206246325065313214360 unitRange
struct SmartTarget::@333075361354170120173166243340237372226003166270::@163054074026206351133353217237356273245266110331 goGUID
WayPoint(uint32 _id, float _x, float _y, float _z)