struct Wakdata::HarvestLoot
- Wakdata::HarvestLoot
- Struct
- Value
- Object
Included Modules
- BSON::Serializable
- JSON::Serializable
- JSON::Serializable::Strict
- Wakdata::With::Id
- Wakdata::With::ItemId
- Wakdata::With::Quantity
- YAML::Serializable
Defined in:
wakdata/harvest_loot.crConstructors
- .new(id : UInt32, item_id : UInt32, quantity : UInt32, required_prospection : UInt8, drop_rate : Float32, list_id : UInt32, quantity_per_item : UInt8, quantity_min : UInt32, quantity_max : UInt32, max_roll : UInt8, item_is_loot_list : Bool)
- .new(ctx : YAML::ParseContext, node : YAML::Nodes::Node)
- .new(pull : JSON::PullParser)
-
.new(bson : BSON)
Allocate an instance and copies data from a BSON struct.
Class Method Summary
-
.from_bson(bson : BSON)
NOTE See
self.new
.
Instance Method Summary
- #[](value : String)
- #drop_rate : Float32
- #item_is_loot_list : Bool
- #list_id : UInt32
- #max_roll : UInt8
- #quantity_max : UInt32
- #quantity_min : UInt32
- #quantity_per_item : UInt8
- #required_prospection : UInt8
-
#to_bson(bson = BSON.new)
Converts to a BSON representation.
Instance methods inherited from module Wakdata::With::Quantity
quantity : UInt32
quantity
Instance methods inherited from module Wakdata::With::ItemId
item(items : Array(Wakdata::Item), jobItems : Array(Wakdata::JobItem)) : Wakdata::Item | Wakdata::JobItem | Nilitem(items : Array(Wakdata::Item)) : Wakdata::Item | Nil
item(jobItems : Array(Wakdata::JobItem)) : Wakdata::JobItem | Nil item, item_id : UInt32 item_id
Instance methods inherited from module Wakdata::With::Id
id : UInt32
id
Constructor Detail
def self.new(id : UInt32, item_id : UInt32, quantity : UInt32, required_prospection : UInt8, drop_rate : Float32, list_id : UInt32, quantity_per_item : UInt8, quantity_min : UInt32, quantity_max : UInt32, max_roll : UInt8, item_is_loot_list : Bool)
#
def self.new(bson : BSON)
#
Allocate an instance and copies data from a BSON struct.
class User
include BSON::Serializable
property name : String
end
data = BSON.new
data["name"] = "John"
User.new(data)
Class Method Detail
Instance Method Detail
def to_bson(bson = BSON.new)
#
Converts to a BSON representation.
user = User.new name: "John"
bson = user.to_bson