mirror of
https://gitlab.com/2009scape/2009scape.git
synced 2025-12-10 10:20:41 -07:00
Fix pt 2 - contentapi half
This commit is contained in:
parent
31bd7af2b5
commit
8e2d9d1727
1 changed files with 4 additions and 3 deletions
|
|
@ -386,7 +386,7 @@ fun replaceSlot(player: Player, slot: Int, item: Item, currentItem: Item? = null
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cont.remove(currentItem, slot, true)) {
|
if (cont.remove(currentItem, slot, true)) {
|
||||||
return cont.replace(item, slot)
|
return cont.replace(item, slot) ?: currentItem
|
||||||
}
|
}
|
||||||
|
|
||||||
PlayerMonitor.log(player, LogType.DUPE_ALERT, "Potential slot-replacement-based dupe attempt, slot: $slot, item: $item")
|
PlayerMonitor.log(player, LogType.DUPE_ALERT, "Potential slot-replacement-based dupe attempt, slot: $slot, item: $item")
|
||||||
|
|
@ -394,8 +394,9 @@ fun replaceSlot(player: Player, slot: Int, item: Item, currentItem: Item? = null
|
||||||
Container.INVENTORY -> Container.EQUIPMENT
|
Container.INVENTORY -> Container.EQUIPMENT
|
||||||
else -> Container.INVENTORY
|
else -> Container.INVENTORY
|
||||||
}
|
}
|
||||||
if (removeItem(player, currentItem, other))
|
if (removeItem(player, currentItem, other)) {
|
||||||
return cont.replace(item, slot)
|
return cont.replace(item, slot) ?: currentItem
|
||||||
|
}
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue