Core/Objects: Move EventProcessor update to WorldObject::Update
Port From (https://github.com/TrinityCore/TrinityCore/commit/b6965b2c30eb3317228b328a0c1da71235d7c257)
This commit is contained in:
@@ -955,6 +955,12 @@ namespace Game.Entities
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public virtual void Update(uint diff)
|
||||
{
|
||||
m_Events.Update(diff);
|
||||
}
|
||||
|
||||
public void SetWorldObject(bool on)
|
||||
{
|
||||
if (!IsInWorld)
|
||||
@@ -962,6 +968,7 @@ namespace Game.Entities
|
||||
|
||||
GetMap().AddObjectToSwitchList(this, on);
|
||||
}
|
||||
|
||||
public void SetActive(bool on)
|
||||
{
|
||||
if (m_isActive == on)
|
||||
@@ -1034,6 +1041,8 @@ namespace Game.Entities
|
||||
ITransport transport = GetTransport();
|
||||
if (transport != null)
|
||||
transport.RemovePassenger(this);
|
||||
|
||||
m_Events.KillAllEvents(false); // non-delatable (currently cast spells) will not deleted now but it will deleted at call in Map::RemoveAllObjectsInRemoveList
|
||||
}
|
||||
|
||||
public uint GetZoneId() { return m_zoneId; }
|
||||
@@ -3080,8 +3089,6 @@ namespace Game.Entities
|
||||
public Conversation ToConversation() { return IsConversation() ? (this as Conversation) : null; }
|
||||
public SceneObject ToSceneObject() { return IsSceneObject() ? (this as SceneObject) : null; }
|
||||
|
||||
public virtual void Update(uint diff) { }
|
||||
|
||||
public virtual uint GetLevelForTarget(WorldObject target) { return 1; }
|
||||
|
||||
public ZoneScript GetZoneScript() { return m_zoneScript; }
|
||||
|
||||
Reference in New Issue
Block a user