mirror of
https://github.com/mangosfour/server.git
synced 2025-12-27 01:37:04 +00:00
[10519] Fix delaying spell with 2 or more persistent area auras and store ObjectGuid instead of Unit* on DynamicObject affected set
This commit is contained in:
parent
14127b4d08
commit
5d8cd04f97
3 changed files with 39 additions and 8 deletions
|
|
@ -28,7 +28,7 @@ struct SpellEntry;
|
|||
class DynamicObject : public WorldObject
|
||||
{
|
||||
public:
|
||||
typedef std::set<Unit*> AffectedSet;
|
||||
typedef std::set<ObjectGuid> AffectedSet;
|
||||
explicit DynamicObject();
|
||||
|
||||
void AddToWorld();
|
||||
|
|
@ -43,9 +43,9 @@ class DynamicObject : public WorldObject
|
|||
uint64 GetCasterGUID() const { return GetUInt64Value(DYNAMICOBJECT_CASTER); }
|
||||
Unit* GetCaster() const;
|
||||
float GetRadius() const { return m_radius; }
|
||||
bool IsAffecting(Unit *unit) const { return m_affected.find(unit) != m_affected.end(); }
|
||||
void AddAffected(Unit *unit) { m_affected.insert(unit); }
|
||||
void RemoveAffected(Unit *unit) { m_affected.erase(unit); }
|
||||
bool IsAffecting(Unit *unit) const { return m_affected.find(unit->GetObjectGuid()) != m_affected.end(); }
|
||||
void AddAffected(Unit *unit) { m_affected.insert(unit->GetObjectGuid()); }
|
||||
void RemoveAffected(Unit *unit) { m_affected.erase(unit->GetObjectGuid()); }
|
||||
void Delay(int32 delaytime);
|
||||
|
||||
bool IsHostileTo(Unit const* unit) const;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue