mirror of
https://github.com/EQEmu/Server.git
synced 2026-08-26 22:17:54 +00:00
Changed hate counter to uint32 to prevent negative rollback, this most likely can will be an issue but more uncommon
Renamed and refactored most functions and variables in hate_list.h/cpp for readability Refactored how hate works in some local functions mixing the use of hate variable and split it out into different status variables hate_list.cpp/.h style cleanup hate_list.h header function sort, comment erase functions should clearly state their function
This commit is contained in:
+4
-4
@@ -3658,9 +3658,9 @@ bool Mob::SpellOnTarget(uint16 spell_id, Mob* spelltar, bool reflect, bool use_r
|
||||
else{
|
||||
int32 newhate = spelltar->GetHateAmount(this) + aggro;
|
||||
if (newhate < 1) {
|
||||
spelltar->SetHate(this,1);
|
||||
spelltar->SetHateAmountOnEnt(this,1);
|
||||
} else {
|
||||
spelltar->SetHate(this,newhate);
|
||||
spelltar->SetHateAmountOnEnt(this,newhate);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3688,9 +3688,9 @@ bool Mob::SpellOnTarget(uint16 spell_id, Mob* spelltar, bool reflect, bool use_r
|
||||
spelltar->AddToHateList(this, aggro_amount); else{
|
||||
int32 newhate = spelltar->GetHateAmount(this) + aggro_amount;
|
||||
if (newhate < 1) {
|
||||
spelltar->SetHate(this,1);
|
||||
spelltar->SetHateAmountOnEnt(this,1);
|
||||
} else {
|
||||
spelltar->SetHate(this,newhate);
|
||||
spelltar->SetHateAmountOnEnt(this,newhate);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user