mirror of
https://github.com/2006-Scape/apollo.git
synced 2026-12-06 19:01:35 +00:00
Add support for specifying the option for events in the declaration (where applicable).
This commit is contained in:
1 parent
a863d8ea71
commit
22f712da23
9 files changed
+89
-96
No files matched your search
@@ -47,21 +47,19 @@ on :event, :item_on_item do |ctx, player, event|
|
||||
end
|
||||
|
||||
# The ItemOptionEvent handler for all Herblore-related functions.
|
||||
on :event, :item_option do |ctx, player, event|
|
||||
if event.option == 1
|
||||
id = event.id
|
||||
method = HERBLORE_ITEM[id]
|
||||
on :event, :first_item_option do |ctx, player, event|
|
||||
id = event.id
|
||||
method = HERBLORE_ITEM[id]
|
||||
|
||||
if method != nil
|
||||
method.invoke(player, id, event.slot)
|
||||
ctx.break_handler_chain
|
||||
end
|
||||
method = DRINK_ITEM[id]
|
||||
if method != nil
|
||||
method.invoke(player, id, event.slot)
|
||||
ctx.break_handler_chain
|
||||
end
|
||||
method = DRINK_ITEM[id]
|
||||
|
||||
if method != nil
|
||||
method.invoke(player, id, event.slot)
|
||||
ctx.break_handler_chain
|
||||
end
|
||||
if method != nil
|
||||
method.invoke(player, id, event.slot)
|
||||
ctx.break_handler_chain
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in new issue
Block a user