Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifdef SET_ATT_ITEM
- case USE_SET_ATT_COSTUME :
- {
- LPITEM item2;
- if (!IsValidItemPosition(DestCell) || !(item2 = GetItem(DestCell)))
- return false;
- if (item2->IsEquipped())
- {
- BuffOnAttr_RemoveBuffsFromItem(item2);
- }
- if (item2->IsExchanging() || item2->IsEquipped()) // @fixme114
- return false;
- if ((item2->GetType() == ITEM_COSTUME) && (item2->GetSubType() == COSTUME_BODY))
- {
- if (item2->GetAttributeCount() < 2)
- {
- if (item2->HasAttr(item->GetValue(0)))
- {
- ChatPacket(CHAT_TYPE_INFO, "You can't add the same bonus two times.");
- return false;
- }
- item2->AddAttribute(item->GetValue(0), item->GetValue(1));
- ChatPacket(CHAT_TYPE_INFO, "The bonus has been added successfully.");
- item->SetCount(item->GetCount() - 1);
- }
- else
- {
- ChatPacket(CHAT_TYPE_INFO, "Adding bonus failed. You can only add two bonuses on your costume!");
- }
- }
- else
- {
- ChatPacket(CHAT_TYPE_INFO, "The bonus goes only on the costume!");
- }
- }
- break;
- #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement