Documentation ¶
Index ¶
- Constants
- func ItemTemplateToJSONString(itemTemplate ItemTemplate) string
- func ItemTemplatesToJSONString(itemTemplates ItemTemplates) string
- func ItemToJSONString(item Item) string
- func ItemsToJSONString(items Items) string
- type Item
- type ItemQualities
- type ItemQuality
- type ItemSlot
- type ItemSlots
- type ItemSubType
- type ItemSubTypes
- type ItemTemplate
- type ItemTemplates
- type ItemType
- type ItemTypes
- type Items
Constants ¶
View Source
const ( ItemTypeCurrency ItemType = "currency" ItemTypeConsumable = "consumable" ItemTypeArmor = "armor" ItemTypeWeapon = "weapon" ItemTypeCollectible = "collectible" ItemTypeQuest = "quest" ItemTypeCraftingMaterial = "crafting_material" )
View Source
const ( // weapons ItemSubTypeSword ItemSubType = "sword" ItemSubTypeTwoHandSword ItemSubType = "twohandsword" ItemSubTypeAxe = "axe" ItemSubTypeSpear = "spear" // shields ItemSubTypeShield = "shield" )
View Source
const ( ItemSlotInventory ItemSlot = "inventory" ItemSlotContainer = "container" ItemSlotPurse = "purse" ItemSlotHead = "head" ItemSlotChest = "chest" ItemSlotLegs = "legs" ItemSlotBoots = "boots" ItemSlotNeck = "neck" ItemSlotRing1 = "ring1" ItemSlotRing2 = "ring2" ItemSlotHands = "hands" ItemSlotMainHand = "main_hand" ItemSlotOffHand = "off_hand" )
View Source
const ( ItemQualityNormal ItemQuality = "normal" ItemQualityMagic = "magic" ItemQualityRare = "rare" ItemQualityLegendary = "legendary" ItemQualityMythic = "mythic" )
Variables ¶
This section is empty.
Functions ¶
func ItemTemplateToJSONString ¶
func ItemTemplateToJSONString(itemTemplate ItemTemplate) string
ItemTemplateToJSONString ...
func ItemTemplatesToJSONString ¶
func ItemTemplatesToJSONString(itemTemplates ItemTemplates) string
ItemTemplatesToJSONString ...
Types ¶
type Item ¶
type Item struct { *entities.Entity `bson:",inline"` traits.LookAt `bson:",inline"` // "detail" Name string `bson:"name,omitempty" json:"name"` Description string `bson:"description,omitempty" json:"description"` Type ItemType `bson:"type,omitempty" json:"type"` SubType ItemSubType `bson:"subType,omitempty" json:"subType"` Slot ItemSlot `bson:"slot,omitempty" json:"slot"` Quality ItemQuality `bson:"quality,omitempty" json:"quality"` Level int32 `bson:"level,omitempty" json:"level,omitempty"` // custom item properties Properties map[string]interface{} `bson:"properties,omitempty" json:"properties,omitempty"` // "stats" Attributes map[string]interface{} `bson:"attributes,omitempty" json:"attributes,omitempty"` // container specifics Closed bool `bson:"closed,omitempty" json:"closed,omitempty"` Locked bool `bson:"locked,omitempty" json:"locked,omitempty"` LockedBy string `bson:"lockedBy,omitempty" json:"lockedBy,omitempty"` Items Items `bson:"items,omitempty" json:"items,omitempty"` MaxItems int32 `bson:"maxItems,omitempty" json:"maxItems,omitempty"` // misc NoPickup bool `bson:"noPickup,omitempty" json:"noPickup,omitempty"` // metainfo Tags []string `bson:"tags,omitempty" json:"tags"` Created time.Time `bson:"created,omitempty" json:"created,omitempty"` CreatedBy string `bson:"createdBy,omitempty" json:"createdBy,omitempty"` // additional non game critical meta information to enhance player experience on client Meta *struct { Img string `bson:"img,omitempty" json:"img,omitempty"` } `bson:"meta,omitempty" meta:"coords,omitempty"` }
Item data
func ItemFromJSONString ¶
ItemFromJSONString ...
type ItemTemplate ¶
type ItemTemplate struct { Item `bson:",inline"` Script *string `bson:"script,omitempty" json:"script"` }
ItemTemplate ...
func ItemTemplateFromJSONString ¶
func ItemTemplateFromJSONString(input string) (*ItemTemplate, error)
ItemTemplateFromJSONString ...
type ItemTemplates ¶
type ItemTemplates []*ItemTemplate
ItemTemplates type
func ItemTemplatesFromJSONString ¶
func ItemTemplatesFromJSONString(input string) (ItemTemplates, error)
ItemTemplatesFromJSONString ...
Click to show internal directories.
Click to hide internal directories.