#include "stdafx.h" ////////////////////////////////////////////////////////////////////////// #include #include "CharSelect.h" #include "PortalManager.h" #include _IMPL_POOL(CharSelect) CharSelect::CharSelect(void) { } CharSelect::~CharSelect(void) { } VOID CharSelect::Create(KEYTYPE key) { SetKey(key); SetMapCode(11000); // (WAVERIX) (090520) (CHANGES) non-changed hard-code value SetLinkedServer(NULL); On_create(); } VOID CharSelect::On_create() { notification_timer_updater_.SetTimer(10 * 1000); } VOID CharSelect::On_destroy() { } VOID CharSelect::On_readyuser(User* pUser) { pUser->SetZoneState(ePRS_BEFORE_ENTER_CHARSELECT); pUser->SetZoneKey(GetKey()); pUser->SetZoneType(eZONETYPE_CHARSELECT); pUser->ChangeHeIsHereNotificationTimer(false); // NOTE: f110622.2L } VOID CharSelect::On_enteruser(User* pUser) { ZoneInterface::On_enteruser(pUser); ReadyUser(pUser, eSEND_NONE); pUser->SetZoneState(ePRS_AT_CHARSELECT); // ¹æ¿¡ µé¾î¿Ã¶§ ÆÄƼ°ü·Ã 󸮸¦ ÇÑ´Ù. AgentPartyManager::Instance()->EnterZone(pUser, this); // ¼±ÅÃÇÑ Ä³¸¯Å͸¦ ÃʱâÈ­ÇÑ´Ù. pUser->SelectChar(MAX_CHARACTER_LIST_NUM); PortalManager::ClearUserInfo(pUser); pUser->SetReservedHP(0); } VOID CharSelect::On_leaveuser(User* pUser) { if (pUser->GetPartyState().IsPartyMember() == true) { AgentPartyManager::Instance()->LeaveZone(pUser, this); } } // NOTE: f110622.2L, when an user return to the character selection zone, // the user may rarely miss the activated updating server in case the user that was leaving // on a field of a game server. this protocol would notify the database proxy server // in order to refresh the zombie user detection timeout. BOOL CharSelect::Process() { if (notification_timer_updater_.IsExpired() == false) { return true; }; // const ZONE_USER_LIST& user_list = this->GetUserList(); FOREACH_CONTAINER(const ZONE_USER_LIST::value_type& node, user_list, ZONE_USER_LIST) { User* const user = node.second; user->NotifyHeIsHereIfSatisfied(); }; return true; }