Jump to content

Sash problem - Metin2


Recommended Posts

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: https://metin2.download/picture/r3F9504x09DVmF8K988YXgTtGTP6KMUj/.gif

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: https://metin2.download/picture/r3F9504x09DVmF8K988YXgTtGTP6KMUj/.gif

 

Thank you very much!

 

Edited by Metin2 Dev
Core X - External 2 Internal
Link to comment
Share on other sites

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

  • Love 4
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



  • Similar Content

  • Activity

    1. 0

      Metin2 effect script files (MSE and MSA file) how can convert

    2. 10

      Multi Language System

    3. 0

      We are looking for a C++ and Python programmer

    4. 0

      [Quest Scheduler Request] Is there a way to make a quest run independet of player events? Lets say start quest automatically at server startup?

    5. 111

      Ulthar SF V2 (TMP4 Base)

    6. 0

      Quest function when 102.kill definition whereabouts help

    7. 5

      [M2 FILTER] Customized Client Filter

  • Recently Browsing

    • No registered users viewing this page.
×
×
  • 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.