Rebase the MessageHandler, MessageHandlerChain and MessageHandlerChainSet

Rebased several other pieces of code
This commit is contained in:
atomicint
2015-03-29 12:52:55 -04:00
parent 7f345fffac
commit 654a1a6dfd
71 changed files with 452 additions and 457 deletions
+4 -4
View File
@@ -30,17 +30,17 @@ class BankAction < DistancedAction
end
# Intercepts the object action message
on :message, :second_object_action do |ctx, player, message|
on :message, :second_object_action do |player, message|
if message.id == BANK_BOOTH_ID
player.start_action(BankAction.new(player, message.position))
ctx.break_handler_chain
message.terminate
end
end
on :message, :second_npc_action do |ctx, player, message|
on :message, :second_npc_action do |player, message|
npc = $world.npc_repository.get(message.index)
if BANKER_NPCS.include?(npc.id)
player.start_action(BankAction.new(player, npc.position))
ctx.break_handler_chain
message.terminate
end
end