1
This commit is contained in:
parent
38aca0f7ab
commit
bb01811af2
@ -1463,6 +1463,13 @@ void BattleDataContext::UseItem(int item_id)
|
|||||||
if (errcode) {
|
if (errcode) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
auto room = RoomMgr::Instance()->GetRoomByUuid(room_uuid);
|
||||||
|
if (room && !room->IsGameOver()) {
|
||||||
|
auto hum = room->GetPlayerByAccountId(account_id);
|
||||||
|
if (hum) {
|
||||||
|
hum->GetBag()->UpdateItemNum(item_id, item_num);
|
||||||
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
f8::UdpLog::Instance()->Warning
|
f8::UdpLog::Instance()->Warning
|
||||||
("UseBattleItem error room_uuid:%s account_id%s",
|
("UseBattleItem error room_uuid:%s account_id%s",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user