Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetPlayerIdWithUID ¶
func PlayerNameIsExist ¶
PlayerNameIsExist 玩家角色名全局唯一
Types ¶
type Component ¶
type Component struct {
cherryFacade.Component
}
func (*Component) OnAfterInit ¶
func (c *Component) OnAfterInit()
type PlayerTable ¶
type PlayerTable struct { PID int32 `gorm:"column:pid;comment:'平台id'" json:"pid"` OpenId string `gorm:"column:open_id;comment:'平台open_id'" json:"openId"` UID int64 `gorm:"column:uid;comment:'用户id'" json:"uid"` ServerId int32 `gorm:"column:server_id;comment:'创角时的游戏服id'" json:"serverId"` MergedServerId int32 `gorm:"column:merged_server_id;comment:'合服后的游戏服id'" json:"mergedServerId"` PlayerId int64 `gorm:"column:player_id;primary_key;comment:'角色id'" json:"playerId"` Name string `gorm:"column:player_name;comment:'角色名称'" json:"name"` Gender int32 `gorm:"column:gender;comment:'角色性别'" json:"gender"` Level int32 `gorm:"column:level;comment:'角色等级'" json:"level"` Exp int64 `gorm:"column:exp;comment:'角色经验'" json:"exp"` CreateTime int64 `gorm:"column:create_time;comment:'创建时间'" json:"createTime"` }
PlayerTable 角色基础表
func CreatePlayer ¶
func CreatePlayer(session *cproto.Session, name string, serverId int32, playerInit *data.PlayerInitRow) (*PlayerTable, int32)
func GetPlayerTable ¶
func GetPlayerTable(playerId int64) (*PlayerTable, bool)
func (*PlayerTable) InThisServerId ¶
func (p *PlayerTable) InThisServerId() int32
InThisServerId 角色当前正在的游戏服(合服后serverId会变)
func (*PlayerTable) TableName ¶
func (*PlayerTable) TableName() string
Click to show internal directories.
Click to hide internal directories.