Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- bool Inventory::decreaseCountItem( unsigned int index, unsigned int count, bool& deleteFlag )
- {
- CItem* pItem = buffer_[index];
- int newCount = pItem->m_count - count;
- if (newCount < 0) // ?? ??? ???
- {
- newCount = 0;
- deleteFlag = true;
- LOG_ERROR("not enought item count. now count[%d], delete count[%d]", pItem->Count(), count);
- //ch->m_desc->Close("invalid packet item count");
- return deleteItem(index);
- }
- if (newCount == 0) // ??? ??? 0? ??, ???? ?????
- {
- deleteFlag = true;
- return deleteItem(index);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement