This commit is contained in:
aozhiwei 2023-05-24 19:11:30 +08:00
parent 6e5f6eff1d
commit 830125f7dc

View File

@ -49,13 +49,13 @@ void Compose::Clear()
bool Compose::CanAdd()
{
return GetNum() < 9;
return GetNum() < 8;
}
void Compose::IncNum()
{
++num_;
if (num_ % 3 == 0 && num_ <= 9) {
if ((num_ + 1) % 3 == 0 && num_ < 9) {
TakeOnWeapon(owner_->GetCurrWeapon());
}
if (num_ >= 0) {
@ -73,7 +73,7 @@ void Compose::TakeOnWeapon(Weapon* weapon)
Clear();
auto merge_item_meta = mt::MergeItem::GetById(weapon->meta->id());
if (merge_item_meta) {
std::set<int>* buffs = merge_item_meta->GetBuffs(num_);
std::set<int>* buffs = merge_item_meta->GetBuffs(num_ + 1);
if (buffs) {
for (int buff_id : *buffs) {
hold_buffs_.push_back(owner_->TryAddBuff(owner_, buff_id, nullptr));