Advertisement
Guest User

Untitled

a guest
Oct 18th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.33 KB | None | 0 0
  1. UINT CInstanceBase::__GetRefinedEffect(CItemData* pItem)
  2. {
  3. DWORD refine = max(pItem->GetRefine() + pItem->GetSocketCount(), CItemData::ITEM_SOCKET_MAX_NUM) - CItemData::ITEM_SOCKET_MAX_NUM;
  4. switch (pItem->GetType())
  5. {
  6. case CItemData::ITEM_TYPE_WEAPON:
  7. __ClearWeaponRefineEffect();
  8. if (refine < 7)
  9. return 0;
  10. switch (pItem->GetSubType())
  11. {
  12. case CItemData::WEAPON_DAGGER:
  13. m_swordRefineEffectRight = EFFECT_REFINED + EFFECT_SMALLSWORD_REFINED7 + refine - 7;
  14. m_swordRefineEffectLeft = EFFECT_REFINED + EFFECT_SMALLSWORD_REFINED7_LEFT + refine - 7;
  15. break;
  16. case CItemData::WEAPON_FAN:
  17. m_swordRefineEffectRight = EFFECT_REFINED + EFFECT_FANBELL_REFINED7 + refine - 7;
  18. break;
  19. case CItemData::WEAPON_ARROW:
  20. case CItemData::WEAPON_BELL:
  21. m_swordRefineEffectRight = EFFECT_REFINED + EFFECT_SMALLSWORD_REFINED7 + refine - 7;
  22. break;
  23. case CItemData::WEAPON_BOW:
  24. m_swordRefineEffectRight = EFFECT_REFINED + EFFECT_BOW_REFINED7 + refine - 7;
  25. break;
  26. default:
  27. m_swordRefineEffectRight = EFFECT_REFINED + EFFECT_SWORD_REFINED7 + refine - 7;
  28. }
  29. if (m_swordRefineEffectRight)
  30. m_swordRefineEffectRight = __AttachEffect(m_swordRefineEffectRight);
  31. if (m_swordRefineEffectLeft)
  32. m_swordRefineEffectLeft = __AttachEffect(m_swordRefineEffectLeft);
  33. break;
  34. case CItemData::ITEM_TYPE_ARMOR:
  35. __ClearArmorRefineEffect();
  36.  
  37. if (pItem->GetSubType() == CItemData::ARMOR_BODY)
  38. {
  39. DWORD vnum = pItem->GetIndex();
  40.  
  41. if (12010 <= vnum && vnum <= 12049)
  42. {
  43. __AttachEffect(EFFECT_REFINED + EFFECT_BODYARMOR_SPECIAL);
  44. __AttachEffect(EFFECT_REFINED + EFFECT_BODYARMOR_SPECIAL2);
  45. }
  46. if (!shiningdata.empty())
  47. {
  48. for (shiningit = shiningdata.begin(); shiningit != shiningdata.end(); shiningit++)
  49. if (shiningit->first == vnum)
  50. {
  51. std::string substr(shiningit->second);
  52. std::vector<string> chars;
  53. boost::split(chars, substr, boost::is_any_of("#"));
  54. for (std::vector<string>::size_type i = 0; i != chars.size(); i++)
  55. {
  56. __AttachEffectToArmours(chars[i]);
  57. }
  58. }
  59. }
  60. }
  61.  
  62. if (refine < 7)
  63. return 0;
  64.  
  65. if (pItem->GetSubType() == CItemData::ARMOR_BODY)
  66. {
  67. m_armorRefineEffect = EFFECT_REFINED + EFFECT_BODYARMOR_REFINED7 + refine - 7;
  68. __AttachEffect(m_armorRefineEffect);
  69. }
  70. break;
  71. }
  72. return 0;
  73. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement