mirror of
https://github.com/2006-Scape/apollo.git
synced 2026-07-04 08:39:27 +00:00
Rebase the MessageHandler, MessageHandlerChain and MessageHandlerChainSet
Rebased several other pieces of code
This commit is contained in:
@@ -71,13 +71,13 @@ class Conversation
|
||||
raise 'Npc cannot be null when opening a dialogue.' if npc_index.nil?
|
||||
@starters << dialogue
|
||||
|
||||
on :message, :first_npc_action do |ctx, player, event|
|
||||
npc = $world.npc_repository.get(event.index)
|
||||
on :message, :first_npc_action do |player, message|
|
||||
npc = $world.npc_repository.get(message.index)
|
||||
if npc_index == npc.id
|
||||
@starters.each do |start|
|
||||
if dialogue.precondition(player)
|
||||
player.start_action(OpenDialogueAction.new(player, npc, dialogue))
|
||||
ctx.break_handler_chain()
|
||||
message.terminate
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user