Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- case ITEM_COSTUME:
- {
- DWORD toSetValue = this->GetVnum();
- EParts toSetPart = PART_MAX_NUM;
- // °©żĘ ÄÚ˝şĂő
- if (GetSubType() == COSTUME_BODY)
- {
- toSetPart = PART_MAIN;
- quest::PC* pPC = quest::CQuestManager::instance().GetPC(m_pOwner->GetPlayerID());
- if (!bAdd || (pPC && pPC->GetFlag(iaChangeVisualEqFlagName[PART_MAIN])))
- {
- const CItem* pArmor = m_pOwner->GetWear(WEAR_BODY);
- toSetValue = (NULL != pArmor) ? pArmor->GetVnum() : m_pOwner->GetOriginalPart(PART_MAIN);
- }
- }
- #ifdef __WEAPON_COSTUME_SYSTEM__
- else if (GetSubType() == COSTUME_WEAPON)
- {
- toSetPart = PART_WEAPON;
- quest::PC* pPC = quest::CQuestManager::instance().GetPC(m_pOwner->GetPlayerID());
- if (!bAdd || (pPC && pPC->GetFlag(iaChangeVisualEqFlagName[PART_WEAPON])))
- {
- const CItem* pWeapon = m_pOwner->GetWear(WEAR_WEAPON);
- toSetValue = (NULL != pWeapon) ? pWeapon->GetVnum() : m_pOwner->GetPart(PART_WEAPON);
- }
- }
- #endif
- else if (GetSubType() == COSTUME_HAIR)
- {
- toSetPart = PART_HAIR;
- toSetValue = (true == bAdd) ? this->GetValue(3) : 0;
- quest::PC* pPC = quest::CQuestManager::instance().GetPC(m_pOwner->GetPlayerID());
- if (pPC && pPC->GetFlag(iaChangeVisualEqFlagName[PART_HAIR]))
- toSetValue = 0;
- }
- #ifdef __SASH_SYSTEM__
- else if (GetSubType() == COSTUME_SASH)
- {
- toSetPart = PART_SASH;
- toSetValue -= 85000;
- if (GetSocket(SASH_ABSORPTION_SOCKET) >= SASH_EFFECT_FROM_ABS)
- toSetValue += 1000;
- toSetValue = (bAdd == true) ? toSetValue : 0;
- quest::PC* pPC = quest::CQuestManager::instance().GetPC(m_pOwner->GetPlayerID());
- if (pPC && pPC->GetFlag(iaChangeVisualEqFlagName[PART_SASH]))
- toSetValue = 0;
- }
- #endif
- if (PART_MAX_NUM != toSetPart)
- {
- m_pOwner->SetPart((BYTE)toSetPart, toSetValue);
- m_pOwner->UpdatePacket();
- }
- }
- break;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement