playerinfo

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2020 License: GPL-3.0 Imports: 1 Imported by: 1

Documentation

Index

Constants

View Source
const (
	None = iota
	Guest
	Self
	Ulg
)

Account Type

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountInfo

type AccountInfo struct {
	Account     string `json:"Account"`
	GameAccount string `json:"GameAccount"`
	AccountType int64  `json:"AccountType"`
	LoginTime   int64  `json:"LoginTime"`

	AccountToken string `json:"AccountToken"` // platform AccountToken
	Token        string `json:"Token"`        // Server Token
}

AccountInfo ...

func NewAccountInfo

func NewAccountInfo(account, gameAccount, token string, accountType int64) AccountInfo

NewAccountInfo ...

type IPratyAccount

type IPratyAccount interface {
	PartyAccount() string
	GameAccount(string) string
	AccountType() int64
}

IPratyAccount thirdparty api interface

type Info

type Info struct {
	IDStr string `json:"IDStr"`
	ID    int64  `json:"ID"`
	// Money       int64  `json:"Money"`
	MoneyU      uint64 `json:"MoneyU"`
	GameAccount string `json:"GameAccount"`
	Name        string `json:"Name"`

	///////// for Server value
	GameToken     string `json:"GameToken,omitempty"`
	InRoom        int    `json:"InRoom,omitempty"`        // room index
	LastCheckTime int64  `json:"LastCheckTime,omitempty"` // connect check time
	InGame        string `json:"InGame,omitempty"`        // gametype
}

Info Player information

func (*Info) GetMoney

func (p *Info) GetMoney() int64

GetMoney ...

func (*Info) GetMoneyU

func (p *Info) GetMoneyU() uint64

GetMoneyU ...

func (Info) IsCheckOut

func (p Info) IsCheckOut() bool

IsCheckOut is ulg checkout

func (Info) IsInGameRoom

func (p Info) IsInGameRoom() bool

IsInGameRoom is player in game room

func (Info) ResultMap

func (p Info) ResultMap() map[string]interface{}

ResultMap player conver to map, client data

func (*Info) SetMoney

func (p *Info) SetMoney(value int64)

SetMoney ...

func (*Info) SumMoney

func (p *Info) SumMoney(value int64) int64

SumMoney ...

func (Info) ToJSONClient

func (p Info) ToJSONClient() map[string]interface{}

ToJSONClient ...

Jump to

Keyboard shortcuts

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