Class: Wowr::Classes::ItemDropCreature
- Inherits:
-
Object
- Object
- Wowr::Classes::ItemDropCreature
- Defined in:
- lib/wowr/item.rb
Overview
Creatures that drop the item <creature name=“Giant Marsh Frog” minLevel=“1” type=“Critter” maxLevel=“1” dropRate=“6” id=“23979” classification=“0” area=“Dustwallow Marsh”></creature> <creature name=“Nalorakk” minLevel=“73” title=“Bear Avatar” url=“fl=dungeon&fl=normal&fl=23576” type=“Humanoid” maxLevel=“73” dropRate=“2” id=“23576” classification=“3” areaUrl=“fl=dungeon&fl=all&fl=normal&fl=3805” area=“Zul’Aman”></creature>
Instance Attribute Summary collapse
-
#area ⇒ Object
readonly
Returns the value of attribute area.
-
#classification ⇒ Object
readonly
Returns the value of attribute classification.
-
#drop_rate ⇒ Object
readonly
Returns the value of attribute drop_rate.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#max_level ⇒ Object
readonly
Returns the value of attribute max_level.
-
#min_level ⇒ Object
readonly
Returns the value of attribute min_level.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(elem) ⇒ ItemDropCreature
constructor
A new instance of ItemDropCreature.
Constructor Details
#initialize(elem) ⇒ ItemDropCreature
Returns a new instance of ItemDropCreature.
441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 |
# File 'lib/wowr/item.rb', line 441 def initialize(elem) @name = elem[:name] @id = elem[:id].to_i @min_level = elem[:minLevel].to_i @max_level = elem[:maxLevel].to_i @drop_rate = elem[:dropRate].to_i @classification = elem[:classification].to_i @area = elem[:area] # optional boss stuff @title = elem[:title] if elem[:title] # TODO: not nil when no property? @url = elem[:url] if elem[:url] @type = elem[:type] if elem[:type] # Humanoid etc. @area_url = elem[:areaUrl] if elem[:areaUrl] end |
Instance Attribute Details
#area ⇒ Object (readonly)
Returns the value of attribute area.
439 440 441 |
# File 'lib/wowr/item.rb', line 439 def area @area end |
#classification ⇒ Object (readonly)
Returns the value of attribute classification.
439 440 441 |
# File 'lib/wowr/item.rb', line 439 def classification @classification end |
#drop_rate ⇒ Object (readonly)
Returns the value of attribute drop_rate.
439 440 441 |
# File 'lib/wowr/item.rb', line 439 def drop_rate @drop_rate end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
439 440 441 |
# File 'lib/wowr/item.rb', line 439 def id @id end |
#max_level ⇒ Object (readonly)
Returns the value of attribute max_level.
439 440 441 |
# File 'lib/wowr/item.rb', line 439 def max_level @max_level end |
#min_level ⇒ Object (readonly)
Returns the value of attribute min_level.
439 440 441 |
# File 'lib/wowr/item.rb', line 439 def min_level @min_level end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
439 440 441 |
# File 'lib/wowr/item.rb', line 439 def name @name end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
439 440 441 |
# File 'lib/wowr/item.rb', line 439 def type @type end |