split player module
This commit is contained in:
@@ -124,6 +124,14 @@ impl<'q> LootManager<'q> {
|
||||
.first(self.0)?)
|
||||
}
|
||||
|
||||
pub(crate) fn add<S: Into<String>>(self, name: S, base_price: i32) -> QueryResult<Item> {
|
||||
self.add_from(&Item {
|
||||
id: 0,
|
||||
name: name.into(),
|
||||
base_price,
|
||||
})
|
||||
}
|
||||
|
||||
/// Adds a copy of the given item inside player chest
|
||||
pub fn add_from(self, item: &Item) -> QueryResult<Item> {
|
||||
let new_item = NewLoot {
|
||||
|
||||
Reference in New Issue
Block a user