Jump to content

Werwolf94

Member
  • Posts

    11
  • Joined

  • Last visited

  • Feedback

    0%

Posts posted by Werwolf94

  1. Finally, I stayed at Terenzo's source at the end, I fixed the "minecraft terrain texture bug" myself following this guide:


    This is the differentials I made in the EterLib/StateManager.cpp:
    Change this:

    CStateManager::CStateManager(LPDIRECT3DDEVICE9 lpDevice) : m_lpD3DDev(NULL)
    {
    	m_bScene = false;
    	m_dwBestMinFilter = D3DTEXF_LINEAR;
    	m_dwBestMagFilter = D3DTEXF_LINEAR;
    	SetDevice(lpDevice);
    }

    To this:
     

    CStateManager::CStateManager(LPDIRECT3DDEVICE9 lpDevice) : m_lpD3DDev(NULL)
    {
    	m_bScene = false;
    	m_dwBestMinFilter = D3DTEXF_ANISOTROPIC;
    	m_dwBestMagFilter = D3DTEXF_ANISOTROPIC;
    	SetDevice(lpDevice);
    }

    Change this:
     

    void CStateManager::SetDevice(LPDIRECT3DDEVICE9 lpDevice)
    {
    	StateManager_Assert(lpDevice);
    	lpDevice->AddRef();
    
    	if (m_lpD3DDev)
    	{
    		m_lpD3DDev->Release();
    		m_lpD3DDev = NULL;
    	}
    
    	m_lpD3DDev = lpDevice;
    
    	D3DCAPS9 d3dCaps;
    	m_lpD3DDev->GetDeviceCaps(&d3dCaps);
    
    	if (d3dCaps.TextureFilterCaps & D3DPTFILTERCAPS_MAGFANISOTROPIC)
    		m_dwBestMagFilter = D3DTEXF_ANISOTROPIC;
    	else
    		m_dwBestMagFilter = D3DTEXF_LINEAR;
    	
    	if (d3dCaps.TextureFilterCaps & D3DPTFILTERCAPS_MINFANISOTROPIC)
    		m_dwBestMinFilter = D3DTEXF_ANISOTROPIC;
    	else
    		m_dwBestMinFilter = D3DTEXF_LINEAR;
    
    	DWORD dwMax = d3dCaps.MaxAnisotropy;
    	dwMax = dwMax < 4 ? dwMax : 4;
    
    	for (int i = 0; i < 8; ++i)
    		m_lpD3DDev->SetSamplerState(i, D3DSAMP_MAXANISOTROPY, dwMax);
    
    	SetDefaultState();
    }

    To this:
     

    void CStateManager::SetDevice(LPDIRECT3DDEVICE9 lpDevice)
    {
    	StateManager_Assert(lpDevice);
    	lpDevice->AddRef();
    
    	if (m_lpD3DDev)
    	{
    		m_lpD3DDev->Release();
    		m_lpD3DDev = NULL;
    	}
    
    	m_lpD3DDev = lpDevice;
    
    	SetDefaultState();
    }

    After this:
     

    #ifdef _DEBUG
    	int i, j;
    	for (i = 0; i < STATEMANAGER_MAX_RENDERSTATES; i++)
    		m_bRenderStateSavingFlag[i] = FALSE;
    
    	for (j = 0; j < STATEMANAGER_MAX_TRANSFORMSTATES; j++)
    		m_bTransformSavingFlag[j] = FALSE;
    
    	for (j = 0; j < STATEMANAGER_MAX_STAGES; ++j)
    		for (i = 0; i < STATEMANAGER_MAX_TEXTURESTATES; ++i)
    		{
    
    			m_bTextureStageStateSavingFlag[j][i] = FALSE;
    			m_bSamplerStateSavingFlag[j][i] = FALSE;
    		}
    #endif _DEBUG

    Add this:
     

    
    	D3DCAPS9 d3dCaps;
    	m_lpD3DDev->GetDeviceCaps(&d3dCaps);
    
    	DWORD dwMax = d3dCaps.MaxAnisotropy;
    	dwMax = dwMax < 4 ? dwMax : 4;
    
    	for (int i = 0; i < 8; ++i)
    		m_lpD3DDev->SetSamplerState(i, D3DSAMP_MAXANISOTROPY, dwMax);

    (Before void CStateManager::SetDefaultState() ending '}' bracelet)

    Hope it work's for you too.

    • Metin2 Dev 1
  2. Hi!

    You only need to prevent the Z rotation on the guildbuildinglist.txt (locale_xy EIX/EPK) files the following objects write the 360 value to 0 at the ZROT_LIMIT column: -14200 (Guild symbol) -objects: 14400-14408 (You need to prevent all the Tree's rotation!)
    Video proof (i'm not getting any syserr with the tree/guild symbol rotation [yes, I use unique maps in my server, so I think it will work with the originals as well]): 

    That's it, hope it works for you!

  3. Hi!

    You only need to prevent the Z rotation on the guildbuildinglist.txt (locale_xy EIX/EPK) files the following objects write the 360 value to 0 at the ZROT_LIMIT column: -14200 (Guild symbol) -objects: 14400-14408 (You need to prevent all the Tree's rotation!)
    Video proof (i'm not getting any syserr with the tree/guild symbol rotation [yes, I use unique maps in my server, so I think it will work with the originals as well]): 

    That's it, hope it works for you!

  4. Hi!

    You only need to prevent the Z rotation on the guildbuildinglist.txt (locale_xy EIX/EPK) files the following objects write the 360 value to 0 at the ZROT_LIMIT column: -14200 (Guild symbol) -objects: 14400-14408 (You need to prevent all the Tree's rotation!)
    Video proof (i'm not getting any syserr with the tree/guild symbol rotation [yes, I use unique maps in my server, so I think it will work with the originals as well]): 

     
    That's it, hope it works for you!

  5. Thanks for the code!

    I implemented plus one more thing, the guild leader get's back the land price also when this SQL script runs down as some compensation for the loss (I don't implemented that situation when the player's gold goes higher than 2 thousand million, I don't know how to do that).
     

    	CDBManager::instance().DirectQuery(	"update land "
    			"INNER JOIN guild ON land.guild_id = guild.id "
    			"INNER JOIN player ON guild.master = player.id "
    			"set land.guild_id=0, player.gold=player.gold+land.price "
    			"where land.guild_id > 0 and "
    			"DATE_SUB(NOW(),INTERVAL 90 DAY) > player.last_play; " );
    	CDBManager::instance().DirectQuery(	"DELETE object "
    			"FROM object "
    			"INNER JOIN land ON land.id = object.land_id "
    			"WHERE land.guild_id=0; "	);

    (My edition is not strict as yours, I let 90 day offline time for the guild masters.)

  6. Hello Everyone!

    I want to bring some unexpected factors to my future players.
    So, I managed to set timer for example Bestial Archer will respawn after 45 minutes if it's taken down.
    But I don't want to guarantee that. So, I want to give 75% chance to the respawn in the probability column in boss.txt, if the 25% win's the spawn will not happen, the 45 minute timer restarts.
    Sorry, I can't write code in c++, I only understand PHP, can someone help me with some working code?

    I think maybe there we need to edit the regen.cpp file:
     

    			case MODE_REGEN_PERCENT:
    				++mode;
    				break;

    (I know it only skips that column, I can write 75% but the source will handle it as 100% cuz this function is not implemented into the game source.)

    Thanks for any help!

  7. Hi everyone!

    Do you guys also have compiling problems with the db source?
    First there's need to be a space between those > marks at the ClientManager.h:
     

    typedef boost::unordered_map<short, std::pair<BYTE, int>> TChannelStatusMap;

    Correct form maybe:
     

    typedef boost::unordered_map<short, std::pair<BYTE, int> > TChannelStatusMap;

    Umm and I get many errors when I try to compile the ClientManager.cpp:
    spacer.png

    Sorry guys I don't really understand the programming language (I only understand the PHP language  so I'm just a copy-paste guy) but I think there is something near the one of the for cycles that not correct in my case.
    (Btw I use P3NG3R's no TXT ClientManager.cpp version.)
     

  8. Hi!

    I'm currently working on this sh*t and I suggest you to not give any attention on it!

    Because I'm not done with the whole binary but I can tell you need to change this:

     

    //Client\EffectLib
    
    //EffectInstance.cpp
    
    	//Search
    	
    	STATEMANAGER.SaveSamplerState(0, D3DSAMP_MINFILTER, D3DTEXF_NONE);
    	STATEMANAGER.SaveSamplerState(0, D3DSAMP_MAGFILTER, D3DTEXF_NONE);
    	
    	//Replace
    	
    	STATEMANAGER.SaveTextureStageState(0, D3DTSS_MINFILTER, D3DTEXF_NONE);
    	STATEMANAGER.SaveTextureStageState(0, D3DTSS_MAGFILTER, D3DTEXF_NONE);
    	
    	//Search
    	
    	STATEMANAGER.SetFVF(D3DFVF_XYZ|D3DFVF_TEX1);
    	
    	//Replace
    	
    	STATEMANAGER.SetVertexShader(D3DFVF_XYZ|D3DFVF_TEX1);
    	
    	//Search
    	
    	STATEMANAGER.RestoreSamplerState(0, D3DSAMP_MINFILTER);
    	STATEMANAGER.RestoreSamplerState(0, D3DSAMP_MAGFILTER);
    	
    	//Replace
    	
    	STATEMANAGER.RestoreTextureStageState(0, D3DTSS_MINFILTER);
    	STATEMANAGER.RestoreTextureStageState(0, D3DTSS_MAGFILTER);
    
    //EffectMesh.h
    
    	//Search
    	
    	#include <d3dx9.h>
    	
    	//Replace
    	
    	#include <d3dx8.h>
    
    //EffectMeshInstance.cpp
    
    	//Search
    	
    	STATEMANAGER.SetFVF(D3DFVF_XYZ | D3DFVF_TEX1);
    	
    	//Replace
    	
    	STATEMANAGER.SetVertexShader(D3DFVF_XYZ | D3DFVF_TEX1);
    
    //SimpleLightData.cpp
    
    	//Search
    	
    	void CLightData::InitializeLight(D3DLIGHT9& light)
    	
    	//Replace
    	
    	void CLightData::InitializeLight(D3DLIGHT8& light)
    
    //SimpleLightData.h
    
    	//Search
    	
    	#include <d3dx9.h>
    	
    	//Replace
    	
    	#include <d3dx8.h>
    	
    	//Search
    	
    	void InitializeLight(D3DLIGHT9& light);
    	
    	//Replace
    	
    	void InitializeLight(D3DLIGHT8& light);
    
    //SimpleLightInstance.cpp
    
    	//Search
    	
    	D3DLIGHT9 Light;
    	
    	//Replace
    	
    	D3DLIGHT8 Light;
    
    //Client\EterBase
    
    //lzo.cpp
    
    //lzo.h
    
    //Client\EterGrnLib
    
    //Material.cpp
    
    	//Search
    	
    	LPDIRECT3DTEXTURE9 CGrannyMaterial::GetD3DTexture(int iStage) const
    	
    	//Replace
    	
    	LPDIRECT3DTEXTURE8 CGrannyMaterial::GetD3DTexture(int iStage) const
    	
    	//Search (Granny)
    	
    			granny_variant TwoSidedVariant;
    			if (GrannyFindMatchingMember(pgrnMaterial->ExtendedData.Type, pgrnMaterial->ExtendedData.Object, "Two-sided", &TwoSidedVariant))
    								  
    				GrannyConvertSingleObject(TwoSidedVariant.Type, TwoSidedVariant.Object, TwoSidedFieldType, &twoSided, 0);
    	
    	//Replace
    	
    			granny_variant twoSideResult = GrannyFindMatchingMember(pgrnMaterial->ExtendedData.Type, pgrnMaterial->ExtendedData.Object, "Two-sided");
    
    			if (NULL != twoSideResult.Type)
    				GrannyConvertSingleObject(twoSideResult.Type, twoSideResult.Object, TwoSidedFieldType, &twoSided);
    
    	//Search
    	
    	STATEMANAGER.SaveSamplerState(1, D3DSAMP_ADDRESSU, D3DTADDRESS_WRAP);
    	STATEMANAGER.SaveSamplerState(1, D3DSAMP_ADDRESSV, D3DTADDRESS_WRAP);
    	
    	//Replace
    	
    	STATEMANAGER.SaveTextureStageState(1, D3DTSS_ADDRESSU, D3DTADDRESS_WRAP);
    	STATEMANAGER.SaveTextureStageState(1, D3DTSS_ADDRESSV, D3DTADDRESS_WRAP);
    	
    	//Search
    	
    	STATEMANAGER.RestoreSamplerState(1, D3DSAMP_ADDRESSU);
    	STATEMANAGER.RestoreSamplerState(1, D3DSAMP_ADDRESSV);
    	
    	//Replace
    	
    	STATEMANAGER.RestoreTextureStageState(1, D3DTSS_ADDRESSU);
    	STATEMANAGER.RestoreTextureStageState(1, D3DTSS_ADDRESSV);
    
    //Material.h
    
    	//Search
    	
    	#include <d3d9.h>
    	
    	//Replace
    	
    	#include <d3d8.h>
    
    	//Search
    	
    	LPDIRECT3DTEXTURE9		GetD3DTexture(int iStage) const;
    	
    	//Replace
    	
    	LPDIRECT3DTEXTURE8		GetD3DTexture(int iStage) const;
    
    //Mesh.cpp (Granny)
    
    //Mesh.h (Granny)
    
    //Model.cpp
    
    	//Search
    	
    	LPDIRECT3DINDEXBUFFER9 CGrannyModel::GetD3DIndexBuffer() const
    	
    	//Replace
    	
    	LPDIRECT3DINDEXBUFFER8 CGrannyModel::GetD3DIndexBuffer() const
    	
    	//Search
    	
    	LPDIRECT3DVERTEXBUFFER9 CGrannyModel::GetPNTD3DVertexBuffer() const
    	
    	//Replace
    	
    	LPDIRECT3DVERTEXBUFFER8 CGrannyModel::GetPNTD3DVertexBuffer() const
    
    //Model.h
    
    	//Search
    	
    		LPDIRECT3DVERTEXBUFFER9 GetPNTD3DVertexBuffer() const;
    		LPDIRECT3DINDEXBUFFER9 GetD3DIndexBuffer() const;
    
    	//Replace
    	
    		LPDIRECT3DVERTEXBUFFER8 GetPNTD3DVertexBuffer() const;
    		LPDIRECT3DINDEXBUFFER8 GetD3DIndexBuffer() const;
    
    //ModelInstance.h
    
    	//Search (Granny)
    	
    	const granny_int32x *	__GetMeshBoneIndices(unsigned int iMeshBinding) const;
    	
    	//Replace
    	
    	int*	__GetMeshBoneIndices(unsigned int iMeshBinding) const;
    	
    	//Search
    	
    	IDirect3DVertexBuffer9* __GetDeformableD3DVertexBufferPtr();
    	
    	//Replace
    	
    	IDirect3DVertexBuffer8* __GetDeformableD3DVertexBufferPtr();
    
    //ModelInstanceCollisionDetection.cpp (Granny)
    
    //ModelInstanceModel.cpp
    	
    	//Search (Granny)
    	
    	const granny_int32x * CGrannyModelInstance::__GetMeshBoneIndices(unsigned int iMeshBinding) const
    	
    	//Replace
    	
    	int* CGrannyModelInstance::__GetMeshBoneIndices(unsigned int iMeshBinding) const
    	
    	//Search
    	
    	IDirect3DVertexBuffer9* CGrannyModelInstance::__GetDeformableD3DVertexBufferPtr()
    	
    	//Replace
    	
    	IDirect3DVertexBuffer8* CGrannyModelInstance::__GetDeformableD3DVertexBufferPtr()
    
    //ModelInstanceRender.cpp [This will be a lot of work, have a break if you need it.]
    
    	//Search
    
    		STATEMANAGER.SetVertexDeclaration(ms_pntVS);
    
    		// WORK
    		LPDIRECT3DVERTEXBUFFER9 lpd3dDeformPNTVtxBuf = __GetDeformableD3DVertexBufferPtr();
    		// END_OF_WORK
    
    		LPDIRECT3DVERTEXBUFFER9 lpd3dRigidPNTVtxBuf = m_pModel->GetPNTD3DVertexBuffer();
    
    	//Replace
    
    		STATEMANAGER.SetVertexShader(ms_pntVS);
    
    		// WORK
    		LPDIRECT3DVERTEXBUFFER8 lpd3dDeformPNTVtxBuf = __GetDeformableD3DVertexBufferPtr();
    		// END_OF_WORK
    
    		LPDIRECT3DVERTEXBUFFER8 lpd3dRigidPNTVtxBuf = m_pModel->GetPNTD3DVertexBuffer();
    
    	//Search
    
    		// WORK
    		LPDIRECT3DVERTEXBUFFER9 lpd3dDeformPNTVtxBuf = __GetDeformableD3DVertexBufferPtr();
    		// END_OF_WORK
    		LPDIRECT3DVERTEXBUFFER9 lpd3dRigidPNTVtxBuf = m_pModel->GetPNTD3DVertexBuffer();
    
    		STATEMANAGER.SetVertexDeclaration(ms_pntVS);
    
    	//Replace
    
    		// WORK
    		LPDIRECT3DVERTEXBUFFER8 lpd3dDeformPNTVtxBuf = __GetDeformableD3DVertexBufferPtr();
    		// END_OF_WORK
    		LPDIRECT3DVERTEXBUFFER8 lpd3dRigidPNTVtxBuf = m_pModel->GetPNTD3DVertexBuffer();
    
    		STATEMANAGER.SetVertexShader(ms_pntVS);
    
    	//Search
    
    	STATEMANAGER.SetVertexDeclaration(ms_pntVS);
    	
    	//Replace
    	
    	STATEMANAGER.SetVertexShader(ms_pntVS);
    	
    	//Search
    	
    		// WORK
    		LPDIRECT3DVERTEXBUFFER9 lpd3dDeformPNTVtxBuf = __GetDeformableD3DVertexBufferPtr();
    		// END_OF_WORK
    		LPDIRECT3DVERTEXBUFFER9 lpd3dRigidPNTVtxBuf = m_pModel->GetPNTD3DVertexBuffer();
    
    	//Replace
    
    		// WORK
    		LPDIRECT3DVERTEXBUFFER8 lpd3dDeformPNTVtxBuf = __GetDeformableD3DVertexBufferPtr();
    		// END_OF_WORK
    		LPDIRECT3DVERTEXBUFFER8 lpd3dRigidPNTVtxBuf = m_pModel->GetPNTD3DVertexBuffer();
    
    	//Search
    	
    	LPDIRECT3DINDEXBUFFER9 lpd3dIdxBuf = m_pModel->GetD3DIndexBuffer();
    	
    	//Replace
    	
    	LPDIRECT3DINDEXBUFFER8 lpd3dIdxBuf = m_pModel->GetD3DIndexBuffer();
    
    	//Search
    	
    	STATEMANAGER.DrawIndexedPrimitive(D3DPT_TRIANGLELIST, vtxMeshBasePos, vtxCount, pTriGroupNode->idxPos, pTriGroupNode->triCount);
    	
    	//Replace
    	
    	STATEMANAGER.DrawIndexedPrimitive(D3DPT_TRIANGLELIST, 0, vtxCount, pTriGroupNode->idxPos, pTriGroupNode->triCount);
    
    	//Search
    	
    	LPDIRECT3DINDEXBUFFER9 lpd3dIdxBuf = m_pModel->GetD3DIndexBuffer();
    	
    	//Replace
    	
    	LPDIRECT3DINDEXBUFFER8 lpd3dIdxBuf = m_pModel->GetD3DIndexBuffer();
    
    	//Search
    	
    	STATEMANAGER.DrawIndexedPrimitive(D3DPT_TRIANGLELIST, vtxMeshBasePos, vtxCount, pTriGroupNode->idxPos, pTriGroupNode->triCount);
    	
    	//Replace
    	
    	STATEMANAGER.DrawIndexedPrimitive(D3DPT_TRIANGLELIST, 0, vtxCount, pTriGroupNode->idxPos, pTriGroupNode->triCount);
    
    	//Search
    	
    	LPDIRECT3DINDEXBUFFER9 lpd3dIdxBuf = m_pModel->GetD3DIndexBuffer();
    	
    	//Replace
    	
    	LPDIRECT3DINDEXBUFFER8 lpd3dIdxBuf = m_pModel->GetD3DIndexBuffer();
    	
    	//Search
    	
    	STATEMANAGER.DrawIndexedPrimitive(D3DPT_TRIANGLELIST, vtxMeshBasePos, vtxCount, pTriGroupNode->idxPos, pTriGroupNode->triCount);
    	
    	//Replace
    	
    	STATEMANAGER.DrawIndexedPrimitive(D3DPT_TRIANGLELIST, 0, vtxCount, pTriGroupNode->idxPos, pTriGroupNode->triCount);
    
    //ModelInstanceUpdate.cpp (Granny)
    
    //Client\EterImgaeLib
    
    //DXTCImage.cpp
    
    	//Search
    	
    	#include <ddraw.h>
    	
    	//Replace
    	
    	#include <d3d.h>
    
    //Client\EterLib
    
    //BlockTexture.cpp
    
    	//Search
    	
    	STATEMANAGER.SetFVF(D3DFVF_XYZ | D3DFVF_TEX1 | D3DFVF_DIFFUSE);
    	
    	//Replace
    	
    	STATEMANAGER.SetVertexShader(D3DFVF_XYZ|D3DFVF_TEX1|D3DFVF_DIFFUSE);
    
    	//Search
    	
    	if (FAILED(ms_lpd3dDevice->CreateTexture(dwWidth, dwHeight, 0, 0, D3DFMT_A8R8G8B8, D3DPOOL_MANAGED, &m_lpd3dTexture, NULL)))
    	
    	//Replace
    	
    	if (FAILED(ms_lpd3dDevice->CreateTexture(dwWidth, dwHeight, 0, 0, D3DFMT_A8R8G8B8, D3DPOOL_MANAGED, &m_lpd3dTexture)))
    
    //BlockTexture.h
    
    	//Search
    	
    		LPDIRECT3DTEXTURE9 m_lpd3dTexture;
    	
    	//Replace
    	
    		LPDIRECT3DTEXTURE8 m_lpd3dTexture;
    
    //Camera.cpp
    
    	//Search
    	
    	float fDeterminantD3DMatView = D3DXMatrixDeterminant(&m_matView);
    	
    	//Replace
    	
    	float fDeterminantD3DMatView = D3DXMatrixfDeterminant(&m_matView);
    
    //Decal.cpp
    
    	//Search
    	
    	STATEMANAGER.SetFVF(D3DFVF_XYZ | D3DFVF_DIFFUSE | D3DFVF_TEX1);
    	
    	//Replace
    	
    	STATEMANAGER.SetVertexShader(D3DFVF_XYZ|D3DFVF_DIFFUSE|D3DFVF_TEX1);
    
    //GrpBase.cpp
    
    	//Search
    	
    	LPDIRECT3D9				CGraphicBase::ms_lpd3d = NULL;
    	LPDIRECT3DDEVICE9		CGraphicBase::ms_lpd3dDevice = NULL;
    	
    	//Replace
    	
    	LPDIRECT3D8				CGraphicBase::ms_lpd3d = NULL;
    	LPDIRECT3DDEVICE8		CGraphicBase::ms_lpd3dDevice = NULL;
    
    	//Search
    	
    	D3DVIEWPORT9			CGraphicBase::ms_Viewport;
    	
    	//Replace
    	
    	D3DVIEWPORT8			CGraphicBase::ms_Viewport;
    
    	//Search
    	
    	D3DCAPS9				CGraphicBase::ms_d3dCaps;
    	
    	//Replace
    	
    	D3DCAPS8				CGraphicBase::ms_d3dCaps;
    	
    	//Search
    	
    	LPDIRECT3DVERTEXDECLARATION9 CGraphicBase::ms_ptVS = 0;
    	LPDIRECT3DVERTEXDECLARATION9 CGraphicBase::ms_pntVS = 0;
    	LPDIRECT3DVERTEXDECLARATION9 CGraphicBase::ms_pnt2VS = 0;
    
    	//Replace
    	
    	DWORD					CGraphicBase::ms_ptVS = 0;
    	DWORD					CGraphicBase::ms_pntVS = 0;
    	DWORD					CGraphicBase::ms_pnt2VS = 0;
    
    	//Search
    	
    	LPDIRECT3DVERTEXBUFFER9	CGraphicBase::ms_alpd3dPDTVB[PDT_VERTEXBUFFER_NUM];
    
    	LPDIRECT3DINDEXBUFFER9	CGraphicBase::ms_alpd3dDefIB[DEFAULT_IB_NUM];
    
    	//Replace
    	
    	LPDIRECT3DVERTEXBUFFER8	CGraphicBase::ms_alpd3dPDTVB[PDT_VERTEXBUFFER_NUM];
    
    	LPDIRECT3DINDEXBUFFER8	CGraphicBase::ms_alpd3dDefIB[DEFAULT_IB_NUM];
    
    	//Search
    	
    	IDirect3DVertexBuffer9* plpd3dFillRectVB=ms_alpd3dPDTVB[s_dwVBPos];
    
    	//Replace
    	
    	IDirect3DVertexBuffer8* plpd3dFillRectVB=ms_alpd3dPDTVB[s_dwVBPos];
    
    	//Search
    	
    	plpd3dFillRectVB->Lock(0, sizeof(TPDTVertex)*uVtxCount, (void**)&pDstVertices, D3DLOCK_DISCARD)
    
    	//Replace
    	
    	plpd3dFillRectVB->Lock(0, sizeof(TPDTVertex)*uVtxCount, (BYTE**)&pDstVertices, D3DLOCK_DISCARD)
    
    //GrpBase.h
    
    	//Search
    	
    		static LPDIRECT3D9				ms_lpd3d;
    		static LPDIRECT3DDEVICE9		ms_lpd3dDevice;
    
    	//Replace
    	
    		static LPDIRECT3D8				ms_lpd3d;
    		static LPDIRECT3DDEVICE8		ms_lpd3dDevice;
    
    	//Search
    	
    		static D3DVIEWPORT9				ms_Viewport;
    
    	//Replace
    	
    		static D3DVIEWPORT8				ms_Viewport;
    
    	//Search
    	
    		static D3DCAPS9					ms_d3dCaps;
    
    	//Replace
    	
    		static D3DCAPS8					ms_d3dCaps;
    
    	//Search
    	
    		static LPDIRECT3DVERTEXDECLARATION9 ms_ptVS;
    		static LPDIRECT3DVERTEXDECLARATION9 ms_pntVS;
    		static LPDIRECT3DVERTEXDECLARATION9 ms_pnt2VS;
    
    	//Replace
    	
    		static DWORD					ms_ptVS;
    		static DWORD					ms_pntVS;
    		static DWORD					ms_pnt2VS;
    
    	//Search
    	
    		static LPDIRECT3DVERTEXBUFFER9	ms_alpd3dPDTVB[PDT_VERTEXBUFFER_NUM];
    		static LPDIRECT3DINDEXBUFFER9	ms_alpd3dDefIB[DEFAULT_IB_NUM];
    
    	//Replace
    	
    		static LPDIRECT3DVERTEXBUFFER8	ms_alpd3dPDTVB[PDT_VERTEXBUFFER_NUM];
    		static LPDIRECT3DINDEXBUFFER8	ms_alpd3dDefIB[DEFAULT_IB_NUM];
    
    //GrpDetector.cpp
    
    	//Search
    	
    	VOID D3D_CAdapterDisplayModeList::Build(IDirect3D9& rkD3D, D3DFORMAT eD3DFmtDefault, UINT iD3DAdapterInfo)
    	
    	//Replace
    	
    	VOID D3D_CAdapterDisplayModeList::Build(IDirect3D8& rkD3D, D3DFORMAT eD3DFmtDefault, UINT iD3DAdapterInfo)
    
    	//Search (?)
    	
    	UINT uAdapterModeNum = rkD3D.GetAdapterModeCount(iD3DAdapterInfo, eD3DFmtDefault);
    	
    	//Replace
    	
    	UINT uAdapterModeNum=rkD3D.GetAdapterModeCount(iD3DAdapterInfo);
    	
    	//Search (?)
    	
    	rkD3D.EnumAdapterModes(iD3DAdapterInfo, eD3DFmtDefault, iD3DAdapterInfoMode, &kD3DDMCur);
    	
    	//Replace
    	
    	rkD3D.EnumAdapterModes(iD3DAdapterInfo, iD3DAdapterInfoMode, &kD3DDMCur);
    
    	//Search
    	
    	BOOL D3D_CDeviceInfo::FindDepthStencilFormat(IDirect3D9& rkD3D, UINT iD3DAdapterInfo, D3DDEVTYPE DeviceType, D3DFORMAT TargetFormat, D3DFORMAT* pDepthStencilFormat )
    	
    	//Replace
    	
    	BOOL D3D_CDeviceInfo::FindDepthStencilFormat(IDirect3D8& rkD3D, UINT iD3DAdapterInfo, D3DDEVTYPE DeviceType, D3DFORMAT TargetFormat, D3DFORMAT* pDepthStencilFormat )
    
    	//Search
    	
    	BOOL D3D_CDeviceInfo::Build(IDirect3D9& rkD3D, UINT iD3DAdapterInfo, UINT iDevType, D3D_CAdapterDisplayModeList& rkD3DADMList, BOOL (*pfnConfirmDevice)(D3DCAPS9& rkD3DCaps, UINT uBehavior, D3DFORMAT eD3DFmt))
    	
    	//Replace
    	
    	BOOL D3D_CDeviceInfo::Build(IDirect3D8& rkD3D, UINT iD3DAdapterInfo, UINT iDevType, D3D_CAdapterDisplayModeList& rkD3DADMList, BOOL (*pfnConfirmDevice)(D3DCAPS8& rkD3DCaps, UINT uBehavior, D3DFORMAT eD3DFmt))
    
    	//Search
    	
    	isHALWindowedCompatible=TRUE;
    	
    	//Add this code up
    	
    				if (m_kD3DCaps.Caps2 & D3DCAPS2_CANRENDERWINDOWED)
    				{
    
    	//Search
    	
    	isHALDesktopCompatible=TRUE;
    
    	//Add this code down
    	
                    
    				}
    
    	//Search
    	
    	if (aisFormatConfirmed[0])
    	
    	//Replace
    	
    	if (aisFormatConfirmed[0] && (m_kD3DCaps.Caps2 & D3DCAPS2_CANRENDERWINDOWED) )
    
    	//Search
    	
    	BOOL D3D_CAdapterInfo::Build(IDirect3D9& rkD3D, UINT iD3DAdapterInfo, PFNCONFIRMDEVICE pfnConfirmDevice)
    	
    	//Replace
    	
    	BOOL D3D_CAdapterInfo::Build(IDirect3D8& rkD3D, UINT iD3DAdapterInfo, PFNCONFIRMDEVICE pfnConfirmDevice)
    
    	//Search
    	
    	rkD3D.GetAdapterIdentifier(iD3DAdapterInfo, 0, &m_kD3DAdapterIdentifier);
    	
    	//Replace
    	
    	rkD3D.GetAdapterIdentifier(iD3DAdapterInfo, D3DENUM_NO_WHQL_LEVEL, &m_kD3DAdapterIdentifier);
    
    	//Search
    	
    	BOOL D3D_CDisplayModeAutoDetector::Build(IDirect3D9& rkD3D, PFNCONFIRMDEVICE pfnConfirmDevice)
    	
    	//Replace
    	
    	BOOL D3D_CDisplayModeAutoDetector::Build(IDirect3D8& rkD3D, PFNCONFIRMDEVICE pfnConfirmDevice)
    
    //GrpDetector.h
    
    	//Search
    	
    #include <d3d9.h>
    
    typedef BOOL (*PFNCONFIRMDEVICE) (D3DCAPS9& rkD3DCaps, UINT uBehavior, D3DFORMAT eD3DFmt);
    
    	//Replace
    	
    #include <d3d8.h>
    
    typedef BOOL (*PFNCONFIRMDEVICE) (D3DCAPS8& rkD3DCaps, UINT uBehavior, D3DFORMAT eD3DFmt);
    
    	//Search
    	
    		VOID Build(IDirect3D9& rkD3D, D3DFORMAT eD3DFmtDefault, UINT iAdapter);
    	
    	//Replace
    	
    		VOID Build(IDirect3D8& rkD3D, D3DFORMAT eD3DFmtDefault, UINT iAdapter);
    
    	//Search
    	
    		BOOL Build(IDirect3D9& rkD3D, UINT iAdapter, UINT iDevType, D3D_CAdapterDisplayModeList& rkD3DADMList, PFNCONFIRMDEVICE pfnConfirmDevice);
    	
    	//Replace
    	
    		BOOL Build(IDirect3D8& rkD3D, UINT iAdapter, UINT iDevType, D3D_CAdapterDisplayModeList& rkD3DADMList, PFNCONFIRMDEVICE pfnConfirmDevice);
    
    	//Search
    	
    		BOOL FindDepthStencilFormat(IDirect3D9& rkD3D, UINT iAdapter, D3DDEVTYPE DeviceType, D3DFORMAT TargetFormat, D3DFORMAT* pDepthStencilFormat);
    	
    	//Replace
    	
    		BOOL FindDepthStencilFormat(IDirect3D8& rkD3D, UINT iAdapter, D3DDEVTYPE DeviceType, D3DFORMAT TargetFormat, D3DFORMAT* pDepthStencilFormat);
    
    	//Search
    	
    		D3DCAPS9	m_kD3DCaps;
    	
    	//Replace
    	
    		D3DCAPS8	m_kD3DCaps;
    
    	//Search
    	
    		BOOL Build(IDirect3D9& rkD3D, UINT iAdapter, PFNCONFIRMDEVICE pfnConfirmDevice);
    	
    	//Replace
    	
    		BOOL Build(IDirect3D8& rkD3D, UINT iAdapter, PFNCONFIRMDEVICE pfnConfirmDevice);
    
    	//Search
    	
    		D3DADAPTER_IDENTIFIER9& GetIdentifier()
    	
    	//Replace
    	
    		D3DADAPTER_IDENTIFIER8& GetIdentifier()
    
    	//Search
    	
    		D3DADAPTER_IDENTIFIER9	m_kD3DAdapterIdentifier;
    	
    	//Replace
    	
    		D3DADAPTER_IDENTIFIER8	m_kD3DAdapterIdentifier;
    
    	//Search
    	
    		BOOL Build(IDirect3D9& rkD3D, PFNCONFIRMDEVICE pfnConfirmDevice);
    	
    	//Replace
    	
    		BOOL Build(IDirect3D8& rkD3D, PFNCONFIRMDEVICE pfnConfirmDevice);
    
    Okay I'm done, I don't want to write down the changes, so you should modify these files also:
    
    //GrpDevice.cpp
    
    //GrpDevice.h
    
    //GrpExpandedImageInstance.cpp
    
    //GrpImageInstance.cpp
    
    //GrpImageTexture.cpp
    
    //GrpIndexBuffer.cpp
    
    //GrpIndexBuffer.h
    
    //GrpLightManager.cpp
    
    //GrpLightManager.h
    
    //GrpMarkInstance.cpp
    
    //GrpPixelShader.cpp
    
    //GrpScreen.cpp
    
    //GrpShadowTexture.cpp
    
    //GrpShadowTexture.h
    
    //GrpTextInstance.cpp
    
    //GrpTexture.cpp
    
    //GrpTexture.h
    
    //GrpVertexBuffer.cpp
    
    //GrpVertexBuffer.h
    
    //GrpVertexShader.cpp
    
    //JpegFile.cpp (JPG Loader)
    
    //LensFlare.cpp
    
    //Ray.h
    
    //SkyBox.cpp
    
    //StateManager.cpp
    
    //StateManager.h
    
    //StdAfx.h
    
    //Util.h
    
    //Client\EterPythonLib
    
    //PythonGraphic.cpp
    
    //PythonGraphic.h
    
    //Client\GameLib
    
    //ActorInstanceRender.cpp
    
    //AreaTerrain.cpp
    
    //AreaTerrain.h
    
    //DungeonBlock.cpp
    
    //FlyTrace.cpp
    
    //MapBase.h
    
    //MapOutdoor.cpp
    
    //MapOutdoor.h
    
    //MapOutdoorCharacterShadow.cpp
    
    //MapOutdoorRender.cpp
    
    //MapOutdoorRenderHTP.cpp
    
    //MapOutdoorRenderSTP.cpp
    
    //MapOutdoorWater.cpp
    
    //MapType.h
    
    //SnowEnvironment.cpp
    
    //SnowEnvironment.h
    
    //TerrainDecal.cpp
    
    //TerrainPatch.cpp
    
    //TerrainPatch.h
    
    //WeaponTrace.cpp
    
    //Client\PRTerrainLib
    
    //Terrain.h
    
    //TerrainType.h
    
    //TextureSet.h
    
    //Client\ScriptLib
    
    //PythonLauncher.cpp (Python upgrade)
    
    //PythonLauncher.h (Python upgrade)
    
    //PythonMarshal.cpp (Python upgrade)
    
    //StdAfx.h (Python upgrade)
    
    //Client\SpeedTreeLib
    
    //SpeedGrassWrapper.h (I think It may have an error.)
    
    	//Search
    	
    	LPDIRECT3DTEXTURE9				m_lpD3DTexure8;
    	
    
    	//Replace
    	
    	LPDIRECT3DTEXTURE8				m_lpD3DTexure8;
    
    //SpeedTreeForestDirectX8.cpp (Error maybe...)
    
    //SpeedTreeForestDirectX8.h
    
    //SpeedTreeMaterial.h
    
    //SpeedTreeWrapper.cpp
    
    //SpeedTreeWrapper.h
    
    //VertexShaders.h
    
    //Client\SphereLib
    
    //StdAfx.h
    
    //Client\UserInterface
    
    //GuildMarkUploader.cpp (So that can be the Guild mark bug cause?)
    
    	ilCopyPixels(0, 0, 0, SGuildMark::WIDTH, SGuildMark::HEIGHT, 1, IL_BGRA, IL_BYTE, m_kMark.m_apxBuf);
    	
    	ilCopyPixels(0, 0, 0, SGuildMark::WIDTH, SGuildMark::HEIGHT, 1, IL_BGRA, IL_BYTE, (ILvoid*)m_kMark.m_apxBuf);
    
    //PythonApplicationLogo.cpp
    
    //PythonMiniMap.cpp (Yeah the source of the minimap bug...)
    
    //PythonMiniMap.h
    
    //PythonSystem.cpp

     

    • Think 1
    • Love 1
  9. Hi Guys!

    I think you didn't see similar before because my problem is too rare (I googled for solution, and I searched a lot to solve it at similar forums).
    So the problem is when you add bonuses to your weapon (or something else), and you go to another map or you simply log out, the bonus will disappear.
    But if you put into your safebox, or you drop the thing to the ground, the bonus is still remain in your item, so I think the problem is somehow "attached" to
    the player's inventory.
    I maded a video from it, you can see it what am I talking about:

    I have two systems in both server and client side, the slot marking system, and the system which is mark the new items which you buy or pick up.

    (Sorry for my bad English I'm Hungarian.)

×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.