mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 01:11:29 +00:00
[Bug Fix] Melee Life tap overflowing and causing damage (#1773)
* Update mob.cpp * Update mob.cpp
This commit is contained in:
parent
3efd9c7f60
commit
fac0d795f2
16
zone/mob.cpp
16
zone/mob.cpp
@ -5199,18 +5199,20 @@ int16 Mob::GetPositionalDmgAmt(Mob* defender)
|
||||
void Mob::MeleeLifeTap(int32 damage) {
|
||||
|
||||
int32 lifetap_amt = 0;
|
||||
lifetap_amt = spellbonuses.MeleeLifetap + itembonuses.MeleeLifetap + aabonuses.MeleeLifetap
|
||||
+ spellbonuses.Vampirism + itembonuses.Vampirism + aabonuses.Vampirism;
|
||||
int32 melee_lifetap_mod = spellbonuses.MeleeLifetap + itembonuses.MeleeLifetap + aabonuses.MeleeLifetap
|
||||
+ spellbonuses.Vampirism + itembonuses.Vampirism + aabonuses.Vampirism;
|
||||
|
||||
if(lifetap_amt && damage > 0){
|
||||
if(melee_lifetap_mod && damage > 0){
|
||||
|
||||
lifetap_amt = damage * lifetap_amt / 100;
|
||||
LogCombat("Melee lifetap healing for [{}] damage", damage);
|
||||
lifetap_amt = damage * (static_cast<float>(melee_lifetap_mod) / 100.0f);
|
||||
LogCombat("Melee lifetap healing [{}] points of damage with modifier of [{}] ", lifetap_amt, melee_lifetap_mod);
|
||||
|
||||
if (lifetap_amt > 0)
|
||||
if (lifetap_amt >= 0) {
|
||||
HealDamage(lifetap_amt); //Heal self for modified damage amount.
|
||||
else
|
||||
}
|
||||
else {
|
||||
Damage(this, -lifetap_amt, 0, EQ::skills::SkillEvocation, false); //Dmg self for modified damage amount.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user