Hello fellas
I'm kinda stuck within the Element Spell | Refine_element system.
The problem is, that when i change weapon, where element spell is added the element effect is not shown. However, when you log on with weapon weared or take on/off armor/costume weapon/costume armor or use costume mount. Then the effect apears.
I personally think, that it is problem on the client side in instancebase.cpp, however I'm able to figure out, where the problem really is.
The effect is call in:


I'm kinda stuck within the Element Spell | Refine_element system.
The problem is, that when i change weapon, where element spell is added the element effect is not shown. However, when you log on with weapon weared or take on/off armor/costume weapon/costume armor or use costume mount. Then the effect apears.
I personally think, that it is problem on the client side in instancebase.cpp, however I'm able to figure out, where the problem really is.
The effect is call in:
C++:
//Weapon Effect
CItemData * pItemData;
if (CItemManager::Instance().GetItemDataPointer(eWeapon, &pItemData))
{
__GetRefinedEffect(pItemData);
}
else
{
__ClearWeaponRefineEffect();
#ifdef ENABLE_REFINE_ELEMENT
ClearElementEffect();
#endif
}
return true;
}
UINT CInstanceBase::__GetRefinedEffect(CItemData* pItem)
{
#ifdef ENABLE_SIMPLE_REFINED_EFFECT_CHECK
DWORD refine = pItem->GetRefine();
#else
DWORD refine = max(pItem->GetRefine() + pItem->GetSocketCount(),CItemData::ITEM_SOCKET_MAX_NUM) - CItemData::ITEM_SOCKET_MAX_NUM;
#endif
switch (pItem->GetType())
{
case CItemData::ITEM_TYPE_WEAPON:
{
__ClearWeaponRefineEffect();
#ifdef ENABLE_REFINE_ELEMENT
AttachElementEffect(pItem);
#endif
void CInstanceBase::AttachElementEffect(const CItemData* pItem)
{
ClearElementEffect();
if (GetElementEffect() != 0)
{
switch (pItem->GetSubType())
{
case CItemData::WEAPON_DAGGER:
m_swordElementEffectRight = EFFECT_ELEMENTS_WEAPON + EFFECT_ELEMENTS_SMALLSWORD + GetElementEffect();
m_swordElementEffectLeft = EFFECT_ELEMENTS_WEAPON + EFFECT_ELEMENTS_SMALLSWORD_LEFT + GetElementEffect();
break;
case CItemData::WEAPON_FAN:
m_swordElementEffectRight = EFFECT_ELEMENTS_WEAPON + EFFECT_ELEMENTS_FANBELL + GetElementEffect();
break;
case CItemData::WEAPON_ARROW:
case CItemData::WEAPON_BELL:
m_swordElementEffectRight = EFFECT_ELEMENTS_WEAPON + EFFECT_ELEMENTS_SMALLSWORD + GetElementEffect();
break;
case CItemData::WEAPON_BOW:
m_swordElementEffectRight = EFFECT_ELEMENTS_WEAPON + EFFECT_ELEMENTS_BOW + GetElementEffect();
break;
# ifdef ENABLE_WOLFMAN_CHARACTER
case CItemData::WEAPON_CLAW:
m_swordElementEffectRight = EFFECT_ELEMENTS_WEAPON + EFFECT_ELEMENTS_CLAW + GetElementEffect();
m_swordElementEffectLeft = EFFECT_ELEMENTS_WEAPON + EFFECT_ELEMENTS_CLAW_LEFT + GetElementEffect();
break;
# endif
default:
m_swordElementEffectRight = EFFECT_ELEMENTS_WEAPON + EFFECT_ELEMENTS_SWORD + GetElementEffect();
}
if (m_swordElementEffectRight)
m_swordElementEffectRight = __AttachEffect(m_swordElementEffectRight);
if (m_swordElementEffectLeft)
m_swordElementEffectLeft = __AttachEffect(m_swordElementEffectLeft);
}
}
#endif

