Advertisement
Guest User

Untitled

a guest
Apr 24th, 2019
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.97 KB | None | 0 0
  1. case ITEM_COSTUME:
  2. {
  3. DWORD toSetValue = this->GetVnum();
  4. EParts toSetPart = PART_MAX_NUM;
  5.  
  6. // °©żĘ ÄÚ˝şĂő
  7. if (GetSubType() == COSTUME_BODY)
  8. {
  9. toSetPart = PART_MAIN;
  10.  
  11. quest::PC* pPC = quest::CQuestManager::instance().GetPC(m_pOwner->GetPlayerID());
  12. if (!bAdd || (pPC && pPC->GetFlag(iaChangeVisualEqFlagName[PART_MAIN])))
  13. {
  14. const CItem* pArmor = m_pOwner->GetWear(WEAR_BODY);
  15. toSetValue = (NULL != pArmor) ? pArmor->GetVnum() : m_pOwner->GetOriginalPart(PART_MAIN);
  16. }
  17. }
  18.  
  19. #ifdef __WEAPON_COSTUME_SYSTEM__
  20. else if (GetSubType() == COSTUME_WEAPON)
  21. {
  22. toSetPart = PART_WEAPON;
  23.  
  24. quest::PC* pPC = quest::CQuestManager::instance().GetPC(m_pOwner->GetPlayerID());
  25. if (!bAdd || (pPC && pPC->GetFlag(iaChangeVisualEqFlagName[PART_WEAPON])))
  26. {
  27. const CItem* pWeapon = m_pOwner->GetWear(WEAR_WEAPON);
  28. toSetValue = (NULL != pWeapon) ? pWeapon->GetVnum() : m_pOwner->GetPart(PART_WEAPON);
  29. }
  30. }
  31. #endif
  32.  
  33. else if (GetSubType() == COSTUME_HAIR)
  34. {
  35. toSetPart = PART_HAIR;
  36. toSetValue = (true == bAdd) ? this->GetValue(3) : 0;
  37.  
  38. quest::PC* pPC = quest::CQuestManager::instance().GetPC(m_pOwner->GetPlayerID());
  39. if (pPC && pPC->GetFlag(iaChangeVisualEqFlagName[PART_HAIR]))
  40. toSetValue = 0;
  41. }
  42.  
  43. #ifdef __SASH_SYSTEM__
  44. else if (GetSubType() == COSTUME_SASH)
  45. {
  46. toSetPart = PART_SASH;
  47. toSetValue -= 85000;
  48. if (GetSocket(SASH_ABSORPTION_SOCKET) >= SASH_EFFECT_FROM_ABS)
  49. toSetValue += 1000;
  50.  
  51. toSetValue = (bAdd == true) ? toSetValue : 0;
  52.  
  53. quest::PC* pPC = quest::CQuestManager::instance().GetPC(m_pOwner->GetPlayerID());
  54. if (pPC && pPC->GetFlag(iaChangeVisualEqFlagName[PART_SASH]))
  55. toSetValue = 0;
  56. }
  57. #endif
  58.  
  59. if (PART_MAX_NUM != toSetPart)
  60. {
  61. m_pOwner->SetPart((BYTE)toSetPart, toSetValue);
  62. m_pOwner->UpdatePacket();
  63. }
  64. }
  65. break;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement