Jump to content

Hide weapon while emotion is acting


Go to solution Solved by xP3NG3Rx,

Recommended Posts

  • Premium

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.

  • Love 1
Link to comment
https://metin2.dev/topic/19700-hide-weapon-while-emotion-is-acting/
Share on other sites

  • 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
  • Premium
5 hours ago, Raylee said:

Do you tried this way?

Best regards
Raylee

Yes, i was speaking about it, i can't install it bcs is unsafe...

Bad way to do it.

I Want to do only from binary, it's should be easy!

  • 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 4
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])

 

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
  • 2 weeks later...
  • Premium
22 minutes ago, xP3NG3Rx said:

What "up"?

Is that really difficult to make a function to public from private? Hm.

78332c2826.png

Now they want 100% part of code on screen haha

Edited by Metin2 Dev
Core X - External 2 Internal
  • Love 2


 

  • Active+ Member

@xP3NG3Rx Your solution for hide weapon caused a little visual bug. You can see this bug when you buff yourself or another player. Skills are casted more faster than animation.

 

I'll be always helpful!  😉

  • 5 years later...
On 11/7/2018 at 7:22 PM, ReFresh said:

@xP3NG3Rx és ne felejtse el nyilvános funkciót létrehozni a GetCurrentMotionIndex számára. Hogyan kell csinálni?

Locale_inc.h


add

#define ENABLE_EMOTION_HIDE_WEAPON




InstanceBase.cpp

Search:
    

m_GraphicThingInstance.MotionProcess(IsPC());



Add after:

 

#ifdef ENABLE_EMOTION_HIDE_WEAPON
	if (m_GraphicThingInstance.GetCurrentMotionIndex() < CRaceMotionData::NAME_CLAP || m_GraphicThingInstance.GetCurrentMotionIndex() > CRaceMotionData::NAME_JOY || m_GraphicThingInstance.GetCurrentMotionIndex() == CRaceMotionData::NAME_DIG)
	{
		if (m_GraphicThingInstance.GetPartItemID(CRaceData::PART_WEAPON) != m_awPart[CRaceData::PART_WEAPON])
		{
			m_GraphicThingInstance.AttachWeapon(m_awPart[CRaceData::PART_WEAPON]);
			CItemData* pItemData;
			if (CItemManager::Instance().GetItemDataPointer(m_awPart[CRaceData::PART_WEAPON], &pItemData))
			{
				__GetRefinedEffect(pItemData);
			}
		}
	}
	else if (m_GraphicThingInstance.GetPartItemID(CRaceData::PART_WEAPON))
	{
		m_GraphicThingInstance.AttachWeapon(0);
		__ClearWeaponRefineEffect();
	}
#endif

ActorInstanceMotion.cpp

Add end of file

#ifdef ENABLE_EMOTION_HIDE_WEAPON
WORD CActorInstance::GetCurrentMotionIndex()
{
	return __GetCurrentMotionIndex();
}
#endif


Actorinstance.h

Search

        std::deque<CFlyTarget> m_kQue_kFlyTarget;

Add after:
 

#ifdef ENABLE_EMOTION_HIDE_WEAPON
	public:
		WORD GetCurrentMotionIndex();
#endif

build client source, done.
 

 

 

Edited by Gkovacs32
  • Metin2 Dev 1
  • Love 1

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • 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.