Get dz safe return from cache not db

This was loading the dz from database to get safe return data every time
a client's dz removal timer triggered

Add the Zone::GetDynamicZone() method so zones that are dz instances can
find the data from the cache of any dz systems
This commit is contained in:
hg
2020-07-16 19:37:51 -04:00
parent fba078bbe9
commit 6e5ca19d18
6 changed files with 27 additions and 7 deletions
+1 -2
View File
@@ -164,8 +164,7 @@ bool Client::Process() {
if (dynamiczone_removal_timer.Check() && zone && zone->GetInstanceID() != 0)
{
dynamiczone_removal_timer.Disable();
DynamicZone dz = DynamicZone::LoadDzFromDatabase(zone->GetInstanceID());
GoToDzSafeReturnOrBind(dz.GetSafeReturnLocation());
GoToDzSafeReturnOrBind(zone->GetDynamicZone());
}
if (linkdead_timer.Check()) {