Class: Wowr::Classes::DisenchantItem

Inherits:
Item
  • Object
show all
Defined in:
lib/wowr/item.rb

Overview

<item name=“Void Crystal” minCount=“1” maxCount=“2” icon=“inv_enchant_voidcrystal” type=“Enchanting” level=“70” dropRate=“6” id=“22450” quality=“4”></item>

Instance Attribute Summary collapse

Attributes inherited from Item

#icon_base, #id, #name

Instance Method Summary collapse

Methods inherited from Item

#icon

Constructor Details

#initialize(elem, api = nil) ⇒ DisenchantItem

:name, :id, :icon,



497
498
499
500
501
502
503
504
505
506
507
508
# File 'lib/wowr/item.rb', line 497

def initialize(elem, api = nil)
	super(elem, api)
	# @name 			= elem[:name]
	# @id 				= elem[:id].to_i
	# @icon 			= elem[:icon]
	@level 			= elem[:level].to_i
	@type 			= elem[:type]
	@drop_rate 	= elem[:dropRate].to_i
	@min_count 	= elem[:minCount].to_i
	@max_count 	= elem[:maxCount].to_i
	@quality 		= elem[:quality].to_i
end

Instance Attribute Details

#drop_rateObject (readonly)

Returns the value of attribute drop_rate.



494
495
496
# File 'lib/wowr/item.rb', line 494

def drop_rate
  @drop_rate
end

#levelObject (readonly)

Returns the value of attribute level.



494
495
496
# File 'lib/wowr/item.rb', line 494

def level
  @level
end

#max_countObject (readonly)

Returns the value of attribute max_count.



494
495
496
# File 'lib/wowr/item.rb', line 494

def max_count
  @max_count
end

#min_countObject (readonly)

Returns the value of attribute min_count.



494
495
496
# File 'lib/wowr/item.rb', line 494

def min_count
  @min_count
end

#qualityObject (readonly)

Returns the value of attribute quality.



494
495
496
# File 'lib/wowr/item.rb', line 494

def quality
  @quality
end

#typeObject (readonly)

Returns the value of attribute type.



494
495
496
# File 'lib/wowr/item.rb', line 494

def type
  @type
end