Documentation ¶
Index ¶
- Variables
- func AddHeroExecution(ctx context.Context, c *Client) error
- func AddItemExecution(ctx context.Context, c *Client) error
- func CreatePlayerExecution(ctx context.Context, c *Client) error
- func LogonExecution(ctx context.Context, c *Client) error
- func NewClientBotsFlags() []cli.Flag
- func NewFlags() []cli.Flag
- func PubSyncPlayerInfoExecution(ctx context.Context, c *Client) error
- func QueryHerosExecution(ctx context.Context, c *Client) error
- func QueryItemsExecution(ctx context.Context, c *Client) error
- func QueryPlayerInfoExecution(ctx context.Context, c *Client) error
- func RpcSyncPlayerInfoExecution(ctx context.Context, c *Client) error
- type Client
- type ClientBots
- type Command
- type CommandPage
- type Commander
- func (cmd *Commander) CmdAccountLogon(ctx context.Context, result []string) (bool, string)
- func (cmd *Commander) CmdAddHero(ctx context.Context, result []string) (bool, string)
- func (cmd *Commander) CmdAddItem(ctx context.Context, result []string) (bool, string)
- func (cmd *Commander) CmdAddTalent(ctx context.Context, result []string) (bool, string)
- func (cmd *Commander) CmdAddToken(ctx context.Context, result []string) (bool, string)
- func (cmd *Commander) CmdChangeExp(ctx context.Context, result []string) (bool, string)
- func (cmd *Commander) CmdChangeLevel(ctx context.Context, result []string) (bool, string)
- func (cmd *Commander) CmdCliAccountDisconnect(ctx context.Context, result []string) (bool, string)
- func (cmd *Commander) CmdCreatePlayer(ctx context.Context, result []string) (bool, string)
- func (cmd *Commander) CmdDelHero(ctx context.Context, result []string) (bool, string)
- func (cmd *Commander) CmdDelItem(ctx context.Context, result []string) (bool, string)
- func (cmd *Commander) CmdHeroPutonEquip(ctx context.Context, result []string) (bool, string)
- func (cmd *Commander) CmdHeroTakeoffEquip(ctx context.Context, result []string) (bool, string)
- func (cmd *Commander) CmdPublicSyncPlayerInfo(ctx context.Context, result []string) (bool, string)
- func (cmd *Commander) CmdQueryHeros(ctx context.Context, result []string) (bool, string)
- func (cmd *Commander) CmdQueryItems(ctx context.Context, result []string) (bool, string)
- func (cmd *Commander) CmdQueryPlayerInfo(ctx context.Context, result []string) (bool, string)
- func (cmd *Commander) CmdQueryTalents(ctx context.Context, result []string) (bool, string)
- func (cmd *Commander) CmdQueryTokens(ctx context.Context, result []string) (bool, string)
- func (cmd *Commander) CmdQuit(ctx context.Context, result []string) (bool, string)
- func (cmd *Commander) CmdSendHeartBeat(ctx context.Context, result []string) (bool, string)
- func (cmd *Commander) CmdServerAccountDisconnect(ctx context.Context, result []string) (bool, string)
- func (cmd *Commander) CmdStartStageCombat(ctx context.Context, result []string) (bool, string)
- func (cmd *Commander) CmdSyncPlayerInfo(ctx context.Context, result []string) (bool, string)
- func (cmd *Commander) CmdUseItem(ctx context.Context, result []string) (bool, string)
- func (cmd *Commander) CmdWebSocketAccountLogon(ctx context.Context, result []string) (bool, string)
- type ExecuteFunc
- type GameInfo
- type GinServer
- type MsgHandler
- func (h *MsgHandler) OnM2C_AccountLogon(ctx context.Context, sock transport.Socket, msg *transport.Message) error
- func (h *MsgHandler) OnM2C_CreatePlayer(ctx context.Context, sock transport.Socket, msg *transport.Message) error
- func (h *MsgHandler) OnM2C_DelItem(ctx context.Context, sock transport.Socket, msg *transport.Message) error
- func (h *MsgHandler) OnM2C_ExpUpdate(ctx context.Context, sock transport.Socket, msg *transport.Message) error
- func (h *MsgHandler) OnM2C_HeartBeat(ctx context.Context, sock transport.Socket, msg *transport.Message) error
- func (h *MsgHandler) OnM2C_HeroAttUpdate(ctx context.Context, sock transport.Socket, msg *transport.Message) error
- func (h *MsgHandler) OnM2C_HeroInfo(ctx context.Context, sock transport.Socket, msg *transport.Message) error
- func (h *MsgHandler) OnM2C_HeroList(ctx context.Context, sock transport.Socket, msg *transport.Message) error
- func (h *MsgHandler) OnM2C_ItemAdd(ctx context.Context, sock transport.Socket, msg *transport.Message) error
- func (h *MsgHandler) OnM2C_ItemList(ctx context.Context, sock transport.Socket, msg *transport.Message) error
- func (h *MsgHandler) OnM2C_ItemUpdate(ctx context.Context, sock transport.Socket, msg *transport.Message) error
- func (h *MsgHandler) OnM2C_PublicSyncPlayerInfo(ctx context.Context, sock transport.Socket, msg *transport.Message) error
- func (h *MsgHandler) OnM2C_QueryPlayerInfo(ctx context.Context, sock transport.Socket, msg *transport.Message) error
- func (h *MsgHandler) OnM2C_StartStageCombat(ctx context.Context, sock transport.Socket, msg *transport.Message) error
- func (h *MsgHandler) OnM2C_SyncPlayerInfo(ctx context.Context, sock transport.Socket, msg *transport.Message) error
- func (h *MsgHandler) OnM2C_TalentList(ctx context.Context, sock transport.Socket, msg *transport.Message) error
- func (h *MsgHandler) OnM2C_TokenList(ctx context.Context, sock transport.Socket, msg *transport.Message) error
- func (h *MsgHandler) OnMS_SelectPlayer(ctx context.Context, sock transport.Socket, msg *transport.Message) error
- type PromptUI
- type TransportClient
- func (t *TransportClient) Exit(ctx *cli.Context)
- func (t *TransportClient) GetGateEndPoints() []string
- func (t *TransportClient) ReturnMsgName() <-chan string
- func (t *TransportClient) Run(ctx *cli.Context) error
- func (t *TransportClient) SendMessage(msg *transport.Message)
- func (t *TransportClient) SetGameInfo(info *GameInfo)
- func (t *TransportClient) SetProtocol(p string)
- func (t *TransportClient) StartConnect(ctx context.Context) error
- func (t *TransportClient) StartDisconnect()
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrExecuteClientClosed = errors.New("AddExecute failed: cannot find execute client")
View Source
var ErrExecuteContextDone = errors.New("AddExecute failed: goroutine context done")
View Source
var ExecuteFuncChanNum int = 100
Functions ¶
func NewClientBotsFlags ¶
func NewClientBotsFlags() []cli.Flag
Types ¶
type Client ¶
func NewClient ¶
func NewClient(ch chan ExecuteFunc) *Client
func (*Client) SendMessage ¶
type ClientBots ¶
func NewClientBots ¶
func NewClientBots() *ClientBots
func (*ClientBots) Action ¶
func (c *ClientBots) Action(ctx *cli.Context) error
func (*ClientBots) AddExecute ¶
func (c *ClientBots) AddExecute(ctx context.Context, id int64, fn ExecuteFunc) error
func (*ClientBots) Run ¶
func (c *ClientBots) Run(arguments []string) error
func (*ClientBots) Stop ¶
func (c *ClientBots) Stop()
type CommandPage ¶
type Commander ¶
type Commander struct {
// contains filtered or unexported fields
}
func NewCommander ¶
func (*Commander) CmdAccountLogon ¶
func (*Commander) CmdAddHero ¶
func (*Commander) CmdAddItem ¶
func (*Commander) CmdAddTalent ¶
func (*Commander) CmdAddToken ¶
func (*Commander) CmdChangeExp ¶
func (*Commander) CmdChangeLevel ¶
func (*Commander) CmdCliAccountDisconnect ¶
func (*Commander) CmdCreatePlayer ¶
func (*Commander) CmdDelHero ¶
func (*Commander) CmdDelItem ¶
func (*Commander) CmdHeroPutonEquip ¶
func (*Commander) CmdHeroTakeoffEquip ¶
func (*Commander) CmdPublicSyncPlayerInfo ¶
func (*Commander) CmdQueryHeros ¶
func (*Commander) CmdQueryItems ¶
func (*Commander) CmdQueryPlayerInfo ¶
func (*Commander) CmdQueryTalents ¶
func (*Commander) CmdQueryTokens ¶
func (*Commander) CmdSendHeartBeat ¶
func (*Commander) CmdServerAccountDisconnect ¶
func (*Commander) CmdStartStageCombat ¶
func (*Commander) CmdSyncPlayerInfo ¶
func (*Commander) CmdUseItem ¶
type GinServer ¶
type GinServer struct {
// contains filtered or unexported fields
}
func NewGinServer ¶
func NewGinServer(ctx *cli.Context) *GinServer
type MsgHandler ¶
type MsgHandler struct {
// contains filtered or unexported fields
}
func NewMsgHandler ¶
func NewMsgHandler(c *Client, ctx *cli.Context) *MsgHandler
func (*MsgHandler) OnM2C_AccountLogon ¶
func (*MsgHandler) OnM2C_CreatePlayer ¶
func (*MsgHandler) OnM2C_DelItem ¶
func (*MsgHandler) OnM2C_ExpUpdate ¶
func (*MsgHandler) OnM2C_HeartBeat ¶
func (*MsgHandler) OnM2C_HeroAttUpdate ¶
func (*MsgHandler) OnM2C_HeroInfo ¶
func (*MsgHandler) OnM2C_HeroList ¶
func (*MsgHandler) OnM2C_ItemAdd ¶
func (*MsgHandler) OnM2C_ItemList ¶
func (*MsgHandler) OnM2C_ItemUpdate ¶
func (*MsgHandler) OnM2C_PublicSyncPlayerInfo ¶
func (*MsgHandler) OnM2C_QueryPlayerInfo ¶
func (*MsgHandler) OnM2C_StartStageCombat ¶
func (*MsgHandler) OnM2C_SyncPlayerInfo ¶
func (*MsgHandler) OnM2C_TalentList ¶
func (*MsgHandler) OnM2C_TokenList ¶
func (*MsgHandler) OnMS_SelectPlayer ¶
type PromptUI ¶
type PromptUI struct {
// contains filtered or unexported fields
}
func NewPromptUI ¶
type TransportClient ¶
func NewTransportClient ¶
func NewTransportClient(c *Client, ctx *cli.Context) *TransportClient
func (*TransportClient) Exit ¶
func (t *TransportClient) Exit(ctx *cli.Context)
func (*TransportClient) GetGateEndPoints ¶
func (t *TransportClient) GetGateEndPoints() []string
func (*TransportClient) ReturnMsgName ¶
func (t *TransportClient) ReturnMsgName() <-chan string
func (*TransportClient) Run ¶
func (t *TransportClient) Run(ctx *cli.Context) error
func (*TransportClient) SendMessage ¶
func (t *TransportClient) SendMessage(msg *transport.Message)
func (*TransportClient) SetGameInfo ¶
func (t *TransportClient) SetGameInfo(info *GameInfo)
func (*TransportClient) SetProtocol ¶
func (t *TransportClient) SetProtocol(p string)
func (*TransportClient) StartConnect ¶
func (t *TransportClient) StartConnect(ctx context.Context) error
func (*TransportClient) StartDisconnect ¶
func (t *TransportClient) StartDisconnect()
Click to show internal directories.
Click to hide internal directories.