fix(Core/Conditions): ConditionList use after free (#23006)

This commit is contained in:
sogladev
2025-09-24 01:46:52 +02:00
committed by GitHub
parent ae1ea1a701
commit 6d2ad6047c
7 changed files with 59 additions and 65 deletions

View File

@@ -39,6 +39,7 @@ struct SpellRadiusEntry;
struct SpellEntry;
struct SpellCastTimesEntry;
struct Condition;
typedef std::list<Condition*> ConditionList;
enum SpellCastTargetFlags
{
@@ -270,12 +271,12 @@ public:
uint32 ItemType;
uint32 TriggerSpell;
flag96 SpellClassMask;
std::list<Condition*>* ImplicitTargetConditions;
std::shared_ptr<ConditionList> ImplicitTargetConditions;
SpellEffectInfo() : _spellInfo(nullptr), _effIndex(0), Effect(0), ApplyAuraName(0), Amplitude(0), DieSides(0),
RealPointsPerLevel(0), BasePoints(0), PointsPerComboPoint(0), ValueMultiplier(0), DamageMultiplier(0),
BonusMultiplier(0), MiscValue(0), MiscValueB(0), Mechanic(MECHANIC_NONE), RadiusEntry(nullptr), ChainTarget(0),
ItemType(0), TriggerSpell(0), ImplicitTargetConditions(nullptr) {}
ItemType(0), TriggerSpell(0), ImplicitTargetConditions() {}
SpellEffectInfo(SpellEntry const* spellEntry, SpellInfo const* spellInfo, uint8 effIndex);
bool IsEffect() const;
@@ -403,7 +404,6 @@ public:
bool _requireCooldownInfo;
SpellInfo(SpellEntry const* spellEntry);
~SpellInfo();
uint32 GetCategory() const;
bool HasEffect(SpellEffects effect) const;