TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
SmartScriptMgr.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2008-2016 TrinityCore <http://www.trinitycore.org/>
3  *
4  * This program is free software; you can redistribute it and/or modify it
5  * under the terms of the GNU General Public License as published by the
6  * Free Software Foundation; either version 2 of the License, or (at your
7  * option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful, but WITHOUT
10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12  * more details.
13  *
14  * You should have received a copy of the GNU General Public License along
15  * with this program. If not, see <http://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef TRINITY_SMARTSCRIPTMGR_H
19 #define TRINITY_SMARTSCRIPTMGR_H
20 
21 #include "Common.h"
22 #include "Creature.h"
23 #include "CreatureAI.h"
24 #include "Unit.h"
25 #include "Spell.h"
26 #include "DB2Stores.h"
27 
28 //#include "SmartScript.h"
29 //#include "SmartAI.h"
30 
31 struct WayPoint
32 {
33  WayPoint(uint32 _id, float _x, float _y, float _z)
34  {
35  id = _id;
36  x = _x;
37  y = _y;
38  z = _z;
39  }
40 
42  float x;
43  float y;
44  float z;
45 };
46 
48 {
53  SMART_RANDOM_POINT = 0xFFFFFE,
55 };
56 
58 {
70 
72 };
73 
75 {
87 };
88 
90 {
100 };
101 
103 {
104  SMART_EVENT_UPDATE_IC = 0, // InitialMin, InitialMax, RepeatMin, RepeatMax
105  SMART_EVENT_UPDATE_OOC = 1, // InitialMin, InitialMax, RepeatMin, RepeatMax
106  SMART_EVENT_HEALT_PCT = 2, // HPMin%, HPMax%, RepeatMin, RepeatMax
107  SMART_EVENT_MANA_PCT = 3, // ManaMin%, ManaMax%, RepeatMin, RepeatMax
108  SMART_EVENT_AGGRO = 4, // NONE
109  SMART_EVENT_KILL = 5, // CooldownMin0, CooldownMax1, playerOnly2, else creature entry3
110  SMART_EVENT_DEATH = 6, // NONE
111  SMART_EVENT_EVADE = 7, // NONE
112  SMART_EVENT_SPELLHIT = 8, // SpellID, School, CooldownMin, CooldownMax
113  SMART_EVENT_RANGE = 9, // MinDist, MaxDist, RepeatMin, RepeatMax
114  SMART_EVENT_OOC_LOS = 10, // NoHostile, MaxRnage, CooldownMin, CooldownMax
115  SMART_EVENT_RESPAWN = 11, // type, MapId, ZoneId
116  SMART_EVENT_TARGET_HEALTH_PCT = 12, // HPMin%, HPMax%, RepeatMin, RepeatMax
117  SMART_EVENT_VICTIM_CASTING = 13, // RepeatMin, RepeatMax, spellid
118  SMART_EVENT_FRIENDLY_HEALTH = 14, // HPDeficit, Radius, RepeatMin, RepeatMax
119  SMART_EVENT_FRIENDLY_IS_CC = 15, // Radius, RepeatMin, RepeatMax
120  SMART_EVENT_FRIENDLY_MISSING_BUFF = 16, // SpellId, Radius, RepeatMin, RepeatMax
121  SMART_EVENT_SUMMONED_UNIT = 17, // CreatureId(0 all), CooldownMin, CooldownMax
122  SMART_EVENT_TARGET_MANA_PCT = 18, // ManaMin%, ManaMax%, RepeatMin, RepeatMax
123  SMART_EVENT_ACCEPTED_QUEST = 19, // QuestID(0any)
124  SMART_EVENT_REWARD_QUEST = 20, // QuestID(0any)
126  SMART_EVENT_RECEIVE_EMOTE = 22, // EmoteId, CooldownMin, CooldownMax, condition, val1, val2, val3
127  SMART_EVENT_HAS_AURA = 23, // Param1 = SpellID, Param2 = Stack amount, Param3/4 RepeatMin, RepeatMax
128  SMART_EVENT_TARGET_BUFFED = 24, // Param1 = SpellID, Param2 = Stack amount, Param3/4 RepeatMin, RepeatMax
129  SMART_EVENT_RESET = 25, // Called after combat, when the creature respawn and spawn.
130  SMART_EVENT_IC_LOS = 26, // NoHostile, MaxRnage, CooldownMin, CooldownMax
131  SMART_EVENT_PASSENGER_BOARDED = 27, // CooldownMin, CooldownMax
132  SMART_EVENT_PASSENGER_REMOVED = 28, // CooldownMin, CooldownMax
133  SMART_EVENT_CHARMED = 29, // NONE
135  SMART_EVENT_SPELLHIT_TARGET = 31, // SpellID, School, CooldownMin, CooldownMax
136  SMART_EVENT_DAMAGED = 32, // MinDmg, MaxDmg, CooldownMin, CooldownMax
137  SMART_EVENT_DAMAGED_TARGET = 33, // MinDmg, MaxDmg, CooldownMin, CooldownMax
138  SMART_EVENT_MOVEMENTINFORM = 34, // MovementType(any), PointID
139  SMART_EVENT_SUMMON_DESPAWNED = 35, // Entry, CooldownMin, CooldownMax
141  SMART_EVENT_AI_INIT = 37, // NONE
142  SMART_EVENT_DATA_SET = 38, // Id, Value, CooldownMin, CooldownMax
143  SMART_EVENT_WAYPOINT_START = 39, // PointId(0any), pathID(0any)
144  SMART_EVENT_WAYPOINT_REACHED = 40, // PointId(0any), pathID(0any)
146  SMART_EVENT_TRANSPORT_ADDCREATURE = 42, // Entry (0 any)
149  SMART_EVENT_INSTANCE_PLAYER_ENTER = 45, // Team (0 any), CooldownMin, CooldownMax
150  SMART_EVENT_AREATRIGGER_ONTRIGGER = 46, // TriggerId(0 any)
156  SMART_EVENT_TEXT_OVER = 52, // GroupId from creature_text, creature entry who talks (0 any)
157  SMART_EVENT_RECEIVE_HEAL = 53, // MinHeal, MaxHeal, CooldownMin, CooldownMax
159  SMART_EVENT_WAYPOINT_PAUSED = 55, // PointId(0any), pathID(0any)
160  SMART_EVENT_WAYPOINT_RESUMED = 56, // PointId(0any), pathID(0any)
161  SMART_EVENT_WAYPOINT_STOPPED = 57, // PointId(0any), pathID(0any)
162  SMART_EVENT_WAYPOINT_ENDED = 58, // PointId(0any), pathID(0any)
164  SMART_EVENT_UPDATE = 60, // InitialMin, InitialMax, RepeatMin, RepeatMax
165  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
166  SMART_EVENT_GOSSIP_SELECT = 62, // menuID, actionID
170  SMART_EVENT_DUMMY_EFFECT = 66, // spellId, effectIndex
171  SMART_EVENT_IS_BEHIND_TARGET = 67, // cooldownMin, CooldownMax
172  SMART_EVENT_GAME_EVENT_START = 68, // game_event.Entry
173  SMART_EVENT_GAME_EVENT_END = 69, // game_event.Entry
176  SMART_EVENT_ACTION_DONE = 72, // eventId (SharedDefines.EventId)
177  SMART_EVENT_ON_SPELLCLICK = 73, // clicker (unit)
178  SMART_EVENT_FRIENDLY_HEALTH_PCT = 74, // minHpPct, maxHpPct, repeatMin, repeatMax
179  SMART_EVENT_DISTANCE_CREATURE = 75, // guid, entry, distance, repeat
180  SMART_EVENT_DISTANCE_GAMEOBJECT = 76, // guid, entry, distance, repeat
181  SMART_EVENT_COUNTER_SET = 77, // id, value, cooldownMin, cooldownMax
182 
184 };
185 
187 {
192  union
193  {
194  struct
195  {
200  } minMaxRepeat;
201 
202  struct
203  {
208  } kill;
209 
210  struct
211  {
216  } spellHit;
217 
218  struct
219  {
224  } los;
225 
226  struct
227  {
231  } respawn;
232 
233  struct
234  {
237  } minMax;
238 
239  struct
240  {
244  } targetCasting;
245 
246  struct
247  {
252  } friendlyHealth;
253 
254  struct
255  {
256  uint32 radius;
259  } friendlyCC;
260 
261  struct
262  {
263  uint32 spell;
264  uint32 radius;
267  } missingBuff;
268 
269  struct
270  {
274  } summoned;
275 
276  struct
277  {
279  } quest;
280 
281  struct
282  {
286  } emote;
287 
288  struct
289  {
290  uint32 spell;
294  } aura;
295 
296  struct
297  {
298  uint32 spell;
299  uint32 count;
302  } targetAura;
303 
304  struct
305  {
306  uint32 type;
308  } movementInform;
309 
310  struct
311  {
312  uint32 id;
316  } dataSet;
317 
318  struct
319  {
322  } waypoint;
323 
324  struct
325  {
328 
329  struct
330  {
331  uint32 pointID;
333 
334  struct
335  {
340 
341  struct
342  {
343  uint32 id;
344  } areatrigger;
345 
346  struct
347  {
350  } textOver;
351 
352  struct
353  {
354  uint32 id;
355  } timedEvent;
356 
357  struct
358  {
361  } gossip;
362 
363  struct
364  {
365  uint32 spell;
367  } dummy;
368 
369  struct
370  {
373  } behindTarget;
374 
375  struct
376  {
378  } gameEvent;
379 
380  struct
381  {
383  } goStateChanged;
384 
385  struct
386  {
388  } eventInform;
389 
390  struct
391  {
392  uint32 eventId;
393  } doAction;
394 
395  struct
396  {
402 
403  struct
404  {
409  } distance;
410 
411  struct
412  {
413  uint32 id;
414  uint32 value;
417  } counter;
418 
419  struct
420  {
425  } raw;
426  };
427 };
428 
430 {
435 };
436 
438 {
439  SMART_ACTION_NONE = 0, // No action
440  SMART_ACTION_TALK = 1, // groupID from creature_text, duration to wait before TEXT_OVER event is triggered, useTalkTarget (0/1) - use target as talk target
441  SMART_ACTION_SET_FACTION = 2, // FactionId (or 0 for default)
442  SMART_ACTION_MORPH_TO_ENTRY_OR_MODEL = 3, // Creature_template entry(param1) OR ModelId (param2) (or 0 for both to demorph)
443  SMART_ACTION_SOUND = 4, // SoundId, onlySelf
444  SMART_ACTION_PLAY_EMOTE = 5, // EmoteId
445  SMART_ACTION_FAIL_QUEST = 6, // QuestID
446  SMART_ACTION_ADD_QUEST = 7, // QuestID
449  SMART_ACTION_RANDOM_EMOTE = 10, // EmoteId1, EmoteId2, EmoteId3...
450  SMART_ACTION_CAST = 11, // SpellId, CastFlags
451  SMART_ACTION_SUMMON_CREATURE = 12, // CreatureID, summonType, duration in ms, attackInvoker
455  SMART_ACTION_SET_INGAME_PHASE_GROUP = 16, // phaseGroupId, apply
457  SMART_ACTION_SET_UNIT_FLAG = 18, // Flags (may be more than one field OR'd together), Target
458  SMART_ACTION_REMOVE_UNIT_FLAG = 19, // Flags (may be more than one field OR'd together), Target
459  SMART_ACTION_AUTO_ATTACK = 20, // AllowAttackState (0 = stop attack, anything else means continue attacking)
460  SMART_ACTION_ALLOW_COMBAT_MOVEMENT = 21, // AllowCombatMovement (0 = stop combat based movement, anything else continue attacking)
462  SMART_ACTION_INC_EVENT_PHASE = 23, // Value (may be negative to decrement phase, should not be 0)
463  SMART_ACTION_EVADE = 24, // No Params
464  SMART_ACTION_FLEE_FOR_ASSIST = 25, // With Emote
467  SMART_ACTION_REMOVEAURASFROMSPELL = 28, // Spellid (0 removes all auras), charges (0 removes aura)
468  SMART_ACTION_FOLLOW = 29, // Distance (0 = default), Angle (0 = default), EndCreatureEntry, credit, creditType (0monsterkill, 1event)
469  SMART_ACTION_RANDOM_PHASE = 30, // PhaseId1, PhaseId2, PhaseId3...
470  SMART_ACTION_RANDOM_PHASE_RANGE = 31, // PhaseMin, PhaseMax
472  SMART_ACTION_CALL_KILLEDMONSTER = 33, // CreatureId,
473  SMART_ACTION_SET_INST_DATA = 34, // Field, Data
476  SMART_ACTION_DIE = 37, // No Params
478  SMART_ACTION_CALL_FOR_HELP = 39, // Radius, With Emote
479  SMART_ACTION_SET_SHEATH = 40, // Sheath (0-unarmed, 1-melee, 2-ranged)
481  SMART_ACTION_SET_INVINCIBILITY_HP_LEVEL = 42, // MinHpValue(+pct, -flat)
482  SMART_ACTION_MOUNT_TO_ENTRY_OR_MODEL = 43, // Creature_template entry(param1) OR ModelId (param2) (or 0 for both to dismount)
483  SMART_ACTION_SET_INGAME_PHASE_ID = 44, // PhaseId, apply
484  SMART_ACTION_SET_DATA = 45, // Field, Data (only creature @todo)
485  SMART_ACTION_MOVE_FORWARD = 46, // distance
487  SMART_ACTION_SET_ACTIVE = 48, // on/off
489  SMART_ACTION_SUMMON_GO = 50, // GameObjectID, DespawnTime in s
492  SMART_ACTION_WP_START = 53, // run/walk, pathID, canRepeat, quest, despawntime, reactState
493  SMART_ACTION_WP_PAUSE = 54, // time
494  SMART_ACTION_WP_STOP = 55, // despawnTime, quest, fail?
495  SMART_ACTION_ADD_ITEM = 56, // itemID, count
496  SMART_ACTION_REMOVE_ITEM = 57, // itemID, count
497  SMART_ACTION_INSTALL_AI_TEMPLATE = 58, // AITemplateID
498  SMART_ACTION_SET_RUN = 59, // 0/1
499  SMART_ACTION_SET_FLY = 60, // 0/1
501  SMART_ACTION_TELEPORT = 62, // mapID,
502  SMART_ACTION_SET_COUNTER = 63, // id, value, reset (0/1)
506  SMART_ACTION_CREATE_TIMED_EVENT = 67, // id, InitialMin, InitialMax, RepeatMin(only if it repeats), RepeatMax(only if it repeats), chance
507  SMART_ACTION_PLAYMOVIE = 68, // entry
508  SMART_ACTION_MOVE_TO_POS = 69, // PointId, xyz
510  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
514  SMART_ACTION_ADD_AURA = 75, // spellid, targets
515  SMART_ACTION_OVERRIDE_SCRIPT_BASE_OBJECT = 76, // WARNING: CAN CRASH CORE, do not use if you dont know what you are doing
518  SMART_ACTION_SET_RANGED_MOVEMENT = 79, // Distance, angle
519  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)
523  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)
524  SMART_ACTION_INVOKER_CAST = 85, // spellID, castFlags, if avaliable, last used invoker will cast spellId with castFlags on targets
525  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)
528  SMART_ACTION_RANDOM_MOVE = 89, // maxDist
529  SMART_ACTION_SET_UNIT_FIELD_BYTES_1 = 90, // bytes, target
536  SMART_ACTION_JUMP_TO_POS = 97, // speedXY, speedZ, targetX, targetY, targetZ
537  SMART_ACTION_SEND_GOSSIP_MENU = 98, // menuId, optionId
542  SMART_ACTION_SET_ROOT = 103, // off/on
543  SMART_ACTION_SET_GO_FLAG = 104, // Flags
544  SMART_ACTION_ADD_GO_FLAG = 105, // Flags
546  SMART_ACTION_SUMMON_CREATURE_GROUP = 107, // Group, attackInvoker
547  SMART_ACTION_SET_POWER = 108, // PowerType, newPower
548  SMART_ACTION_ADD_POWER = 109, // PowerType, newPower
549  SMART_ACTION_REMOVE_POWER = 110, // PowerType, newPower
550  SMART_ACTION_GAME_EVENT_STOP = 111, // GameEventId
551  SMART_ACTION_GAME_EVENT_START = 112, // GameEventId
552  SMART_ACTION_START_CLOSEST_WAYPOINT = 113, // wp1, wp2, wp3, wp4, wp5, wp6, wp7
553  SMART_ACTION_RISE_UP = 114, // distance
554  SMART_ACTION_RANDOM_SOUND = 115, // soundId1, soundId2, soundId3, soundId4, soundId5, onlySelf
555 
557 };
558 
560 {
562 
563  union
564  {
565  struct
566  {
570  } talk;
571 
572  struct
573  {
575  } faction;
576 
577  struct
578  {
581  } morphOrMount;
582 
583  struct
584  {
587  } sound;
588 
589  struct
590  {
592  } emote;
593 
594  struct
595  {
597  } quest;
598 
599  struct
600  {
602  } react;
603 
604  struct
605  {
612  } randomEmote;
613 
614  struct
615  {
622  } cast;
623 
624  struct
625  {
630  } summonCreature;
631 
632  struct
633  {
636  } threatPCT;
637 
638  struct
639  {
646  } addUnitFlag;
647 
648  struct
649  {
650  uint32 flag1;
651  uint32 flag2;
652  uint32 flag3;
653  uint32 flag4;
654  uint32 flag5;
655  uint32 flag6;
656  } removeUnitFlag;
657 
658  struct
659  {
661  } autoAttack;
662 
663  struct
664  {
666  } combatMove;
667 
668  struct
669  {
671  } setEventPhase;
672 
673  struct
674  {
677  } incEventPhase;
678 
679  struct
680  {
681  uint32 spell;
683  } removeAura;
684 
685  struct
686  {
692  } follow;
693 
694  struct
695  {
702  } randomPhase;
703 
704  struct
705  {
709 
710  struct
711  {
713  } killedMonster;
714 
715  struct
716  {
719  } setInstanceData;
720 
721  struct
722  {
723  uint32 field;
725 
726  struct
727  {
729  } updateTemplate;
730 
731  struct
732  {
735  } callHelp;
736 
737  struct
738  {
740  } setSheath;
741 
742  struct
743  {
745  } forceDespawn;
746 
747  struct
748  {
751  } invincHP;
752 
753  struct
754  {
757  } ingamePhaseId;
758 
759  struct
760  {
762  uint32 apply;
764 
765  struct
766  {
767  uint32 field;
768  uint32 data;
769  } setData;
770 
771  struct
772  {
774  } moveRandom;
775 
776  struct
777  {
778  uint32 state;
779  } visibility;
780 
781  struct
782  {
783  uint32 entry;
785  } summonGO;
786 
787  struct
788  {
789  uint32 state;
790  } active;
791 
792  struct
793  {
794  uint32 id;
795  } taxi;
796 
797  struct
798  {
802  uint32 quest;
805  } wpStart;
806 
807  struct
808  {
809  uint32 delay;
810  } wpPause;
811 
812  struct
813  {
815  uint32 quest;
817  } wpStop;
818 
819  struct
820  {
821  uint32 entry;
823  } item;
824 
825  struct
826  {
827  uint32 id;
834 
835  struct
836  {
837  uint32 run;
838  } setRun;
839 
840  struct
841  {
843  } setFly;
844 
845  struct
846  {
848  } setSwim;
849 
850  struct
851  {
853  } teleport;
854 
855  struct
856  {
860  } setCounter;
861 
862  struct
863  {
864  uint32 id;
866  } storeVar;
867 
868  struct
869  {
870  uint32 id;
871  } storeTargets;
872 
873  struct
874  {
875  uint32 id;
881  } timeEvent;
882 
883  struct
884  {
885  uint32 entry;
886  } movie;
887 
888  struct
889  {
890  uint32 entry;
895  } equip;
896 
897  struct
898  {
900  uint32 type;
901  } unitFlag;
902 
903  struct
904  {
906  uint32 type;
907  } setunitByte;
908 
909  struct
910  {
911  uint32 byte1;
912  uint32 type;
913  } delunitByte;
914 
915  struct
916  {
918  } enterVehicle;
919 
920  struct
921  {
922  uint32 id;
924  } timedActionList;
925 
926  struct
927  {
935 
936  struct
937  {
942 
943  struct
944  {
947 
948  struct
949  {
952  } jump;
953 
954  struct
955  {
957  } flee;
958 
959  struct
960  {
962  } RespawnTarget;
963 
964  struct
965  {
968  } MoveToPos;
969 
970  struct
971  {
974  } sendGossipMenu;
975 
976  struct
977  {
978  uint32 state;
979  } setGoLootState;
980 
981  struct
982  {
983  uint32 id;
985 
986  struct
987  {
989  uint32 angle;
991 
992  struct
993  {
995  } setHealthRegen;
996 
997  struct
998  {
1000  } setRoot;
1001 
1002  struct
1003  {
1004  uint32 flag;
1005  } goFlag;
1006 
1007  struct
1008  {
1011  } creatureGroup;
1012 
1013  struct
1014  {
1017  } power;
1018 
1019  struct
1020  {
1021  uint32 id;
1022  } gameEventStop;
1023 
1024  struct
1025  {
1026  uint32 id;
1027  } gameEventStart;
1028 
1029  struct
1030  {
1038 
1039  struct
1040  {
1042  uint32 onlySelf;
1043  } randomSound;
1044 
1047 
1048  struct
1049  {
1050  uint32 param1;
1051  uint32 param2;
1052  uint32 param3;
1053  uint32 param4;
1054  uint32 param5;
1056  } raw;
1057  };
1058 };
1059 
1061 {
1062  SMARTAI_TEMPLATE_BASIC = 0, //nothing is preset
1063  SMARTAI_TEMPLATE_CASTER = 1, //spellid, repeatMin, repeatMax, range, manaPCT +JOIN: target_param1 as castFlag
1064  SMARTAI_TEMPLATE_TURRET = 2, //spellid, repeatMin, repeatMax +JOIN: target_param1 as castFlag
1066  SMARTAI_TEMPLATE_CAGED_GO_PART = 4, //creatureID, give credit at point end?,
1067  SMARTAI_TEMPLATE_CAGED_NPC_PART = 5, //gameObjectID, despawntime, run?, dist, TextGroupID
1069 };
1070 
1072 {
1073  SMART_TARGET_NONE = 0, // NONE, defaulting to invoket
1074  SMART_TARGET_SELF = 1, // Self cast
1075  SMART_TARGET_VICTIM = 2, // Our current target (ie: highest aggro)
1076  SMART_TARGET_HOSTILE_SECOND_AGGRO = 3, // Second highest aggro
1077  SMART_TARGET_HOSTILE_LAST_AGGRO = 4, // Dead last on aggro
1078  SMART_TARGET_HOSTILE_RANDOM = 5, // Just any random target on our threat list
1079  SMART_TARGET_HOSTILE_RANDOM_NOT_TOP = 6, // Any random target except top threat
1080  SMART_TARGET_ACTION_INVOKER = 7, // Unit who caused this Event to occur
1081  SMART_TARGET_POSITION = 8, // use xyz from event params
1082  SMART_TARGET_CREATURE_RANGE = 9, // CreatureEntry(0any), minDist, maxDist
1083  SMART_TARGET_CREATURE_GUID = 10, // guid, entry
1084  SMART_TARGET_CREATURE_DISTANCE = 11, // CreatureEntry(0any), maxDist
1085  SMART_TARGET_STORED = 12, // id, uses pre-stored target(list)
1086  SMART_TARGET_GAMEOBJECT_RANGE = 13, // entry(0any), min, max
1087  SMART_TARGET_GAMEOBJECT_GUID = 14, // guid, entry
1088  SMART_TARGET_GAMEOBJECT_DISTANCE = 15, // entry(0any), maxDist
1089  SMART_TARGET_INVOKER_PARTY = 16, // invoker's party members
1090  SMART_TARGET_PLAYER_RANGE = 17, // min, max
1092  SMART_TARGET_CLOSEST_CREATURE = 19, // CreatureEntry(0any), maxDist, dead?
1093  SMART_TARGET_CLOSEST_GAMEOBJECT = 20, // entry(0any), maxDist
1095  SMART_TARGET_ACTION_INVOKER_VEHICLE = 22, // Unit's vehicle who caused this Event to occur
1096  SMART_TARGET_OWNER_OR_SUMMONER = 23, // Unit's owner or summoner
1097  SMART_TARGET_THREAT_LIST = 24, // All units on creature's threat list
1098  SMART_TARGET_CLOSEST_ENEMY = 25, // maxDist, playerOnly
1099  SMART_TARGET_CLOSEST_FRIENDLY = 26, // maxDist, playerOnly
1100 
1102 };
1103 
1105 {
1107  {
1108  type = t;
1109  raw.param1 = p1;
1110  raw.param2 = p2;
1111  raw.param3 = p3;
1112  x = 0.0f;
1113  y = 0.0f;
1114  z = 0.0f;
1115  o = 0.0f;
1116  }
1118  float x, y, z, o;
1119  union
1120  {
1121  struct
1122  {
1126  } unitRange;
1127 
1128  struct
1129  {
1132  } unitGUID;
1133 
1134  struct
1135  {
1136  uint32 creature;
1138  } unitDistance;
1139 
1140  struct
1141  {
1142  uint32 dist;
1143  } playerDistance;
1144 
1145  struct
1146  {
1147  uint32 minDist;
1148  uint32 maxDist;
1149  } playerRange;
1150 
1151  struct
1152  {
1154  } stored;
1155 
1156  struct
1157  {
1158  uint32 entry;
1159  uint32 minDist;
1160  uint32 maxDist;
1161  } goRange;
1162 
1163  struct
1164  {
1165  uint32 dbGuid;
1166  uint32 entry;
1167  } goGUID;
1168 
1169  struct
1170  {
1171  uint32 entry;
1172  uint32 dist;
1173  } goDistance;
1174 
1175  struct
1176  {
1178  } position;
1179 
1180  struct
1181  {
1182  uint32 entry;
1183  uint32 dist;
1185  } closest;
1186 
1187  struct
1188  {
1189  uint32 maxDist;
1192 
1193  struct
1194  {
1195  uint32 maxDist;
1197  } closestFriendly;
1198 
1199  struct
1200  {
1204  } raw;
1205  };
1206 };
1207 
1209 {
1221 };
1222 
1224 {
1235 };
1236 
1238 {
1249 };
1250 
1252 {
1331 };
1332 
1334 {
1335  SMART_EVENT_FLAG_NOT_REPEATABLE = 0x001, //Event can not repeat
1336  SMART_EVENT_FLAG_DIFFICULTY_0 = 0x002, //Event only occurs in instance difficulty 0
1337  SMART_EVENT_FLAG_DIFFICULTY_1 = 0x004, //Event only occurs in instance difficulty 1
1338  SMART_EVENT_FLAG_DIFFICULTY_2 = 0x008, //Event only occurs in instance difficulty 2
1339  SMART_EVENT_FLAG_DIFFICULTY_3 = 0x010, //Event only occurs in instance difficulty 3
1342  SMART_EVENT_FLAG_DEBUG_ONLY = 0x080, //Event only occurs in debug build
1343  SMART_EVENT_FLAG_DONT_RESET = 0x100, //Event will not reset in SmartScript::OnReset()
1344 
1347 };
1348 
1350 {
1351  SMARTCAST_INTERRUPT_PREVIOUS = 0x01, //Interrupt any spell casting
1352  SMARTCAST_TRIGGERED = 0x02, //Triggered (this makes spell cost zero mana and have no cast time)
1353  //SMARTCAST_FORCE_CAST = 0x04, //Forces cast even if creature is out of mana or out of range
1354  //SMARTCAST_NO_MELEE_IF_OOM = 0x08, //Prevents creature from entering melee if out of mana or out of range
1355  //SMARTCAST_FORCE_TARGET_SELF = 0x10, //Forces the target to cast this spell on itself
1356  SMARTCAST_AURA_NOT_PRESENT = 0x20, //Only casts the spell if the target does not have an aura from the spell
1357  SMARTCAST_COMBAT_MOVE = 0x40 //Prevents combat movement if cast successful. Allows movement on range, OOM, LOS
1358 };
1359 
1360 // one line in DB is one event
1362 {
1364  , event_id(0), link(0), event(), action(), target(), timer(0), active(false), runOnce(false)
1365  , enableTimed(false) { }
1366 
1371 
1375 
1377  uint32 GetEventType() const { return (uint32)event.type; }
1378  uint32 GetActionType() const { return (uint32)action.type; }
1379  uint32 GetTargetType() const { return (uint32)target.type; }
1380 
1382  bool active;
1383  bool runOnce;
1385 
1386  operator bool() const { return entryOrGuid != 0; }
1387 };
1388 
1389 typedef std::unordered_map<uint32, WayPoint*> WPPath;
1390 
1391 typedef std::list<WorldObject*> ObjectList;
1392 
1394 {
1395  ObjectList* m_objectList;
1398 
1399 public:
1400  ObjectGuidList(ObjectList* objectList, WorldObject* baseObject)
1401  {
1402  ASSERT(objectList != NULL);
1403  m_objectList = objectList;
1404  m_baseObject = baseObject;
1405  m_guidList = new GuidList();
1406 
1407  for (ObjectList::iterator itr = objectList->begin(); itr != objectList->end(); ++itr)
1408  {
1409  m_guidList->push_back((*itr)->GetGUID());
1410  }
1411  }
1412 
1413  ObjectList* GetObjectList()
1414  {
1415  if (m_baseObject)
1416  {
1417  //sanitize list using m_guidList
1418  m_objectList->clear();
1419 
1420  for (GuidList::iterator itr = m_guidList->begin(); itr != m_guidList->end(); ++itr)
1421  {
1422  if (WorldObject* obj = ObjectAccessor::GetWorldObject(*m_baseObject, *itr))
1423  m_objectList->push_back(obj);
1424  else
1425  TC_LOG_DEBUG("scripts.ai", "SmartScript::mTargetStorage stores a guid to an invalid object: %s", itr->ToString().c_str());
1426  }
1427  }
1428 
1429  return m_objectList;
1430  }
1431 
1432  bool Equals(ObjectList* objectList)
1433  {
1434  return m_objectList == objectList;
1435  }
1436 
1438  {
1439  delete m_objectList;
1440  delete m_guidList;
1441  }
1442 };
1443 typedef std::unordered_map<uint32, ObjectGuidList*> ObjectListMap;
1444 
1446 {
1447  private:
1449  ~SmartWaypointMgr();
1450 
1451  public:
1452  static SmartWaypointMgr* instance();
1453 
1454  void LoadFromDB();
1455 
1456  WPPath* GetPath(uint32 id)
1457  {
1458  if (waypoint_map.find(id) != waypoint_map.end())
1459  return waypoint_map[id];
1460  else return nullptr;
1461  }
1462 
1463  private:
1464  std::unordered_map<uint32, WPPath*> waypoint_map;
1465 };
1466 
1467 // all events for a single entry
1468 typedef std::vector<SmartScriptHolder> SmartAIEventList;
1469 
1470 // all events for all entries / guids
1471 typedef std::unordered_map<int64, SmartAIEventList> SmartAIEventMap;
1472 
1473 // Helper Stores
1474 typedef std::map<uint32 /*entry*/, std::pair<uint32 /*spellId*/, SpellEffIndex /*effIndex*/> > CacheSpellContainer;
1475 typedef std::pair<CacheSpellContainer::const_iterator, CacheSpellContainer::const_iterator> CacheSpellContainerBounds;
1476 
1478 {
1479  private:
1482 
1483  public:
1484  static SmartAIMgr* instance();
1485 
1486  void LoadSmartAIFromDB();
1487 
1488  SmartAIEventList GetScript(int32 entry, SmartScriptType type)
1489  {
1490  SmartAIEventList temp;
1491  if (mEventMap[uint32(type)].find(entry) != mEventMap[uint32(type)].end())
1492  return mEventMap[uint32(type)][entry];
1493  else
1494  {
1495  if (entry > 0)//first search is for guid (negative), do not drop error if not found
1496  TC_LOG_DEBUG("scripts.ai", "SmartAIMgr::GetScript: Could not load Script for Entry %d ScriptType %u.", entry, uint32(type));
1497  return temp;
1498  }
1499  }
1500 
1501  static SmartScriptHolder& FindLinkedSourceEvent(SmartAIEventList& list, uint32 eventId)
1502  {
1503  SmartAIEventList::iterator itr = std::find_if(list.begin(), list.end(),
1504  [eventId](SmartScriptHolder& source) { return source.link == eventId; });
1505 
1506  if (itr != list.end())
1507  return *itr;
1508 
1509  static SmartScriptHolder SmartScriptHolderDummy;
1510  return SmartScriptHolderDummy;
1511  }
1512 
1513  static SmartScriptHolder& FindLinkedEvent(SmartAIEventList& list, uint32 link)
1514  {
1515  SmartAIEventList::iterator itr = std::find_if(list.begin(), list.end(),
1516  [link](SmartScriptHolder& linked) { return linked.event_id == link && linked.GetEventType() == SMART_EVENT_LINK; });
1517 
1518  if (itr != list.end())
1519  return *itr;
1520 
1521  static SmartScriptHolder SmartScriptHolderDummy;
1522  return SmartScriptHolderDummy;
1523  }
1524 
1525  private:
1526  //event stores
1527  SmartAIEventMap mEventMap[SMART_SCRIPT_TYPE_MAX];
1528 
1529  bool IsEventValid(SmartScriptHolder& e);
1530  bool IsTargetValid(SmartScriptHolder const& e);
1531 
1532  bool IsMinMaxValid(SmartScriptHolder const& e, uint32 min, uint32 max)
1533  {
1534  if (max < min)
1535  {
1536  TC_LOG_ERROR("sql.sql", "SmartAIMgr: Entry " SI64FMTD " 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);
1537  return false;
1538  }
1539  return true;
1540  }
1541 
1542  /*inline bool IsPercentValid(SmartScriptHolder e, int32 pct)
1543  {
1544  if (pct < -100 || pct > 100)
1545  {
1546  TC_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);
1547  return false;
1548  }
1549  return true;
1550  }*/
1551 
1552  bool NotNULL(SmartScriptHolder const& e, uint32 data)
1553  {
1554  if (!data)
1555  {
1556  TC_LOG_ERROR("sql.sql", "SmartAIMgr: Entry " SI64FMTD " SourceType %u Event %u Action %u Parameter can not be NULL, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType());
1557  return false;
1558  }
1559  return true;
1560  }
1561 
1562  bool IsCreatureValid(SmartScriptHolder const& e, uint32 entry)
1563  {
1564  if (!sObjectMgr->GetCreatureTemplate(entry))
1565  {
1566  TC_LOG_ERROR("sql.sql", "SmartAIMgr: Entry " SI64FMTD " SourceType %u Event %u Action %u uses non-existent Creature entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), entry);
1567  return false;
1568  }
1569  return true;
1570  }
1571 
1572  bool IsQuestValid(SmartScriptHolder const& e, uint32 entry)
1573  {
1574  if (!sObjectMgr->GetQuestTemplate(entry))
1575  {
1576  TC_LOG_ERROR("sql.sql", "SmartAIMgr: Entry " SI64FMTD " SourceType %u Event %u Action %u uses non-existent Quest entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), entry);
1577  return false;
1578  }
1579  return true;
1580  }
1581 
1582  bool IsGameObjectValid(SmartScriptHolder const& e, uint32 entry)
1583  {
1584  if (!sObjectMgr->GetGameObjectTemplate(entry))
1585  {
1586  TC_LOG_ERROR("sql.sql", "SmartAIMgr: Entry " SI64FMTD " SourceType %u Event %u Action %u uses non-existent GameObject entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), entry);
1587  return false;
1588  }
1589  return true;
1590  }
1591 
1592  bool IsSpellValid(SmartScriptHolder const& e, uint32 entry)
1593  {
1594  if (!sSpellMgr->GetSpellInfo(entry))
1595  {
1596  TC_LOG_ERROR("sql.sql", "SmartAIMgr: Entry " SI64FMTD " SourceType %u Event %u Action %u uses non-existent Spell entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), entry);
1597  return false;
1598  }
1599  return true;
1600  }
1601 
1602  bool IsItemValid(SmartScriptHolder const& e, uint32 entry)
1603  {
1604  if (!sItemStore.LookupEntry(entry))
1605  {
1606  TC_LOG_ERROR("sql.sql", "SmartAIMgr: Entry " SI64FMTD " SourceType %u Event %u Action %u uses non-existent Item entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), entry);
1607  return false;
1608  }
1609  return true;
1610  }
1611 
1612  bool IsTextEmoteValid(SmartScriptHolder const& e, uint32 entry)
1613  {
1614  if (!sEmotesTextStore.LookupEntry(entry))
1615  {
1616  TC_LOG_ERROR("sql.sql", "SmartAIMgr: Entry " SI64FMTD " SourceType %u Event %u Action %u uses non-existent Text Emote entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), entry);
1617  return false;
1618  }
1619  return true;
1620  }
1621 
1622  bool IsEmoteValid(SmartScriptHolder const& e, uint32 entry)
1623  {
1624  if (!sEmotesStore.LookupEntry(entry))
1625  {
1626  TC_LOG_ERROR("sql.sql", "SmartAIMgr: Entry " SI64FMTD " SourceType %u Event %u Action %u uses non-existent Emote entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), entry);
1627  return false;
1628  }
1629  return true;
1630  }
1631 
1632  bool IsAreaTriggerValid(SmartScriptHolder const& e, uint32 entry)
1633  {
1634  if (!sAreaTriggerStore.LookupEntry(entry))
1635  {
1636  TC_LOG_ERROR("sql.sql", "SmartAIMgr: Entry " SI64FMTD " SourceType %u Event %u Action %u uses non-existent AreaTrigger entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), entry);
1637  return false;
1638  }
1639  return true;
1640  }
1641 
1642  bool IsSoundValid(SmartScriptHolder const& e, uint32 entry)
1643  {
1644  if (!sSoundEntriesStore.LookupEntry(entry))
1645  {
1646  TC_LOG_ERROR("sql.sql", "SmartAIMgr: Entry " SI64FMTD " SourceType %u Event %u Action %u uses non-existent Sound entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), entry);
1647  return false;
1648  }
1649  return true;
1650  }
1651 
1652  bool IsTextValid(SmartScriptHolder const& e, uint32 id);
1653 
1654  // Helpers
1655  void LoadHelperStores();
1656  void UnLoadHelperStores();
1657 
1658  CacheSpellContainerBounds GetSummonCreatureSpellContainerBounds(uint32 creatureEntry) const;
1659  CacheSpellContainerBounds GetSummonGameObjectSpellContainerBounds(uint32 gameObjectEntry) const;
1660  CacheSpellContainerBounds GetKillCreditSpellContainerBounds(uint32 killCredit) const;
1661  CacheSpellContainerBounds GetCreateItemSpellContainerBounds(uint32 itemId) const;
1662 
1663  CacheSpellContainer SummonCreatureSpellStore;
1664  CacheSpellContainer SummonGameObjectSpellStore;
1665  CacheSpellContainer KillCreditSpellStore;
1666  CacheSpellContainer CreateItemSpellStore;
1667 };
1668 
1669 #define sSmartScriptMgr SmartAIMgr::instance()
1670 #define sSmartWaypointMgr SmartWaypointMgr::instance()
1671 #endif
uint32 wp2
Definition: SmartScriptMgr.h:1032
bool Equals(ObjectList *objectList)
Definition: SmartScriptMgr.h:1432
Definition: SmartScriptMgr.h:1352
Definition: SmartScriptMgr.h:1066
struct SmartAction::@114::@186 goFlag
struct SmartAction::@114::@139 setInstanceData64
Definition: SmartScriptMgr.h:51
float x
Definition: SmartScriptMgr.h:42
Definition: SmartScriptMgr.h:81
uint32 count
Definition: SmartScriptMgr.h:822
Definition: SmartScriptMgr.h:106
Definition: SmartScriptMgr.h:452
Definition: SmartScriptMgr.h:1086
struct SmartAction::@114::@156 item
struct SmartAction::@114::@168 unitFlag
Definition: SmartScriptMgr.h:1099
Definition: SmartScriptMgr.h:1337
struct SmartAction::@114::@178 RespawnTarget
SmartScriptType
Definition: SmartScriptMgr.h:1208
Definition: SmartScriptMgr.h:175
struct SmartEvent::@77::@99 instancePlayerEnter
struct SmartAction::@114::@136 randomPhaseRange
Definition: SmartScriptMgr.h:125
Definition: SmartScriptMgr.h:532
Definition: SmartScriptMgr.h:1229
Definition: SmartScriptMgr.h:68
Definition: SmartScriptMgr.h:109
uint32 attack
Definition: SmartScriptMgr.h:660
uint32 speedz
Definition: SmartScriptMgr.h:951
Definition: SmartScriptMgr.h:491
Definition: SmartScriptMgr.h:53
uint32 percent
Definition: SmartScriptMgr.h:750
struct SmartEvent::@77::@92 aura
const uint32 SmartAITypeMask[SMART_SCRIPT_TYPE_MAX][2]
Definition: SmartScriptMgr.h:1237
uint32 dec
Definition: SmartScriptMgr.h:676
uint32 min
Definition: SmartScriptMgr.h:196
Definition: SmartScriptMgr.h:445
uint32 event_phase_mask
Definition: SmartScriptMgr.h:189
Definition: SmartScriptMgr.h:174
uint32 entry5
Definition: SmartScriptMgr.h:932
uint32 emote5
Definition: SmartScriptMgr.h:610
Definition: SmartScriptMgr.h:161
Definition: SmartScriptMgr.h:152
Definition: SmartScriptMgr.h:118
Definition: SmartScriptMgr.h:1081
Definition: SmartScriptMgr.h:556
Definition: SmartScriptMgr.h:543
uint32 emote
Definition: SmartScriptMgr.h:283
uint32 state
Definition: SmartScriptMgr.h:382
struct SmartAction::@114::@116 talk
Definition: SmartScriptMgr.h:529
uint32 param4
Definition: SmartScriptMgr.h:424
uint32 fly
Definition: SmartScriptMgr.h:842
uint32 charges
Definition: SmartScriptMgr.h:682
Definition: SmartScriptMgr.h:1228
Definition: SmartScriptMgr.h:495
SmartEventFlags
Definition: SmartScriptMgr.h:1333
Definition: SmartScriptMgr.h:474
uint32 gossipNpcTextId
Definition: SmartScriptMgr.h:973
uint32 dist
Definition: SmartScriptMgr.h:407
Definition: SmartScriptMgr.h:178
struct SmartAction::@114::@165 timeEvent
uint32 goRespawnTime
Definition: SmartScriptMgr.h:961
Definition: SmartScriptMgr.h:451
Definition: SmartScriptMgr.h:179
uint32 entry
Definition: SmartScriptMgr.h:1131
uint32 dist
Definition: SmartScriptMgr.h:687
Definition: SmartScriptMgr.h:492
Definition: SmartScriptMgr.h:166
struct SmartAction::@114::@152 taxi
Definition: SmartScriptMgr.h:496
uint32 textGroupID
Definition: SmartScriptMgr.h:348
Definition: SmartScriptMgr.h:1214
Definition: SmartScriptMgr.h:1217
Definition: SmartScriptMgr.h:531
SmartEvent event
Definition: SmartScriptMgr.h:1372
SMART_EVENT_PHASE_BITS
Definition: SmartScriptMgr.h:74
uint32 state
Definition: SmartScriptMgr.h:601
uint32 action
Definition: SmartScriptMgr.h:360
uint32 spell_id
Definition: SmartScriptMgr.h:939
Definition: SmartScriptMgr.h:503
uint32 reactState
Definition: SmartScriptMgr.h:804
Definition: SmartScriptMgr.h:480
Definition: SmartScriptMgr.h:173
struct SmartAction::@114::@122 react
int64_t int64
Definition: Define.h:145
Definition: SmartScriptMgr.h:461
uint32 entry3
Definition: SmartScriptMgr.h:930
uint32 param6
Definition: SmartScriptMgr.h:1055
Definition: SmartScriptMgr.h:1230
Definition: SmartScriptMgr.h:1062
SMARTAI_TARGETS type
Definition: SmartScriptMgr.h:1117
~ObjectGuidList()
Definition: SmartScriptMgr.h:1437
Definition: SmartScriptMgr.h:1445
Definition: SmartScriptMgr.h:115
SmartAIMgr()
Definition: SmartScriptMgr.h:1480
bool IsCreatureValid(SmartScriptHolder const &e, uint32 entry)
Definition: SmartScriptMgr.h:1562
Definition: SmartScriptMgr.h:1343
uint32 cooldownMin
Definition: SmartScriptMgr.h:204
Definition: SmartScriptMgr.h:1085
uint32 maxHpPct
Definition: SmartScriptMgr.h:398
uint32 param3
Definition: SmartScriptMgr.h:1203
uint32 id
Definition: SmartScriptMgr.h:307
struct SmartEvent::@77::@102 timedEvent
Definition: SmartScriptMgr.h:151
uint32 playerOnly
Definition: SmartScriptMgr.h:206
uint32 sheath
Definition: SmartScriptMgr.h:739
uint32 flag1
Definition: SmartScriptMgr.h:640
Definition: SmartScriptMgr.h:122
struct SmartTarget::@194::@204 goDistance
bool IsSoundValid(SmartScriptHolder const &e, uint32 entry)
Definition: SmartScriptMgr.h:1642
uint32 sender
Definition: SmartScriptMgr.h:359
Definition: SmartScriptMgr.h:1098
uint32 max
Definition: SmartScriptMgr.h:197
uint32 effIndex
Definition: SmartScriptMgr.h:366
std::vector< SmartScriptHolder > SmartAIEventList
Definition: SmartScriptMgr.h:1468
struct SmartTarget::@194::@196 unitRange
Definition: SmartScriptMgr.h:550
DBCStorage< AreaTriggerEntry > sAreaTriggerStore(AreaTriggerfmt)
Definition: SmartScriptMgr.h:1212
Definition: SmartScriptMgr.h:112
Definition: SmartScriptMgr.h:548
Definition: SmartScriptMgr.h:460
struct SmartAction::@114::@154 wpPause
uint32 phaseMax
Definition: SmartScriptMgr.h:707
uint32 useTalkTarget
Definition: SmartScriptMgr.h:569
Definition: SmartScriptMgr.h:498
struct SmartAction::@114::@132 incEventPhase
uint32 creatureEntry
Definition: SmartScriptMgr.h:349
struct SmartAction::@114::@172 timedActionList
Definition: SmartScriptMgr.h:143
uint32 link
Definition: SmartScriptMgr.h:1370
WorldObject * m_baseObject
Definition: SmartScriptMgr.h:1397
Definition: SmartScriptMgr.h:54
void LoadFromDB()
Definition: AddonMgr.cpp:40
uint32 timerType
Definition: SmartScriptMgr.h:923
Definition: SmartScriptMgr.h:1065
Definition: SmartScriptMgr.h:181
Definition: SmartScriptMgr.h:526
Definition: SmartScriptMgr.h:1335
struct SmartAction::@114::@125 summonCreature
Definition: SmartScriptMgr.h:559
struct SmartEvent::@77::@104 dummy
float z
Definition: SmartScriptMgr.h:44
Definition: SmartScriptMgr.h:135
uint32 minHP
Definition: SmartScriptMgr.h:749
struct SmartAction::@114::@182 sendTargetToTarget
uint32 flag3
Definition: SmartScriptMgr.h:642
Definition: SmartScriptMgr.h:123
Definition: SmartScriptMgr.h:485
struct SmartEvent::@77::@95 dataSet
uint32 number
Definition: SmartScriptMgr.h:865
uint32 onlySelf
Definition: SmartScriptMgr.h:586
struct SmartAction::@114::@128 removeUnitFlag
Definition: SmartScriptMgr.h:140
Definition: SmartScriptMgr.h:454
uint32 wp3
Definition: SmartScriptMgr.h:1033
uint32 withDelayed
Definition: SmartScriptMgr.h:938
struct SmartAction::@114::@129 autoAttack
Definition: SmartScriptMgr.h:108
Definition: SmartScriptMgr.h:1341
uint32 phase5
Definition: SmartScriptMgr.h:700
uint32 emote2
Definition: SmartScriptMgr.h:607
Definition: SmartScriptMgr.h:137
Definition: SmartScriptMgr.h:439
struct SmartAction::@114::@173 randTimedActionList
struct SmartAction::@114::@190 gameEventStart
struct SmartAction::@114::@158 setRun
uint32 GetEventType() const
Definition: SmartScriptMgr.h:1377
Definition: SmartScriptMgr.h:131
uint32 model
Definition: SmartScriptMgr.h:580
Definition: SmartScriptMgr.h:489
Definition: SmartScriptMgr.h:124
Definition: SmartScriptMgr.h:518
Definition: SmartScriptMgr.h:180
Definition: SmartScriptMgr.h:478
struct SmartAction::@114::@130 combatMove
struct SmartAction::@114::@184 setHealthRegen
uint32 max
Definition: SmartScriptMgr.h:877
struct SmartAction::@114::@162 setCounter
uint32 hpDeficit
Definition: SmartScriptMgr.h:248
Definition: SmartScriptMgr.h:141
Definition: SmartScriptMgr.h:1082
Definition: SmartScriptMgr.h:76
arena_t NULL
Definition: jemalloc_internal.h:624
Definition: SmartScriptMgr.h:1225
struct SmartAction::@114::@170 delunitByte
uint32 speedxy
Definition: SmartScriptMgr.h:950
Definition: SmartScriptMgr.h:145
#define false
Definition: CascPort.h:18
Definition: SmartScriptMgr.h:150
struct SmartAction::@114::@161 teleport
float y
Definition: SmartScriptMgr.h:1118
Definition: SmartScriptMgr.h:525
uint32 inc
Definition: SmartScriptMgr.h:675
uint32 pointId
Definition: SmartScriptMgr.h:966
struct SmartTarget::@194::@209 raw
SmartAIEventList GetScript(int32 entry, SmartScriptType type)
Definition: SmartScriptMgr.h:1488
SMART_ACTION
Definition: SmartScriptMgr.h:437
CacheSpellContainer CreateItemSpellStore
Definition: SmartScriptMgr.h:1666
struct SmartEvent::@77::@88 missingBuff
struct SmartAction::@114::@143 forceDespawn
uint32 phase3
Definition: SmartScriptMgr.h:698
bool active
Definition: SmartScriptMgr.h:1382
struct SmartAction::@114::@127 addUnitFlag
Definition: SmartScriptMgr.h:511
Definition: SmartScriptMgr.h:1393
Definition: SmartScriptMgr.h:515
Definition: SmartScriptMgr.h:509
Definition: SmartScriptMgr.h:1233
#define TC_LOG_DEBUG(filterType__,...)
Definition: Log.h:198
Definition: SmartScriptMgr.h:176
Definition: SmartScriptMgr.h:1216
SMARTAI_TEMPLATE
Definition: SmartScriptMgr.h:1060
uint32 event_id
Definition: SmartScriptMgr.h:1369
Definition: SmartScriptMgr.h:62
struct SmartAction::@114::@137 killedMonster
struct SmartAction::@114::@157 installTtemplate
Definition: Object.h:423
Definition: SmartScriptMgr.h:479
Definition: SmartScriptMgr.h:1064
Definition: SmartScriptMgr.h:466
struct SmartAction::@114::@193 raw
uint32 radius
Definition: SmartScriptMgr.h:249
uint32 range
Definition: SmartScriptMgr.h:733
Definition: SmartScriptMgr.h:494
const uint32 SmartAIEventMask[SMART_EVENT_END][2]
Definition: SmartScriptMgr.h:1251
Definition: SmartScriptMgr.h:163
CacheSpellContainer SummonGameObjectSpellStore
Definition: SmartScriptMgr.h:1664
Definition: SmartScriptMgr.h:138
uint32 value
Definition: SmartScriptMgr.h:858
struct SmartAction::@114::@188 power
Definition: SmartScriptMgr.h:160
uint32 regenHealth
Definition: SmartScriptMgr.h:994
uint32 repeatMax
Definition: SmartScriptMgr.h:879
Definition: SmartScriptMgr.h:549
Definition: SmartScriptMgr.h:551
uint32 repeat
Definition: SmartScriptMgr.h:801
struct SmartEvent::@77::@105 behindTarget
Definition: SmartScriptMgr.h:177
Definition: SmartScriptMgr.h:170
Definition: SmartScriptMgr.h:1213
struct SmartAction::@114::@145 ingamePhaseId
Definition: SmartScriptMgr.h:116
Definition: SmartScriptMgr.h:444
CacheSpellContainer SummonCreatureSpellStore
Definition: SmartScriptMgr.h:1663
uint32 flag2
Definition: SmartScriptMgr.h:641
uint32 maxDist
Definition: SmartScriptMgr.h:221
Definition: SmartScriptMgr.h:114
Definition: SmartScriptMgr.h:1084
Definition: SmartScriptMgr.h:130
uint32 threatINC
Definition: SmartScriptMgr.h:634
const uint32 SmartPhaseMask[SMART_EVENT_PHASE_COUNT][2]
Definition: SmartScriptMgr.h:89
uint32 run
Definition: SmartScriptMgr.h:799
uint32 event_flags
Definition: SmartScriptMgr.h:191
Definition: SmartScriptMgr.h:65
Definition: SmartScriptMgr.h:66
uint32 mask
Definition: SmartScriptMgr.h:891
uint32 cooldownMax
Definition: SmartScriptMgr.h:205
#define sObjectMgr
Definition: ObjectMgr.h:1567
SmartScriptHolder()
Definition: SmartScriptMgr.h:1363
Definition: SmartScriptMgr.h:1079
Definition: SmartScriptMgr.h:78
struct SmartAction::@114::@155 wpStop
uint32 flag
Definition: SmartScriptMgr.h:899
Definition: SmartScriptMgr.h:171
ObjectGuidList(ObjectList *objectList, WorldObject *baseObject)
Definition: SmartScriptMgr.h:1400
Definition: SmartScriptMgr.h:111
uint32 param2
Definition: SmartScriptMgr.h:422
Definition: SmartScriptMgr.h:169
uint32 maxDist
Definition: SmartScriptMgr.h:1125
Definition: SmartScriptMgr.h:440
TC_GAME_API WorldObject * GetWorldObject(WorldObject const &, ObjectGuid const &)
Definition: ObjectAccessor.cpp:79
uint32 area
Definition: SmartScriptMgr.h:230
uint32 dead
Definition: SmartScriptMgr.h:1184
struct SmartEvent::@77::@103 gossip
struct SmartEvent::@77::@83 respawn
Definition: SmartScriptMgr.h:1232
Definition: SmartScriptMgr.h:120
uint32 map
Definition: SmartScriptMgr.h:1177
std::list< ObjectGuid > GuidList
Definition: ObjectGuid.h:333
struct SmartEvent::@77::@108 eventInform
struct SmartTarget::@194::@198 unitDistance
struct SmartTarget::@194::@208 closestFriendly
T max(const T &x, const T &y)
Definition: g3dmath.h:320
Definition: SmartScriptMgr.h:1095
struct SmartEvent::@77::@107 goStateChanged
Definition: SmartScriptMgr.h:1345
DBCStorage< EmotesEntry > sEmotesStore(Emotesfmt)
Definition: SmartScriptMgr.h:1104
#define bool
Definition: CascPort.h:16
Definition: SmartScriptMgr.h:60
Definition: SmartScriptMgr.h:31
struct SmartAction::@114::@183 setRangedMovement
Definition: SmartScriptMgr.h:1336
struct SmartEvent::@77::@79 minMaxRepeat
uint32 id
Definition: SmartScriptMgr.h:41
struct SmartAction::@114::@166 movie
uint32 flag5
Definition: SmartScriptMgr.h:644
uint32 param1
Definition: SmartScriptMgr.h:421
uint32 guid
Definition: SmartScriptMgr.h:405
Definition: SmartScriptMgr.h:1078
Definition: SmartScriptMgr.h:127
struct SmartAction::@114::@171 enterVehicle
uint32 flags
Definition: SmartScriptMgr.h:617
Definition: SmartScriptMgr.h:121
Definition: SmartScriptMgr.h:148
uint32 entry4
Definition: SmartScriptMgr.h:931
Definition: SmartScriptMgr.h:1067
Definition: SmartScriptMgr.h:510
Definition: SmartScriptMgr.h:432
Definition: SmartScriptMgr.h:154
uint32 param1
Definition: SmartScriptMgr.h:1201
Definition: SmartScriptMgr.h:158
std::unordered_map< uint32, WPPath * > waypoint_map
Definition: SmartScriptMgr.h:1464
Definition: SmartScriptMgr.h:50
struct SmartAction::@114::@147 setData
Definition: SmartScriptMgr.h:441
SmartTarget target
Definition: SmartScriptMgr.h:1374
Definition: SmartScriptMgr.h:462
Definition: SmartScriptMgr.h:534
Definition: SmartScriptMgr.h:499
uint32 data
Definition: SmartScriptMgr.h:718
Definition: SmartScriptMgr.h:63
struct SmartAction::@114::@181 setGoLootState
Definition: SmartScriptMgr.h:1340
uint32 entry1
Definition: SmartScriptMgr.h:928
struct SmartEvent::@77::@94 movementInform
uint32 delay
Definition: SmartScriptMgr.h:744
std::list< WorldObject * > ObjectList
Definition: SmartScriptMgr.h:1391
Definition: SmartScriptMgr.h:142
struct SmartEvent::@77::@82 los
Definition: SmartScriptMgr.h:453
Definition: SmartScriptMgr.h:536
Definition: SmartScriptMgr.h:1096
T min(const T &x, const T &y)
Definition: g3dmath.h:305
Definition: SmartScriptMgr.h:82
bool IsEmoteValid(SmartScriptHolder const &e, uint32 entry)
Definition: SmartScriptMgr.h:1622
Definition: SmartScriptMgr.h:1074
Definition: SmartScriptMgr.h:172
Definition: SmartScriptMgr.h:110
Definition: SmartScriptMgr.h:475
Definition: SmartScriptMgr.h:507
Definition: SmartScriptMgr.h:472
Definition: SmartScriptMgr.h:128
uint32 spellId
Definition: SmartScriptMgr.h:243
uint32 spell
Definition: SmartScriptMgr.h:616
uint32 factionID
Definition: SmartScriptMgr.h:574
uint32 id
Definition: SmartScriptMgr.h:1153
struct SmartAction::@114::@164 storeTargets
std::unordered_map< int64, SmartAIEventList > SmartAIEventMap
Definition: SmartScriptMgr.h:1471
Definition: SmartScriptMgr.h:167
Definition: SmartScriptMgr.h:477
Definition: SmartScriptMgr.h:442
Definition: SmartScriptMgr.h:434
Definition: SmartScriptMgr.h:547
struct SmartAction::@114::@177 flee
Definition: SmartScriptMgr.h:450
uint32 slot2
Definition: SmartScriptMgr.h:893
Definition: SmartScriptMgr.h:469
struct SmartTarget::@194::@202 goRange
std::pair< CacheSpellContainer::const_iterator, CacheSpellContainer::const_iterator > CacheSpellContainerBounds
Definition: SmartScriptMgr.h:1475
Definition: SmartScriptMgr.h:522
uint32 entry
Definition: SmartScriptMgr.h:406
Definition: SmartScriptMgr.h:1087
Definition: SmartScriptMgr.h:517
Definition: SmartScriptMgr.h:521
Definition: SmartScriptMgr.h:52
Definition: SmartScriptMgr.h:448
struct SmartAction::@114::@123 randomEmote
Definition: SmartScriptMgr.h:458
uint32 type
Definition: SmartScriptMgr.h:627
Definition: SmartScriptMgr.h:1219
struct SmartAction::@114::@151 active
Definition: SmartScriptMgr.h:490
Definition: SmartScriptMgr.h:64
Definition: SmartScriptMgr.h:533
struct SmartEvent::@77::@81 spellHit
Definition: SmartScriptMgr.h:1210
ObjectList * GetObjectList()
Definition: SmartScriptMgr.h:1413
bool IsAreaTriggerValid(SmartScriptHolder const &e, uint32 entry)
Definition: SmartScriptMgr.h:1632
uint32 targetParam2
Definition: SmartScriptMgr.h:620
ObjectList * m_objectList
Definition: SmartScriptMgr.h:1395
Definition: SmartScriptMgr.h:471
uint32 repeatMin
Definition: SmartScriptMgr.h:198
Definition: SmartScriptMgr.h:1357
bool IsTextEmoteValid(SmartScriptHolder const &e, uint32 entry)
Definition: SmartScriptMgr.h:1612
struct SmartAction::@114::@135 randomPhase
uint32 school
Definition: SmartScriptMgr.h:213
Definition: SmartScriptMgr.h:502
Definition: SmartScriptMgr.h:71
Definition: SmartScriptMgr.h:1342
uint32 repeat
Definition: SmartScriptMgr.h:408
struct SmartAction::@114::@149 visibility
GuidList * m_guidList
Definition: SmartScriptMgr.h:1396
struct SmartTarget::@194::@197 unitGUID
Definition: SmartScriptMgr.h:162
uint32 id
Definition: SmartScriptMgr.h:755
Definition: SmartScriptMgr.h:470
Definition: SmartScriptMgr.h:505
uint32 count
Definition: SmartScriptMgr.h:291
struct SmartAction::@114::@142 setSheath
struct SmartEvent::@77::@85 targetCasting
uint32 min
Definition: SmartScriptMgr.h:876
Definition: SmartScriptMgr.h:473
uint32 groupId
Definition: SmartScriptMgr.h:761
uint32 textGroupID
Definition: SmartScriptMgr.h:567
struct SmartEvent::@77::@89 summoned
std::map< uint32, std::pair< uint32, SpellEffIndex > > CacheSpellContainer
Definition: SmartScriptMgr.h:1474
uint32 param2
Definition: SmartScriptMgr.h:829
struct SmartTarget::@194::@206 closest
uint32 param5
Definition: SmartScriptMgr.h:832
uint32 emote4
Definition: SmartScriptMgr.h:609
Definition: SmartScriptMgr.h:1338
Definition: SmartScriptMgr.h:530
DB2Storage< ItemEntry > sItemStore("Item.db2", ItemFormat, HOTFIX_SEL_ITEM)
#define SI64FMTD
Definition: Define.h:140
Definition: SmartScriptMgr.h:149
SpellEffIndex
Definition: SharedDefines.h:26
uint32 anim
Definition: SmartScriptMgr.h:945
struct SmartAction::@114::@176 jump
struct SmartEvent::@77::@96 waypoint
Definition: SmartScriptMgr.h:1231
#define sSpellMgr
Definition: SpellMgr.h:756
uint32 timer
Definition: SmartScriptMgr.h:1381
uint32 map
Definition: SmartScriptMgr.h:229
Definition: SmartScriptMgr.h:468
Definition: SmartScriptMgr.h:107
SmartWaypointMgr()
Definition: SmartScriptMgr.h:1448
uint32 param4
Definition: SmartScriptMgr.h:831
uint32 move
Definition: SmartScriptMgr.h:665
Definition: SmartScriptMgr.h:157
int32_t int32
Definition: Define.h:146
Definition: SmartScriptMgr.h:79
Definition: SmartScriptMgr.h:446
bool IsSpellValid(SmartScriptHolder const &e, uint32 entry)
Definition: SmartScriptMgr.h:1592
Definition: SmartScriptMgr.h:67
Definition: SmartScriptMgr.h:113
SMART_EVENT
Definition: SmartScriptMgr.h:102
uint32 wp6
Definition: SmartScriptMgr.h:1036
uint32 minDist
Definition: SmartScriptMgr.h:1124
uint32 gameEventId
Definition: SmartScriptMgr.h:377
uint32_t uint32
Definition: Define.h:150
Definition: SmartScriptMgr.h:455
bool NotNULL(SmartScriptHolder const &e, uint32 data)
Definition: SmartScriptMgr.h:1552
struct SmartAction::@114::@131 setEventPhase
uint32 value
Definition: SmartScriptMgr.h:313
Definition: SmartScriptMgr.h:49
struct SmartAction::@114::@133 removeAura
float z
Definition: SmartScriptMgr.h:1118
Definition: SmartScriptMgr.h:153
Definition: SmartScriptMgr.h:527
Definition: SmartScriptMgr.h:139
uint32 phase1
Definition: SmartScriptMgr.h:696
Definition: SmartScriptMgr.h:69
struct SmartAction::@114::@175 sendGoCustomAnim
std::unordered_map< uint32, WayPoint * > WPPath
Definition: SmartScriptMgr.h:1389
struct SmartAction::@114::@138 setInstanceData
uint32 gossipMenuId
Definition: SmartScriptMgr.h:972
uint32 wp1
Definition: SmartScriptMgr.h:1031
Definition: SmartScriptMgr.h:488
Definition: SmartScriptMgr.h:86
struct SmartEvent::@77::@113 raw
Definition: SmartScriptMgr.h:1215
struct SmartAction::@114::@167 equip
uint32 emote3
Definition: SmartScriptMgr.h:608
Definition: SmartScriptMgr.h:80
Definition: SmartScriptMgr.h:457
Definition: SmartScriptMgr.h:164
uint32 param3
Definition: SmartScriptMgr.h:423
std::unordered_map< uint32, ObjectGuidList * > ObjectListMap
Definition: SmartScriptMgr.h:1443
Definition: SmartScriptMgr.h:165
Definition: SmartScriptMgr.h:449
Definition: SmartScriptMgr.h:85
struct SmartAction::@114::@169 setunitByte
Definition: SmartScriptMgr.h:524
SMART_EVENT type
Definition: SmartScriptMgr.h:188
Definition: SmartScriptMgr.h:465
Definition: SmartScriptMgr.h:1080
uint32 transport
Definition: SmartScriptMgr.h:967
uint32 targetParam3
Definition: SmartScriptMgr.h:621
uint32 phase6
Definition: SmartScriptMgr.h:701
float y
Definition: SmartScriptMgr.h:43
Definition: SmartScriptMgr.h:1089
struct SmartAction::@114::@179 MoveToPos
bool enableTimed
Definition: SmartScriptMgr.h:1384
Definition: SmartScriptMgr.h:537
uint32 chance
Definition: SmartScriptMgr.h:880
uint32 creature
Definition: SmartScriptMgr.h:207
struct SmartAction::@114::@140 updateTemplate
Definition: SmartScriptMgr.h:459
float x
Definition: SmartScriptMgr.h:1118
uint32 slot3
Definition: SmartScriptMgr.h:894
struct SmartEvent::@77::@87 friendlyCC
Definition: SmartScriptMgr.h:1088
uint32 creditType
Definition: SmartScriptMgr.h:691
struct SmartAction::@114::@150 summonGO
uint32 pathID
Definition: SmartScriptMgr.h:800
Definition: SmartScriptMgr.h:519
struct SmartEvent::@77::@86 friendlyHealth
float o
Definition: SmartScriptMgr.h:1118
uint32 creature
Definition: SmartScriptMgr.h:1123
uint32 flag4
Definition: SmartScriptMgr.h:643
uint32 repeatMax
Definition: SmartScriptMgr.h:199
uint32 credit
Definition: SmartScriptMgr.h:690
Definition: SmartScriptMgr.h:83
uint32 spell
Definition: SmartScriptMgr.h:212
bool IsItemValid(SmartScriptHolder const &e, uint32 entry)
Definition: SmartScriptMgr.h:1602
Definition: SmartScriptMgr.h:105
uint32 phase
Definition: SmartScriptMgr.h:670
Definition: SmartScriptMgr.h:1339
Definition: SmartScriptMgr.h:481
Definition: SmartScriptMgr.h:1101
Definition: SmartScriptMgr.h:1356
uint32 repeatMin
Definition: SmartScriptMgr.h:878
Definition: SmartScriptMgr.h:1091
Definition: SmartScriptMgr.h:476
struct SmartEvent::@77::@84 minMax
struct SmartAction::@114::@163 storeVar
struct SmartAction::@114::@191 closestWaypointFromList
Definition: SmartScriptMgr.h:1093
Definition: SmartScriptMgr.h:487
struct SmartAction::@114::@192 randomSound
Definition: SmartScriptMgr.h:168
Definition: SmartScriptMgr.h:516
uint32 quest
Definition: SmartScriptMgr.h:278
SmartTarget(SMARTAI_TARGETS t=SMART_TARGET_NONE, uint32 p1=0, uint32 p2=0, uint32 p3=0)
Definition: SmartScriptMgr.h:1106
struct SmartAction::@114::@153 wpStart
uint32 noHostile
Definition: SmartScriptMgr.h:220
uint32 flag6
Definition: SmartScriptMgr.h:645
struct SmartAction::@114::@126 threatPCT
Definition: SmartScriptMgr.h:1346
CacheSpellContainer KillCreditSpellStore
Definition: SmartScriptMgr.h:1665
uint32 param1
Definition: SmartScriptMgr.h:828
uint32 reset
Definition: SmartScriptMgr.h:859
Definition: SmartScriptMgr.h:84
struct SmartAction::@114::@148 moveRandom
Definition: SmartScriptMgr.h:1220
Definition: SmartScriptMgr.h:1351
int64 entryOrGuid
Definition: SmartScriptMgr.h:1367
uint32 param3
Definition: SmartScriptMgr.h:830
Definition: SmartScriptMgr.h:146
Definition: SmartScriptMgr.h:482
Definition: SmartScriptMgr.h:59
uint32 GetActionType() const
Definition: SmartScriptMgr.h:1378
Definition: SmartScriptMgr.h:77
struct SmartTarget::@194::@199 playerDistance
SmartAction action
Definition: SmartScriptMgr.h:1373
Definition: SmartScriptMgr.h:544
Definition: SmartScriptMgr.h:1097
uint32 emote1
Definition: SmartScriptMgr.h:606
uint32 GetScriptType() const
Definition: SmartScriptMgr.h:1376
uint32 byte1
Definition: SmartScriptMgr.h:905
Definition: SmartScriptMgr.h:456
Definition: SmartScriptMgr.h:523
struct SmartEvent::@77::@101 textOver
uint32 group
Definition: SmartScriptMgr.h:1009
uint32 mapID
Definition: SmartScriptMgr.h:852
#define TC_GAME_API
Definition: Define.h:134
static SmartScriptHolder & FindLinkedSourceEvent(SmartAIEventList &list, uint32 eventId)
Definition: SmartScriptMgr.h:1501
Definition: SmartScriptMgr.h:538
uint32 targetType
Definition: SmartScriptMgr.h:618
Definition: SmartScriptMgr.h:1073
Definition: SmartScriptMgr.h:134
uint32 type
Definition: SmartScriptMgr.h:228
Definition: SmartScriptMgr.h:1094
uint32 entry6
Definition: SmartScriptMgr.h:933
struct SmartAction::@114::@117 faction
Definition: SmartScriptMgr.h:506
Definition: SmartScriptMgr.h:1218
Definition: SmartScriptMgr.h:1063
Definition: SmartScriptMgr.h:545
Definition: SmartScriptMgr.h:136
Definition: SmartScriptMgr.h:119
uint32 threatDEC
Definition: SmartScriptMgr.h:635
uint32 entry
Definition: SmartScriptMgr.h:689
Definition: SmartScriptMgr.h:431
struct SmartEvent::@77::@106 gameEvent
Definition: SmartScriptMgr.h:514
Definition: SmartScriptMgr.h:483
uint32 wp5
Definition: SmartScriptMgr.h:1035
uint32 slot1
Definition: SmartScriptMgr.h:892
struct SmartAction::@114::@187 creatureGroup
Definition: SmartScriptMgr.h:117
Definition: SmartScriptMgr.h:132
Definition: SmartScriptMgr.h:520
#define ASSERT
Definition: Errors.h:55
struct SmartTarget::@194::@205 position
Definition: SmartScriptMgr.h:104
eSmartAI
Definition: SmartScriptMgr.h:47
Definition: SmartScriptMgr.h:513
SmartScriptType source_type
Definition: SmartScriptMgr.h:1368
uint32 sound
Definition: SmartScriptMgr.h:585
Definition: SmartScriptMgr.h:554
uint32 pointID
Definition: SmartScriptMgr.h:320
Definition: SmartScriptMgr.h:1090
uint32 minHpPct
Definition: SmartScriptMgr.h:397
uint32 GetTargetType() const
Definition: SmartScriptMgr.h:1379
uint32 powerType
Definition: SmartScriptMgr.h:1015
uint32 counterId
Definition: SmartScriptMgr.h:857
WPPath * GetPath(uint32 id)
Definition: SmartScriptMgr.h:1456
Definition: SmartScriptMgr.h:501
struct SmartAction::@114::@144 invincHP
uint32 playerOnly
Definition: SmartScriptMgr.h:1190
DBCStorage< EmotesTextEntry > sEmotesTextStore(EmotesTextfmt)
Definition: SmartScriptMgr.h:1092
Definition: SmartScriptMgr.h:147
Definition: SmartScriptMgr.h:133
uint32 param2
Definition: SmartScriptMgr.h:1202
struct SmartAction::@114::@160 setSwim
uint32 distance
Definition: SmartScriptMgr.h:773
#define TC_LOG_ERROR(filterType__,...)
Definition: Log.h:207
struct SmartAction::@114::@180 sendGossipMenu
Definition: SmartScriptMgr.h:443
uint32 event_chance
Definition: SmartScriptMgr.h:190
uint32 dist
Definition: SmartScriptMgr.h:1137
struct SmartAction::@114::@124 cast
Definition: SmartScriptMgr.h:186
bool IsGameObjectValid(SmartScriptHolder const &e, uint32 entry)
Definition: SmartScriptMgr.h:1582
struct SmartAction::@114::@141 callHelp
uint32 targetParam1
Definition: SmartScriptMgr.h:619
Definition: SmartScriptMgr.h:497
uint32 phase2
Definition: SmartScriptMgr.h:697
struct SmartEvent::@77::@80 kill
Definition: SmartScriptMgr.h:1361
uint32_t uint32
Definition: g3dmath.h:168
uint32 dbGuid
Definition: SmartScriptMgr.h:1130
Definition: SmartScriptMgr.h:493
Definition: SmartScriptMgr.h:1075
uint32 team
Definition: SmartScriptMgr.h:336
Definition: SmartScriptMgr.h:1211
uint32 creature
Definition: SmartScriptMgr.h:579
Definition: SmartScriptMgr.h:508
struct SmartEvent::@77::@112 counter
Definition: SmartScriptMgr.h:542
Definition: SmartScriptMgr.h:1083
Definition: SmartScriptMgr.h:552
uint32 apply
Definition: SmartScriptMgr.h:756
struct SmartTarget::@194::@200 playerRange
Definition: SmartScriptMgr.h:159
SmartAITypeMaskId
Definition: SmartScriptMgr.h:1223
struct SmartEvent::@77::@98 transportRelocate
SmartCastFlags
Definition: SmartScriptMgr.h:1349
uint32 seat
Definition: SmartScriptMgr.h:917
struct SmartEvent::@77::@109 doAction
struct SmartAction::@114::@174 interruptSpellCasting
uint32 eventId
Definition: SmartScriptMgr.h:387
Definition: SmartScriptMgr.h:464
struct SmartAction::@114::@118 morphOrMount
uint32 phaseMin
Definition: SmartScriptMgr.h:706
uint32 fail
Definition: SmartScriptMgr.h:816
Definition: SmartScriptMgr.h:1477
Definition: SmartScriptMgr.h:1076
Definition: SmartScriptMgr.h:1068
uint32 field
Definition: SmartScriptMgr.h:717
uint32 phase4
Definition: SmartScriptMgr.h:699
Definition: SmartScriptMgr.h:61
Definition: SmartScriptMgr.h:1234
struct SmartEvent::@77::@93 targetAura
Definition: SmartScriptMgr.h:447
struct SmartEvent::@77::@111 distance
Definition: SmartScriptMgr.h:512
uint32 emote6
Definition: SmartScriptMgr.h:611
Definition: SmartScriptMgr.h:484
Definition: SmartScriptMgr.h:467
struct SmartAction::@114::@189 gameEventStop
uint32 quest
Definition: SmartScriptMgr.h:596
SMART_SCRIPT_RESPAWN_CONDITION
Definition: SmartScriptMgr.h:429
uint32 angle
Definition: SmartScriptMgr.h:688
Definition: SmartScriptMgr.h:463
Definition: SmartScriptMgr.h:528
uint32 entry2
Definition: SmartScriptMgr.h:929
Definition: SmartScriptMgr.h:500
struct SmartTarget::@194::@207 closestAttackable
struct SmartEvent::@77::@110 friendlyHealthPct
Definition: SmartScriptMgr.h:129
Definition: SmartScriptMgr.h:433
Definition: SmartScriptMgr.h:504
WayPoint(uint32 _id, float _x, float _y, float _z)
Definition: SmartScriptMgr.h:33
uint32 withInstant
Definition: SmartScriptMgr.h:940
uint32 despawnTime
Definition: SmartScriptMgr.h:784
Definition: SmartScriptMgr.h:155
Definition: SmartScriptMgr.h:126
struct SmartTarget::@194::@203 goGUID
uint32 pathID
Definition: SmartScriptMgr.h:321
struct SmartEvent::@77::@100 areatrigger
uint32 attackInvoker
Definition: SmartScriptMgr.h:629
uint32 swim
Definition: SmartScriptMgr.h:847
~SmartAIMgr()
Definition: SmartScriptMgr.h:1481
uint32 newPower
Definition: SmartScriptMgr.h:1016
uint32 wp4
Definition: SmartScriptMgr.h:1034
struct SmartEvent::@77::@97 transportAddCreature
bool runOnce
Definition: SmartScriptMgr.h:1383
uint32 withEmote
Definition: SmartScriptMgr.h:734
Definition: SmartScriptMgr.h:144
Definition: SmartScriptMgr.h:535
SMARTAI_TARGETS
Definition: SmartScriptMgr.h:1071
Definition: SmartScriptMgr.h:1226
SMART_EVENT_PHASE
Definition: SmartScriptMgr.h:57
bool IsQuestValid(SmartScriptHolder const &e, uint32 entry)
Definition: SmartScriptMgr.h:1572
struct SmartTarget::@194::@201 stored
SMART_ACTION type
Definition: SmartScriptMgr.h:561
struct SmartAction::@114::@134 follow
bool IsMinMaxValid(SmartScriptHolder const &e, uint32 min, uint32 max)
Definition: SmartScriptMgr.h:1532
DB2Storage< SoundEntriesEntry > sSoundEntriesStore("SoundEntries.db2", SoundEntriesFormat, HOTFIX_SEL_SOUND_ENTRIES)
Definition: SmartScriptMgr.h:183
Definition: SmartScriptMgr.h:1077
struct SmartAction::@114::@159 setFly
Definition: SmartScriptMgr.h:546
Definition: SmartScriptMgr.h:1227
std::array< uint32, SMART_ACTION_PARAM_COUNT-1 > sounds
Definition: SmartScriptMgr.h:1041
Definition: SmartScriptMgr.h:156
struct SmartAction::@114::@146 ingamePhaseGroup
uint32 emote
Definition: SmartScriptMgr.h:591
uint32 root
Definition: SmartScriptMgr.h:999
struct SmartAction::@114::@185 setRoot
Definition: SmartScriptMgr.h:540
Definition: SmartScriptMgr.h:486
static SmartScriptHolder & FindLinkedEvent(SmartAIEventList &list, uint32 link)
Definition: SmartScriptMgr.h:1513
Definition: SmartScriptMgr.h:539
Definition: SmartScriptMgr.h:553
uint32 duration
Definition: SmartScriptMgr.h:568
Definition: SmartScriptMgr.h:541