mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-23 05:36:23 +00:00
chore(Cleanup): Merge redundant if in Totem::Update() (#12423)
TotemUpdate-too-long
This commit is contained in:
@@ -34,20 +34,13 @@ Totem::Totem(SummonPropertiesEntry const* properties, ObjectGuid owner) : Minion
|
||||
void Totem::Update(uint32 time)
|
||||
{
|
||||
Unit* owner = GetOwner();
|
||||
if (!owner || !owner->IsAlive() || !IsAlive())
|
||||
if (!owner || !owner->IsAlive() || !IsAlive() || m_duration <= time)
|
||||
{
|
||||
UnSummon(); // remove self
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_duration <= time)
|
||||
{
|
||||
UnSummon(); // remove self
|
||||
return;
|
||||
}
|
||||
else
|
||||
m_duration -= time;
|
||||
|
||||
m_duration -= time;
|
||||
Creature::Update(time);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user