Hi everyone, i already try to add mde shining for weapon type and it work perfectly.
So i try also to add mde shining to weapon costume and it's not working, shining not display
This is a code who i use :
InstanceBase.cpp
C
- void CInstanceBase::__ClearWeaponRefineEffect()
- {
- if (m_swordRefineEffectRight)
- {
- __DetachEffect(m_swordRefineEffectRight);
- m_swordRefineEffectRight = 0;
- }
- if (m_swordRefineEffectLeft)
- {
- __DetachEffect(m_swordRefineEffectLeft);
- m_swordRefineEffectLeft = 0;
- }
- #ifdef ENABLE_EFFECT_WITH_MDE
- if (weapon_effect)
- {
- __DetachEffect(weapon_effect);
- __DetachEffect(weapon_effect_left);
- weapon_effect= 0;
- weapon_effect_left= 0;
- }
- #endif
- }
C
- UINT CInstanceBase::__GetRefinedEffect(CItemData* pItem)
- {
- DWORD refine = max(pItem->GetRefine() + pItem->GetSocketCount(),CItemData::ITEM_SOCKET_MAX_NUM) - CItemData::ITEM_SOCKET_MAX_NUM;
- switch (pItem->GetType())
- {
- case CItemData::ITEM_TYPE_WEAPON:
- __ClearWeaponRefineEffect();
- #ifdef ENABLE_EFFECT_WITH_MDE
- if (pItem->GetType() == CItemData::ITEM_TYPE_COSTUME)
- {
- switch (pItem->GetSubType())
- {
- case CItemData::COSTUME_WEAPON_FAN:
- if (pItem->GetIndex() == 40140)
- {
- if (m_kHorse.IsMounting())
- {
- weapon_effect = EFFECT_REFINED + SHINING_NAME;
- weapon_effect_left = EFFECT_REFINED + SHINING_NAME;
- }
- else
- {
- weapon_effect = EFFECT_REFINED + SHINING_NAME;
- }
- }
- else if (pItem->GetIndex() == 40147)
- {
- if (m_kHorse.IsMounting())
- {
- weapon_effect = EFFECT_REFINED + SHINING_NAME;
- weapon_effect_left = EFFECT_REFINED + SHINING_NAME;
- }
- else
- {
- weapon_effect = EFFECT_REFINED + SHINING_NAME;
- }
- }
- break;
- case CItemData::COSTUME_WEAPON_BELL:
- if (pItem->GetIndex() == 40120)
- {
- weapon_effect = EFFECT_REFINED + SHINING_NAME;
- }
- break;
- case CItemData::COSTUME_WEAPON_DAGGER:
- if (pItem->GetIndex() == 40125)
- {
- weapon_effect = EFFECT_REFINED + SHINING_NAME;
- weapon_effect_left = EFFECT_REFINED + SHINING_NAME;
- }
- break;
- case CItemData::COSTUME_WEAPON_BOW:
- if (pItem->GetIndex() == 40138)
- {
- weapon_effect = EFFECT_REFINED + SHINING_NAME;
- }
- break;
- default:
- if (pItem->GetIndex() == 40127)
- __AttachEffect(EFFECT_REFINED+SHINING_NAME);
- if (pItem->GetIndex() == 40128)
- }
- if (weapon_effect)
- weapon_effect = __AttachEffect(weapon_effect);
- if (weapon_effect_left)
- weapon_effect_left = __AttachEffect(weapon_effect_left);
- }
- #endif
Someone know what's wrong with that code ?