mirror of
https://github.com/mangosfour/server.git
synced 2025-12-28 13:37:13 +00:00
[10688] New version of patch for send real diff from last update.
In new version last update time stopred for specific Cell that store all world objects placed in it. All objects of Cell updated (or not updated) in same time. Original version provided by ciphercom.
This commit is contained in:
parent
464908f453
commit
e219ee99bb
36 changed files with 183 additions and 151 deletions
|
|
@ -31,7 +31,7 @@ Totem::Totem() : Creature(CREATURE_SUBTYPE_TOTEM)
|
|||
m_type = TOTEM_PASSIVE;
|
||||
}
|
||||
|
||||
void Totem::Update( uint32 time )
|
||||
void Totem::Update(uint32 update_diff, uint32 tick_diff)
|
||||
{
|
||||
Unit *owner = GetOwner();
|
||||
if (!owner || !owner->isAlive() || !isAlive())
|
||||
|
|
@ -40,15 +40,15 @@ void Totem::Update( uint32 time )
|
|||
return;
|
||||
}
|
||||
|
||||
if (m_duration <= time)
|
||||
if (m_duration <= update_diff)
|
||||
{
|
||||
UnSummon(); // remove self
|
||||
return;
|
||||
}
|
||||
else
|
||||
m_duration -= time;
|
||||
m_duration -= update_diff;
|
||||
|
||||
Creature::Update( time );
|
||||
Creature::Update(update_diff, tick_diff);
|
||||
}
|
||||
|
||||
void Totem::Summon(Unit* owner)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue