mirror of
https://github.com/2006-Scape/apollo.git
synced 2026-07-05 16:49:04 +00:00
Fix Magic Check Issues
I forgot to check a few things when i changed magic check's Issues Fix * You couldn't teleport but now you can * Illegal items would throw an error * Process elements would get removed even if you couldn't cast the spell due to moving illegal items
This commit is contained in:
@@ -31,9 +31,13 @@ class SpellAction < Action
|
|||||||
@pulses = 0
|
@pulses = 0
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def illegal_item?
|
||||||
|
false
|
||||||
|
end
|
||||||
|
|
||||||
def execute
|
def execute
|
||||||
if @pulses == 0
|
if @pulses == 0
|
||||||
unless process_elements && check_skill
|
unless check_skill
|
||||||
stop
|
stop
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
@@ -42,8 +46,8 @@ class SpellAction < Action
|
|||||||
stop
|
stop
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
process_elements
|
||||||
end
|
end
|
||||||
|
|
||||||
execute_action
|
execute_action
|
||||||
@pulses += 1
|
@pulses += 1
|
||||||
end
|
end
|
||||||
@@ -113,10 +117,6 @@ class ItemSpellAction < SpellAction
|
|||||||
super
|
super
|
||||||
end
|
end
|
||||||
|
|
||||||
def illegal_item?
|
|
||||||
false
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
# Intercepts the magic on item message.
|
# Intercepts the magic on item message.
|
||||||
@@ -149,7 +149,6 @@ on :message, :button do |player, message|
|
|||||||
unless tele.nil?
|
unless tele.nil?
|
||||||
player.start_action(TeleportingAction.new(player, tele))
|
player.start_action(TeleportingAction.new(player, tele))
|
||||||
message.terminate
|
message.terminate
|
||||||
return
|
|
||||||
end
|
end
|
||||||
|
|
||||||
conv = CONVERT_SPELLS[button]
|
conv = CONVERT_SPELLS[button]
|
||||||
|
|||||||
Reference in New Issue
Block a user