Fix Runecrafting (broken by cf7a742).

This commit is contained in:
Major-
2015-01-12 02:33:05 +00:00
parent 49593955a1
commit 51c1cc3193
2 changed files with 5 additions and 3 deletions
+2 -1
View File
@@ -26,7 +26,7 @@ end
# Intercepts the item on object message.
on :message, :item_on_object do |ctx, player, message|
talisman = TALISMANS[message.id]; altar = ENTRANCE_ALTARS[message.object_id]
if (talisman != nil && altar != nil)
unless (talisman.nil? || altar.nil?)
player.start_action(TeleportAction.new(player, message.position, 2, altar.entrance_position))
ctx.break_handler_chain
end
@@ -36,6 +36,7 @@ end
on :message, :object_action do |ctx, player, message|
if (message.option == 1)
object_id = message.id
if (altar = PORTALS[object_id]) != nil # Get the altar associated with this exit portal.
player.start_action(TeleportAction.new(player, altar.entrance_position, 1, altar.exit_position))
ctx.break_handler_chain