[int64] Hate Fixes (#2163)

* Hate fixes

* Update perl_hateentry.cpp

* Update perl_hateentry.cpp
This commit is contained in:
Chris Miles
2022-05-09 20:49:43 -05:00
committed by GitHub
parent 763fc82379
commit 209b0eb273
22 changed files with 119 additions and 47 deletions
+3 -3
View File
@@ -108,7 +108,7 @@ void EntityList::DescribeAggro(Client *to_who, NPC *from_who, float d, bool verb
}
if (is_engaged) {
uint64 hate_amount = from_who->GetHateAmount(npc);
int64 hate_amount = from_who->GetHateAmount(npc);
to_who->Message(
Chat::White,
fmt::format(
@@ -1509,8 +1509,8 @@ bool Mob::PassCharismaCheck(Mob* caster, uint16 spell_id) {
void Mob::RogueEvade(Mob *other)
{
int amount = other->GetHateAmount(this) * zone->random.Int(40, 70) / 100;
other->SetHateAmountOnEnt(this, std::max(100, amount));
int64 amount = other->GetHateAmount(this) * zone->random.Int(40, 70) / 100;
other->SetHateAmountOnEnt(this, std::max((int64)100, amount));
return;
}