GunZ 1.5 (Summer of 2011) Source.

Page 7 of 12 FirstFirst 123456789101112 LastLast
Results 91 to 105 of 168
  1. #91
    Account Upgraded | Title Enabled! jewness12 is offline
    MemberRank
    Aug 2009 Join Date
    213Posts

    Re: GunZ 1.5 (Summer of 2011) Source.

    Quote Originally Posted by ThePhailure772 View Post
    Code:
    #include "stdafx.h"
    #include "ZRuleQuestChallenge.h"
    #include "ZMatch.h"
    #include "MActorDef.h"
    #include "MNewQuestScenario.h"
    #include "ZFSMManager.h"
    #include "ZActorActionManager.h"
    #include "ZActorAction.h"
    #include "ZActorWithFSM.h"
    #include "ZApplication.h"
    #include "ZFSMManager.h"
    #include "ZFSMParser.h"
    #include "ZFSM.h"
    
    ZRuleQuestChallenge::ZRuleQuestChallenge(ZMatch* pMatch) 
     : ZRule(pMatch)
     , m_pFsmManager(new ZFSMManager)
     , m_pActorDefMgr(new MActorDefManager)
     , m_pActorActionMgr(new ZActorActionManager)
     , m_pScenario(NULL)
     , m_nCurrSector(0)
    {
    }
    
    ZRuleQuestChallenge::~ZRuleQuestChallenge()
    {
    	delete m_pFsmManager;
    	delete m_pActorDefMgr;
    	delete m_pActorActionMgr;
    }
    
    bool ZRuleQuestChallenge::LoadScenarioMap(const char* szScenarioName)
    {
    	MNewQuestScenarioManager* pScenarioMgr = ZApplication::GetStageInterface()->GetChallengeQuestScenario();
    	if (!pScenarioMgr) { _ASSERT(0); return false; }
    	MNewQuestScenario* pScenario = pScenarioMgr->GetScenario(szScenarioName);
    	if (!pScenario) { _ASSERT(0); return false; }
    
    	int numSector = pScenario->GetNumSector();
    	for (int i=0; i<numSector; ++i)
    	{
    		MNewQuestSector* pSector = pScenario->GetSector(i);
    		if (!pSector)  { _ASSERT(0); return false; }
    
    		const char* szMapName = pSector->GetMapName();
    		_ASSERT(0 != strlen(szMapName));
    		ZGetWorldManager()->AddWorld(szMapName);
    	}
    
    	return true;
    }
    
    int ZRuleQuestChallenge::GetRoundMax()
    {
    	if (!m_pScenario) {
    		_ASSERT(0);
    		return 1;
    	}
    
    	return m_pScenario->GetNumSector();
    }
    
    
    bool ZRuleQuestChallenge::Init()
    {
    	//todok quest °ÔÀÓÀ» ÇÒ¶§¸¶´Ù »õ·Î ·ÎµùÇÏ´Â °ÍÀ» °³¼±ÇÏÀÚ.
    
    	// npc action Àбâ
    	string strActionFile("system/zactoraction.xml");
    #ifndef _DEBUG
    	strActionFile += ".mef";
    #endif
    	if (!m_pActorActionMgr->ReadXml(ZApplication::GetFileSystem(), strActionFile.c_str()))
    	{
    		mlog("Error while Load %s\n", strActionFile.c_str());
    		return false;
    	}
    
    	// npc fsm ±â¹Ý AI Àбâ
    	string strAIFSMFile("system/aifsm.xml");
    #ifndef _DEBUG
    	strAIFSMFile += ".mef";
    #endif
    	vector<ZFSM*> vecFSM;
    	ZFSMParser fsmParser;
    	if (!fsmParser.ReadXml(ZApplication::GetFileSystem(), strAIFSMFile.c_str(), vecFSM, m_pActorActionMgr))
    	{
    		mlog("Error while Load %s\n", strAIFSMFile.c_str());
    		return false;
    	}
    	m_pFsmManager->AddFsm(&vecFSM[0], (unsigned int)vecFSM.size());
    
    
    	// npc ¸ðµ¨ Àбâ
    	string strNpcMeshListFile("model/npc2.xml");
    #ifndef _DEBUG
    	strNpcMeshListFile += ".mef";
    #endif	
    	if (ZGetNpcMeshMgr()->LoadXmlList(strNpcMeshListFile.c_str()) == -1)
    	{
    		mlog("Error while Load %s\n", strNpcMeshListFile.c_str());
    		return false;
    	}
    
    	// npc Á¤ÀÇ Àбâ
    	string strNpcDefFile("system/npc2.xml");
    #ifndef _DEBUG
    	strNpcDefFile += ".mef";
    #endif
    	if (!m_pActorDefMgr->ReadXml(ZApplication::GetFileSystem(), strNpcDefFile.c_str()))
    	{
    		mlog("Error while Read %s\n", strNpcDefFile.c_str());
    		return false;
    	}
    
    
    	// ÀÌ Äù½ºÆ®ÀÇ ½Ã³ª¸®¿À °´Ã¼ ¾Ë¾ÆµÎ±â
    	const char* szScenarioName = ZGetGameClient()->GetMatchStageSetting()->GetMapName();
    	
    	MNewQuestScenarioManager* pScenarioMgr = ZApplication::GetStageInterface()->GetChallengeQuestScenario();
    	if (!pScenarioMgr) { _ASSERT(0); return false; }
    	MNewQuestScenario* pScenario = pScenarioMgr->GetScenario(szScenarioName);
    	if (!pScenario) { _ASSERT(0); return false; }
    
    	m_pScenario = pScenario;
    
    	m_nCurrSector = 0;
    
    	return true;
    }
    
    void ZRuleQuestChallenge::OnUpdate( float fDelta )
    {
    	if (ZGetGame() == NULL) return;
    
    	//MUID uidChar(ZGetMyUID());
    	//static int tempUid = 111;
    	//MUID uidNPC(1,tempUid);
    	////unsigned char nNPCType, nPositionIndex;
    
    	////pCommand->GetParameter(&uidChar,			0, MPT_UID);
    	////pCommand->GetParameter(&uidNPC,				1, MPT_UID);
    	////pCommand->GetParameter(&nNPCType,			2, MPT_UCHAR);
    	////pCommand->GetParameter(&nPositionIndex,		3, MPT_UCHAR);
    
    	//// ÀÏ´Ü Á×Àº ³ðÀº Á¦°ÅÇÑ´Ù
    	//ZNPCObjectMap* pNpcMap = ZGetObjectManager()->GetNPCObjectMap();
    	//for (ZNPCObjectMap::iterator it=pNpcMap->begin(); it!=pNpcMap->end(); )
    	//{
    	//	if (it->second->IsDie())
    	//	{
    	//		delete it->second;
    	//		it = pNpcMap->erase(it);
    	//	}
    	//	else
    	//		++it;
    	//}
    
    	//// µ¿½Ã ½ºÆù ¼ö¸¦ Á¦ÇÑÇÑ´Ù
    	//if (5 <= pNpcMap->size())
    	//	return;
    
    	//tempUid++;
    	//uidNPC = MUID(1, tempUid);
    
    	///*
    	//MQUEST_NPC NPCType = NPC_GOBLIN_GUNNER;
    
    	////ZMapSpawnType nSpawnType = ZMST_NPC_MELEE;
    
    	//ZMapSpawnManager* pMSM = ZGetGame()->GetMapDesc()->GetSpawnManager();
    
    	//MQuestNPCInfo* pNPCInfo = ZGetQuest()->GetNPCCatalogue()->GetInfo(NPCType);
    	////MQuestNPCInfo* pNPCInfo = GetNPCInfo(NPCType);
    	//if (pNPCInfo == NULL) return;
    
    	//ZMapSpawnData* pSpawnData = pMSM->GetSpawnData(ZMST_NPC_MELEE, 0);
    
    	//rvector NPCPos = rvector(0,0,0);
    	//rvector NPCDir = rvector(1,0,0);
    
    	//if (pSpawnData)
    	//{
    	//	NPCPos = pSpawnData->m_Pos;
    	//	NPCDir = pSpawnData->m_Dir;
    	//}*/
    
    	//bool bMyControl = (uidChar == ZGetMyUID());
    	//SpawnActor("knifeman", uidNPC, bMyControl);
    
    
    	//todokkkkk Á×Àº ¿£ÇǾ¾ ¼­¹ö¿¡ ¾Ë¸²
    }
    
    void ZRuleQuestChallenge::OnSetRoundState( MMATCH_ROUNDSTATE roundState )
    {
    	switch(roundState) 
    	{
    	case MMATCH_ROUNDSTATE_PREPARE: 
    		{
    		}
    		break;
    	case MMATCH_ROUNDSTATE_PRE_COUNTDOWN:
    		{
    		}
    		break;
    	case MMATCH_ROUNDSTATE_COUNTDOWN : 
    		{
    		}
    		break;
    	case MMATCH_ROUNDSTATE_PLAY:
    		{
    		}
    		break;
    	case MMATCH_ROUNDSTATE_FINISH:
    		{
    		}
    		break;
    	case MMATCH_ROUNDSTATE_EXIT:
    		{
    		}
    		break;
    	case MMATCH_ROUNDSTATE_FREE:
    		{
    		}
    		break;
    	};
    }
    
    float ZRuleQuestChallenge::FilterDelayedCommand( MCommand* pCommand )
    {
    	switch (pCommand->GetID())
    	{
    	case MC_NEWQUEST_PEER_NPC_ATTACK_MELEE:	//todok ÀÌÁ¦ »ç¿ëÇÏÁö ¾ÊÀ½
    		{
    			char szActionName[64];	//todokkkk ¾×¼Ç À̸§À» º¸³»Áö ¸»°í Á¤¼ö°°Àº È¿À²ÀûÀÎ °ªÀ¸·Î ±¸º°ÇÒ¼ö ÀÖ°Ô ÇÏÀÚ
    			pCommand->GetParameter(szActionName,	1, MPT_STR, sizeof(szActionName));
    
    			IActorAction* pAction = m_pActorActionMgr->GetAction(szActionName);
    			if (!pAction) { _ASSERT(0); break; }
    
    			const ZActorActionMeleeShot* pMeleeShot = pAction->GetMeleeShot();
    			return pMeleeShot->GetDelay();
    		}
    	}
    
    	return 0;
    }
    
    bool ZRuleQuestChallenge::OnCommand( MCommand* pCommand )
    {
    	switch (pCommand->GetID())
    	{
    	case MC_NEWQUEST_PEER_NPC_ATTACK_MELEE:	//todok ÀÌÁ¦ »ç¿ëÇÏÁö ¾ÊÀ½
    		{
    			MUID uidNpc;
    			char szActionName[64];	//todokkkk ¾×¼Ç À̸§À» º¸³»Áö ¸»°í Á¤¼ö°°Àº È¿À²ÀûÀÎ °ªÀ¸·Î ±¸º°ÇÒ¼ö ÀÖ°Ô ÇÏÀÚ
    			pCommand->GetParameter(&uidNpc, 0, MPT_UID);
    			pCommand->GetParameter(szActionName,	1, MPT_STR, sizeof(szActionName));
    
    			ZActorBase* pActor = ZGetObjectManager()->GetNPCObject(uidNpc);
    			ZActorWithFSM* pActorWithFSM = MDynamicCast(ZActorWithFSM, pActor);
    			if (pActorWithFSM)
    			{
    				pActorWithFSM->OnPeerMeleeShot(szActionName);
    			}
    
    			return true;
    		}
    	case MC_NEWQUEST_NPC_SPAWN:
    		{
    			MUID uidController;
    			MUID uidNpc;
    			char szActorDefName[128];
    			unsigned char nCustomSpawnTypeIndex, nSpawnIndex;
    			pCommand->GetParameter(&uidController,	0, MPT_UID);
    			pCommand->GetParameter(&uidNpc,			1, MPT_UID);
    			pCommand->GetParameter(szActorDefName,	2, MPT_STR, sizeof(szActorDefName));
    			pCommand->GetParameter(&nCustomSpawnTypeIndex,	3, MPT_UCHAR);
    			pCommand->GetParameter(&nSpawnIndex,			4, MPT_UCHAR);
    
    			SpawnActor(szActorDefName, uidNpc, nCustomSpawnTypeIndex, nSpawnIndex, ZGetMyUID()==uidController);
    			return true;
    		}
    
    	case MC_NEWQUEST_NPC_DEAD:
    		{
    			MUID uidKiller, uidNPC;
    
    			pCommand->GetParameter(&uidKiller,	0, MPT_UID);
    			pCommand->GetParameter(&uidNPC,		1, MPT_UID);
    
    			ZActorWithFSM* pActor = (ZActorWithFSM*)ZGetObjectManager()->GetNPCObject(uidNPC);
    			if (pActor)
    			{
    				ZGetObjectManager()->Delete(pActor);
    
    				//todok ¾Æ·¡ ÁÖ¼® ±¸ÇöÇØÁà¾ß ÇÔ
    				/*m_GameInfo.IncreaseNPCKilled();
    
    				ZCharacter* pCharacter = (ZCharacter*) ZGetCharacterManager()->Find(uidKiller);
    				if (pCharacter)
    				{
    					ZModule_QuestStatus* pMod = (ZModule_QuestStatus*)pCharacter->GetModule(ZMID_QUESTSTATUS);
    					if (pMod)
    					{
    						pMod->AddKills();
    					}
    				}*/
    			}
    			return true;
    		}
    
    	case MC_NEWQUEST_MOVE_TO_NEXT_SECTOR:
    		{
    			MoveToNextSector();
    			return true;
    		}
    
    	case MC_NEWQUEST_PEER_NPC_BASICINFO:
    		{
    			MCommandParameter* pParam = pCommand->GetParameter(0);
    			if(pParam->GetType()!=MPT_BLOB)
    			{
    				_ASSERT(0); break;
    			}
    
    			ZACTOR_WITHFSM_BASICINFO* pbi= (ZACTOR_WITHFSM_BASICINFO*)pParam->GetPointer();
    			ZActorWithFSM* pActor = (ZActorWithFSM*)ZGetObjectManager()->GetNPCObject(pbi->uidNPC);
    			if (pActor)
    			{
    				pActor->OnBasicInfo(pbi);
    			}
    
    			return true;
    		}
    	case MC_NEWQUEST_PEER_NPC_ACTION_EXECUTE:
    		{
    			MUID uidNpc;
    			int nActionIndex;
    			pCommand->GetParameter(&uidNpc, 0, MPT_UID);
    			pCommand->GetParameter(&nActionIndex, 1, MPT_INT, sizeof(nActionIndex));
    
    			ZActorBase* pActor = ZGetObjectManager()->GetNPCObject(uidNpc);
    			ZActorWithFSM* pActorWithFSM = MDynamicCast(ZActorWithFSM, pActor);
    			if (pActorWithFSM)
    			{
    				pActorWithFSM->OnPeerActionExecute(nActionIndex);
    			}
    
    			return true;
    		}
    	}
    
    	return false;
    }
    
    void ZRuleQuestChallenge::SpawnActor(const char* szActorDefName, MUID& uid, int nCustomSpawnTypeIndex, int nSpawnIndex, bool bMyControl)
    {
    	rvector pos(0,0,0);
    	rvector dir(1,0,0);
    
    	ZMapSpawnManager* pMSM = ZGetGame()->GetMapDesc()->GetSpawnManager();
    	if (pMSM)
    	{
    		ZMapSpawnData* pSpawnData = pMSM->GetCustomSpawnData(nCustomSpawnTypeIndex, nSpawnIndex);
    		if (pSpawnData)
    		{
    			pos = pSpawnData->m_Pos;
    			dir = pSpawnData->m_Dir;
    		}
    	}
    
    	MActorDef* pActorDef = m_pActorDefMgr->GetDef(szActorDefName);
    	if (!pActorDef) 
    	{
    		mlog("ERROR : cannot found actordef:\'%s\'\n", szActorDefName);
    		_ASSERT(0); 
    		return; 
    	}
    
    	// ¸¸¾à ¸®¼Ò½º ·ÎµùÀ» ¾ÈÇßÀ¸¸é ·Îµå - ÀÌ·²ÀÏÀº Å×½ºÆ®»©°ï ¾ø¾î¾ßÇÑ´Ù.
    	RMesh* pNPCMesh = ZGetNpcMeshMgr()->Get(pActorDef->GetName());
    	if (pNPCMesh)
    	{
    		if (!pNPCMesh->m_isMeshLoaded)
    		{
    			ZGetNpcMeshMgr()->Load(pActorDef->GetName());
    			ZGetNpcMeshMgr()->ReloadAllAnimation();
    		}
    	}
    
    	ZActorWithFSM* pNewActor = new ZActorWithFSM(ZGetGame(), m_pActorActionMgr);
    	pNewActor->InitWithActorDef(pActorDef, m_pFsmManager);
    	pNewActor->SetUID(uid);
    	pNewActor->SetPosition(pos);
    	pNewActor->SetDirection(dir);
    	pNewActor->SetMyControl(bMyControl);
    
    	ZGetObjectManager()->Add(pNewActor);
    	ZGetEffectManager()->AddReBirthEffect(pNewActor->GetPosition());
    }
    
    void ZRuleQuestChallenge::MoveToNextSector()
    {
    	ZCharacter *pMyChar = ZGetGame()->m_pMyCharacter;
    	pMyChar->InitStatus();
    
    	// Àü È­¸é¿¡¼­ ³²¾ÆÀÖÀ» ¼ö Àִ ź°ú ÀÌÆåÆ®¸¦ Á¦°Å
    	ZGetEffectManager()->Clear();
    	ZGetGame()->m_WeaponManager.Clear();
    
    	// »õ·Î¿î ¿ùµå·Î À̵¿!!
    	++m_nCurrSector;	//todok ÇöÀç ¼½ÅͰ¡ ¸¶Áö¸· ¼½ÅͶó¸é? ±¦ÂúÀº°Ç°¡..
    	ZGetWorldManager()->SetCurrent(m_nCurrSector);
    	//todok ¶ó¿îµå ÇüÅ·Π·êÀ» ±¸ÇöÇ߱⠶§¹®¿¡ ÀÌ ÄÚµå´Â ÀÌÁ¦ ÇÊ¿ä ¾ø´Âµí
    	//// À̹ø¿¡ À̵¿ÇÒ Ä³¸¯ÅÍÀÇ À§Ä¡
    	//int nPosIndex = ZGetCharacterManager()->GetCharacterIndex(pMyChar->GetUID(), false);
    	//if (nPosIndex < 0) nPosIndex=0;
    	//ZMapSpawnData* pSpawnData = ZGetWorld()->GetDesc()->GetSpawnManager()->GetSoloData(nPosIndex);
    	//// »õ ÁÂÇ¥·Î À̵¿
    	//if (pSpawnData!=NULL && pMyChar!=NULL)
    	//{
    	//	pMyChar->SetPosition(pSpawnData->m_Pos);
    	//	pMyChar->SetDirection(pSpawnData->m_Dir);
    	//	ZGetEffectManager()->AddReBirthEffect(pSpawnData->m_Pos);
    	//}
    
    	//todok quest Àӽ÷ΠÁÖ¼®ÇÔ ±¸ÇöÇØ¾ß ÇÑ´Ù
    	//// ¾Æ¹«µµ º¸¿©ÁÖÁö ¾Ê´Â´Ù.
    	//for(ZCharacterManager::iterator i = ZGetCharacterManager()->begin();i!=ZGetCharacterManager()->end();i++)
    	//{
    	//	i->second->SetVisible(false);
    	//}
    
    	//// ko¼ö µ¿±âÈ­
    	//ZModule_QuestStatus* pMod = (ZModule_QuestStatus*)pMyChar->GetModule(ZMID_QUESTSTATUS);
    	//if (pMod)
    	//{
    	//	int nKills = pMod->GetKills();
    	//	ZGetScreenEffectManager()->SetKO(nKills);
    	//}
    }
    ;)
    Showoff.

  2. #92
    Enthusiast releloz0r is offline
    MemberRank
    Jul 2011 Join Date
    26Posts

    Re: GunZ 1.5 (Summer of 2011) Source.

    Why no one code and compile it and post the files compiled? <.<

  3. #93
    Member iOverRun is offline
    MemberRank
    Apr 2011 Join Date
    Near by !!Location
    98Posts

    Re: GunZ 1.5 (Summer of 2011) Source.

    wow Awesome !!

  4. #94
    Enthusiast swordlegend is offline
    MemberRank
    Aug 2009 Join Date
    27Posts

    Re: GunZ 1.5 (Summer of 2011) Source.

    Thank you very Much

  5. #95
    Apprentice ZxPwn is offline
    MemberRank
    Aug 2009 Join Date
    13Posts

    Re: GunZ 1.5 (Summer of 2011) Source.

    Let the fun begin ;)

  6. #96
    num num num <3 rootbeer daniel131605 is offline
    MemberRank
    Jul 2008 Join Date
    New YorkLocation
    573Posts

    Re: GunZ 1.5 (Summer of 2011) Source.

    is this the same one that delpa or whatever his name release? because his 1.5 gunz server stuff disappeared :/

  7. #97
    Hi, I'm Omar! Vusion is offline
    MemberRank
    Jan 2011 Join Date
    HereLocation
    1,658Posts

    Re: GunZ 1.5 (Summer of 2011) Source.

    Quote Originally Posted by Phoenix View Post
    It's the complete original (MAIET) GunZ client & server source along with the Database & tools till May/June 2011. All features like Duel tournament, Survival, GunZ 1.5, etc. are available.
    Hope that says it.

  8. #98
    Enthusiast foranyone is offline
    MemberRank
    Jan 2007 Join Date
    35Posts

    Re: GunZ 1.5 (Summer of 2011) Source.

    thanks for someone

  9. #99
    Enthusiast koren249 is offline
    MemberRank
    Dec 2011 Join Date
    38Posts

    Re: GunZ 1.5 (Summer of 2011) Source.


  10. #100
    人◕ ‿‿ ◕人 Forean is offline
    MemberRank
    Jul 2008 Join Date
    1,183Posts

    Re: GunZ 1.5 (Summer of 2011) Source.

    Did some searching

    Get Source_Code.7z on Wupload.com


    thats the only one i could get off the google web cache.

    If anyone wants to please upload to more mirrors.

  11. #101
    Valued Member ZeidForce is offline
    MemberRank
    Nov 2009 Join Date
    C:\Puerto Rico\Location
    133Posts

    Re: GunZ 1.5 (Summer of 2011) Source.

    The source code is not full, there are error msg, that files that not exist in the source, and other people have it full. I dont know that is happening.




    -

  12. #102
    Valued Member Kahazard is offline
    MemberRank
    Oct 2011 Join Date
    126Posts

    Re: GunZ 1.5 (Summer of 2011) Source.

    Quote Originally Posted by ZeidForce View Post
    The source code is not full, there are error msg, that files that not exist in the source, and other people have it full. I dont know that is happening.




    -
    you don't know anything of C++, this is problem.

  13. #103
    Valued Member ZeidForce is offline
    MemberRank
    Nov 2009 Join Date
    C:\Puerto Rico\Location
    133Posts

    Re: GunZ 1.5 (Summer of 2011) Source.

    Quote Originally Posted by Kahazard View Post
    you don't know anything of C++, this is problem.
    No I fix the problem, I download the new mirror of the source and fixed.

  14. #104
    My Religion: Love ♥ diosz is offline
    MemberRank
    Feb 2008 Join Date
    IDK~Location
    314Posts

    Re: GunZ 1.5 (Summer of 2011) Source.

    Quote Originally Posted by ZeidForce View Post
    No I fix the problem, I download the new mirror of the source and fixed.

    i downloaded these files and works good, well when the download was working .... i gave you the file that you lost, i dont know but is impossible that with me works and with you dont, if you too downloaded this files

  15. #105
    Valued Member ZeidForce is offline
    MemberRank
    Nov 2009 Join Date
    C:\Puerto Rico\Location
    133Posts

    Re: GunZ 1.5 (Summer of 2011) Source.

    Quote Originally Posted by diosz View Post
    i downloaded these files and works good, well when the download was working .... i gave you the file that you lost, i dont know but is impossible that with me works and with you dont, if you too downloaded this files
    Its ok, I downloaded the new mirrors in the other post and work perfect



Advertisement