mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-28 09:17:15 +00:00
Fix sign issue with hate redux spells
This commit is contained in:
+4
-9
@@ -82,6 +82,7 @@ Copyright (C) 2001-2002 EQEMu Development Team (http://eqemu.org)
|
||||
|
||||
#include <assert.h>
|
||||
#include <math.h>
|
||||
#include <algorithm>
|
||||
|
||||
#ifndef WIN32
|
||||
#include <stdlib.h>
|
||||
@@ -3674,17 +3675,11 @@ bool Mob::SpellOnTarget(uint16 spell_id, Mob* spelltar, bool reflect, bool use_r
|
||||
if (aggro > 0) {
|
||||
if (!IsHarmonySpell(spell_id))
|
||||
spelltar->AddToHateList(this, aggro);
|
||||
else
|
||||
if(!spelltar->PassCharismaCheck(this, spell_id))
|
||||
else if (!spelltar->PassCharismaCheck(this, spell_id))
|
||||
spelltar->AddToHateList(this, aggro);
|
||||
}
|
||||
else{
|
||||
uint32 newhate = spelltar->GetHateAmount(this) + aggro;
|
||||
if (newhate < 1) {
|
||||
spelltar->SetHateAmountOnEnt(this,1);
|
||||
} else {
|
||||
spelltar->SetHateAmountOnEnt(this,newhate);
|
||||
}
|
||||
int newhate = spelltar->GetHateAmount(this) + aggro;
|
||||
spelltar->SetHateAmountOnEnt(this, std::max(1, newhate));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user