Class: Reve::Classes::KillAttacker
Overview
It’s possible to be killed/attacked by an NPC. In this case character_id, character_name, alliance_id, alliance_name and weapon_type_id will be nil Represents an attacker (attacking a KillVictim) in a Kill Attributes
-
id ( Fixnum | NilClass ) - ID of the attacker; nil if the attacker was an NPC or not a Character
-
name ( String | NilClass ) - Name of the attacker; nil if the attacker was an NPC or not a Character
-
corporation_id ( Fixnum ) - ID of the Corporation that the Character belongs to (could be NPC Corporation!)
-
corporation_name ( String ) - Name of the Corporation that the Character belongs to (could be NPC Corporation!)
-
alliance_id ( Fixnum | NilClass ) - ID of the Alliance that the Character belongs to (nil if the KillAttacker doesn’t belong to an Alliance)
-
security_status ( Float ) - Security status of the KillAttacker
-
damage_done ( Fixnum ) - How much damage the KillAttacker did.
-
final_blow ( Boolean ) - True if this KillAttacker got the final blow to kill the KillVictim
-
weapon_type_id ( Fixnum | NilClass ) - Type ID of the (a?) weapon the KillAttacker was firing. (Refer to CCP database dump invtypes)
-
ship_type_id ( Fixnum ) - Type ID of the ship the KillAttacker was flying. (Refer to CCP database dump invtypes)
See Also: Kill, KillLoss, KillVictim, Reve::API#personal_kills, Reve::API#corporate_kills
Instance Attribute Summary collapse
-
#alliance_id ⇒ Object
readonly
Returns the value of attribute alliance_id.
-
#alliance_name ⇒ Object
readonly
Returns the value of attribute alliance_name.
-
#corporation_id ⇒ Object
readonly
Returns the value of attribute corporation_id.
-
#corporation_name ⇒ Object
readonly
Returns the value of attribute corporation_name.
-
#damage_done ⇒ Object
readonly
Returns the value of attribute damage_done.
-
#faction_id ⇒ Object
readonly
Returns the value of attribute faction_id.
-
#faction_name ⇒ Object
readonly
Returns the value of attribute faction_name.
-
#final_blow ⇒ Object
readonly
Returns the value of attribute final_blow.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#security_status ⇒ Object
readonly
Returns the value of attribute security_status.
-
#ship_type_id ⇒ Object
readonly
Returns the value of attribute ship_type_id.
-
#weapon_type_id ⇒ Object
readonly
Returns the value of attribute weapon_type_id.
Instance Method Summary collapse
-
#initialize(elem) ⇒ KillAttacker
constructor
:nodoc:.
Constructor Details
#initialize(elem) ⇒ KillAttacker
:nodoc:
337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 |
# File 'lib/reve/classes.rb', line 337 def initialize(elem) #:nodoc: @id = elem['characterID'] == "0" ? nil : elem['characterID'].to_i @name = elem['characterName'].empty? ? nil : elem['characterName'] @corporation_id = elem['corporationID'].to_i @corporation_name = elem['corporationName'] @alliance_id = elem['allianceID'] == "0" ? nil : elem['allianceID'].to_i @alliance_name = elem['allianceName'].empty? ? nil : elem['allianceName'] @faction_id = elem['factionID'] == "0" ? nil : elem['factionID'].to_i @faction_name = elem['factionName'].empty? ? nil : elem['factionName'] @security_status = elem['securityStatus'].to_f @damage_done = elem['damageDone'].to_i @final_blow = elem['finalBlow'] == "1" @weapon_type_id = elem['weaponTypeID'] == "0" ? nil : elem['weaponTypeID'].to_i @ship_type_id = elem['shipTypeID'].to_i end |
Instance Attribute Details
#alliance_id ⇒ Object (readonly)
Returns the value of attribute alliance_id.
335 336 337 |
# File 'lib/reve/classes.rb', line 335 def alliance_id @alliance_id end |
#alliance_name ⇒ Object (readonly)
Returns the value of attribute alliance_name.
335 336 337 |
# File 'lib/reve/classes.rb', line 335 def alliance_name @alliance_name end |
#corporation_id ⇒ Object (readonly)
Returns the value of attribute corporation_id.
335 336 337 |
# File 'lib/reve/classes.rb', line 335 def corporation_id @corporation_id end |
#corporation_name ⇒ Object (readonly)
Returns the value of attribute corporation_name.
335 336 337 |
# File 'lib/reve/classes.rb', line 335 def corporation_name @corporation_name end |
#damage_done ⇒ Object (readonly)
Returns the value of attribute damage_done.
335 336 337 |
# File 'lib/reve/classes.rb', line 335 def damage_done @damage_done end |
#faction_id ⇒ Object (readonly)
Returns the value of attribute faction_id.
335 336 337 |
# File 'lib/reve/classes.rb', line 335 def faction_id @faction_id end |
#faction_name ⇒ Object (readonly)
Returns the value of attribute faction_name.
335 336 337 |
# File 'lib/reve/classes.rb', line 335 def faction_name @faction_name end |
#final_blow ⇒ Object (readonly)
Returns the value of attribute final_blow.
335 336 337 |
# File 'lib/reve/classes.rb', line 335 def final_blow @final_blow end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
335 336 337 |
# File 'lib/reve/classes.rb', line 335 def id @id end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
335 336 337 |
# File 'lib/reve/classes.rb', line 335 def name @name end |
#security_status ⇒ Object (readonly)
Returns the value of attribute security_status.
335 336 337 |
# File 'lib/reve/classes.rb', line 335 def security_status @security_status end |
#ship_type_id ⇒ Object (readonly)
Returns the value of attribute ship_type_id.
335 336 337 |
# File 'lib/reve/classes.rb', line 335 def ship_type_id @ship_type_id end |
#weapon_type_id ⇒ Object (readonly)
Returns the value of attribute weapon_type_id.
335 336 337 |
# File 'lib/reve/classes.rb', line 335 def weapon_type_id @weapon_type_id end |