bool ZObserver::IsVisibleSetTarget(ZCharacter* pCharacter) { if(pCharacter->IsDie()) return false; if (pCharacter->IsAdminHide()) return false; if (pCharacter->GetTeamID() == MMT_SPECTATOR) return false; if(g_pGame->IsReplay()) return true; if(ZGetGameClient()->GetMatchStageSetting()->GetGameType() == MMATCH_GAMETYPE_DUEL) { ZRuleDuel* pDuel = (ZRuleDuel*)ZGetGameInterface()->GetGame()->GetMatch()->GetRule(); if (pDuel->GetQueueIdx(pCharacter->GetUID()) <= 1) return true; else return false; } if (ZGetGameTypeManager()->IsQuestDerived(ZGetGameClient()->GetMatchStageSetting()->GetGameType())) { if(!pCharacter->IsVisible()) return false; } if(m_nType==ZOM_ANYONE) return true; if(m_nType==ZOM_RED && pCharacter->GetTeamID()==MMT_RED) return true; if(m_nType==ZOM_BLUE && pCharacter->GetTeamID()==MMT_BLUE) return true; return false; }
void ZVoteInterface::VoteInput(char nKey) { if (GetShowTargetList()) { // 1~0 , A~F 까지 - 누른키에 해당하는 플레이어 없을 수도 있음 int nIndex = ConvKeyToIndex(nKey); if (OnVoteRun(nIndex)) { ZGetGameClient()->SetCanVote(false); ShowTargetList(false); return; } } if (ZGetGameClient()->CanVote()) { if (nKey == 'Y') { ZPOSTCMD0(MC_MATCH_VOTE_YES); ZGetGameClient()->SetCanVote(false); ShowTargetList(false); } else if (nKey == 'N') { ZPOSTCMD0(MC_MATCH_VOTE_NO); ZGetGameClient()->SetCanVote(false); ShowTargetList(false); } return; } }
void ZGameClient::OnClanUpdateCharClanInfo(void* pBlob) { int nCount = MGetBlobArrayCount(pBlob); if (nCount != 1) return; MTD_CharClanInfo* pClanInfoNode = (MTD_CharClanInfo*)MGetBlobArrayElement(pBlob, 0); ZGetMyInfo()->SetClanInfo(pClanInfoNode->szClanName, pClanInfoNode->nGrade); ZGetMyInfo()->Serialize(); // 클랜정보가 변경되었다. if (ZGetGameClient()->IsConnected()) ZPostRequestClanMemberList(ZGetGameClient()->GetPlayerUID()); ZPlayerListBox *pList = GetProperClanListOutput(); if(pList) { if( !ZGetMyInfo()->IsClanJoined() ) { ZPlayerListBox* pWidget = (ZPlayerListBox*)ZApplication::GetGameInterface()->GetIDLResource()->FindWidget("LobbyChannelPlayerList"); if(pWidget) { pWidget->RemoveAll(); } } pList->RefreshUI(); } }
bool ZShopEquipInterface::Equip(MMatchCharItemParts parts, MUID& uidItem) { ZPostRequestEquipItem(ZGetGameClient()->GetPlayerUID(), uidItem, parts); // 서버에서 자동으로 보내준다. // ZPostRequestCharacterItemList(ZGetGameClient()->GetPlayerUID()); return true; }
void ZActor::CheckDead(float fDelta) { if (!CheckFlag(AF_MY_CONTROL)) return; if (!CheckFlag(AF_DEAD)) { if(m_pModule_HPAP->GetHP()<=0) { SetDeadTime(ZGetGame()->GetTime()); m_Animation.Input(ZA_EVENT_DEATH); SetFlag(AF_DEAD, true); MUID uidKiller = this->GetLastAttacker(); ZPostQuestPeerNPCDead(uidKiller, GetUID()); m_TaskManager.Clear(); } } else { if (!CheckFlag(AF_REQUESTED_DEAD)) { if (ZGetGame()->GetTime()-GetDeadTime() > GetNPCInfo()->fDyingTime) { MUID uidAttacker = GetLastAttacker(); if (uidAttacker == MUID(0, 0)) { uidAttacker = ZGetGameClient()->GetPlayerUID(); } ZPostQuestRequestNPCDead(uidAttacker, GetUID(), GetPosition()); SetFlag(AF_REQUESTED_DEAD, true); } } } }
void ZGameClient::OnClanAnswerJoinAgreement(const MUID& uidClanAdmin, const char* szJoiner, const bool bAnswer) { if (!IsWaitingClanJoiningAgree()) return; if (ZGetGameClient()->GetPlayerUID() != uidClanAdmin) return; if (bAnswer) { if (IsUpperClanGrade(ZGetMyInfo()->GetClanGrade(), MCG_ADMIN)) { char szClanName[256]; sprintf(szClanName, ZGetMyInfo()->GetClanName()); ZPostRequestAgreedJoinClan(uidClanAdmin, szClanName, (char*)szJoiner); } } else { // 동의창 지워줘야 한다. ShowClanJoinerAgreeWaitFrame(false); m_uidRequestPlayer = MUID(0,0); ZApplication::GetGameInterface()->ShowMessage( MSG_CLAN_JOINER_AGREEMENT_REJECT ); } }
void ZCharacterView::SetCharacter( MUID uid ) { m_Info.UID = uid; MMatchObjCacheMap* pObjCacheMap = ZGetGameClient()->GetObjCacheMap(); for(MMatchObjCacheMap::iterator itor = pObjCacheMap->begin(); itor != pObjCacheMap->end(); ++itor) { MMatchObjCache* pObj = (*itor).second; if( pObj->GetUID() == m_Info.UID ) { InitCharParts( pObj->GetCostume()->nSex, pObj->GetCostume()->nHair, pObj->GetCostume()->nFace, pObj->GetCostume()->nEquipedItemID ); MCOLOR _color; char sp_name[255]; MMatchUserGradeID gid; if(GetUserInfoUID(m_Info.UID,_color,sp_name,gid)) { SetText( sp_name ); m_Info.nLevel = 0; } else { SetText( pObj->GetName() ); m_Info.nLevel = pObj->GetLevel(); } SetDrawInfo( true ); } } }
bool ZEmblemInterface::ReloadClanInfo(UINT nClanID) { EmblemInfoMapList::iterator Iterator; if ( !FindClanInfo( nClanID, &Iterator)) return false; ZEmblemInfoNode &EmblemNode = Iterator->second; char szFilePath[256]; if(!ZGetGameClient()->GetEmblemManager()->GetEmblemPathByCLID(nClanID,szFilePath)) return false; SAFE_DELETE(EmblemNode.m_pBitmapEmblem); #ifdef _PUBLISH MZFile::SetReadMode( MZIPREADFLAG_ZIP | MZIPREADFLAG_MRS | MZIPREADFLAG_MRS2 | MZIPREADFLAG_FILE ); #endif // 클랜ID 값을 이용하여 해당 비트맵을 메모리 캐쉬로 로드한다. MBitmapR2 *pBitmap = new MBitmapR2; pBitmap->Create("clanEmblem",RGetDevice(),szFilePath,false); EmblemNode.m_pBitmapEmblem = pBitmap; #ifdef _PUBLISH MZFile::SetReadMode( MZIPREADFLAG_MRS2 ); #endif return true; }
RRESULT OnDeActivate(void *pParam) { if (ZGetGameInterface() && ZGetGameClient()) return R_OK; // ZGetGameClient()->PriorityBoost(false); return R_OK; }
RRESULT OnActivate(void *pParam) { if (ZGetGameInterface() && ZGetGameClient() && Z_ETC_BOOST) return R_OK; // ZGetGameClient()->PriorityBoost(true); return R_OK; }
void ZRoomListBox::RequestSelStageJoin() { MUID uidChar = ZGetGameClient()->GetPlayerUID(); if (GetSelRoomUID() != MUID(0,0)) { if ( (ZGetMyInfo()->IsAdminGrade() == false) && (m_pMapInfo[m_Selection].bPrivate) ) { char szStageName[SMI_ROOMNAME_LENGTH] = ""; MUID uidStage = MUID(0,0); const sMapInfo* pSelRoomInfo = GetSelMapInfo(); if (pSelRoomInfo != NULL) { strcpy_safe(szStageName, pSelRoomInfo->room_name); uidStage = pSelRoomInfo->uidStage; } SetPrivateStageUID(uidStage); // 비밀방 ZApplication::GetGameInterface()->ShowPrivateStageJoinFrame(szStageName); } else { ZPostRequestStageJoin(uidChar, GetSelRoomUID()); // 공개방 ZApplication::GetGameInterface()->EnableLobbyInterface(false); } } }
void ZSurvival::OnGameUpdate(float fElapsed) { if (!ZGetGameTypeManager()->IsQuestDerived(ZGetGameClient()->GetMatchStageSetting()->GetGameType())) return; UpdateNavMeshWeight(fElapsed); }
void ZSurvival::OnGameCreate() { if (!ZGetGameTypeManager()->IsQuestDerived(ZGetGameClient()->GetMatchStageSetting()->GetGameType())) return; // 여기서 npc.xml 등 퀘스트에 필요한 파일을 읽는다. 만약 이미 이전에 읽었었다면 읽지 않는다. // 때문에 ZSurvival::OnDestroyOnce()는 명시적으로 호출하지 않음. OnCreateOnce(); Create(); // 라운드별 보상 XP BP 카운터를 초기화 m_nRewardBP = 0; m_nRewardXP = 0; m_nReachedRound = 0; m_nPoint = 0; // 서바이벌맵 해킹 감지 if (m_MapCatalogue.IsHacked()) { ZGetGameInterface()->ShowDisconnectMsg( MERR_FIND_HACKER, 30000 ); mlog(ZMsg(MSG_HACKING_DETECTED)); mlog("\nhacked XML.\n"); } }
bool ZSurvival::OnReadyToNewSector(MCommand* pCommand) { MUID uidPlayer; pCommand->GetParameter(&uidPlayer, 0, MPT_UID); m_CharactersGone.insert(uidPlayer); ZCharacter *pChar = ZGetCharacterManager()->Find(uidPlayer); // 내가 옵저브 하고 있는 캐릭터가 이동하면 다른 캐릭터로 바꾼다 if(ZGetCombatInterface()->GetObserver()->GetTargetCharacter()==pChar) { ZGetCombatInterface()->GetObserver()->ChangeToNextTarget(); } if (uidPlayer == ZGetGameClient()->GetPlayerUID()) { MoveToNextSector(); } else { // 해당 플레이어 이동 ZCharacter *pChar = ZGetCharacterManager()->Find(uidPlayer); if(pChar && m_CharactersGone.find(ZGetGameClient()->GetPlayerUID())!=m_CharactersGone.end()) { // 내가 이미 이동한 경우 해당플레이어를 보이게 만든다 // pChar->SetVisible(true); // 이번에 이동할 캐릭터의 위치 int nPosIndex = ZGetCharacterManager()->GetCharacterIndex(pChar->GetUID(), false); if (nPosIndex < 0) nPosIndex=0; else if (nPosIndex >= MAX_QUSET_PLAYER_COUNT) nPosIndex = MAX_QUSET_PLAYER_COUNT-1; ZMapSpawnData* pSpawnData = ZGetWorld()->GetDesc()->GetSpawnManager()->GetSoloData(nPosIndex); if(pSpawnData) { pChar->SetPosition(pSpawnData->m_Pos); pChar->SetDirection(pSpawnData->m_Dir); ZGetEffectManager()->AddReBirthEffect(pSpawnData->m_Pos); } else { _ASSERT(0); } } } return true; }
void ZApplication::ParseStandAloneArguments(const char* pszArgs) { char buffer[256]; char *str; str=strstr(pszArgs, ZTOKEN_GAME); if ( str != NULL) { #ifndef LOCALE_NHNUSA ZApplication::GetInstance()->m_nInitialState = GUNZ_GAME; if(GetNextName(buffer,sizeof(buffer),str+strlen(ZTOKEN_GAME))) { strcpy(m_szFileName,buffer); CreateTestGame(buffer); SetLaunchMode(ZLAUNCH_MODE_STANDALONE_GAME); return; } #endif } str=strstr(pszArgs, ZTOKEN_GAME_CHARDUMMY); if ( str != NULL) { ZApplication::GetInstance()->m_nInitialState = GUNZ_GAME; char szTemp[256], szMap[256]; int nDummyCount = 0, nShotEnable = 0; sscanf(str, "%s %s %d %d", szTemp, szMap, &nDummyCount, &nShotEnable); bool bShotEnable = false; if (nShotEnable != 0) bShotEnable = true; SetLaunchMode(ZLAUNCH_MODE_STANDALONE_GAME); CreateTestGame(szMap, nDummyCount, bShotEnable); return; } str=strstr(pszArgs, ZTOKEN_QUEST); if ( str != NULL) { SetLaunchMode(ZLAUNCH_MODE_STANDALONE_QUEST); return; } #ifndef LOCALE_NHNUSA #ifdef _QUEST str=strstr(pszArgs, ZTOKEN_GAME_AI); if ( str != NULL) { SetLaunchMode(ZLAUNCH_MODE_STANDALONE_AI); ZApplication::GetInstance()->m_nInitialState = GUNZ_GAME; char szTemp[256], szMap[256]; sscanf(str, "%s %s", szTemp, szMap); ZGetGameClient()->GetMatchStageSetting()->SetGameType(MMATCH_GAMETYPE_QUEST); CreateTestGame(szMap, 0, false, true, 0); return; } #endif #endif }
static bool WriteStageSetting(ZFile& File) { REPLAY_STAGE_SETTING_NODE rssn; GetReplayStageSetting(rssn, *ZGetGameClient()->GetMatchStageSetting()->GetStageSetting()); WRITE(rssn); return true; }
bool ZSurvival::OnMovetoPortal(MCommand* pCommand) { char nCurrSectorIndex; unsigned char nCurrRepeatIndex; MUID uidPlayer; pCommand->GetParameter(&nCurrSectorIndex, 0, MPT_CHAR); pCommand->GetParameter(&nCurrRepeatIndex, 1, MPT_UCHAR); pCommand->GetParameter(&uidPlayer, 2, MPT_UID); // 포탈로 이동한 사람이 자신이면 여기서 실제로 다음 섹터로 이동 if (uidPlayer == ZGetGameClient()->GetPlayerUID()) { m_bIsRoundClear = false; ZGetQuest()->GetGameInfo()->ClearNPCKilled(); // 여기서 새로운 섹터로 이동 m_GameInfo.OnMovetoNewSector((int)(nCurrSectorIndex), nCurrRepeatIndex); // 나 새로운 섹터로 왔다고 메시지를 보낸다. ZPostQuestReadyToNewSector(ZGetGameClient()->GetPlayerUID()); // 나를 npc 타겟팅 후보에서 뺀다 ZGetGame()->ExceptCharacterFromNpcTargetting( ZGetGameInterface()->GetMyCharacter()); } else { // 해당 플레이어 이동 ZCharacter *pChar = ZGetCharacterManager()->Find(uidPlayer); if(pChar && m_CharactersGone.find(ZGetGameClient()->GetPlayerUID())==m_CharactersGone.end()) { // 내가 아직 이동하지 않은 경우 해당플레이어를 안보이게 만든다 pChar->SetVisible(false); ZGetEffectManager()->AddReBirthEffect(pChar->GetPosition()); // 해당 플레이어를 npc 타겟팅 후보에서 뺀다 ZGetGame()->ExceptCharacterFromNpcTargetting(pChar); } } // 이 캐릭터를 타겟으로 하는 탄환이 있으면 제거한다 ZGetGame()->m_WeaponManager.DeleteWeaponHasTarget( uidPlayer ); return true; }
void ZActor::OnPeerDie(MUID& uidKiller) { bool bMyKill = (ZGetGameClient()->GetPlayerUID() == uidKiller); rvector pos_sound = GetPosition(); pos_sound.z += m_Collision.fHeight - 10.0f; ZApplication::GetSoundEngine()->PlayNPCSound(m_pNPCInfo->nID, NPC_SOUND_DEATH, pos_sound, bMyKill); }
bool ZModule_HPAP::CheckQuestCheet() { #ifdef _PUBLISH return false; #endif if (IsMyCharacter((ZObject*)m_pContainer)) { if ((ZIsLaunchDevelop()) && (ZGetGameClient()->GetServerMode() == MSM_TEST)) { if (ZGetGameTypeManager()->IsQuestDerived(ZGetGameClient()->GetMatchStageSetting()->GetGameType())) { if (ZGetQuest()->GetCheet(ZQUEST_CHEET_GOD) == true) return true; } } } return false; }
static bool WriteDuelInfo(ZFile& File) { assert(ZGetGameClient()->GetMatchStageSetting()->GetGameType() == MMATCH_GAMETYPE_DUEL); assert(dynamic_cast<ZRuleDuel*>(ZGetGameInterface()->GetGame()->GetMatch()->GetRule()) != nullptr); auto* RuleDuel = static_cast<ZRuleDuel*>(ZGetGameInterface()->GetGame()->GetMatch()->GetRule()); WRITE(RuleDuel->QInfo); return true; }
void ZVoteInterface::DrawVoteMessage(MDrawContext* pDC) // 투표가 진행중일때 메시지 { // 투표 진행중일때 메시지 if ( (ZGetGameInterface()->GetState() == GUNZ_GAME) && ZGetGameClient() && ZGetGameClient()->IsVoteInProgress() && ZGetGameClient()->CanVote() ) { MFont *pFont=ZGetGameInterface()->GetCombatInterface()->GetGameFont(); pDC->SetFont(pFont); pDC->SetColor(MCOLOR(0x80ffffff)); TextRelative(pDC,300.f/800.f,550/600.f,ZGetGameClient()->GetVoteMessage()); if(timeGetTime()/500 % 2 == 0 ) { TextRelative(pDC,300.f/800.f,565/600.f, ZMsg(MSG_VOTE_YESNO)); } } }
void ZSurvival::OnGameDestroy() { if (!ZGetGameTypeManager()->IsQuestDerived(ZGetGameClient()->GetMatchStageSetting()->GetGameType())) return; Destroy(); ZGetEffectManager()->EnableDraw(true); ZGetGame()->m_WeaponManager.EnableRender(true); ZGetWorldItemManager()->EnableDraw(true); }
void ZCombatQuestScreen::OnDraw(CCDrawContext* pDC) { ///////////////////////////////////////////// list<ZCharacter*> SortedCharacterList; for(ZCharacterManager::iterator itor = ZGetGame()->m_CharacterManager.begin(); itor != ZGetGame()->m_CharacterManager.end(); ++itor) { ZCharacter* pCharacter = (*itor).second; if (!pCharacter->IsVisible()) continue; SortedCharacterList.push_back(pCharacter); } SortedCharacterList.sort(CompareQuestScreenCharacter); /* int cnt = 0; for (list<ZCharacter*>::iterator itor = SortedCharacterList.begin(); itor != SortedCharacterList.end(); ++itor) { DrawPlayer(pDC, cnt, (*itor)); cnt++; } */ if ( ZGetQuest()->IsRoundClear()) { // 운영자 hide는 제외 bool bEventHide = false; if (ZGetMyInfo()->IsAdminGrade()) { CCMatchObjCache* pCache = ZGetGameClient()->FindObjCache(ZGetMyUID()); if (pCache && pCache->CheckFlag(CCTD_PlayerFlags_AdminHide)) bEventHide = true; } DWORD dwSec; DWORD dwCurrTime = timeGetTime(); if ( ZGetQuest()->GetRemainedTime() < dwCurrTime) dwSec = 0; else dwSec = (ZGetQuest()->GetRemainedTime() - dwCurrTime) / 1000; char szSec[ 10]; sprintf( szSec, "%d", dwSec); char szMsg[ 128]; ZTransMsg( szMsg, MSG_GAME_NEXT_N_MIN_AFTER, 1, szSec); pDC->SetFont( CCFontManager::Get("FONTa10_O2Wht")); pDC->SetColor(sColor(0xFFFFFFFF)); if (!bEventHide) TextRelative(pDC,400.f/800.f,500.f/600.f, szMsg, true); } }
static bool WriteGameTypeInfo(ZFile& File, ZCharacterManager& CharacterManager) { switch (ZGetGameClient()->GetMatchStageSetting()->GetGameType()) { case MMATCH_GAMETYPE_DUEL: V(WriteDuelInfo(File)); break; case MMATCH_GAMETYPE_GUNGAME: V(WriteGunGameInfo(File, CharacterManager)); break; } return true; }
bool ZSurvival::OnSectorStart(MCommand* pCommand) { char nSectorIndex; unsigned char nRepeatIndex; pCommand->GetParameter(&nSectorIndex, 0, MPT_CHAR); pCommand->GetParameter(&nRepeatIndex, 1, MPT_UCHAR); m_bIsRoundClear = false; ZGetQuest()->GetGameInfo()->ClearNPCKilled(); // 만약 섹터가 틀리면 강제로 이동한다. if (m_GameInfo.GetCurrSectorIndex() != nSectorIndex || m_GameInfo.GetCurrRepeatIndex() != nRepeatIndex) { // 새로운 섹터로 이동 m_GameInfo.OnMovetoNewSector((int)nSectorIndex, nRepeatIndex); MoveToNextSector(); } // 모든 사람들을 보여준다. for(ZCharacterManager::iterator i = ZGetCharacterManager()->begin();i!=ZGetCharacterManager()->end();i++) { i->second->SetVisible(true); } // npc의 타겟팅 후보 제외 목록을 비운다 ZGetGame()->ClearListExceptionFromNpcTargetting(); // 전 화면에서 남아있을 수 있는 탄을 제거한다 ZGetGame()->m_WeaponManager.Clear(); ZGetWorldItemManager()->Reset(); m_CharactersGone.clear(); // admin hide 이면 다시 옵저버를 활성화 MMatchObjCache* pObjCache = ZGetGameClient()->FindObjCache(ZGetMyUID()); if (pObjCache && pObjCache->CheckFlag(MTD_PlayerFlags_AdminHide)) { ZGetGameInterface()->GetCombatInterface()->SetObserverMode(true); } return true; }
bool ZSurvival::OnEntrustNPCControl(MCommand* pCommand) { MUID uidChar, uidNPC; pCommand->GetParameter(&uidChar, 0, MPT_UID); pCommand->GetParameter(&uidNPC, 1, MPT_UID); ZActor* pNPC = ZGetObjectManager()->GetNPCObject(uidNPC); if (pNPC) { // uidChar이 내플레이어 UID이면 해당 NPC는 내가 조종하는 것이다. bool bMyControl = (uidChar == ZGetGameClient()->GetPlayerUID()); pNPC->SetMyControl(bMyControl); ZCharacter *pOwner = ZGetCharacterManager()->Find(uidChar); if(pOwner) pNPC->SetOwner(pOwner->GetUserName()); } return true; }
void ZActor::PostBasicInfo() { DWORD nNowTime = GetGlobalTimeMS(); if (GetInitialized() == false) return; if(IsDie() && ZGetGame()->GetTime() - GetDeadTime()>5.f) return; int nMoveTick = (ZGetGameClient()->GetAllowTunneling() == false) ? PEERMOVE_TICK : PEERMOVE_AGENT_TICK; if ((int)(nNowTime - m_nLastTime[ACTOR_LASTTIME_BASICINFO]) >= nMoveTick) { m_nLastTime[ACTOR_LASTTIME_BASICINFO] = nNowTime; ZACTOR_BASICINFO pbi; pbi.fTime = ZGetGame()->GetTime(); pbi.uidNPC = GetUID(); pbi.posx = m_Position.x; pbi.posy = m_Position.y; pbi.posz = m_Position.z; pbi.velx = GetVelocity().x; pbi.vely = GetVelocity().y; pbi.velz = GetVelocity().z; pbi.dirx = GetDirection().x*32000.0f; pbi.diry = GetDirection().y*32000.0f; pbi.dirz = GetDirection().z*32000.0f; pbi.anistate = GetCurrAni(); ZPOSTCMD1(MC_QUEST_PEER_NPC_BASICINFO, MCommandParameterBlob(&pbi,sizeof(ZACTOR_BASICINFO))); ZBasicInfoItem Item; Item.info.position = m_Position; Item.info.direction = GetDirection(); Item.info.velocity = GetVelocity(); Item.fSendTime = Item.fReceivedTime = ZGetGame()->GetTime(); AddToHistory(Item); } }
void ZRoomListBox::RequestSelPrivateStageJoin() { MUID uidChar = ZGetGameClient()->GetPlayerUID(); ZIDLResource* pResource = ZApplication::GetGameInterface()->GetIDLResource(); MUID uidStageUID = GetSelectedPrivateStageUID(); if (uidStageUID == MUID(0,0)) uidStageUID = GetSelRoomUID(); if (uidStageUID != MUID(0,0)) { MEdit* pPassEdit = (MEdit*)pResource->FindWidget("PrivateStagePassword"); if (pPassEdit!=NULL) { char szPassword[256]; strcpy_safe(szPassword, pPassEdit->GetText()); ZPostRequestPrivateStageJoin(uidChar, uidStageUID, szPassword); ZApplication::GetGameInterface()->EnableLobbyInterface(false); } } }
bool ZSurvival::OnSetMonsterBibleInfo( MCommand* pCmd ) { if( 0 == pCmd ) return false; MUID uid; MCommandParameter* pParam; void* pMonBibleInfoBlob; MQuestMonsterBible* pMonBible; pCmd->GetParameter( &uid, 0, MPT_UID ); if( uid != ZGetGameClient()->GetPlayerUID() ) { return false; } pParam = pCmd->GetParameter(1); pMonBibleInfoBlob = pParam->GetPointer(); pMonBible = reinterpret_cast< MQuestMonsterBible* >( MGetBlobArrayElement(pMonBibleInfoBlob, 0) ); return true; }
bool ZSurvival::OnRefreshPlayerStatus(MCommand* pCommand) { // 운영자 hide는 제외 bool bAdminHide = false; if (ZGetMyInfo()->IsAdminGrade()) { MMatchObjCache* pCache = ZGetGameClient()->FindObjCache(ZGetMyUID()); if (pCache && pCache->CheckFlag(MTD_PlayerFlags_AdminHide)) bAdminHide = true; } if (!bAdminHide) { // 옵저버이거나 옵저버 예약상태를 푼다. ZGetGame()->ReleaseObserver(); // 죽어있으면 리스폰 if (ZGetGame()->m_pMyCharacter->IsDie()) { ZGetGame()->GetMatch()->RespawnSolo(); } } // 피와 총알을 채운다 for(ZCharacterManager::iterator i = ZGetCharacterManager()->begin();i!=ZGetCharacterManager()->end();i++) { ZCharacter* pCharacter = i->second; if (!pCharacter->IsAdminHide()) pCharacter->InitStatus(); } ZGetGame()->CancelSuicide(); return true; }