market

package
v0.0.0-...-54eea7a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 11, 2020 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Orders = NewOrdersPool()

Functions

This section is empty.

Types

type Assortment

type Assortment struct {
	Bodies     map[int]detail.Body               `json:"bodies"`
	Weapons    map[int]detail.Weapon             `json:"weapons"`
	Ammo       map[int]ammo.Ammo                 `json:"ammo"`
	Equips     map[int]equip.Equip               `json:"equips"`
	Resources  map[int]resource.Resource         `json:"resources"`
	Recycles   map[int]resource.RecycledResource `json:"recycles"`
	Details    map[int]resource.CraftDetail      `json:"details"`
	Blueprints map[int]blueprints.Blueprint      `json:"blueprints"`
	Boxes      map[int]box.Box                   `json:"boxes"`
	Trash      map[int]trashItem.TrashItem       `json:"trash"`
}

func GetAssortment

func GetAssortment() *Assortment

type OrdersPool

type OrdersPool struct {
	// contains filtered or unexported fields
}

func NewOrdersPool

func NewOrdersPool() *OrdersPool

func (*OrdersPool) AddNewOrder

func (o *OrdersPool) AddNewOrder(newOrder order.Order)

func (*OrdersPool) Buy

func (o *OrdersPool) Buy(orderID, count int, user *player.Player) error

func (*OrdersPool) Cancel

func (o *OrdersPool) Cancel(orderID int, user *player.Player) error

func (*OrdersPool) GetOrder

func (o *OrdersPool) GetOrder(id int) (bool, *order.Order, *sync.Mutex)

func (*OrdersPool) GetOrders

func (o *OrdersPool) GetOrders() map[int]*order.Order

func (*OrdersPool) GetUserOrders

func (o *OrdersPool) GetUserOrders(userID int) map[int]*order.Order

func (*OrdersPool) PlaceNewBuyOrder

func (o *OrdersPool) PlaceNewBuyOrder(itemId, price, quantity, minBuyOut, expires int, itemType string, user *player.Player) error

func (*OrdersPool) PlaceNewSellOrder

func (o *OrdersPool) PlaceNewSellOrder(storageSlot, price, quantity, minBuyOut, expires int, user *player.Player) error

func (*OrdersPool) Sell

func (o *OrdersPool) Sell(orderID, count int, user *player.Player) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL