mirror of
https://github.com/EQEmu/Server.git
synced 2026-04-17 06:32:39 +00:00
Fix sign issue with hate redux spells
This commit is contained in:
parent
0d4775a9df
commit
ea240f7814
@ -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>
|
||||
@ -3669,22 +3670,16 @@ bool Mob::SpellOnTarget(uint16 spell_id, Mob* spelltar, bool reflect, bool use_r
|
||||
spelltar->Message_StringID(MT_SpellFailure, YOU_RESIST, spells[spell_id].name);
|
||||
}
|
||||
|
||||
if(spelltar->IsAIControlled()){
|
||||
if (spelltar->IsAIControlled()) {
|
||||
int32 aggro = CheckAggroAmount(spell_id);
|
||||
if(aggro > 0) {
|
||||
if(!IsHarmonySpell(spell_id))
|
||||
spelltar->AddToHateList(this, aggro);
|
||||
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);
|
||||
}
|
||||
if (aggro > 0) {
|
||||
if (!IsHarmonySpell(spell_id))
|
||||
spelltar->AddToHateList(this, aggro);
|
||||
else if (!spelltar->PassCharismaCheck(this, spell_id))
|
||||
spelltar->AddToHateList(this, aggro);
|
||||
} else {
|
||||
int newhate = spelltar->GetHateAmount(this) + aggro;
|
||||
spelltar->SetHateAmountOnEnt(this, std::max(1, newhate));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user