[Code Cleanup] Zone Data Loading Refactor (#2388)

* [Code Cleanup] Zone data loading refactor

* Update client_packet.cpp

* strcpy adjustments

* Ensure safe points get reloaded properly

* Simplify GetPEQZone and getZoneShutDownDelay

* Bring in zone_store where needed

* Update client.cpp

* Signature

* Signature

* Convert helpers to using pointers

* PR comment

* Update worlddb.cpp

* Fix loading for instances

* Fix zoning with fallback as well

* Another place for instance fallback
This commit is contained in:
Chris Miles
2022-09-01 18:48:28 -05:00
committed by GitHub
parent c613dbb2f7
commit 89fdd842e1
81 changed files with 753 additions and 1130 deletions
+3 -3
View File
@@ -292,7 +292,7 @@ int64 Client::CalcHPRegen(bool bCombat)
if (!bCombat && CanFastRegen() && (IsSitting() || CanMedOnHorse())) {
auto max_hp = GetMaxHP();
int fast_regen = 6 * (max_hp / zone->newzone_data.FastRegenHP);
int fast_regen = 6 * (max_hp / zone->newzone_data.fast_regen_hp);
if (base < fast_regen) // weird, but what the client is doing
base = fast_regen;
}
@@ -771,7 +771,7 @@ int64 Client::CalcManaRegen(bool bCombat)
if (!bCombat && CanFastRegen() && (IsSitting() || CanMedOnHorse())) {
auto max_mana = GetMaxMana();
int fast_regen = 6 * (max_mana / zone->newzone_data.FastRegenMana);
int fast_regen = 6 * (max_mana / zone->newzone_data.fast_regen_mana);
if (regen < fast_regen) // weird, but what the client is doing
regen = fast_regen;
}
@@ -1801,7 +1801,7 @@ int64 Client::CalcEnduranceRegen(bool bCombat)
int64 regen = base;
if (!bCombat && CanFastRegen() && (IsSitting() || CanMedOnHorse())) {
auto max_end = GetMaxEndurance();
int fast_regen = 6 * (max_end / zone->newzone_data.FastRegenEndurance);
int fast_regen = 6 * (max_end / zone->newzone_data.fast_regen_endurance);
if (aa_regen < fast_regen) // weird, but what the client is doing
aa_regen = fast_regen;
}