Class: Wowr::Classes::Armor

Inherits:
BaseStat show all
Defined in:
lib/wowr/character.rb,
lib/wowr/character.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(elem) ⇒ Armor

Returns a new instance of Armor.



384
385
386
387
388
389
# File 'lib/wowr/character.rb', line 384

def initialize(elem)
	@base 			= elem[:base].to_i
	@effective 	= elem[:effective].to_i
	@percent 		= elem[:percent].to_f
	@pet_bonus 	= elem[:petBonus].to_i == -1 ? nil : elem[:petBonus].to_i
end

Instance Attribute Details

#baseObject (readonly)

Returns the value of attribute base.



603
604
605
# File 'lib/wowr/character.rb', line 603

def base
  @base
end

#effectiveObject (readonly)

Returns the value of attribute effective.



603
604
605
# File 'lib/wowr/character.rb', line 603

def effective
  @effective
end

#percentObject (readonly)

Returns the value of attribute percent.



383
384
385
# File 'lib/wowr/character.rb', line 383

def percent
  @percent
end

#pet_bonusObject (readonly)

Returns the value of attribute pet_bonus.



383
384
385
# File 'lib/wowr/character.rb', line 383

def pet_bonus
  @pet_bonus
end