user_chat_module

package
v0.0.0-...-bd0de05 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChatModel

type ChatModel struct {
	module_base.ModuleBase
	// contains filtered or unexported fields
}

func GetChatModel

func GetChatModel() (*ChatModel, error)

func NewChatModel

func NewChatModel() *ChatModel

func (*ChatModel) AddPlayerRecord

func (p *ChatModel) AddPlayerRecord(player *data_type.UserChatData) error

func (*ChatModel) BroadCastSystemMessage

func (p *ChatModel) BroadCastSystemMessage(context string, aliveSec uint64) error

func (*ChatModel) Chat

func (p *ChatModel) Chat(
	chatType proto.ChatChannelType, context string, msgId, senderId, receiverId int64,
) error

func (*ChatModel) Daily

func (p *ChatModel) Daily(utc time.Time)

func (*ChatModel) GeUserChatData

func (p *ChatModel) GeUserChatData(userId int64) *data_type.UserChatData

if not found player chat data return nil

func (*ChatModel) GetChatMap

func (p *ChatModel) GetChatMap(appId string, mapId int32) (*data_type.ChatMap, error)

func (*ChatModel) Hourly

func (p *ChatModel) Hourly(utc time.Time)

func (*ChatModel) LoadPlayerBaseData

func (p *ChatModel) LoadPlayerBaseData(userId int64) (*dbData.PlayerBaseData, error)

func (*ChatModel) Minutely

func (p *ChatModel) Minutely(utc time.Time)

func (*ChatModel) MultiLoadPlayerBaseData

func (p *ChatModel) MultiLoadPlayerBaseData(
	playerIds []int64,
) (map[int64]dbData.PlayerBaseData, error)

func (*ChatModel) MultiLoadPlayerSceneData

func (p *ChatModel) MultiLoadPlayerSceneData(
	playerIds []int64,
) (map[int64]dbData.PlayerSceneData, error)

func (*ChatModel) OnEnterGame

func (*ChatModel) OnInit

func (p *ChatModel) OnInit() error

func (*ChatModel) OnLeaveGame

func (p *ChatModel) OnLeaveGame(userId int64, socketId string)

func (*ChatModel) OnStart

func (p *ChatModel) OnStart() error

func (*ChatModel) RemovePlayerRecord

func (p *ChatModel) RemovePlayerRecord(userId int64, socketId string)

func (*ChatModel) Secondly

func (p *ChatModel) Secondly(utc time.Time)

func (*ChatModel) UpdatePlayerRecord

func (p *ChatModel) UpdatePlayerRecord(newChatData *data_type.UserChatData) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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