Jump to content

sash system effect problem


Recommended Posts

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

Link to comment
Share on other sites

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")

 

Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • Developer

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;
	}

 

  • Love 1

My youtube channel  on which you can see my works here

Link to comment
Share on other sites

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?:)

Link to comment
Share on other sites

  • 4 months later...

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



  • Similar Content

  • Activity

    1. 0

      I just implemented some costumes and they are not visible

    2. 0

      Skill Tree Problem

    3. 97

      Ulthar SF V2 (TMP4 Base)

    4. 5

      Client Crashes through Offline Shop (Ikarus)

    5. 5

      VIVY-WORLD2 - FARM TO THE TOP

    6. 0

      ToolTip Bug?

    7. 0

      Skill tree build erorr

    8. 0

      Visual Bug | How to fix this visual bug inside the Special Storage feature?

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