data

package
v0.0.0-...-5996917 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	NEOURI = fmt.Sprintf("bolt://%s:7687", config.Server.NEOAddress)
	DRIVER neo4j.Driver

	PGCONNSTR = fmt.Sprintf("host=%s port=%d user=%s password=%s dbname=%s sslmode=disable",
		config.Server.PGAddress,
		config.Server.PGPort,
		config.Server.PGUname,
		config.Server.PGPword,
		config.Server.PGUname)
	ChatLogsCapture      []ChatLog
	ItemSalesCapture     []ItemSales
	ItemTotalsCapture    map[int]ItemTotals
	CombatMetricsCapture []CombatMetric
)

Functions

func AccountExists

func AccountExists(acctName string) bool

AccountExists Checks whether an account exists based on name

func CharacterExists

func CharacterExists(charName string) bool

func ClearChatLogs

func ClearChatLogs()

func ClearCombatMetrics

func ClearCombatMetrics()

func ClearItemSales

func ClearItemSales()

func CopyItem

func CopyItem(itemId int, creator string) (int, bool)

func CopyMob

func CopyMob(mobId int) (int, bool)

func CreateChar

func CreateChar(charData map[string]interface{}) bool

CreateChar New character

func CreateDrop

func CreateDrop(dropData map[string]interface{}) bool

func CreateEncounter

func CreateEncounter(encounterData map[string]interface{}) bool

func CreateExit

func CreateExit(exitData map[string]interface{}) bool

CreateExit Create Exits from a map of exitData

func CreateItem

func CreateItem(itemData map[string]interface{}) (int, bool)

func CreateMenu

func CreateMenu(roomName string, creator string) (int, bool)

CreateRoom will create a new room from a roomname and a creator

func CreateMenuOption

func CreateMenuOption(exitData map[string]interface{}) bool

CreateExit Create Exits from a map of exitData

func CreateMob

func CreateMob(mobName string, creator string) (int, bool)

func CreateNarrative

func CreateNarrative(narrData map[string]interface{}) (bool, error)

func CreateRoom

func CreateRoom(roomName string, creator string) (int, bool)

CreateRoom will create a new room from a roomname and a creator

func Deactivate

func Deactivate(acctName string) bool

Deactivate account based on account name

func DeleteAcct

func DeleteAcct(acctName string) bool

DeleteAcct Delete account based on account name

func DeleteChar

func DeleteChar(charName string) bool

DeleteChar Delete character

func DeleteDrop

func DeleteDrop(mobId int, itemId int) bool

func DeleteEncounter

func DeleteEncounter(mobId int, roomId int) bool

func DeleteExit

func DeleteExit(exitName string, room_id int) bool

DeleteExit Delete Exit based on the exit name and the containing room

func DeleteItem

func DeleteItem(itemId int) bool

func DeleteMenu

func DeleteMenu(room_id int) bool

DeleteRoom Delete Room

func DeleteMenuOption

func DeleteMenuOption(exitName string, room_id int) bool

DeleteExit Delete Exit based on the exit name and the containing room

func DeleteMob

func DeleteMob(mobId int) bool

func DeleteRoom

func DeleteRoom(room_id int) bool

DeleteRoom Delete Room

func ExitExists

func ExitExists(exitName string, room_id int) bool

ExitExists Does this exit exist?

func FlushChatLogs

func FlushChatLogs() bool

func FlushCombatMetrics

func FlushCombatMetrics() bool

func FlushItemSales

func FlushItemSales() bool

func ListChars

func ListChars(acctName string) []string

ListChars Retrieve account characters based on account name

func ListPowerChar

func ListPowerChar(acctName string) (string, bool)

ListPowerChar Retrieve account power characters based on account name

func ListPuppets

func ListPuppets() []string

ListPuppets Retrieve account characters attached to the PuppetMaster

func LoadAcct

func LoadAcct(acctName string) (map[string]interface{}, bool)

LoadAcct Retrieve account info based on an acctName

func LoadChar

func LoadChar(charName string) (map[string]interface{}, bool)

LoadChar Retrieve character information

func LoadExit

func LoadExit(exitName string, room_id int, toId int) map[string]interface{}

func LoadItem

func LoadItem(itemId int) map[string]interface{}

func LoadItems

func LoadItems() []interface{}

func LoadMenu

func LoadMenu(room_id int) map[string]interface{}

func LoadMenuOption

func LoadMenuOption(exitName string, room_id int, toId int) map[string]interface{}

func LoadMenus

func LoadMenus() []interface{}

func LoadMob

func LoadMob(mobId int) map[string]interface{}

func LoadMobs

func LoadMobs() []interface{}

func LoadRoom

func LoadRoom(room_id int) map[string]interface{}

func LoadRooms

