iRemain 17 Posted April 5, 2015 Share Posted April 5, 2015 Hi, I wanted to add some new sword effects using binary but I don't know why it dosen't do anything :-? My triying : switch (pItem->GetType()) { case CItemData::ITEM_TYPE_WEAPON: __ClearWeaponRefineEffect(); switch(pItem->GetSubType()) { case CItemData::WEAPON_SWORD: { DWORD vnum = pItem->GetIndex(); if (420 <= vnum && vnum <= 429) { __AttachEffect(EFFECT_REFINED+ EFFECT_SWORD_NEW_REFINED); __AttachEffect(EFFECT_REFINED+ EFFECT_SWORD_NEW_REFINED2); } } if (refine < 7) //현재 제련도 7 이상만 이펙트가 있습니다. return 0; case CItemData::WEAPON_DAGGER: m_swordRefineEffectRight = EFFECT_REFINED+EFFECT_SMALLSWORD_REFINED7+refine-7; m_swordRefineEffectLeft = EFFECT_REFINED+EFFECT_SMALLSWORD_REFINED7_LEFT+refine-7; break; case CItemData::WEAPON_FAN: m_swordRefineEffectRight = EFFECT_REFINED+EFFECT_FANBELL_REFINED7+refine-7; break; case CItemData::WEAPON_ARROW: case CItemData::WEAPON_BELL: m_swordRefineEffectRight = EFFECT_REFINED+EFFECT_SMALLSWORD_REFINED7+refine-7; break; case CItemData::WEAPON_BOW: m_swordRefineEffectRight = EFFECT_REFINED+EFFECT_BOW_REFINED7+refine-7; break; case CItemData::WEAPON_CLAW: m_swordRefineEffectRight = EFFECT_REFINED + EFFECT_SMALLSWORD_REFINED7 + refine - 7; m_swordRefineEffectLeft = EFFECT_REFINED + EFFECT_SMALLSWORD_REFINED7_LEFT + refine - 7; break; default: m_swordRefineEffectRight = EFFECT_REFINED+EFFECT_SWORD_REFINED7+refine-7; } if (m_swordRefineEffectRight) m_swordRefineEffectRight = __AttachEffect(m_swordRefineEffectRight); if (m_swordRefineEffectLeft) m_swordRefineEffectLeft = __AttachEffect(m_swordRefineEffectLeft); break; Link to comment Share on other sites More sharing options...
iRemain 17 Posted April 6, 2015 Author Share Posted April 6, 2015 up Link to comment Share on other sites More sharing options...
Legend 187 Posted April 6, 2015 Share Posted April 6, 2015 if (420 <= vnum && vnum <= 429) Change to: if (420 <= vnum || vnum <= 429) Kind Regards Legend Link to comment Share on other sites More sharing options...
iRemain 17 Posted April 6, 2015 Author Share Posted April 6, 2015 (edited) Nope, that wasn't the problem. I manage to make it but, the problem now is that when I siwtch the weapon the effect remains :-? What would it be the problem? Code: case CItemData::ITEM_TYPE_WEAPON: __ClearWeaponRefineEffect(); if (pItem->GetSubType() == CItemData::WEAPON_SWORD) { DWORD vnum = pItem->GetIndex(); if (vnum <= 420 && vnum <= 429) { __AttachEffect(EFFECT_REFINED + EFFECT_SWORD_REFINED_SPECIAL1); } } if (refine < 7) return 0; switch(pItem->GetSubType()) { case CItemData::WEAPON_DAGGER: m_swordRefineEffectRight = EFFECT_REFINED+EFFECT_SMALLSWORD_REFINED7+refine-7; m_swordRefineEffectLeft = EFFECT_REFINED+EFFECT_SMALLSWORD_REFINED7_LEFT+refine-7; break; case CItemData::WEAPON_FAN: m_swordRefineEffectRight = EFFECT_REFINED+EFFECT_FANBELL_REFINED7+refine-7; break; case CItemData::WEAPON_ARROW: case CItemData::WEAPON_BELL: m_swordRefineEffectRight = EFFECT_REFINED+EFFECT_SMALLSWORD_REFINED7+refine-7; break; case CItemData::WEAPON_BOW: m_swordRefineEffectRight = EFFECT_REFINED+EFFECT_BOW_REFINED7+refine-7; break; default: m_swordRefineEffectRight = EFFECT_REFINED+EFFECT_SWORD_REFINED7+refine-7; } if (m_swordRefineEffectRight) m_swordRefineEffectRight = __AttachEffect(m_swordRefineEffectRight); if (m_swordRefineEffectLeft) m_swordRefineEffectLeft = __AttachEffect(m_swordRefineEffectLeft); break; Image: Edited August 19, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now