Core/SmartScripts: added SMART_ACTION_SET_COUNTER and SMART_EVENT_COUNTER_SET

as per request of DB developers

(cherry picked from commit 23b1c042adbe3a460457aa11f017c90e6600bfa2)

Conflicts:
	src/server/game/AI/SmartScripts/SmartScript.h
This commit is contained in:
MitchesD committed 2015-04-02 18:30:27 +02:00
1 parent d8ef63040a
commit 1de02764c7
4 files changed
+92 -3

No files matched your search

@@ -167,8 +167,9 @@ enum SMART_EVENT
SMART_EVENT_FRIENDLY_HEALTH_PCT = 74, // minHpPct, maxHpPct, repeatMin, repeatMax
SMART_EVENT_DISTANCE_CREATURE = 75, // guid, entry, distance, repeat
SMART_EVENT_DISTANCE_GAMEOBJECT = 76, // guid, entry, distance, repeat
SMART_EVENT_COUNTER_SET = 77, // id, value, cooldownMin, cooldownMax
SMART_EVENT_END = 77
SMART_EVENT_END = 78
};
struct SmartEvent
@@ -396,6 +397,14 @@ struct SmartEvent
uint32 repeat;
} distance;
struct
{
uint32 id;
uint32 value;
uint32 cooldownMin;
uint32 cooldownMax;
} counter;
struct
{
uint32 param1;
@@ -479,7 +488,7 @@ enum SMART_ACTION
SMART_ACTION_SET_FLY = 60, // 0/1
SMART_ACTION_SET_SWIM = 61, // 0/1
SMART_ACTION_TELEPORT = 62, // mapID,
// 63 unused
SMART_ACTION_SET_COUNTER = 63, // id, value, reset (0/1)
SMART_ACTION_STORE_TARGET_LIST = 64, // varID,
SMART_ACTION_WP_RESUME = 65, // none
SMART_ACTION_SET_ORIENTATION = 66, //
@@ -822,6 +831,13 @@ struct SmartAction
uint32 mapID;
} teleport;
struct
{
uint32 counterId;
uint32 value;
uint32 reset;
} setCounter;
struct
{
uint32 id;
@@ -1294,6 +1310,7 @@ const uint32 SmartAIEventMask[SMART_EVENT_END][2] =
{SMART_EVENT_FRIENDLY_HEALTH_PCT, SMART_SCRIPT_TYPE_MASK_CREATURE },
{SMART_EVENT_DISTANCE_CREATURE, SMART_SCRIPT_TYPE_MASK_CREATURE },
{SMART_EVENT_DISTANCE_GAMEOBJECT, SMART_SCRIPT_TYPE_MASK_CREATURE },
{SMART_EVENT_COUNTER_SET, SMART_SCRIPT_TYPE_MASK_CREATURE + SMART_SCRIPT_TYPE_MASK_GAMEOBJECT }
};
enum SmartEventFlags