void CGameSocket::RecvZoneChange(Packet & pkt) { uint16 uid = pkt.read<uint16>(); uint8 byZoneNumber = pkt.read<uint8>(); CUser* pUser = g_pMain->GetUserPtr(uid); if (pUser == nullptr) return; pUser->m_pMap = g_pMain->GetZoneByID(byZoneNumber); pUser->m_bZone = byZoneNumber; TRACE("**** RecvZoneChange -- user(%s, %d), cur_zone = %d\n", pUser->GetName().c_str(), pUser->GetID(), byZoneNumber); }
void CGameSocket::RecvUserRegene(Packet & pkt) { uint16 uid, sHP; pkt >> uid >> sHP; CUser* pUser = g_pMain->GetUserPtr(uid); if(pUser == nullptr) return; pUser->m_bLive = AI_USER_LIVE; pUser->m_sHP = sHP; TRACE("**** RecvUserRegene -- uid = (%s,%d), HP = %d\n", pUser->GetName().c_str(), pUser->GetID(), pUser->m_sHP); }