Jump to content
metin2dev
  • 0
Sign in to follow this  
Tyrael

open sash system effect problem

Question

I have the following problem of not working correctly the effect when equipping the costumee
continuous effect permanently equipped or not costumee
effect disappears only when dying


 

bool CInstanceBase::SetAcce(DWORD eAcce)
{
	if (IsPoly())
		return false;

	if (__IsShapeAnimalWear())
		return false;

	eAcce = eAcce + 65536;
	m_GraphicThingInstance.AttachAcce(eAcce, 0, CRaceData::PART_ACCE);

	if (!eAcce)
	{
		__ClearAcceRefineEffect();
		m_GraphicThingInstance.SetScale(1.0f, 1.0f, 1.0f);
		m_GraphicThingInstance.SetScalePosition(0.0f, 0.0f, 0.0f);
		m_awPart[CRaceData::PART_ACCE] = 0;
	}
	else
	{
		CItemData * pItemData;
		TItemPos Cell;
		Cell.cell = c_Costume_Slot_Acce-1;
		if (CItemManager::Instance().GetItemDataPointer(eAcce, &pItemData))
		{
			__EffectContainer_AttachEffect(m_acceEffect);
			m_acceEffect = EFFECT_REFINED+EFFECT_ACCE_SPECIAL;
			__EffectContainer_AttachEffect(m_acceEffect);

			DWORD Race = GetRace();
			DWORD Job = RaceToJob(Race);
			DWORD Sex = RaceToSex(Race);
			m_GraphicThingInstance.SetScaleNew(pItemData->GetItemScale(Job, Sex));
			if(IsMountingHorse())
			{
				D3DXVECTOR3 pos = pItemData->GetItemScalePosition(Job, Sex);
				if (Sex == 1)
					pos.z = pos.z + 15.0f;
				else
					pos.z = pos.z + 10.0f;
					
				m_GraphicThingInstance.SetScalePosition(pos);
			}
			else
			{
				m_GraphicThingInstance.SetScalePosition(pItemData->GetItemScalePosition(Job, Sex));				
			}
			m_awPart[CRaceData::PART_ACCE] = eAcce;
		}
	}

	return true;
}

other methods none works

bool CInstanceBase::SetAcce(DWORD eAcce)
{
	if (IsPoly())
		return false;

	if (__IsShapeAnimalWear())
		return false;
	
	eAcce = eAcce + 65536;
		// __ClearAcceRefineEffect(); // Clear the previous effect
		// m_acceEffect = EFFECT_REFINED + EFFECT_ACCE_SPECIAL;
		// __EffectContainer_AttachEffect(m_acceEffect);
	m_GraphicThingInstance.AttachAcce(eAcce, 0, CRaceData::PART_ACCE);

	if (!eAcce)
	{
		__ClearAcceRefineEffect();
		m_GraphicThingInstance.SetScale(1.0f, 1.0f, 1.0f);
		m_GraphicThingInstance.SetScalePosition(0.0f, 0.0f, 0.0f);
		m_awPart[CRaceData::PART_ACCE] = 0;
	}
	else
	{
		CItemData * pItemData;
		TItemPos Cell;
		Cell.cell = c_Costume_Slot_Acce-1;
		if (CItemManager::Instance().GetItemDataPointer(eAcce, &pItemData))
		{
			DWORD Race = GetRace();
			DWORD Job = RaceToJob(Race);
			DWORD Sex = RaceToSex(Race);
			m_GraphicThingInstance.SetScaleNew(pItemData->GetItemScale(Job, Sex));	
			if(IsMountingHorse())
			{
				D3DXVECTOR3 pos = pItemData->GetItemScalePosition(Job, Sex);
				if (Sex == 1)
					pos.z = pos.z + 15.0f;
				else
					pos.z = pos.z + 10.0f;
					
				m_GraphicThingInstance.SetScalePosition(pos);
			}
			else
			{
				m_GraphicThingInstance.SetScalePosition(pItemData->GetItemScalePosition(Job, Sex));				
			}
			m_awPart[CRaceData::PART_ACCE] = eAcce;
			__GetRefinedEffect(pItemData);		
		}
		else
			__ClearAcceRefineEffect();		
	}

    return true;
}



	case CItemData::ITEM_TYPE_COSTUME:
		__ClearAcceRefineEffect();

		if (pItem->GetSubType() == CItemData::COSTUME_ACCE)
		{
			case CItemData::COSTUME_ACCE:
			{
				m_acceEffect = EFFECT_REFINED + EFFECT_ACCE_SPECIAL;
				break;
			}
		if (m_acceEffect)
			m_acceEffect = __AttachEffect(m_acceEffect);
		break;
		}



kind regards

Share this post


Link to post
Share on other sites

10 answers to this question

Recommended Posts

  • 0

Hello! I have a problem too, and i fixed. Change SASH with ACCE

In InstanceBase.h, Search:

Quote

