Jump to content

Sash unequip problem


Go to solution Solved by Syreldar,

Recommended Posts

  • Premium

Show me your SetAcce method on InstanceBase.cpp.

  • Love 1

 

"Nothing's free in this life.

Ignorant people have an obligation to make up for their ignorance by paying those who help them.

Either you got the brains or cash, if you lack both you're useless."

Syreldar

Link to comment
Share on other sites

void CInstanceBase::SetAcce(DWORD dwAcce)
{
	if (!IsPC())
		return;
	
	if (IsPoly())
		return;
	
	dwAcce += 85000;
	ClearAcceEffect();
	
	float fSpecular = 65.0f;
	fSpecular /= 100.0f;
	m_awPart[CRaceData::PART_ACCE] = dwAcce;
	
	CItemData * pItemData;
	if (!CItemManager::Instance().GetItemDataPointer(dwAcce, &pItemData))
		return;
	
	m_GraphicThingInstance.AttachAcce(pItemData, fSpecular);
	#ifdef ENABLE_OBJ_SCALLING
	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);
	}
	#endif
}

 

Link to comment
Share on other sites

  • Premium
  • Solution
2 minutes ago, Paikei said:


 

 

 

take this part:

	dwAcce += 85000;
	ClearAcceEffect();

Change into:

	__ClearAcceEffect();
	if (dwAcce == 0)
	{
		m_GraphicThingInstance.AttachAcce(false, 0);
		return;
	}

	dwAcce += 85000;

 

  • Love 2

 

"Nothing's free in this life.

Ignorant people have an obligation to make up for their ignorance by paying those who help them.

Either you got the brains or cash, if you lack both you're useless."

Syreldar

Link to comment
Share on other sites

  • Premium
Just now, Paikei said:

Thank you so much, it works now! :)

A "like" and "solved" is enough. No problem.

 

"Nothing's free in this life.

Ignorant people have an obligation to make up for their ignorance by paying those who help them.

Either you got the brains or cash, if you lack both you're useless."

Syreldar

Link to comment
Share on other sites

  • Bot

I had that same problem, and I solved it thanks to this response from @ManiacRobert (I found the solution a little weird since I would never have thought that the problem would be there, but it worked)

Likewise, thank you @Syreldar for this solution that looks more elaborate.

4 hours ago, Syreldar said:

Change into:


	__ClearAcceEffect();
	if (dwAcce == 0)
	{
		m_GraphicThingInstance.AttachAcce(false, 0);
		return;
	}

	dwAcce += 85000;

 

english_banner.gif

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. 4

      Feeding game source to LLM

    2. 0

      Quest 6/7 Problem

    3. 5

      Effect weapons

    4. 0

      [C++] Fix Core Downer Using Negative Number in GM Codes

    5. 3

      Crystal Metinstone

    6. 4

      Feeding game source to LLM

    7. 113

      Ulthar SF V2 (TMP4 Base)

    8. 4

      Feeding game source to LLM

  • 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.