mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 09:31:30 +00:00
Fix totems issue and add despawn
Despawn should tell client ... still TODO
This commit is contained in:
parent
2a7a88ff47
commit
c7e33eb6b9
@ -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();
|
||||
|
||||
@ -3447,7 +3447,7 @@ bool Mob::SpellOnTarget(uint16 spell_id, Mob *spelltar, bool reflect, bool use_r
|
||||
if(spelltar->IsClient() && spelltar->CastToClient()->IsHoveringForRespawn())
|
||||
return false;
|
||||
|
||||
if(IsDetrimentalSpell(spell_id) && !IsAttackAllowed(spelltar) && !IsResurrectionEffects(spell_id)) {
|
||||
if(IsDetrimentalSpell(spell_id) && !IsAttackAllowed(spelltar, true) && !IsResurrectionEffects(spell_id)) {
|
||||
if(!IsClient() || !CastToClient()->GetGM()) {
|
||||
Message_StringID(MT_SpellFailure, SPELL_NO_HOLD);
|
||||
return false;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user