EFFECT_REFINED_NUM,

And change this:

Quote

EFFECT_SASH,

With this Example 31:

Quote

EFFECT_SASH = 31,

And Playersettingmodule.py change what you did:

Quote

if app.ENABLE_SASH_SYSTEM:
        chrmgr.RegisterEffect(chrmgr.EFFECT_REFINED + 31, "Bip01", "d:/ymir work/pc/common/effect/armor/acc_01.mse")

 

Share this post


Link to post
Share on other sites
  • 0
hace 6 horas, riku11 dijo:

I want to see this func : 


__ClearAcceRefineEffect
void CInstanceBase::__ClearAcceRefineEffect()
{
	if (!m_acceEffect)
		return;
	
	__EffectContainer_DetachEffect(m_acceEffect);
	m_acceEffect = 0;
}


 

 

hace 12 horas, xDiiZeRx dijo:

Hello! I have a problem too, and i fixed. Change SASH with ACCE

In InstanceBase.h, Search:

And change this:

With this Example 31:

And Playersettingmodule.py change what you did:

 

is not correct the topic is not the visualization of the efect
but refreshing

of equipment or not

try to define it differently and how it should be correctly and does not take the functions

Share this post


Link to post
Share on other sites
  • 0

I think I found the hitch :

 

	eAcce = eAcce + 65536;
		// __ClearAcceRefineEffect(); // Clear the previous effect
		// m_acceEffect = EFFECT_REFINED + EFFECT_ACCE_SPECIAL;
		// __EffectContainer_AttachEffect(m_acceEffect);
	m_GraphicThingInstance.AttachAcce(eAcce, 0, CRaceData::PART_ACCE);

	if (!eAcce)
	{
		__ClearAcceRefineEffect();
		m_GraphicThingInstance.SetScale(1.0f, 1.0f, 1.0f);
		m_GraphicThingInstance.SetScalePosition(0.0f, 0.0f, 0.0f);
		m_awPart[CRaceData::PART_ACCE] = 0;
	}


if(!eAcce) it not possible because eAcce = eAcce + 65536; -> eAcce is never 0 so..

replace this part with 

	eAcce = eAcce + 65536;
		// __ClearAcceRefineEffect(); // Clear the previous effect
		// m_acceEffect = EFFECT_REFINED + EFFECT_ACCE_SPECIAL;
		// __EffectContainer_AttachEffect(m_acceEffect);
	m_GraphicThingInstance.AttachAcce(eAcce, 0, CRaceData::PART_ACCE);

	if ( eAcce  == 65536)
	{
		__ClearAcceRefineEffect();
		m_GraphicThingInstance.SetScale(1.0f, 1.0f, 1.0f);
		m_GraphicThingInstance.SetScalePosition(0.0f, 0.0f, 0.0f);
		m_awPart[CRaceData::PART_ACCE] = 0;
	}

 

  • Thanks 1

Share this post


Link to post
Share on other sites
  • 0
hace 1 hora, riku11 dijo:

I think I found the hitch :

 


	eAcce = eAcce + 65536;
		// __ClearAcceRefineEffect(); // Clear the previous effect
		// m_acceEffect = EFFECT_REFINED + EFFECT_ACCE_SPECIAL;
		// __EffectContainer_AttachEffect(m_acceEffect);
	m_GraphicThingInstance.AttachAcce(eAcce, 0, CRaceData::PART_ACCE);

	if (!eAcce)
	{
		__ClearAcceRefineEffect();
		m_GraphicThingInstance.SetScale(1.0f, 1.0f, 1.0f);
		m_GraphicThingInstance.SetScalePosition(0.0f, 0.0f, 0.0f);
		m_awPart[CRaceData::PART_ACCE] = 0;
	}


if(!eAcce) it not possible because eAcce = eAcce + 65536; -> eAcce is never 0 so..

replace this part with 

	eAcce = eAcce + 65536;
		// __ClearAcceRefineEffect(); // Clear the previous effect
		// m_acceEffect = EFFECT_REFINED + EFFECT_ACCE_SPECIAL;
		// __EffectContainer_AttachEffect(m_acceEffect);
	m_GraphicThingInstance.AttachAcce(eAcce, 0, CRaceData::PART_ACCE);

	if ( eAcce  == 65536)
	{
		__ClearAcceRefineEffect();
		m_GraphicThingInstance.SetScale(1.0f, 1.0f, 1.0f);
		m_GraphicThingInstance.SetScalePosition(0.0f, 0.0f, 0.0f);
		m_awPart[CRaceData::PART_ACCE] = 0;
	}

 

you are right with it is solved the refresh error
:wub:
sorry the annoyance has any idea how to attach a definition
for various effects?:)

Share this post


Link to post
Share on other sites
  • 0
hace 52 minutos, riku11 dijo:

I think I have not fully understood your request

be able to use different effects on each type of sash:wub:

Share this post


Link to post
Share on other sites

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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×