Advertisement
Guest User

Untitled

a guest
Mar 29th, 2017
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.01 KB | None | 0 0
  1. case ITEM_WEAPON:
  2. {
  3. #ifdef ENABLE_WEAPON_COSTUME_SYSTEM
  4. LPITEM pkCostumeWeapon = m_pOwner->GetWear(WEAR_COSTUME_WEAPON);
  5. if (pkCostumeWeapon && bAdd)
  6. {
  7. if (pkCostumeWeapon->GetValue(3) == GetSubType() && bAdd)
  8. {
  9. m_pOwner->SetPart(PART_WEAPON, pkCostumeWeapon->GetVnum());
  10. break;
  11. }
  12. else
  13. {
  14. m_pOwner->SetPart(PART_WEAPON, GetVnum());
  15. break;
  16. }
  17. }
  18.  
  19. if (bAdd)
  20. {
  21. if (m_wCell == INVENTORY_MAX_NUM + WEAR_WEAPON)
  22. m_pOwner->SetPart(PART_WEAPON, GetVnum());
  23. }
  24. else
  25. {
  26. if (m_wCell == INVENTORY_MAX_NUM + WEAR_WEAPON)
  27. m_pOwner->SetPart(PART_WEAPON, m_pOwner->GetOriginalPart(PART_WEAPON));
  28. }
  29. #else
  30. if(bAdd)
  31. {
  32. if(m_wCell == INVENTORY_MAX_NUM + WEAR_WEAPON)
  33. {
  34. m_pOwner->SetPart(PART_WEAPON, GetVnum());
  35. }
  36. }
  37. else
  38. {
  39. if(m_wCell == INVENTORY_MAX_NUM + WEAR_WEAPON)
  40. {
  41. m_pOwner->SetPart(PART_WEAPON, m_pOwner->GetOriginalPart(PART_WEAPON));
  42. }
  43. }
  44. #endif
  45. }
  46. break;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement