Class: Reve::Classes::KillLoss

Inherits:
Object
  • Object
show all
Defined in:
lib/reve/classes.rb

Overview

A model to represent losses from being killed. Attributes

  • type_id ( Fixnum ) - Type ID of the KillLoss. (Refer to CCP database dump invtypes)

  • flag ( Fixnum ) - A flag to denoe some special qualities of the KillLoss such as where it was mounted or if it was in a container. Refer to wiki.eve-dev.net/API_Inventory_Flags

  • quantity_dropped ( Fixnum ) - The number of type_id that were dropped for looting - e.g., not destroyed.

  • quantity_destroyed ( Fixnum ) - The number of type_id that were destroyed in the Kill.

  • contained_losses ( [KillLoss] ) - If the KillLoss was a container (refer to type_id) then this array will be populated with a list of KillLoss objects that were inside the container.

See Also: Kill, KillAttacker, KillVictim, Reve::API#personal_kills, Reve::API#corporate_kills

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(elem) ⇒ KillLoss

Returns a new instance of KillLoss.



403
404
405
406
407
408
409
# File 'lib/reve/classes.rb', line 403

def initialize(elem)
  @type_id = elem['typeID'].to_i
  @flag = elem['flag'].to_i
  @quantity_dropped = elem['qtyDropped'].to_i
  @quantity_destroyed = elem['qtyDestroyed'].to_i
  @contained_losses = []        
end

Instance Attribute Details

#contained_lossesObject

Returns the value of attribute contained_losses.



402
403
404
# File 'lib/reve/classes.rb', line 402

def contained_losses
  @contained_losses
end

#flagObject (readonly)

Returns the value of attribute flag.



401
402
403
# File 'lib/reve/classes.rb', line 401

def flag
  @flag
end

#quantity_destroyedObject (readonly)

Returns the value of attribute quantity_destroyed.



401
402
403
# File 'lib/reve/classes.rb', line 401

def quantity_destroyed
  @quantity_destroyed
end

#quantity_droppedObject (readonly)

Returns the value of attribute quantity_dropped.



401
402
403
# File 'lib/reve/classes.rb', line 401

def quantity_dropped
  @quantity_dropped
end

#type_idObject (readonly)

Returns the value of attribute type_id.



401
402
403
# File 'lib/reve/classes.rb', line 401

def type_id
  @type_id
end