Re: Warning: Client Cannot Receive Packet or Key is Invalid
Posted: Fri Oct 03, 2014 2:27 am
In extreme cases, your current zone can get corrupted to 0 when the client key error occurs. When this happens if you set your previous zone to something like Lower Jeuno and the user attempts to login again, their current zone will be 0, their prev zone will be Jeuno. When that happens, the zone_in packet has a check for if zone 0 as mog house and then attempts to send you to your previous zone when you exit:
So that means this could happen:
- Player creates a new character and starts in Sandy.
- Player logs out or has key error.
- Players prevzone is force set to Lower Jeuno using your suggestion.
- Players currzone has the chance to corrupt and become 0.
- Player times out, then logs back in which they log into their mog house even though they were in Sandy.
- Player leaves their mog house and they are now in Lower Jeuno due to their prev zone being set.
It's rare to happen, but having your zones corrupt to 0 in the database is not unheard of.
Code: Select all
if (PChar->getZone() == 0)
{
WBUFB(data,(0x80)-4) = 1;
WBUFW(data,(0x30)-4) = PChar->loc.prevzone; // form zone
WBUFW(data,(0x42)-4) = PChar->loc.prevzone; // from zone
WBUFW(data,(0xAA)-4) = GetMogHouseID(PChar); // Mog House id
WBUFB(data,(0xAE)-4) = GetMosHouseFlag(PChar); // Mog House leaving flag
} else {
WBUFB(data,(0x80)-4) = 2;
WBUFW(data,(0x30)-4) = PChar->getZone(); // to zone
WBUFW(data,(0x42)-4) = PChar->getZone(); // to zone
WBUFW(data,(0xAA)-4) = 0x01FF;
WBUFB(data,(0xAC)-4) = csid > 0 ? 0x01 : 0x00; //if 0x01 then pause between zone
WBUFB(data,(0xAF)-4) = PChar->loc.zone->CanUseMisc(MISC_MOGMENU); // флаг, позволяет использовать mog menu за пределами mog house
}
- Player creates a new character and starts in Sandy.
- Player logs out or has key error.
- Players prevzone is force set to Lower Jeuno using your suggestion.
- Players currzone has the chance to corrupt and become 0.
- Player times out, then logs back in which they log into their mog house even though they were in Sandy.
- Player leaves their mog house and they are now in Lower Jeuno due to their prev zone being set.
It's rare to happen, but having your zones corrupt to 0 in the database is not unheard of.