UINT CInstanceBase::__GetRefinedEffect(CItemData* pItem, DWORD dwWeaponRarePts, DWORD m_dwCostumEvo)
{
auto 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();
if (refine < 7) //현재 제련도 7 이상만 이펙트가 있습니다.
return 0;
switch(pItem->GetSubType())
{
case CItemData::WEAPON_SWORD:
#ifdef ENABLE_WEAPON_RARITY_SYSTEM
if (pItem->IsFlag(CItemData::ITEM_FLAG_ITEM_RARE_ABILITY) && dwWeaponRarePts >= 150)
{
m_swordRefineEffectRight = __DetermineRarityLevel(pItem->GetSubType(), dwWeaponRarePts);
break;
}
#endif
m_swordRefineEffectRight = EFFECT_REFINED+EFFECT_SWORD_REFINED7+refine-7;
break;
case CItemData::WEAPON_DAGGER:
#ifdef ENABLE_WEAPON_RARITY_SYSTEM
if (pItem->IsFlag(CItemData::ITEM_FLAG_ITEM_RARE_ABILITY) && dwWeaponRarePts >= 150)
{
m_swordRefineEffectRight = __DetermineRarityLevel(pItem->GetSubType(), dwWeaponRarePts);
m_swordRefineEffectLeft = __DetermineRarityLevel(pItem->GetSubType(), dwWeaponRarePts, true);
break;
}
#endif
m_swordRefineEffectRight = EFFECT_REFINED+EFFECT_SMALLSWORD_REFINED7+refine-7;
m_swordRefineEffectLeft = EFFECT_REFINED+EFFECT_SMALLSWORD_REFINED7_LEFT+refine-7;
break;
case CItemData::WEAPON_FAN:
#ifdef ENABLE_WEAPON_RARITY_SYSTEM
if (pItem->IsFlag(CItemData::ITEM_FLAG_ITEM_RARE_ABILITY) && dwWeaponRarePts >= 150)
{
m_swordRefineEffectRight = __DetermineRarityLevel(pItem->GetSubType(), dwWeaponRarePts);
break;
}
#endif
m_swordRefineEffectRight = EFFECT_REFINED+EFFECT_FANBELL_REFINED7+refine-7;
break;
case CItemData::WEAPON_ARROW:
#ifdef ENABLE_QUIVER_SYSTEM
case CItemData::WEAPON_QUIVER:
#endif
case CItemData::WEAPON_BELL:
#ifdef ENABLE_WEAPON_RARITY_SYSTEM
if (pItem->IsFlag(CItemData::ITEM_FLAG_ITEM_RARE_ABILITY) && dwWeaponRarePts >= 150)
{
m_swordRefineEffectRight = __DetermineRarityLevel(pItem->GetSubType(), dwWeaponRarePts);
break;
}
#endif
m_swordRefineEffectRight = EFFECT_REFINED+EFFECT_SMALLSWORD_REFINED7+refine-7;
break;
case CItemData::WEAPON_BOW:
#ifdef ENABLE_WEAPON_RARITY_SYSTEM
if (pItem->IsFlag(CItemData::ITEM_FLAG_ITEM_RARE_ABILITY) && dwWeaponRarePts >= 150)
{
m_swordRefineEffectRight = __DetermineRarityLevel(pItem->GetSubType(), dwWeaponRarePts);
break;
}
#endif
m_swordRefineEffectRight = EFFECT_REFINED+EFFECT_BOW_REFINED7+refine-7;
break;
case CItemData::WEAPON_CLAW:
#ifdef ENABLE_WEAPON_RARITY_SYSTEM
if (pItem->IsFlag(CItemData::ITEM_FLAG_ITEM_RARE_ABILITY) && dwWeaponRarePts >= 150)
{
m_swordRefineEffectRight = __DetermineRarityLevel(pItem->GetSubType(), dwWeaponRarePts);
m_swordRefineEffectLeft = __DetermineRarityLevel(pItem->GetSubType(), dwWeaponRarePts, true);
break;
}
#endif
m_swordRefineEffectRight = EFFECT_REFINED+EFFECT_SMALLSWORD_REFINED7+refine-7;
m_swordRefineEffectLeft = EFFECT_REFINED+EFFECT_SMALLSWORD_REFINED7_LEFT+refine-7;
break;
default:
#ifdef ENABLE_WEAPON_RARITY_SYSTEM
if (pItem->IsFlag(CItemData::ITEM_FLAG_ITEM_RARE_ABILITY) && dwWeaponRarePts >= 150)
{
m_swordRefineEffectRight = __DetermineRarityLevel(pItem->GetSubType(), dwWeaponRarePts);
break;
}
#endif
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;
case CItemData::ITEM_TYPE_ARMOR:
__ClearArmorRefineEffect();
// °ⓒ¿E Æ?E AIÆaÆ®
if (pItem->GetSubType() == CItemData::ARMOR_BODY)
{
DWORD vnum = pItem->GetIndex();
// color armors [blue shining] - DEFAULT
if (vnum >= 12010 && vnum <= 12019 || //Blaustahlpanzer
vnum >= 12020 && vnum <= 12029 || //Blauer Drachenanzug
vnum >= 12030 && vnum <= 12039 || //Auraplattenpanzer
vnum >= 12040 && vnum <= 12049 ||
vnum >= 21080 && vnum <= 21089) //Kleidung des Drachen
{
__AttachEffect(EFFECT_REFINED + EFFECT_BODYARMOR_SPECIAL); //effect 19 bubble
__AttachEffect(EFFECT_REFINED + EFFECT_BODYARMOR_SPECIAL2); //effect 20 blue shining
}
#ifdef ENABLE_VERSION_162_ENABLED
if (20000 >= vnum && vnum <= 20759)
{
__AttachEffect(EFFECT_REFINED + EFFECT_BODYARMOR_SPECIAL3);
break;
}
if (20760 >= vnum && vnum <= 20959)
{
__AttachEffect(EFFECT_REFINED + EFFECT_BODYARMOR_SPECIAL3);
break;
}
if (21210 >= vnum && vnum <= 21305)
{
__AttachEffect(EFFECT_REFINED + EFFECT_BODYARMOR_SPECIAL4);
break;
}
#endif
}
if (pItem->GetSubType() == CItemData::ARMOR_BODY)
{
m_armorRefineEffect = EFFECT_REFINED+EFFECT_BODYARMOR_REFINED7+refine-7;
__AttachEffect(m_armorRefineEffect);
}
break;
case CItemData::ITEM_TYPE_COSTUME:
#ifdef ENABLE_COSTUME_EVOLUTION_SYSTEM
if (pItem->GetSubType() == CItemData::COSTUME_BODY)
{
__ClearArmorRefineEffect();
if (m_dwCostumEvo == 1)
__AttachEffect(EFFECT_REFINED + EFFECT_COSTUME_SYSTEM_SPECIAL1);
else if (m_dwCostumEvo == 2)
__AttachEffect(EFFECT_REFINED + EFFECT_COSTUME_SYSTEM_SPECIAL2);
else if (m_dwCostumEvo == 3)
__AttachEffect(EFFECT_REFINED + EFFECT_COSTUME_SYSTEM_SPECIAL3);
else if (m_dwCostumEvo == 4)
__AttachEffect(EFFECT_REFINED + EFFECT_COSTUME_SYSTEM_SPECIAL4);
else if (m_dwCostumEvo == 5)
__AttachEffect(EFFECT_REFINED + EFFECT_COSTUME_SYSTEM_SPECIAL5);
else if (m_dwCostumEvo == 6)
__AttachEffect(EFFECT_REFINED + EFFECT_COSTUME_SYSTEM_SPECIAL6);
else if (m_dwCostumEvo == 7)
__AttachEffect(EFFECT_REFINED + EFFECT_COSTUME_SYSTEM_SPECIAL7);
}
break;
#endif
}
return 0;
}