feat(Core/SmartScripts): Add support to friendly+hostile to SMART_EVENT_OOC_LOS and SMART_EVENT_IC_LOS (#10037)

* .

* .
This commit is contained in:
IntelligentQuantum
2022-01-06 13:16:12 +03:30
committed by GitHub
parent 7fb6b7e15f
commit c377c62c7a
4 changed files with 32 additions and 7 deletions

View File

@@ -112,7 +112,7 @@ enum SMART_EVENT
SMART_EVENT_EVADE = 7, // NONE
SMART_EVENT_SPELLHIT = 8, // SpellID, School, CooldownMin, CooldownMax
SMART_EVENT_RANGE = 9, // MinDist, MaxDist, RepeatMin, RepeatMax
SMART_EVENT_OOC_LOS = 10, // NoHostile, MaxRnage, CooldownMin, CooldownMax, PlayerOnly
SMART_EVENT_OOC_LOS = 10, // HostilityMode, MaxRnage, CooldownMin, CooldownMax, PlayerOnly
SMART_EVENT_RESPAWN = 11, // type, MapId, ZoneId
SMART_EVENT_TARGET_HEALTH_PCT = 12, // HPMin%, HPMax%, RepeatMin, RepeatMax
SMART_EVENT_VICTIM_CASTING = 13, // RepeatMin, RepeatMax, spellid
@@ -128,7 +128,7 @@ enum SMART_EVENT
SMART_EVENT_HAS_AURA = 23, // Param1 = SpellID, Param2 = Stack amount, Param3/4 RepeatMin, RepeatMax
SMART_EVENT_TARGET_BUFFED = 24, // Param1 = SpellID, Param2 = Stack amount, Param3/4 RepeatMin, RepeatMax
SMART_EVENT_RESET = 25, // Called after combat, when the creature respawn and spawn.
SMART_EVENT_IC_LOS = 26, // NoHostile, MaxRnage, CooldownMin, CooldownMax, PlayerOnly
SMART_EVENT_IC_LOS = 26, // HostilityMode, MaxRnage, CooldownMin, CooldownMax, PlayerOnly
SMART_EVENT_PASSENGER_BOARDED = 27, // CooldownMin, CooldownMax
SMART_EVENT_PASSENGER_REMOVED = 28, // CooldownMin, CooldownMax
SMART_EVENT_CHARMED = 29, // NONE
@@ -228,7 +228,10 @@ struct SmartEvent
struct
{
uint32 noHostile;
/// <summary>
/// Hostility mode of the event. 0: hostile, 1: not hostile, 2: any
/// </summary>
uint32 hostilityMode;
uint32 maxDist;
uint32 cooldownMin;
uint32 cooldownMax;
@@ -458,6 +461,14 @@ struct SmartEvent
uint32 param5;
} raw;
};
enum class LOSHostilityMode : uint32
{
Hostile = 0,
NotHostile = 1,
Any = 2,
End
};
};
enum SMART_SCRIPT_RESPAWN_CONDITION