mirror of
https://github.com/EQEmu/Server.git
synced 2026-03-22 01:22:27 +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 <assert.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
#include <algorithm>
|
||||||
|
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
#include <stdlib.h>
|
#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);
|
spelltar->Message_StringID(MT_SpellFailure, YOU_RESIST, spells[spell_id].name);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(spelltar->IsAIControlled()){
|
if (spelltar->IsAIControlled()) {
|
||||||
int32 aggro = CheckAggroAmount(spell_id);
|
int32 aggro = CheckAggroAmount(spell_id);
|
||||||
if(aggro > 0) {
|
if (aggro > 0) {
|
||||||
if(!IsHarmonySpell(spell_id))
|
if (!IsHarmonySpell(spell_id))
|
||||||
spelltar->AddToHateList(this, aggro);
|
spelltar->AddToHateList(this, aggro);
|
||||||
else
|
else if (!spelltar->PassCharismaCheck(this, spell_id))
|
||||||
if(!spelltar->PassCharismaCheck(this, spell_id))
|
spelltar->AddToHateList(this, aggro);
|
||||||
spelltar->AddToHateList(this, aggro);
|
} else {
|
||||||
}
|
int newhate = spelltar->GetHateAmount(this) + aggro;
|
||||||
else{
|
spelltar->SetHateAmountOnEnt(this, std::max(1, newhate));
|
||||||
uint32 newhate = spelltar->GetHateAmount(this) + aggro;
|
|
||||||
if (newhate < 1) {
|
|
||||||
spelltar->SetHateAmountOnEnt(this,1);
|
|
||||||
} else {
|
|
||||||
spelltar->SetHateAmountOnEnt(this,newhate);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user