Fix totems issue and add despawn

Despawn should tell client ... still TODO
This commit is contained in:
Michael Cook (mackal)
2017-07-14 23:13:33 -04:00
parent 2a7a88ff47
commit c7e33eb6b9
2 changed files with 8 additions and 1 deletions
+7
View File
@@ -273,6 +273,8 @@ void Aura::ProcessTotem(Mob *owner)
auto mob = e.second;
if (mob == this)
continue;
if (mob == owner)
continue;
if (owner->IsAttackAllowed(mob)) { // might need more checks ...
bool in_range = DistanceSquared(GetPosition(), mob->GetPosition()) <= distance;
auto it = casted_on.find(mob->GetID());
@@ -341,6 +343,11 @@ bool Aura::Process()
return true;
}
if (remove_timer.Check()) {
Depop();
return true;
}
if (movement_type == AuraMovement::Follow && GetPosition() != owner->GetPosition() && movement_timer.Check()) {
m_Position = owner->GetPosition();
SendPosUpdate();