mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-21 12:42:19 +00:00
Auction House Space Check Fix
This commit is contained in:
1 parent
7c8f18f65e
commit
bf277bbdfe
3 files changed
+148
-50
No files matched your search
@@ -366,8 +366,9 @@ public class ManageAuctionPacket extends AbstractPacket {
|
||||
String result = controller.createGlobalListing(player, sellerName, item, startingPrice, buyoutPrice, durationHours);
|
||||
if (result != null) {
|
||||
// Failed create, return item (or drop to avoid loss).
|
||||
if (!player.inventory.addItemStackToInventory(item.copy())) {
|
||||
player.entityDropItem(item.copy(), 0.5f);
|
||||
// Use same reference so partial add mutates stackSize, then drop only the remainder.
|
||||
if (!player.inventory.addItemStackToInventory(item)) {
|
||||
player.entityDropItem(item, 0.5f);
|
||||
}
|
||||
}
|
||||
if (result == null) {
|
||||
|
||||
Reference in new issue
Block a user