Skip to content

Commit 64276c6

Browse files
committed
fix: fix clearItem #100
1 parent a85e686 commit 64276c6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/legacy/api/PlayerAPI.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2841,7 +2841,7 @@ Local<Value> PlayerClass::clearItem(const Arguments& args) {
28412841
} else {
28422842
result += clearCount;
28432843
}
2844-
player->getInventory().removeItem(slot, clearCount);
2844+
player->getHandContainer().removeItem(slot, clearCount);
28452845
}
28462846
}
28472847
auto& armorSlots = player->getArmorContainer().getSlots();
@@ -2852,7 +2852,7 @@ Local<Value> PlayerClass::clearItem(const Arguments& args) {
28522852
} else {
28532853
result += clearCount;
28542854
}
2855-
player->getInventory().removeItem(slot, clearCount);
2855+
player->getArmorContainer().removeItem(slot, clearCount);
28562856
}
28572857
}
28582858
player->refreshInventory();

0 commit comments

Comments
 (0)