Jump to content
  • 0

Hide weapon when using emotion


ReFresh

Question

Hello guys,

I have implemented function done maybe by @xP3NG3Rx, I'm not sure. And I found a bug with weapon. Have someone solution for that? 

Video with the bug:

Spoiler
https://youtu.be/PPfHZHogehE

 

InstanceBase.cpp:

Spoiler
if (m_GraphicThingInstance.__GetCurrentMotionIndex() < CRaceMotionData::NAME_CLAP || 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);

			if (IsAffect(AFFECT_GEOMGYEONG))
				__Warrior_SetGeomgyeongAffect(true);

			if (IsAffect(AFFECT_GWIGEOM))
				__AttachEffect(EFFECT_AFFECT + AFFECT_GWIGEOM);
		}
	}

	else if (m_GraphicThingInstance.GetPartItemID(CRaceData::PART_WEAPON))
	{
		m_GraphicThingInstance.AttachWeapon(0);
		__ClearWeaponRefineEffect();

		if (IsAffect(AFFECT_GEOMGYEONG))
			__Warrior_SetGeomgyeongAffect(false);
		if (IsAffect(AFFECT_GWIGEOM))
			__DetachEffect(EFFECT_AFFECT + AFFECT_GWIGEOM);
	}

 

ActorInstance.h:

Spoiler
public:
		WORD		__GetCurrentMotionIndex();

 

 

  • Love 1
Link to comment

5 answers to this question

Recommended Posts

  • 0

You can block equip change when emotion running.. Normally emotion is stopped when you unequip armour or weapon.. So this is easy way how to fix it.. 

  • Love 1
Link to comment
  • 0

@Cunoo I don't think it's a good fix for it 😄 and maybe it's not possible to do that, because this function probably overwriting the default function for emotion use in server source.

  • Love 1
Link to comment
  • 0
6 hours ago, ReFresh said:

@Cunoo I don't think it's a good fix for it 😄 and maybe it's not possible to do that, because this function probably overwriting the default function for emotion use in server source.

Default function stop it running emote... (official code) So this is same fix about ymir... You don't make more than true, false...  I think you can more, but this is not badest code.. If you can't make memory leak you are right..  Not the best but right.. 

Link to comment

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


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