mirror of
https://gitlab.com/2009scape/2009scape.git
synced 2026-08-01 14:39:13 -06:00
Fixed a bug with usewith listeners where the ids could be flipped in inappropriate contexts
This commit is contained in:
parent
c3250acce1
commit
77b0fc4eb6
1 changed files with 4 additions and 1 deletions
|
|
@ -171,7 +171,10 @@ object InteractionListeners {
|
|||
var flipped = false
|
||||
|
||||
val method = if (with is Player) get(-1, used.id, 4) ?: return false
|
||||
else get(used.id,with.id,type) ?: get(with.id,used.id,type).also { flipped = true } ?: return false
|
||||
else get(used.id,with.id,type) ?:
|
||||
if (type == InteractionListener.ITEM)
|
||||
get(with.id,used.id,type).also { flipped = true } ?: return false
|
||||
else return false
|
||||
|
||||
val destOverride = if(flipped) {
|
||||
getOverride(type, used.id, "use") ?: getOverride(type, with.id) ?: getOverride(type, "use")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue