mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-25 18:21:28 +00:00
Merge pull request #281 from KayenEQ/Development
Fix to SE_PercentHeal to allow it to work if no max value set.
This commit is contained in:
commit
b8b43c7149
@ -299,7 +299,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial)
|
||||
//This effect can also do damage by percent.
|
||||
if (val < 0) {
|
||||
|
||||
if (-val > spell.max[i])
|
||||
if (spell.max[i] && -val > spell.max[i])
|
||||
val = -spell.max[i];
|
||||
|
||||
if (caster)
|
||||
@ -309,7 +309,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial)
|
||||
|
||||
else
|
||||
{
|
||||
if (val > spell.max[i])
|
||||
if (spell.max[i] && val > spell.max[i])
|
||||
val = spell.max[i];
|
||||
|
||||
if(caster)
|
||||
@ -2647,7 +2647,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial)
|
||||
case SE_Taunt:
|
||||
{
|
||||
if (IsNPC()){
|
||||
caster->Taunt(this->CastToNPC(), false, spell.base[i]);
|
||||
caster->Taunt(this->CastToNPC(), false, static_cast<float>(spell.base[i]));
|
||||
|
||||
if (spell.base2[i] > 0)
|
||||
CastToNPC()->SetHate(caster, (CastToNPC()->GetHateAmount(caster) + spell.base2[i]));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user