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