class BN::Entity::D3::Hero

A hero within Diablo 3.

Constants

MAX_LEVEL

Public Class Methods

new(attributes={}) click to toggle source
Calls superclass method BN::Helpers::HasAttributes::new
# File lib/bn/entity/d3/hero.rb, line 10
def initialize(attributes={})
  super

  @level ||= 1
  @paragon_level ||= 0
  @hardcore ||= false
  @seasonal ||= false
  @dead ||= false
end

Protected Instance Methods

validate_level(value, paragon=false) click to toggle source
# File lib/bn/entity/d3/hero.rb, line 154
def validate_level(value, paragon=false)
  value = value.to_i
  value = 0 if value < MAX_LEVEL
  value = MAX_LEVEL if !paragon && value > MAX_LEVEL

  value
end