mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 07:18:37 +00:00
Beneficial spells will now correctly inherit targets RestTimer
Example PC A is fighting mob B. PC C casts a heal on PC A. PC C will inherit the timer from PC A. This is done because beneficial spells have a "witness" check from NPCs so there is a chance PC C would not gain aggro and could just keep on going with no RestTimer which allows them to fast regen while actively participating.
This commit is contained in:
@@ -3895,6 +3895,8 @@ bool Mob::SpellOnTarget(uint16 spell_id, Mob *spelltar, bool reflect, bool use_r
|
||||
spelltar->SetHateAmountOnEnt(this, std::max(newhate, 1));
|
||||
}
|
||||
} else if (IsBeneficialSpell(spell_id) && !IsSummonPCSpell(spell_id)) {
|
||||
if (spelltar->IsClient() && IsClient())
|
||||
CastToClient()->UpdateRestTimer(spelltar->CastToClient()->GetRestTimer());
|
||||
entity_list.AddHealAggro(
|
||||
spelltar, this,
|
||||
CheckHealAggroAmount(spell_id, spelltar, (spelltar->GetMaxHP() - spelltar->GetHP())));
|
||||
|
||||
Reference in New Issue
Block a user