mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-16 01:01:30 +00:00
[Crash] Fix possible dereference of nullptr in Client::CalcHPRegen (#3316)
This commit is contained in:
parent
2d3ddcb574
commit
39b5374e92
@ -288,7 +288,7 @@ int64 Client::CalcHPRegen(bool bCombat)
|
||||
|
||||
if (!bCombat && CanFastRegen() && (IsSitting() || CanMedOnHorse())) {
|
||||
auto max_hp = GetMaxHP();
|
||||
int fast_regen = 6 * (max_hp / zone->newzone_data.fast_regen_hp);
|
||||
int64 fast_regen = 6 * (max_hp / (zone ? zone->newzone_data.fast_regen_hp : 180));
|
||||
if (base < fast_regen) // weird, but what the client is doing
|
||||
base = fast_regen;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user