mirror of
https://gitlab.com/2009scape/2009scape.git
synced 2025-12-20 05:20:22 -07:00
Fixed bots putting inaccessible noted items on GE
This commit is contained in:
parent
9f6e7b49be
commit
a04191b11e
2 changed files with 8 additions and 5 deletions
|
|
@ -187,7 +187,7 @@ public class ItemDefinition extends Definition<Item> {
|
||||||
private int colourEquip2;
|
private int colourEquip2;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The note item.
|
* The note item id if un-noted. The un-noted item id if noted. -1 if no noted counterpart.
|
||||||
*/
|
*/
|
||||||
private int noteId = -1;
|
private int noteId = -1;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,17 +1,18 @@
|
||||||
package core.game.ge
|
package core.game.ge
|
||||||
|
|
||||||
|
import core.ServerConstants
|
||||||
import core.api.*
|
import core.api.*
|
||||||
|
import core.cache.def.impl.ItemDefinition
|
||||||
import core.game.node.entity.player.Player
|
import core.game.node.entity.player.Player
|
||||||
import core.game.node.entity.player.info.PlayerDetails
|
import core.game.node.entity.player.info.PlayerDetails
|
||||||
import core.game.node.entity.player.link.audio.Audio
|
import core.game.node.entity.player.link.audio.Audio
|
||||||
import core.game.system.task.Pulse
|
|
||||||
import core.ServerConstants
|
|
||||||
import core.tools.SystemLogger
|
|
||||||
import core.game.system.command.Privilege
|
import core.game.system.command.Privilege
|
||||||
import core.game.system.config.ItemConfigParser
|
import core.game.system.config.ItemConfigParser
|
||||||
|
import core.game.system.task.Pulse
|
||||||
import core.game.world.GameWorld
|
import core.game.world.GameWorld
|
||||||
import core.game.world.repository.Repository
|
import core.game.world.repository.Repository
|
||||||
import core.tools.Log
|
import core.tools.Log
|
||||||
|
import core.tools.SystemLogger
|
||||||
import core.tools.colorize
|
import core.tools.colorize
|
||||||
import java.lang.Integer.max
|
import java.lang.Integer.max
|
||||||
import java.util.concurrent.LinkedBlockingDeque
|
import java.util.concurrent.LinkedBlockingDeque
|
||||||
|
|
@ -203,7 +204,9 @@ class GrandExchange : StartupListener, Commands {
|
||||||
if (!PriceIndex.canTrade(itemID))
|
if (!PriceIndex.canTrade(itemID))
|
||||||
return false
|
return false
|
||||||
|
|
||||||
val offer = GrandExchangeOffer.createBotOffer(itemID, amount)
|
// noted offers can not be bought.
|
||||||
|
val itemDef = ItemDefinition.forId(itemID)
|
||||||
|
val offer = GrandExchangeOffer.createBotOffer(if (itemDef.isUnnoted) itemID else itemDef.noteId, amount)
|
||||||
pendingOffers.addLast(offer)
|
pendingOffers.addLast(offer)
|
||||||
|
|
||||||
return true
|
return true
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue