添加战场掉落伪装处理
This commit is contained in:
parent
d6c7d04e36
commit
9142edc8f7
@ -2811,6 +2811,10 @@ void Human::AddItem(int item_id, int item_num)
|
||||
|
||||
if (room->frame_no > join_frameno) {
|
||||
room->frame_event.AddItemChg(this, item_id, items_[item_id]);
|
||||
} else {
|
||||
if (item_num <= 0) {
|
||||
battling_items_.insert(item_id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -2821,7 +2825,9 @@ void Human::DecItem(int item_id, int item_num)
|
||||
itr->second -= item_num;
|
||||
room->frame_event.AddItemChg(this, item_id, std::max(0, itr->second));
|
||||
if (itr->second <= 0) {
|
||||
items_.erase(itr);
|
||||
if (battling_items_.find(item_id) == battling_items_.end()) {
|
||||
items_.erase(itr);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -312,6 +312,7 @@ private:
|
||||
long long last_sync_gas_frameno = 0;
|
||||
std::list<Buff> buff_list_;
|
||||
std::map<int, int> items_;
|
||||
std::set<int> battling_items_;
|
||||
std::array<Buff*, kBET_End> buff_effect_ = {};
|
||||
|
||||
std::array<float, kHAT_End> buff_attr_abs_ = {};
|
||||
|
Loading…
x
Reference in New Issue
Block a user