Documentation ¶
Index ¶
- Constants
- func AddAccountFieldByFieldName(db *gorm.DB, account *Account) (uint32, error)
- func AddDatePlayerFieldByFieldName(db *gorm.DB, player *PlayerData) error
- func DelAcceptApplyFriend(rc *redis.Client, uid uint32)
- func GetAcceptApplyFriend(rc *redis.Client, uid uint32) ([]byte, bool)
- func GetAllMail() map[uint32]*Mail
- func GetComboTokenByAccountId(rc *redis.Client, accountId string) string
- func GetDbConf(db *gorm.DB)
- func GetPlayerFriend(rc *redis.Client, uid uint32) ([]byte, bool)
- func IsOverlapping(rogueMap []*RogueConf) bool
- func NewMysql(dsn string) *gorm.DB
- func NewRedis(addr, password string, db int) *redis.Client
- func NewSqlite(dsn string) *gorm.DB
- func SetAcceptApplyFriend(rc *redis.Client, uid uint32, value []byte) bool
- func SetComboTokenByAccountId(rc *redis.Client, accountId, comboToken string) string
- func SetPlayerFriend(rc *redis.Client, uid uint32, value []byte) bool
- func UpdateAccountFieldByFieldName(db *gorm.DB, account *Account) error
- func UpdateBlockData(db *gorm.DB, blockData *BlockData) error
- func UpdatePlayer(db *gorm.DB, player *PlayerData) error
- func UpdatePlayerBasic(db *gorm.DB, player *PlayerBasic) bool
- type Account
- type BlockData
- type DbConf
- type Item
- type Mail
- type PlayerBasic
- type PlayerData
- type PlayerUid
- type RogueConf
- type ScheduleConf
- type ServerConf
- type TimeInterval
Constants ¶
View Source
const ( MailAvatar = 1 // 角色 MailMaterial = 2 // 材料 )
邮件奖励类型
Variables ¶
This section is empty.
Functions ¶
func AddAccountFieldByFieldName ¶ added in v1.3.0
添加新账号
func AddDatePlayerFieldByFieldName ¶ added in v1.3.0
func AddDatePlayerFieldByFieldName(db *gorm.DB, player *PlayerData) error
添加新账号数据
func DelAcceptApplyFriend ¶ added in v1.2.2
func DelAcceptApplyFriend(rc *redis.Client, uid uint32)
删除玩家待加入数据库好友信息
func GetAcceptApplyFriend ¶ added in v1.2.2
获取玩家待加入数据库好友信息
func GetAllMail ¶ added in v1.3.0
func GetComboTokenByAccountId ¶ added in v1.3.0
获取ComboToken
func GetPlayerFriend ¶ added in v1.2.2
获取玩家好友申请信息
func IsOverlapping ¶ added in v1.3.0
func SetAcceptApplyFriend ¶ added in v1.2.2
设置玩家待加入数据库好友信息
func SetComboTokenByAccountId ¶ added in v1.3.0
设置ComboToken
func SetPlayerFriend ¶ added in v1.2.2
设置玩家好友申请信息
func UpdateAccountFieldByFieldName ¶ added in v1.3.0
更新账号
func UpdateBlockData ¶ added in v1.3.0
更新地图文件
func UpdatePlayerBasic ¶ added in v1.3.0
func UpdatePlayerBasic(db *gorm.DB, player *PlayerBasic) bool
更新账号简要数据
Types ¶
type Account ¶
type Account struct { AccountId uint32 `gorm:"primarykey;AUTO_INCREMENT"` Username string Token string ComboToken string CreateTime int64 CreatedAt time.Time UpdatedAt time.Time }
func QueryAccountByFieldAccountId ¶ added in v1.3.0
type BlockData ¶ added in v1.2.2
type DbConf ¶ added in v1.3.0
type DbConf struct { MailMap map[uint32]*Mail RogueMap map[uint32]*RogueConf // contains filtered or unexported fields }
var DBCONF *DbConf
type Mail ¶
type Mail struct { Id uint32 `gorm:"primarykey;AUTO_INCREMENT"` // 邮件id Title string // 邮件标题 Sender string // 发件人 BeginTime sql.NullTime // 开始时间 EndTime sql.NullTime // 结束时间 Content string // 内容 Item string // 邮件附件 ItemList []*Item `gorm:"-"` }
全服邮件
func GetMailById ¶ added in v1.3.0
type PlayerBasic ¶ added in v1.3.0
type PlayerData ¶
type PlayerData struct { Uid uint32 `gorm:"primarykey"` Nickname string Level uint32 Exp uint32 DataVersion uint32 BinData []byte }
func QueryAccountUidByFieldPlayer ¶ added in v1.3.0
func QueryAccountUidByFieldPlayer(db *gorm.DB, uid uint32) *PlayerData
使用账号id拉取数据
type PlayerUid ¶
type PlayerUid struct { Uid uint32 `gorm:"primarykey;AUTO_INCREMENT"` AccountType uint32 AccountId uint32 CreateTime int64 IsBan bool BanBeginTime int64 BanEndTime int64 BanMsg string }
func GetPlayerUidByAccountId ¶ added in v1.3.0
使用account id拉取数据
type RogueConf ¶ added in v1.2.3
type RogueConf struct { SeasonId uint32 `gorm:"primarykey;AUTO_INCREMENT"` BeginTime sql.NullTime EndTime sql.NullTime }
func GetCurRogue ¶ added in v1.3.0
func GetCurRogue() *RogueConf
type ScheduleConf ¶ added in v1.2.3
type ServerConf ¶ added in v1.2.2
type ServerConf struct {
AutoCreate bool // 是否自动注册
}
type TimeInterval ¶ added in v1.3.0
type TimeInterval struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.