Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void CHARACTER::RemoveSpecifyItem(DWORD vnum, DWORD count)
- {
- if (0 == count)
- return;
- for (UINT i = 0; i < INVENTORY_MAX_NUM; ++i)
- {
- if (NULL == GetInventoryItem(i))
- continue;
- if (GetInventoryItem(i)->GetVnum() != vnum)
- continue;
- //개인 상점에 등록된 물건이면 넘어간다. (개인 상점에서 판매될때 이 부분으로 들어올 경우 문제!)
- if(m_pkMyShop)
- {
- bool isItemSelling = m_pkMyShop->IsSellingItem(GetInventoryItem(i)->GetID());
- if (isItemSelling)
- continue;
- }
- if (vnum >= 80003 && vnum <= 80007)
- LogManager::instance().GoldBarLog(GetPlayerID(), GetInventoryItem(i)->GetID(), QUEST, "RemoveSpecifyItem");
- if (count >= GetInventoryItem(i)->GetCount())
- {
- count -= GetInventoryItem(i)->GetCount();
- GetInventoryItem(i)->SetCount(0);
- if (0 == count)
- return;
- }
- else
- {
- GetInventoryItem(i)->SetCount(GetInventoryItem(i)->GetCount() - count);
- return;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement