mirror of
https://github.com/2006-Scape/apollo.git
synced 2026-07-06 16:51:37 +00:00
Fix unexpected return in magic plugin
This commit is contained in:
@@ -124,21 +124,21 @@ end
|
|||||||
on :message, :magic_on_item do |player, message|
|
on :message, :magic_on_item do |player, message|
|
||||||
spell = message.spell_id
|
spell = message.spell_id
|
||||||
|
|
||||||
alch = ALCHEMY_SPELLS[spell]
|
alchemy = ALCHEMY_SPELLS[spell]
|
||||||
unless alch.nil?
|
unless alchemy.nil?
|
||||||
slot = message.slot
|
slot = message.slot
|
||||||
item = player.inventory.get(slot)
|
item = player.inventory.get(slot)
|
||||||
player.start_action(AlchemyAction.new(player, alch, slot, item))
|
player.start_action(AlchemyAction.new(player, alchemy, slot, item))
|
||||||
message.terminate
|
message.terminate
|
||||||
return
|
else
|
||||||
end
|
enchant = ENCHANT_SPELLS[message.id]
|
||||||
|
|
||||||
ench = ENCHANT_SPELLS[message.id]
|
if !enchant.nil? && enchant.button == spell
|
||||||
if !ench.nil? && ench.button == spell
|
slot = message.slot
|
||||||
slot = message.slot
|
item = player.inventory.get(slot)
|
||||||
item = player.inventory.get(slot)
|
player.start_action(EnchantAction.new(player, enchant, slot, item, ENCHANT_ITEMS[item.id]))
|
||||||
player.start_action(EnchantAction.new(player, ench, slot, item, ENCHANT_ITEMS[item.id]))
|
message.terminate
|
||||||
message.terminate
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user