1
This commit is contained in:
parent
78a5893c09
commit
92ecda9c19
@ -47,6 +47,11 @@ void Compose::Clear()
|
||||
hold_buffs_.clear();
|
||||
}
|
||||
|
||||
bool Compose::CanAdd()
|
||||
{
|
||||
return GetNum() < 9;
|
||||
}
|
||||
|
||||
void Compose::IncNum()
|
||||
{
|
||||
++num_;
|
||||
|
@ -12,6 +12,7 @@ class Compose
|
||||
|
||||
void Init();
|
||||
void IncNum();
|
||||
bool CanAdd();
|
||||
int GetNum() { return num_; }
|
||||
|
||||
private:
|
||||
|
@ -2637,7 +2637,7 @@ void Human::ProcLootWeaponNew(AddItemDTO& dto)
|
||||
if (GetCurrWeapon()->weapon_idx == GUN_SLOT1 ||
|
||||
GetCurrWeapon()->weapon_idx == GUN_SLOT2) {
|
||||
if (GetCurrWeapon()->weapon_id == dto.item_meta->id()) {
|
||||
if (GetCompose()->GetNum() >= 9) {
|
||||
if (!GetCompose()->CanAdd()) {
|
||||
return;
|
||||
}
|
||||
GetCompose()->IncNum();
|
||||
|
Loading…
x
Reference in New Issue
Block a user