Class: D3MPQ::CoreData::GameBalance::Base
- Defined in:
- lib/d3_mpq/core_data/game_balance/base.rb
Direct Known Subclasses
AffixList, EliteModifiers, ExperienceTable, ItemDropTable, ItemEnhancements, ItemTypes, Items, LabelsGlobal, MonsterAffixes, MonsterLevels, MonsterNames, PowerFormulaTables, RareNames, Recipes, SetItemBonuses, SocketedEffects
Class Method Summary collapse
-
.content(&block) ⇒ Object
Main method to use.
- .struct_size ⇒ Object
- .struct_size=(value) ⇒ Object
Instance Method Summary collapse
-
#data_offset ⇒ Object
data start offset (relative to the starts of the GamHeader.
- #struct_size ⇒ Object
Class Method Details
.content(&block) ⇒ Object
Main method to use
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/d3_mpq/core_data/game_balance/base.rb', line 30 def content(&block) array :content, :initial_length => lambda { data_num_bytes / struct_size }, :adjust_offset => lambda { data_offset + 16 }, &block count_bytes_remaining :bytes_remaining hide :variable_content array :variable_content, :initial_length => lambda { bytes_remaining / 4 } do string :length => 4 end hide :rest rest :rest end |
.struct_size ⇒ Object
47 48 49 |
# File 'lib/d3_mpq/core_data/game_balance/base.rb', line 47 def struct_size @struct_size ||= 0 end |
.struct_size=(value) ⇒ Object
51 52 53 |
# File 'lib/d3_mpq/core_data/game_balance/base.rb', line 51 def struct_size=(value) @struct_size = value end |
Instance Method Details
#data_offset ⇒ Object
data start offset (relative to the starts of the GamHeader
19 20 21 |
# File 'lib/d3_mpq/core_data/game_balance/base.rb', line 19 def data_offset data_array_entries.last end |
#struct_size ⇒ Object
57 58 59 |
# File 'lib/d3_mpq/core_data/game_balance/base.rb', line 57 def struct_size self.class.struct_size end |