fix(Core/Creatures): Implemented `SUMMON_PROP_FLAG_ONLY_VISIBLE_TO_SU… (#14054)

* fix(Core/Creatures): Implemented `SUMMON_PROP_FLAG_ONLY_VISIBLE_TO_SUMMONER` summon flag.

Fixes #6674

* Update.
This commit is contained in:
UltraNix
2023-01-06 00:52:05 +01:00
committed by GitHub
parent 0e1e8f27de
commit 14f3b444ae
12 changed files with 96 additions and 44 deletions

View File

@@ -534,7 +534,7 @@ enum SMART_ACTION
SMART_ACTION_ACTIVATE_GOBJECT = 9, //
SMART_ACTION_RANDOM_EMOTE = 10, // EmoteId1, EmoteId2, EmoteId3...
SMART_ACTION_CAST = 11, // SpellId, CastFlags, LimitTargets
SMART_ACTION_SUMMON_CREATURE = 12, // CreatureID, summonType, duration in ms, attackInvoker, attackScriptOwner
SMART_ACTION_SUMMON_CREATURE = 12, // CreatureID, summonType, duration in ms, attackInvoker, attackScriptOwner, flags(SmartActionSummonCreatureFlags)
SMART_ACTION_THREAT_SINGLE_PCT = 13, // Threat%
SMART_ACTION_THREAT_ALL_PCT = 14, // Threat%
SMART_ACTION_CALL_AREAEXPLOREDOREVENTHAPPENS = 15, // QuestID
@@ -696,6 +696,17 @@ enum SMART_ACTION
SMART_ACTION_AC_END = 225, // placeholder
};
enum class SmartActionSummonCreatureFlags
{
None = 0,
PersonalSpawn = 1,
PreferUnit = 2,
All = PersonalSpawn | PreferUnit
};
DEFINE_ENUM_FLAG(SmartActionSummonCreatureFlags);
struct SmartAction
{
SMART_ACTION type;
@@ -820,6 +831,7 @@ struct SmartAction
uint32 duration;
SAIBool attackInvoker;
uint32 attackScriptOwner;
uint32 flags; // SmartActionSummonCreatureFlags
} summonCreature;
struct