コード例 #1
0
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);
	}
}
コード例 #2
0
ファイル: ZBrain.cpp プロジェクト: MagistrAVSH/node3d
float ZBrain::MakeSpeed( float fSpeed)
{
	MQuestNPCGlobalAIValue* pGlobalAIValue = ZGetQuest()->GetNPCCatalogue()->GetGlobalAIValue();
	float fShakingRatio = pGlobalAIValue->m_fSpeed_ShakingRatio;
	float fExtraValue = fSpeed * fShakingRatio;
	float fMinSpeed = max( (fSpeed - fExtraValue), 0.0f);
	float fMaxSpeed = fSpeed + fExtraValue;

	return RandomNumber( fMinSpeed, fMaxSpeed);
}
コード例 #3
0
ファイル: ZSurvival.cpp プロジェクト: MagistrAVSH/node3d
bool ZSurvival::OnCreate()
{
	memset(&m_Cheet, 0, sizeof(m_Cheet));
	m_bIsRoundClear = false;
	ZGetQuest()->GetGameInfo()->ClearNPCKilled();
	m_fLastWeightTime = 0.0f;

	//m_Map.Init();
	LoadNPCMeshes();
	LoadNPCSounds();

	return ZGetScreenEffectManager()->CreateQuestRes();
}
コード例 #4
0
ファイル: ZBrain.cpp プロジェクト: MagistrAVSH/node3d
float ZBrain::MakeAttackUpdateTime( char nAgility)
{
	MQuestNPCGlobalAIValue* pGlobalAIValue = ZGetQuest()->GetNPCCatalogue()->GetGlobalAIValue();
	float fShakingRatio = pGlobalAIValue->m_fAttack_ShakingRatio;
	float fTime = pGlobalAIValue->m_fAttackUpdateTime[ nAgility - 1];
	float fExtraValue = fTime * fShakingRatio;
	float fMinTime = fTime - fExtraValue;
	if ( fMinTime < 0.0f)
		fMinTime = 0.0f;
	float fMaxTime = fTime + fExtraValue;

	return RandomNumber( fMinTime, fMaxTime);
}
コード例 #5
0
ファイル: ZBrain.cpp プロジェクト: MagistrAVSH/node3d
float ZBrain::MakePathFindingUpdateTime( char nIntelligence)
{
	MQuestNPCGlobalAIValue* pGlobalAIValue = ZGetQuest()->GetNPCCatalogue()->GetGlobalAIValue();
	float fShakingRatio = pGlobalAIValue->m_fPathFinding_ShakingRatio;
	float fTime = pGlobalAIValue->m_fPathFindingUpdateTime[ nIntelligence - 1];
	float fExtraValue = fTime * fShakingRatio;
	float fMinTime = fTime - fExtraValue;
	if ( fMinTime < 0.0f)
		fMinTime = 0.0f;
	float fMaxTime = fTime + fExtraValue;

	return RandomNumber( fMinTime, fMaxTime);
}
コード例 #6
0
ファイル: ZSurvival.cpp プロジェクト: MagistrAVSH/node3d
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;
}
コード例 #7
0
ファイル: ZSurvival.cpp プロジェクト: MagistrAVSH/node3d
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;
}
コード例 #8
0
ファイル: ZActor.cpp プロジェクト: Asunaya/RefinedGunz
void ZActor::InitStatus() 
{
	int nMaxHP = m_pNPCInfo->nMaxHP;
	int nMaxAP = m_pNPCInfo->nMaxAP;

	nMaxHP = ZActor::CalcMaxHP(m_nQL, nMaxHP);
	nMaxAP = ZActor::CalcMaxAP(m_nQL, nMaxAP);

	m_pModule_HPAP->SetMaxHP(nMaxHP);
	m_pModule_HPAP->SetMaxAP(nMaxAP);

	if (ZGetQuest()->GetCheet(ZQUEST_CHEET_WEAKNPCS) == true) nMaxHP = 1;

	m_pModule_HPAP->SetHP(nMaxHP);
	m_pModule_HPAP->SetAP(nMaxAP);
	m_pModule_HPAP->SetRealDamage(true);

	EmptyHistory();
}
コード例 #9
0
ファイル: ZModule_HPAP.cpp プロジェクト: Asunaya/RefinedGunz
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;
}
コード例 #10
0
ファイル: ZActor.cpp プロジェクト: Asunaya/RefinedGunz
void ZActor::OnDamaged(ZObject* pAttacker, rvector srcPos, ZDAMAGETYPE damageType, MMatchWeaponType weaponType,
	float fDamage, float fPiercingRatio, int nMeleeType)
{
	if (!CheckFlag(AF_SOUND_WOUNDED))
	{
		bool bMyKill = false;
		if (pAttacker)
		{
			bMyKill = (pAttacker == g_pGame->m_pMyCharacter);
		}

		rvector pos_sound = GetPosition();
		pos_sound.z += m_Collision.fHeight - 10.0f;
		ZApplication::GetSoundEngine()->PlayNPCSound(m_pNPCInfo->nID, NPC_SOUND_WOUND, pos_sound, bMyKill);
		SetFlag(AF_SOUND_WOUNDED, true);		
	}

	if ((m_pNPCInfo->nGrade == NPC_GRADE_BOSS) || (m_pNPCInfo->nGrade == NPC_GRADE_LEGENDARY))
	{
		if (ZGetQuest()->GetGameInfo()->GetBoss() == GetUID())
		{
			ZGetScreenEffectManager()->ShockBossGauge(fDamage);
		}
	}

	if ((damageType == ZD_BULLET) || (damageType == ZD_BULLET_HEADSHOT))
	{
		m_nDamageCount++;
	}

	if(CheckFlag(AF_MY_CONTROL))
	{
		bool bSkipDamagedAnimation = false;

		if(m_pNPCInfo->bNeverAttackCancel ) {

			bSkipDamagedAnimation = ZActorAnimation::IsSkippableDamagedAnimation(GetCurrAni());
		}

		if(bSkipDamagedAnimation==false) {
		
			if((damageType==ZD_MELEE) || (damageType==ZD_KATANA_SPLASH)) {

				ZCharacterObject* pCObj = MDynamicCast(ZCharacterObject, pAttacker);

				bool bLightningDamage = false;

				if(pCObj) {
					ZC_ENCHANT etype = pCObj->GetEnchantType();
					if( etype == ZC_ENCHANT_LIGHTNING )
						bLightningDamage = true;	
				}

				if(bLightningDamage && (damageType==ZD_KATANA_SPLASH)) {
					m_Animation.Input(ZA_EVENT_LIGHTNING_DAMAGED);
				}
				else {
					if(nMeleeType%2)
						m_Animation.Input(ZA_EVENT_MELEE_DAMAGED1);
					else
						m_Animation.Input(ZA_EVENT_MELEE_DAMAGED2);

				}
				SetVelocity(0,0,0);
			}
			else {
				if( GetNPCInfo()->bNeverPushed == false)
				{
					if (m_nDamageCount >= 5)
					{
						m_Animation.Input(ZA_EVENT_RANGE_DAMAGED);
						m_nDamageCount = 0;
					}
				}
			}
		}
	}

	ZObject::OnDamaged(pAttacker,srcPos,damageType,weaponType,fDamage,fPiercingRatio,nMeleeType);
}
コード例 #11
0
// LoadMonsterBookInfo
bool ZMonsterBookInterface::LoadMonsterBookInfo( void)
{
	// 몬스터 도감 페이지 정보 리스트 삭제
	if ( !m_mapMonsterBookPage.empty())
	{
		for ( ZMonsterBookPageItr itr = m_mapMonsterBookPage.begin();  itr != m_mapMonsterBookPage.end();  itr++)
			delete (*itr).second;

		m_mapMonsterBookPage.clear();
	}


	// NPC 정보를 구함
	ZGetQuest()->Load();
	CCQuestNPCCatalogue* pNPCCatalogue = ZGetQuest()->GetNPCCatalogue();
	if ( pNPCCatalogue == NULL)
		return false;


	int nTotalItemCount = 0;
	int nTotalCollectItemCount = 0;
	m_nTotalPageNum = 0;


	for ( map<CCQUEST_NPC, CCQuestNPCInfo*>::iterator itr = pNPCCatalogue->begin();  itr != pNPCCatalogue->end();  itr++)
	{
		// 하드 코드 : 이벤트용 NPC인 경우엔 빼준다
		if ( (*itr).first >= 100)
			continue;


		// 리스트 노드 생성
		CCQuestNPCInfo* pNPCInfo = (*itr).second;
		ZMonsterBookPageInfo* pMonsterBookPageInfo = new ZMonsterBookPageInfo;

		pMonsterBookPageInfo->m_nID			= (*itr).first;
		pMonsterBookPageInfo->m_strName		= pNPCInfo->szName;
		pMonsterBookPageInfo->m_nGrade		= (int)pNPCInfo->nGrade;
		pMonsterBookPageInfo->m_strDesc		= pNPCInfo->szDesc;
		pMonsterBookPageInfo->m_nHP			= pNPCInfo->nMaxHP;


		// 스킬 정보를 구함
		for ( int i = 0;  i < pNPCInfo->nSkills;  i++)
		{
			ZSkillManager* pSkillMgr = ZGetApplication()->GetSkillManager();
			map<int,ZSkillDesc*>::iterator itrSkill = pSkillMgr->find( pNPCInfo->nSkillIDs[ i]);
			if ( itrSkill != pSkillMgr->end())
			{
				string strSkill = (*itrSkill).second->szName;

				pMonsterBookPageInfo->m_Skill.push_back( strSkill);
			}
		}


		// 드롭 아이템 목록을 구함
		CCQuestDropSet* pDropItem = ZGetQuest()->GetDropTable()->Find( pNPCInfo->nDropTableID);
		if ( pDropItem)
		{
			// 드롭 아이템 갯수
			int nDropItemCount = (int)pDropItem->GetQuestItems().size();
			nTotalItemCount += nDropItemCount;


			// 수집한 아이템 갯수
			int nCollectItemCount = 0;


			for ( set<int>::iterator itrItem = pDropItem->GetQuestItems().begin();  itrItem != pDropItem->GetQuestItems().end();  itrItem++)
			{
				ZDropItemInfo* pItemNode = new ZDropItemInfo;

				// 아이템을 획득한적이 있는지 검사
				ZMyQuestItemMap::iterator itr = ZGetMyInfo()->GetItemList()->GetQuestItemMap().find( *itrItem);
				if ( itr != ZGetMyInfo()->GetItemList()->GetQuestItemMap().end())
				{
					// 획득한 아이템 갯수 추가
					nCollectItemCount++;


					// 아이템 정보를 구함
					CCQuestItemDesc* pQItemDesc = GetQuestItemDescMgr().FindQItemDesc( *itrItem);
					if ( pQItemDesc)
					{
						pItemNode->m_strName	= pQItemDesc->m_szQuestItemName;
						pItemNode->m_pIcon		= ZGetGameInterface()->GetQuestItemIcon( *itrItem, false);
					}
					else
					{
						CCMatchItemDesc* pItemDesc = CCGetMatchItemDescMgr()->GetItemDesc( *itrItem);
						if ( pItemDesc)
						{
							pItemNode->m_strName	= pItemDesc->m_pMItemName->Ref().m_szItemName;
							pItemNode->m_pIcon		= GetItemIconBitmap( pItemDesc);
						}
					}
				}
				// 획득한 적이 없으면 ???로 표시
				else
				{
					pItemNode->m_strName	= "?????";
					pItemNode->m_pIcon		= CCBitmapManager::Get( "slot_icon_unknown.tga");
				}


				// 노드 추가
				pMonsterBookPageInfo->m_DropItem.push_back( pItemNode);
			}


			// 전체 수집한 아이템 갯수 추가
			nTotalCollectItemCount += nCollectItemCount;
	
			
			// 페이지 달성률 구함
			if ( nDropItemCount > 0)
				pMonsterBookPageInfo->m_fCompleteRate = (float)nCollectItemCount / (float)nDropItemCount * 100.0f;
		}


		// 노드 추가
		m_mapMonsterBookPage.insert( ZMonsterBookPage::value_type( m_nTotalPageNum + 1, pMonsterBookPageInfo));
		m_nTotalPageNum++;
	}


	// 전체 달성률
	if ( nTotalItemCount > 0)
		m_fCompleteRate	= (float)nTotalCollectItemCount / (float)nTotalItemCount * 100.0f;


	return true;
}
コード例 #12
0
bool ZGameInput::OnDebugEvent(MEvent* pEvent)
{
#ifdef _PUBLISH

	return false;
#endif

	static bool bMusicMute = false;

	switch(pEvent->nMessage){
	case MWM_KEYDOWN:
		{
			switch (pEvent->nKey)
			{
			case VK_END:
				{
					ZGetGameInterface()->m_bTeenVersion = !ZGetGameInterface()->m_bTeenVersion;
				}
				return true;

			case VK_INSERT:
				{
					g_debug_render_mode++;
					if(g_debug_render_mode > 3)
						g_debug_render_mode = 0;
				}
				return true;

			case VK_DELETE:
				{
					g_bVertex_Soft = !g_bVertex_Soft;
				}
				return true;

			
			//---------------------------------------------------------------------------------------------------
			// VK_F1 부터 VK_F8 까지는 새로운 키맵핑을 위해, Ctrl을 눌렀을 때 동작하도록 수정!
			// Added By 홍기주
			case VK_F1:
				{
					if( pEvent->bCtrl ) {
						ZGetGame()->m_pMyCharacter->SetVisible( !ZGetGame()->m_pMyCharacter->IsVisible() );
					}

					return false;					
				}				
				

			case VK_F2: 
				{
					if( pEvent->bCtrl ) {
						ZGetGameInterface()->ShowInterface(	!ZGetGameInterface()->IsShowInterface() );
					}
					
					return false;
				}
				

			case VK_F3:
				{
					if( pEvent->bCtrl ) {
						if (ZIsLaunchDevelop()) {
							ZApplication::GetGameInterface()->GetScreenDebugger()->SwitchDebugInfo();
							return true;
						}						
					}

					return false;
				}
				

			case VK_F4:
				{
					if( pEvent->bCtrl ) {
						ZGetGame()->m_bShowWireframe=!ZGetGame()->m_bShowWireframe;
						return true;
					}

					return false;
				}

			case VK_F5: 
				{
					if( pEvent->bCtrl ) {
						m_bCTOff = !m_bCTOff;
						RMesh::SetTextureRenderOnOff(m_bCTOff);
						return true;
					}

					return false;
				}
				

			case VK_F6:
				{
					if( pEvent->bCtrl ) {
						g_debug_rot =!g_debug_rot;
						return true;
					}

					return false;
				}

			case VK_F7: 
				{	
					if( pEvent->bCtrl ) {
						// 프로파일링 시작/끝
						extern bool g_bProfile;
						if(g_bProfile) {
							ZPOSTCMD0(ZC_END_PROFILE);
							ZChatOutput("Profile saved.");
						} else {
							ZPOSTCMD0(ZC_BEGIN_PROFILE);
							ZChatOutput("Profile started.");
						}
						return true;
					}

					return false;
				}


			case VK_F8:
				{
					if( pEvent->bCtrl ) {
						RSolidBspNode::m_bTracePath = !RSolidBspNode::m_bTracePath;
					}
					return false;
				}

			case VK_F9:
				{
					static int nIndex = 0;
					nIndex++; if (nIndex >= 2) nIndex = 0;

					if (nIndex == 0)
					{
						ZGetGameInterface()->m_bViewUI = true;
						ZGetGameInterface()->GetGame()->m_pMyCharacter->SetVisible(true);

					}
					else if (nIndex == 1)
					{
						ZGetGameInterface()->m_bViewUI = false;
						ZGetGame()->m_pMyCharacter->SetVisible(false);
						ZGetGameInterface()->GetCombatInterface()->ShowCrossHair(false);
					}
				}
				return false;

			case 'U': {

				ZC_ENCHANT zctype;
//				int Module = 20;

				if(ZGetGame() && ZGetGame()->m_pMyCharacter ) {

					zctype = ZGetGame()->m_pMyCharacter->GetEnchantType();

//						 if(zctype==ZC_ENCHANT_FIRE)		Module = ZMID_FIREDAMAGE;
//					else if(zctype==ZC_ENCHANT_COLD)		Module = ZMID_COLDDAMAGE;
//					else if(zctype==ZC_ENCHANT_LIGHTNING)	Module = ZMID_LIGHTNINGDAMAGE;
//					else if(zctype==ZC_ENCHANT_POISON)		Module = ZMID_POISONDAMAGE;

					if(zctype==ZC_ENCHANT_FIRE) {
						ZModule_FireDamage *pModule = (ZModule_FireDamage*)ZGetGame()->m_pMyCharacter->GetModule(ZMID_FIREDAMAGE);
						pModule->BeginDamage(ZGetGame()->m_pMyCharacter,5,10);
					}
					else if(zctype==ZC_ENCHANT_COLD) {
						ZModule_ColdDamage *pModule = (ZModule_ColdDamage*)ZGetGame()->m_pMyCharacter->GetModule(ZMID_COLDDAMAGE);
						pModule->BeginDamage(10,50);
					}
					else if(zctype==ZC_ENCHANT_LIGHTNING) {
						ZModule_LightningDamage *pModule = (ZModule_LightningDamage*)ZGetGame()->m_pMyCharacter->GetModule(ZMID_LIGHTNINGDAMAGE);
						pModule->BeginDamage(ZGetGame()->m_pMyCharacter,5,10);
					}
					else if(zctype==ZC_ENCHANT_POISON) {
						ZModule_PoisonDamage *pModule = (ZModule_PoisonDamage*)ZGetGame()->m_pMyCharacter->GetModule(ZMID_POISONDAMAGE);
						pModule->BeginDamage(ZGetGame()->m_pMyCharacter,5,10);
					}
				}

				//g_pGame->m_pMyCharacter->ShotBlocked();
//				ZApplication::GetSoundEngine()->StopMusic();
				//ZApplication::GetSoundEngine()->load_preset();
					  }break;

			case 'M':
				{
					if (ZApplication::GetInstance()->GetLaunchMode()==ZApplication::ZLAUNCH_MODE_STANDALONE_GAME)
					{

						// 혼자테스트할때 되살아나기
						if (ZGetGame()->GetMatch()->IsTeamPlay())
						{
							ZCharacter* pCharacter = ZGetGame()->m_pMyCharacter;
							pCharacter->InitStatus();
							rvector pos=rvector(0,0,0), dir=rvector(0,1,0);

							static int nTeamIndex = 0;
							static int nSpawnIndex = 0;

							ZMapSpawnData* pSpawnData = ZGetGame()->GetMapDesc()->GetSpawnManager()->GetTeamData(nTeamIndex, nSpawnIndex);
							if (pSpawnData != NULL)
							{
								pos = pSpawnData->m_Pos;
								dir = pSpawnData->m_Dir;
							}

							pCharacter->SetPosition(pos);
							pCharacter->SetDirection(dir);

							nSpawnIndex++;
							if (nSpawnIndex >= 16) 
							{
								nSpawnIndex = 0;
								nTeamIndex++;
								if (nTeamIndex >= 2) nTeamIndex=0;
							}
						}
						else
						{
							if(ZGetGame()->m_CharacterManager.size()==1)
								ZGetGameInterface()->RespawnMyCharacter();
						}
					}

				}break;

			case 'C' : {
//				ZModule_Skills *pmod = (ZModule_Skills *)g_pGame->m_pMyCharacter->GetModule(ZMID_SKILLS);
//				pmod->Excute(0,MUID(0,0),rvector(0,0,0));
					
//				g_pGame->UpdateCombo(true);


					   }break;

#ifdef _DEBUG
			case 'G' : {
//						MNewMemories::Dump();
//						g_pGame->m_pMyCharacter->m_bGuardTest=!g_pGame->m_pMyCharacter->m_bGuardTest;
					   }break;
#endif

				// 테스트용..
			case 'I' : ZGetGame()->m_pMyCharacter->AddIcon(rand()%5); return true;
				// 테스트^^

			case 'F' : DumpFontTexture(); return true;
//			case 'F' : 
//				{
//					static bool toggle = false;
//					if(toggle)
//						ZGetInput()->SetDeviceForcesXY(1,1);
//					else
//						ZGetInput()->SetDeviceForcesXY(0,0);
//					toggle=!toggle;
//					return true;
//				}
			case 'L' :
				{
//					rvector pos = g_pGame->m_pMyCharacter->GetPosition();
//					pos.x += 1000.0f;
//					ZApplication::GetSoundEngine()->PlayNPCSound(NPC_GOBLIN, NPC_SOUND_WOUND, pos, true);

					ZApplication::GetGameInterface()->FinishGame();
//					ZGetScreenEffectManager()->AddScreenEffect("teamredwin");

					/*
					g_pGame->m_pMyCharacter->m_Position = rvector( 2712.99805 , -1691.46191 , 2649.13403 );
					g_pGame->m_pMyCharacter->Move(rvector( 2.561 , -7.040 , -6.471 ));
					*/

					/*
					g_pGame->m_pMyCharacter->m_Position = rvector( 2713.05347 , -1691.56250 , 2929.06738 );
					g_pGame->m_pMyCharacter->Move(rvector( 0.00000000 , 0.00000000 , -2.07031250 ));
					*/

					/*
					g_pGame->m_pMyCharacter->m_Position = rvector( 1648.73877 ,8691.30176 ,1501.03381 -120);
					g_pGame->m_pMyCharacter->Move(rvector( -0.134,0.004, -0.986 ));
					g_pGame->m_pMyCharacter->m_Velocity = rvector( -450,0,0);
					
					ZPostLocalMessage(MSG_HACKING_DETECTED);
					

					ZGetEffectManager()->AddShotgunEffect(rvector(0,0,100),rvector(0,0,100),rvector(0,1,0),g_pGame->m_pMyCharacter);
					*/
				}break;

			case 'K':
				{
//					rvector pos = g_pGame->m_pMyCharacter->GetPosition();
//					pos.x += 1000.0f;
//					ZApplication::GetSoundEngine()->PlayNPCSound(NPC_GOBLIN, NPC_SOUND_WOUND, pos, false);

//					ZGetGameInterface()->GetCamera()->Shock(2000.f, .5f, rvector(0.0f, 0.0f, -1.0f));
					ZGetScreenEffectManager()->ShockBossGauge(35.0f);

					static int n = 0; n++;
					ZGetScreenEffectManager()->AddKO(n);

//					g_pGame->m_pMyCharacter->OnBlast(rvector(1,0,0));
//					ZGetGameInterface()->GetCamera()->Shock(500.f, .5f, rvector(0.0f, 0.0f, -1.0f));
				}break;
			case 'B':
				{
					// test
					ZCombatInterface* pCombatInterface = ZGetGameInterface()->GetCombatInterface();
					pCombatInterface->SetObserverMode(!pCombatInterface->GetObserver()->IsVisible());
				}
				return true;
			case 'N':
				{
					ZCombatInterface* pCombatInterface = ZGetGameInterface()->GetCombatInterface();
					if(pCombatInterface->GetObserverMode())
						pCombatInterface->GetObserver()->ChangeToNextTarget();
				}
				return true;
			case 'P':
				{
					// test
//					g_pGame->m_pMyCharacter->OnKnockback(rvector(1.0f, 0.0f, 0.0f),200.f);
					ZGetEffectManager()->AddMethorEffect(rvector(0,0,0) , 1 );

				}
				return true;
			case 'O':
				{
					if (ZApplication::GetInstance()->GetLaunchMode()==ZApplication::ZLAUNCH_MODE_STANDALONE_AI)
					{
						ZGetObjectManager()->ClearNPC();
						// npc 생성 test
						MUID uidNPC = MUID(0,0);
						uidNPC.High = rand() % RAND_MAX;
						uidNPC.Low = rand() % RAND_MAX;

						int nNPCType = rand() % NPC_GOBLIN_KING+1;

						nNPCType = NPC_GOBLIN_GUNNER;
						rvector ranpos = rvector(0, 0, 0);

						MQuestNPCInfo* pNPCInfo = NULL;

						if(ZGetQuest())
							pNPCInfo = 	ZGetQuest()->GetNPCInfo(MQUEST_NPC(nNPCType));

						ZActor* pNewActor = ZActor::CreateActor(MQUEST_NPC(nNPCType), 1.0f, 0);
						if (pNewActor)
						{
							pNewActor->SetUID(uidNPC);
							pNewActor->SetPosition(ranpos);
							pNewActor->SetMyControl(true);

							if(pNewActor->m_pVMesh && pNPCInfo) {

								D3DCOLORVALUE color;

								color.r = pNPCInfo->vColor.x;
								color.g = pNPCInfo->vColor.y;
								color.b = pNPCInfo->vColor.z;
								color.a = 1.f;

								pNewActor->m_pVMesh->SetNPCBlendColor(color);//색을 지정한 경우..
							}

							ZGetObjectManager()->Add(pNewActor);
							ZGetEffectManager()->AddReBirthEffect(ranpos);
						}
					}
				}
				return true;
			
/*
			case VK_HOME:

				if(ZGetGameInterface()->GetGame()) {
					RFrameTime* ft = &ZGetGameInterface()->GetGame()->m_pMyCharacter->m_pVMesh->m_FrameTime;

					if( ft->m_bActive ) {
						ft->Stop();
					}
					else {
						ft->Start(20,300);
					}
				}
				return true;
*/
			// 앞으로는 NUMPAD는 매크로로 사용될 것이다. 하하!
			// 그러므로, NUMPAD1~NUMPAD9는 Return false로 수정!
			case VK_NUMPAD0: ZGetGameInterface()->TestToggleCharacter();return true;
			case VK_NUMPAD1: ZGetGameInterface()->TestChangeParts(0);	return false;
			case VK_NUMPAD2: ZGetGameInterface()->TestChangeParts(1);	return false;
			case VK_NUMPAD3: ZGetGameInterface()->TestChangeParts(2);	return false;
			case VK_NUMPAD4: ZGetGameInterface()->TestChangeParts(3);	return false;
			case VK_NUMPAD5: ZGetGameInterface()->TestChangeParts(4);	return false;
			case VK_NUMPAD6: ZGetGameInterface()->TestChangeParts(5);	return false;
			case VK_NUMPAD7: ZGetGameInterface()->TestChangeWeapon();	return false;			
			case VK_NUMPAD9:
				bMusicMute = !bMusicMute;
				ZGetSoundEngine()->SetMusicMute(bMusicMute);
				return false;

			/* 이게 뭐꼬 ? -_-
			case VK_OEM_3:	// `
				{
					ZGetGameInterface()->SetCursorEnable(
						!ZGetGameInterface()->IsCursorEnable());
				}
				return true;
			*/

#ifdef USING_VERTEX_SHADER
			case 'V':
				{
					//RShaderMgr::shader_enabled = !RShaderMgr::shader_enabled;
					RShaderMgr::mbUsingShader = !RShaderMgr::mbUsingShader;
				}
				return false;
#endif			

			}

		}
		break;

	} // switch

	return false;
}