mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-10 19:10:25 +00:00
Implemented support for allowing most focus effects to now be usable
by NPCs (ie Heal/Damage focus, cast time, spell range ect) from both spell buffs and items. Rule for enabling spell focus is TRUE by default Rule for enabling item focus is FALSE by default. Consilidated a number of redundant client / mob functions to use the same pathway for calculating effect values.
This commit is contained in:
@@ -1386,15 +1386,6 @@ void Client::Damage(Mob* other, int32 damage, uint16 spell_id, SkillUseTypes att
|
||||
if(spell_id==0)
|
||||
spell_id = SPELL_UNKNOWN;
|
||||
|
||||
if(spell_id!=0 && spell_id != SPELL_UNKNOWN && other && damage > 0)
|
||||
{
|
||||
if(other->IsNPC() && !other->IsPet())
|
||||
{
|
||||
float npcspellscale = other->CastToNPC()->GetSpellScale();
|
||||
damage = ((float)damage * npcspellscale) / (float)100;
|
||||
}
|
||||
}
|
||||
|
||||
// cut all PVP spell damage to 2/3 -solar
|
||||
// Blasting ourselfs is considered PvP
|
||||
//Don't do PvP mitigation if the caster is damaging himself
|
||||
@@ -3806,13 +3797,6 @@ void Mob::HealDamage(uint32 amount, Mob *caster, uint16 spell_id)
|
||||
int32 curhp = GetHP();
|
||||
uint32 acthealed = 0;
|
||||
|
||||
if (caster && amount > 0) {
|
||||
if (caster->IsNPC() && !caster->IsPet()) {
|
||||
float npchealscale = caster->CastToNPC()->GetHealScale();
|
||||
amount = (static_cast<float>(amount) * npchealscale) / 100.0f;
|
||||
}
|
||||
}
|
||||
|
||||
if (amount > (maxhp - curhp))
|
||||
acthealed = (maxhp - curhp);
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user