void ZActor::InitMesh(char* szMeshName, MQUEST_NPC nNPCType) { // for test RMesh* pMesh; pMesh = ZGetNpcMeshMgr()->Get(szMeshName); if(!pMesh) { _ASSERT(0); mlog("ZActor::InitMesh() - 원하는 모델을 찾을수 없음\n"); return; } int nVMID = g_pGame->m_VisualMeshMgr.Add(pMesh); if(nVMID==-1) mlog("ZActor::InitMesh() - 캐릭터 생성 실패\n"); RVisualMesh* pVMesh = g_pGame->m_VisualMeshMgr.GetFast(nVMID); SetVisualMesh(pVMesh); pVMesh->SetScale(rvector(15,15,15)); m_Animation.Set(ZA_ANIM_RUN); pVMesh->m_FrameInfo[0].m_pAniIdEventSet = ZGetAniEventMgr()->GetAniIDEventSet((int)nNPCType); }
bool ZSurvival::Load() { if (m_bLoaded) return true; string strFileDropTable(FILENAME_DROPTABLE); //#ifndef _DEBUG // strFileDropTable += ".mef"; //#endif if (!m_DropTable.ReadXml(ZApplication::GetFileSystem(), strFileDropTable.c_str())) { mlog("Error while Read m_DropTable %s", strFileDropTable.c_str()); return false; } string strFileNameZNPC(FILENAME_ZNPC_DESC); //#ifndef _DEBUG // strFileNameZNPC += ".mef"; //#endif if (!m_NPCCatalogue.ReadXml(ZApplication::GetFileSystem(), strFileNameZNPC.c_str())) { mlog("Error while Read Item Descriptor %s", strFileNameZNPC.c_str()); return false; } ProcessNPCDropTableMatching(); string strFileNameSurvivalMap(FILENAME_SURVIVALMAP); //#ifndef _DEBUG // strFileNameSurvivalMap += ".mef"; //#endif if (!m_MapCatalogue.ReadXml(ZApplication::GetFileSystem(), strFileNameSurvivalMap.c_str())) { mlog("Read Survivalmap Catalogue Failed"); return false; } //여기다 애니메이션 이벤트 xml 파일 읽는 부분을 추가해주고....... RAniEventMgr* AniEventMgr = ZGetAniEventMgr(); if (!AniEventMgr->ReadXml(ZApplication::GetFileSystem(), "System/AnimationEvent.xml")) { mlog("Read Animation Event Failed"); return false; } m_bLoaded = true; return true; }
void ZSurvival::Reload() { m_bLoaded = false; #ifdef _DEBUG ZApplication::GetSkillManager()->Destroy(); ZApplication::GetSkillManager()->Create(); #endif m_NPCCatalogue.Clear(); m_MapCatalogue.Clear(); m_DropTable.Clear(); RAniEventMgr* AniEventMgr = ZGetAniEventMgr(); AniEventMgr->Destroy(); Load(); }