Advertisement
Guest User

Untitled

a guest
Jun 17th, 2019
234
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.38 KB | None | 0 0
  1. // 1) Search: bool CHARACTER::CanEquipNow(const LPITEM item, const TItemPos& srcCell, const TItemPos& destCell)
  2. // 2) Before the end of function where is last:
  3. return true;
  4. }
  5. // 3) Make a new line and paste:
  6. #ifdef __EFFECT_SYSTEM__
  7. #ifdef __NEW_ARROW_SYSTEM__
  8. if (item->GetType() == ITEM_WEAPON && item->GetSubType() != WEAPON_ARROW && item->GetSubType() != WEAPON_UNLIMITED_ARROW)
  9. #else
  10. if (item->GetType() == ITEM_WEAPON && item->GetSubType() != WEAPON_ARROW)
  11. #endif
  12. {
  13. LPITEM pkItem = GetWear(WEAR_EFFECT_WEAPON);
  14. if (pkItem)
  15. {
  16. ChatPacket(CHAT_TYPE_INFO, LC_TEXT("You must unwear the weapon effect before."));
  17. return false;
  18. }
  19. }
  20. else if (item->GetType() == ITEM_ARMOR && item->GetSubType() == ARMOR_BODY)
  21. {
  22. LPITEM pkItem = GetWear(WEAR_EFFECT_ARMOR);
  23. if (pkItem)
  24. {
  25. ChatPacket(CHAT_TYPE_INFO, LC_TEXT("You must unwear the armor effect before."));
  26. return false;
  27. }
  28. }
  29. else if (item->GetType() == ITEM_COSTUME && item->GetSubType() == USE_EFFECT)
  30. {
  31. if (item->GetWearFlag() & WEARABLE_EFFECT_ARMOR)
  32. {
  33. LPITEM pkItem = GetWear(WEAR_BODY);
  34. if (!pkItem)
  35. {
  36. ChatPacket(CHAT_TYPE_INFO, LC_TEXT("To can wear a armor effect you must have a armor weared."));
  37. return false;
  38. }
  39. }
  40. else
  41. {
  42. LPITEM pkItem = GetWear(WEAR_WEAPON);
  43. if (!pkItem)
  44. {
  45. ChatPacket(CHAT_TYPE_INFO, LC_TEXT("To can wear a weapon effect you must have a weapon weared."));
  46. return false;
  47. }
  48. }
  49. }
  50. #endif
  51.  
  52.  
  53. // 1) Search: bool CHARACTER::CanUnequipNow(const LPITEM item, const TItemPos& srcCell, const TItemPos& destCell)
  54. // 2) Before the end of function where is last:
  55. return true;
  56. }
  57. // 3) Make a new line and paste:
  58. #ifdef __EFFECT_SYSTEM__
  59. #ifdef __NEW_ARROW_SYSTEM__
  60. if (item->GetType() == ITEM_WEAPON && item->GetSubType() != WEAPON_ARROW && item->GetSubType() != WEAPON_UNLIMITED_ARROW)
  61. #else
  62. if (item->GetType() == ITEM_WEAPON && item->GetSubType() != WEAPON_ARROW)
  63. #endif
  64. {
  65. LPITEM pkItem = GetWear(WEAR_EFFECT_WEAPON);
  66. if (pkItem)
  67. {
  68. ChatPacket(CHAT_TYPE_INFO, LC_TEXT("You must unwear the weapon effect before."));
  69. return false;
  70. }
  71. }
  72. else if (item->GetType() == ITEM_ARMOR && item->GetSubType() == ARMOR_BODY)
  73. {
  74. LPITEM pkItem = GetWear(WEAR_EFFECT_ARMOR);
  75. if (pkItem)
  76. {
  77. ChatPacket(CHAT_TYPE_INFO, LC_TEXT("You must unwear the armor effect before."));
  78. return false;
  79. }
  80. }
  81. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement