Jump to content

Hide weapon while emotion is acting


Go to solution Solved by xP3NG3Rx,

Recommended Posts

  • Forum Moderator
On 10/10/2018 at 6:11 PM, WeedHex said:

Hello, i need your help for a thing already asked in metin2dev but i couldn't use it.

 

Someone have a way to: Hide weapon while emotion is acting?  

More better if you can do it from binary only.

Do you tried this way?

Best regards
Raylee

  • Love 1
Link to comment
Share on other sites

  • 2 weeks later...
  • Honorable Member
  • Solution
	AttackProcess();
	MovementProcess();

	m_GraphicThingInstance.MotionProcess(IsPC());
	// Hide weapon: GetCurrentMotionIndex public version of the __GetCurrentMotionIndex in gamelib\\ActorInstance.h
	if (m_GraphicThingInstance.GetCurrentMotionIndex() < CRaceMotionData::NAME_CLAP || m_GraphicThingInstance.GetCurrentMotionIndex() == CRaceMotionData::NAME_DIG)
	{
		if (m_GraphicThingInstance.GetPartItemID(CRaceData::PART_WEAPON) != m_adwPart[CRaceData::PART_WEAPON])
		{
			m_GraphicThingInstance.AttachWeapon(m_adwPart[CRaceData::PART_WEAPON]);
			CItemData* pItemData;
			if (CItemManager::Instance().GetItemDataPointer(m_adwPart[CRaceData::PART_WEAPON], &pItemData))
				__GetRefinedEffect(pItemData);
		}
	}
	else if (m_GraphicThingInstance.GetPartItemID(CRaceData::PART_WEAPON))
	{
		m_GraphicThingInstance.AttachWeapon(0);
		__ClearWeaponRefineEffect();
	}
	// EOF Hide weapon

	if (IsMountingHorse())
	{
		m_kHorse.m_pkActor->HORSE_MotionProcess(FALSE);
	}

Give a try with this, just put in the CInstanceBase::Update make it fit over there, and don't forget to make a public function for the GetCurrentMotionIndex.

  • Metin2 Dev 1
  • Love 3
Link to comment
Share on other sites

On 10/28/2018 at 9:05 PM, xP3NG3Rx said:

	AttackProcess();
	MovementProcess();

	m_GraphicThingInstance.MotionProcess(IsPC());
	// Hide weapon: GetCurrentMotionIndex public version of the __GetCurrentMotionIndex in gamelib\\ActorInstance.h
	if (m_GraphicThingInstance.GetCurrentMotionIndex() < CRaceMotionData::NAME_CLAP || m_GraphicThingInstance.GetCurrentMotionIndex() == CRaceMotionData::NAME_DIG)
	{
		if (m_GraphicThingInstance.GetPartItemID(CRaceData::PART_WEAPON) != m_adwPart[CRaceData::PART_WEAPON])
		{
			m_GraphicThingInstance.AttachWeapon(m_adwPart[CRaceData::PART_WEAPON]);
			CItemData* pItemData;
			if (CItemManager::Instance().GetItemDataPointer(m_adwPart[CRaceData::PART_WEAPON], &pItemData))
				__GetRefinedEffect(pItemData);
		}
	}
	else if (m_GraphicThingInstance.GetPartItemID(CRaceData::PART_WEAPON))
	{
		m_GraphicThingInstance.AttachWeapon(0);
		__ClearWeaponRefineEffect();
	}
	// EOF Hide weapon

	if (IsMountingHorse())
	{
		m_kHorse.m_pkActor->HORSE_MotionProcess(FALSE);
	}

Give a try with this, just put in the CInstanceBase::Update make it fit over there, and don't forget to make a public function for the GetCurrentMotionIndex.

You have one error in this code.  This part:

if (m_GraphicThingInstance.GetPartItemID(CRaceData::PART_WEAPON) != m_adwPart[CRaceData::PART_WEAPON])

 

Link to comment
Share on other sites

43 minutes ago, xP3NG3Rx said:

What do you mean?

https://metin2.download/picture/7V01Op768kDUmMTvl3xJ5n98wI1r7lTU/.png

https://metin2.download/picture/Kt5vzdtI9wEklie1NkMA6fWVkMR179uT/.png

Or they are from my shite visual studio xD

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

  • 2 weeks later...

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



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