Jump to content
metin2dev
  • 0
Sign in to follow this  
Lua_Horus2

open Sash problem - Metin2

Question

Hello, today  i try implement metin2 oficial sash.

But i have one problem.

I equip one sash, but appear another sash!

Someone help me?

equiped sash and costume window: http://prntscr.com/jwtpez

item_list:  https://pastebin.com/r5ZP4zVd (only problem sash code)

item_desc:  https://pastebin.com/7jbVdp9n (only problem sash code)

item_scale:  https://pastebin.com/FMJ7ZVrV (only problem sash code)

item_proto: https://pastebin.com/pYUpq7rd (only problem sash code)

item_names: https://pastebin.com/X9EZ6s9k (only problem sash code)

model gr2: http://prntscr.com/jwtrv0

 

Thank you very much!

 

Share this post


Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • 0

You missed to update the source for the new sashes.

./UserInterface/InstanceBase.cpp

search for this:
void CInstanceBase::SetSash(DWORD dwSash)
inside this funtcion search this:
dwSash > 86000
replace with this:
dwSash > 87000
and replace this:
dwSash -= 1000;
with this:
dwSash -= 2000;

Should look like this:
 

Spoiler

void CInstanceBase::SetSash(DWORD dwSash)
{
	if (!IsPC())
		return;
	if (IsPoly())
		return;
	dwSash += 85000;
	ClearSashEffect();
	float fSpecular = 65.0f;
	if (dwSash > 87000)
	{
		dwSash -= 2000;
		fSpecular += 35;
		m_dwSashEffect = EFFECT_REFINED + EFFECT_SASH;
		__EffectContainer_AttachEffect(m_dwSashEffect);
	}
	fSpecular /= 100.0f;
	m_awPart[CRaceData::PART_SASH] = dwSash;
	CItemData * pItemData;
	if (!CItemManager::Instance().GetItemDataPointer(dwSash, &pItemData))
		return;
	m_GraphicThingInstance.AttachSash(pItemData, fSpecular);
	DWORD dwRace = GetRace(), dwPos = RaceToJob(dwRace), dwSex = RaceToSex(dwRace);
	dwPos += 1;
	if (dwSex == 0)
		dwPos += 5;
	float fScaleX, fScaleY, fScaleZ, fPositionX, fPositionY, fPositionZ;
	if (pItemData->GetItemScale(dwPos, fScaleX, fScaleY, fScaleZ, fPositionX, fPositionY, fPositionZ))
	{
		m_GraphicThingInstance.SetScale(fScaleX, fScaleY, fScaleZ, true);
		if (m_kHorse.IsMounting())
			fPositionZ += 10.0f;
		m_GraphicThingInstance.SetScalePosition(fPositionX, fPositionY, fPositionZ, true);
	}
}

 

 

No go Serversource, game/src/item.cpp

search this:

else if (GetSubType() == COSTUME_SASH)

inside this if clause replace this:

toSetValue += 1000;

with this:

toSetValue += 2000;

Should look like this:

 

Spoiler

else if (GetSubType() == COSTUME_SASH)
{
	toSetValue -= 85000;
	if (GetSocket(SASH_ABSORPTION_SOCKET) >= SASH_EFFECT_FROM_ABS)
		toSetValue += 2000;

	toSetValue = (bAdd == true) ? toSetValue : 0;
	toSetPart = PART_SASH;
}

 

 

#Link removed

  • Thanks 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×