Class: Wowr::Classes::GuildBankItem
Overview
More detailed item used in full Wowr::Classes::GuildBank Very close to Wowr::Classes::EquippedItem <item bag=“0” durability=“0” icon=“racial_dwarf_findtreasure” id=“12219” maxDurability=“0” name=“Unadorned Seal of Ascension” qi=“1” quantity=“1” randomPropertiesId=“0” seed=“1827537860” slot=“90” subtype=“” subtypeLoc=“Quest” type=“consumables”/>
Instance Attribute Summary collapse
-
#bag_id ⇒ Object
readonly
Returns the value of attribute bag_id.
-
#durability ⇒ Object
readonly
Returns the value of attribute durability.
-
#max_durability ⇒ Object
readonly
Returns the value of attribute max_durability.
-
#qi ⇒ Object
readonly
Returns the value of attribute qi.
-
#quantity ⇒ Object
readonly
Returns the value of attribute quantity.
-
#random_properties_id ⇒ Object
readonly
Returns the value of attribute random_properties_id.
-
#seed ⇒ Object
readonly
Returns the value of attribute seed.
-
#slot ⇒ Object
readonly
Returns the value of attribute slot.
-
#subtype ⇒ Object
readonly
Returns the value of attribute subtype.
-
#subtype_loc ⇒ Object
readonly
Returns the value of attribute subtype_loc.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Attributes inherited from Item
Instance Method Summary collapse
-
#initialize(elem, bags = nil, api = nil) ⇒ GuildBankItem
constructor
A new instance of GuildBankItem.
Methods inherited from Item
Constructor Details
#initialize(elem, bags = nil, api = nil) ⇒ GuildBankItem
Returns a new instance of GuildBankItem.
161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 |
# File 'lib/wowr/guild_bank.rb', line 161 def initialize(elem, bags = nil, api = nil) super(elem, api) @bag_id = elem[:bag].to_i @qi = elem[:qi].to_i @quantity = elem[:quantity].to_i @durability = elem[:durability].to_i @max_durability = elem[:maxDurability].to_i @random_properties_id = elem[:randomPropertiesId] == 0 ? nil : elem[:randomPropertiesId].to_i @seed = elem[:seed].to_i @slot = elem[:slot].to_i @subtype = elem[:subtype] == "" ? nil : elem[:subtype] @subtype_loc = elem[:subtypeLoc] == "" ? nil : elem[:subtypeLoc] @type = elem[:type].to_i bags[@bag_id].items << self end |
Instance Attribute Details
#bag_id ⇒ Object (readonly)
Returns the value of attribute bag_id.
158 159 160 |
# File 'lib/wowr/guild_bank.rb', line 158 def bag_id @bag_id end |
#durability ⇒ Object (readonly)
Returns the value of attribute durability.
158 159 160 |
# File 'lib/wowr/guild_bank.rb', line 158 def durability @durability end |
#max_durability ⇒ Object (readonly)
Returns the value of attribute max_durability.
158 159 160 |
# File 'lib/wowr/guild_bank.rb', line 158 def max_durability @max_durability end |
#qi ⇒ Object (readonly)
Returns the value of attribute qi.
158 159 160 |
# File 'lib/wowr/guild_bank.rb', line 158 def qi @qi end |
#quantity ⇒ Object (readonly)
Returns the value of attribute quantity.
158 159 160 |
# File 'lib/wowr/guild_bank.rb', line 158 def quantity @quantity end |
#random_properties_id ⇒ Object (readonly)
Returns the value of attribute random_properties_id.
158 159 160 |
# File 'lib/wowr/guild_bank.rb', line 158 def random_properties_id @random_properties_id end |
#seed ⇒ Object (readonly)
Returns the value of attribute seed.
158 159 160 |
# File 'lib/wowr/guild_bank.rb', line 158 def seed @seed end |
#slot ⇒ Object (readonly)
Returns the value of attribute slot.
158 159 160 |
# File 'lib/wowr/guild_bank.rb', line 158 def slot @slot end |
#subtype ⇒ Object (readonly)
Returns the value of attribute subtype.
158 159 160 |
# File 'lib/wowr/guild_bank.rb', line 158 def subtype @subtype end |
#subtype_loc ⇒ Object (readonly)
Returns the value of attribute subtype_loc.
158 159 160 |
# File 'lib/wowr/guild_bank.rb', line 158 def subtype_loc @subtype_loc end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
158 159 160 |
# File 'lib/wowr/guild_bank.rb', line 158 def type @type end |