mirror of
https://github.com/EQEmu/Server.git
synced 2026-03-10 14:22:26 +00:00
Fix to SE_PercentHeal to allow it to work if no max value set.
This commit is contained in:
parent
d4139b98e3
commit
b4286b87db
@ -299,7 +299,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial)
|
|||||||
//This effect can also do damage by percent.
|
//This effect can also do damage by percent.
|
||||||
if (val < 0) {
|
if (val < 0) {
|
||||||
|
|
||||||
if (-val > spell.max[i])
|
if (spell.max[i] && -val > spell.max[i])
|
||||||
val = -spell.max[i];
|
val = -spell.max[i];
|
||||||
|
|
||||||
if (caster)
|
if (caster)
|
||||||
@ -309,7 +309,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial)
|
|||||||
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (val > spell.max[i])
|
if (spell.max[i] && val > spell.max[i])
|
||||||
val = spell.max[i];
|
val = spell.max[i];
|
||||||
|
|
||||||
if(caster)
|
if(caster)
|
||||||
@ -2647,7 +2647,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial)
|
|||||||
case SE_Taunt:
|
case SE_Taunt:
|
||||||
{
|
{
|
||||||
if (IsNPC()){
|
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)
|
if (spell.base2[i] > 0)
|
||||||
CastToNPC()->SetHate(caster, (CastToNPC()->GetHateAmount(caster) + spell.base2[i]));
|
CastToNPC()->SetHate(caster, (CastToNPC()->GetHateAmount(caster) + spell.base2[i]));
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user