mirror of
https://github.com/2006-Scape/apollo.git
synced 2026-07-03 00:38:21 +00:00
Rebase the MessageHandler, MessageHandlerChain and MessageHandlerChainSet
Rebased several other pieces of code
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
#
|
||||
# If you only wish to intercept a message, use the intercept method, e.g.
|
||||
#
|
||||
# intercept :item_on_item, used_id, target_id, :irreversible do |ctx, player, message|
|
||||
# intercept :item_on_item, used_id, target_id, :irreversible do |player, message|
|
||||
# # code here
|
||||
# end
|
||||
|
||||
|
||||
@@ -36,11 +36,11 @@ class ItemOnItemPair
|
||||
|
||||
end
|
||||
|
||||
# Adds a message handler to the item on item message.
|
||||
on :message, :item_on_item do |ctx, player, message|
|
||||
# Adds a message listener to the item on item message.
|
||||
on :message, :item_on_item do |player, message|
|
||||
used, target = message.id, message.target_id
|
||||
pair = ItemOnItemPair.new(used, target)
|
||||
block = ITEM_PAIRS[pair]
|
||||
|
||||
block.call(ctx, player, message) unless block == nil
|
||||
block.call(player, message) unless block == nil
|
||||
end
|
||||
Reference in New Issue
Block a user