class RuneRb::GroundItems::GroundItemEvent

Attributes

item[R]

Public Class Methods

new(item) click to toggle source
Calls superclass method RuneRb::Engine::Event::new
# File app/services/ground_items.rb, line 50
def initialize(item)
  super(30000)
  @item = item
end

Public Instance Methods

execute() click to toggle source
# File app/services/ground_items.rb, line 55
def execute
  if !@item.global
    if @item.available
      @item.make_global
    else
      stop
    end
  else
    if @item.available
      @item.remove
    end
    
    stop
  end
end