View Single Post
  #4  
Old 02-11-2004, 06:10 AM
vesuvias
Fire Beetle
 
Join Date: Feb 2004
Posts: 17
Default

Quote:
Originally Posted by toolh3
I think the original idea the devs have here is that this OP_ZoneChange case block is going to be hit again because of this code block:
Code:
if (m_pp.zone_id == zone->GetZoneID()) 
{
   // No need to ask worldserver if we're zoning to ourselves (most
   // likely to a bind point), also fixes a bug since the default response was failure
   APPLAYER* outapp = new APPLAYER(OP_ZoneChange,sizeof(ZoneChange_Struct));
   ZoneChange_Struct* zc2 = (ZoneChange_Struct*) outapp->pBuffer;
   strcpy(zc2->char_name, GetName());
   zc2->zoneID = m_pp.zone_id;
   zc2->success = 1;
   QueuePacket(outapp);
   safe_delete(outapp);
   zone->StartShutdownTimer(AUTHENTICATION_TIMEOUT * 1000);
}
I think your right about that, however what prevents us from hitting this same block of code when we run through OP_ZoneChange a second time?

Quote:
Originally Posted by toolh3
Code:
else 
{ 
   cout << "WARNING: No target coords for this zone in DB found" << endl; 
   cout << "Zoning to safe coords: " << target_zone << " (" << database.GetZoneID(target_zone) << ")" << ", x=" << tarx << ", y=" << tary << ", z=" << tarz << endl; 
   tarx=database.GetSafePoint(target_zone, "x"); 
   tary=database.GetSafePoint(target_zone, "y"); 
   tarz=database.GetSafePoint(target_zone, "z"); 
   zonesummon_x = -2; 
   zonesummon_y = -2; 
   zonesummon_z = -2; 
}
When I get home today I think I will try this out. But actually since
Code:
if (!database.GetSafePoints(target_zone, &tarx, &tary, &tarz, &minstatus, &minlevel)) {
						target_zone[0] = 0;
					}
was called before we even enter that compound branch I don't think I even have to specify what tarx, tary and tarz are, they should already have the right values (and we just cout'd them )

Interesting... thanks for the input.
Ves
Reply With Quote