Documentation ¶
Index ¶
- Constants
- Variables
- func BuyItem(portUuid, configId string) (string, error)
- func DeleteItem(item *Item)
- func DeleteRequest(uuid string) error
- func LoadItemConfig(data []byte)
- func TransferItem(currentOwner, newOwner, itemId string) error
- func Use(itemId, portfolioUuid string, itemParameters interface{}) (interface{}, error)
- type InnerItem
- type Item
- type TradeEffectItem
Constants ¶
View Source
const TradeItemType = "trade_effect"
Variables ¶
View Source
var ItemLock = lock.NewLock("item")
View Source
var Items = make(map[string]*Item)
View Source
var ItemsPortInventory = make(map[string]map[string]*Item)
Functions ¶
func DeleteItem ¶
func DeleteItem(item *Item)
func DeleteRequest ¶
func LoadItemConfig ¶
func LoadItemConfig(data []byte)
Types ¶
type InnerItem ¶
type InnerItem interface { SetPortfolioUuid(string) Activate(interface{}) (interface{}, error) Copy() InnerItem SetParentItemUuid(string) }
func UnmarshalJsonItem ¶
type TradeEffectItem ¶
type TradeEffectItem struct { ParentItemUuid string `json:"-"` TargetPortfolio string `json:"portfolio_uuid"` Duration utils.Duration `json:"duration"` ProfitMultiplier *float64 `json:"profit_multiplier"` BuyFeeMultiplier *float64 `json:"buy_fee_multiplier"` SellFeeMultiplier *float64 `json:"sell_fee_multiplier"` BuyFeeAmount *int64 `json:"buy_fee"` SellFeeAmount *int64 `json:"sell_fee"` BlockTrading *bool `json:"block_trading"` }
func (*TradeEffectItem) Activate ¶
func (p *TradeEffectItem) Activate(interface{}) (interface{}, error)
func (*TradeEffectItem) Copy ¶
func (p *TradeEffectItem) Copy() InnerItem
func (*TradeEffectItem) SetParentItemUuid ¶
func (p *TradeEffectItem) SetParentItemUuid(parent string)
func (*TradeEffectItem) SetPortfolioUuid ¶
func (p *TradeEffectItem) SetPortfolioUuid(portfolioUuid string)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.