func LoadRooms() []interface{}

func LoadSetting

func LoadSetting(settingName string) (string, bool)

func NewAcct

func NewAcct(acctData map[string]interface{}) bool

NewAcct Create a new account from a map of account values

func OptionExists

func OptionExists(exitName string, room_id int) bool

ExitExists Does this exit exist?

func PuppetChar

func PuppetChar(charName string) bool

PuppetChar Remove current ownership and set ownership to the PuppetMaster account

func RenameExit

func RenameExit(exitName string, oldName string, baseRoom int, toRoom int) bool

RenameExit Renames an exit based on it's previous name, the new name, and the connecting room information

func SaveChar

func SaveChar(charData map[string]interface{}) bool

SaveChar Update character information from a map

func SaveCharField

func SaveCharField(charName string, field string, fieldVal interface{}) bool

SaveCharField Update character

func SearchAccountName

func SearchAccountName(searchStr string, skip int) []interface{}

func SearchCharDesc

func SearchCharDesc(searchStr string, skip int) []interface{}

func SearchCharName

func SearchCharName(searchStr string, skip int) []interface{}

func SearchItemDesc

func SearchItemDesc(searchStr string, skip int) []interface{}

func SearchItemMaxDamage

func SearchItemMaxDamage(searchStr string, skip int) []interface{}

func SearchItemName

func SearchItemName(searchStr string, skip int) []interface{}

func SearchItemRange

func SearchItemRange(loId int, hiId int, skip int) []interface{}

func SearchItemType

func SearchItemType(searchStr string, skip int) []interface{}

func SearchMenuName

func SearchMenuName(searchStr string, skip int) []interface{}

func SearchMobDesc

func SearchMobDesc(searchStr string, skip int) []interface{}

func SearchMobName

func SearchMobName(searchStr string, skip int) []interface{}

func SearchMobRange

func SearchMobRange(loId int, hiId int, skip int) []interface{}

func SearchRoomDesc

func SearchRoomDesc(searchStr string, skip int) []interface{}

func SearchRoomName

func SearchRoomName(searchStr string, skip int) []interface{}

func StoreChatLog

func StoreChatLog(chatType int, fromId int, toId int, message string)

func StoreCombatMetric

func StoreCombatMetric(Action string, ActionType int, Mode int, TotalDamage int, Resisted int, FinalDamage int, AttackerType int, AttackerId int, AttackerTier int, VictimType int, VictimId int)

func StoreItemSale

func StoreItemSale(ItemId int, SellerId int, SellerTier int, SellValue int)

func SumEncounters

func SumEncounters(roomId int) int

func TogglePermission

func TogglePermission(acctName string, permission uint32) bool

func UpdateDrop

func UpdateDrop(mobData map[string]interface{}) bool

func UpdateEncounter

func UpdateEncounter(mobData map[string]interface{}) bool

func UpdateExit

func UpdateExit(exitData map[string]interface{}) bool

UpdateExit Update Exit based on

func UpdateItem

func UpdateItem(itemData map[string]interface{}) bool

func UpdateMenu

func UpdateMenu(roomData map[string]interface{}) bool

UpdateRoom Update Room

func UpdateMenuOption

func UpdateMenuOption(exitData map[string]interface{}) bool

UpdateExit Update Exit based on

func UpdateMob

func UpdateMob(mobData map[string]interface{}) bool

func UpdateNarrative

func UpdateNarrative(narrData map[string]interface{}) bool

func UpdatePassword

func UpdatePassword(acctName string, acctPass string) bool

UpdatePassword Update account

func UpdateRoom

func UpdateRoom(roomData map[string]interface{}) bool

UpdateRoom Update Room

func UpdateSetting

func UpdateSetting(settingName string, setting string) bool

Types

type ChatLog

type ChatLog struct {
	ChatType int // say 0 osay 1 sent 2 act 3	gmsay 4, ptell 5
	FromId   int
	ToId     int
	Message  string
	ChatTime time.Time
}

type CombatMetric

type CombatMetric struct {
	Action       string
	ActionType   int // damage 0, heal 1
	Mode         int // melee 0, ranged 1, spell 2, item 3
	TotalDamage  int
	Resisted     int
	FinalDamage  int
	AttackerType int // player 0, mob 1, npc 2
	AttackerId   int
	AttackerTier int
	VictimType   int // player 0, mob 1, npc 2
	VictimId     int
	CombatTime   time.Time
}

type ItemSales

type ItemSales struct {
	ItemId     int
	TimeSold   time.Time
	SellerId   int
	SellerTier int
	SellValue  int
}

type ItemTotals

type ItemTotals struct {
	ItemId     int
	TotalSold  int
	TotalValue int
	LastSold   time.Time
}

Jump to

Keyboard shortcuts

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