clientai

package
v0.0.0-...-e449b39 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2022 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DemuxNoti2ByteFnMap = [...]func(me interface{}, hd c2t_packet.Header, rbody []byte) error{
	c2t_idnoti.Invalid:        bytesRecvNotiFn_Invalid,
	c2t_idnoti.EnterTower:     bytesRecvNotiFn_EnterTower,
	c2t_idnoti.EnterFloor:     bytesRecvNotiFn_EnterFloor,
	c2t_idnoti.LeaveFloor:     bytesRecvNotiFn_LeaveFloor,
	c2t_idnoti.LeaveTower:     bytesRecvNotiFn_LeaveTower,
	c2t_idnoti.Ageing:         bytesRecvNotiFn_Ageing,
	c2t_idnoti.Death:          bytesRecvNotiFn_Death,
	c2t_idnoti.ReadyToRebirth: bytesRecvNotiFn_ReadyToRebirth,
	c2t_idnoti.Rebirthed:      bytesRecvNotiFn_Rebirthed,
	c2t_idnoti.Broadcast:      bytesRecvNotiFn_Broadcast,
	c2t_idnoti.VPObjList:      bytesRecvNotiFn_VPObjList,
	c2t_idnoti.VPTiles:        bytesRecvNotiFn_VPTiles,
	c2t_idnoti.FloorTiles:     bytesRecvNotiFn_FloorTiles,
	c2t_idnoti.FieldObjList:   bytesRecvNotiFn_FieldObjList,
	c2t_idnoti.FoundFieldObj:  bytesRecvNotiFn_FoundFieldObj,
	c2t_idnoti.ForgetFloor:    bytesRecvNotiFn_ForgetFloor,
	c2t_idnoti.ActivateTrap:   bytesRecvNotiFn_ActivateTrap,
}

Functions

This section is empty.

Types

type ClientAI

type ClientAI struct {
	ServiceInfo       *c2t_obj.ServiceInfo
	AccountInfo       *c2t_obj.AccountInfo
	TowerInfo         *c2t_obj.TowerInfo
	ViewportXYLenList findnear.XYLenList
	FloorInfoList     []*c2t_obj.FloorInfo
	CurrentFloor      *clientfloor.ClientFloor

	OLNotiData *c2t_obj.NotiVPObjList_data

	IsOverLoad bool
	HPdiff     int
	SPdiff     int

	ServerClientTimeDiff time.Duration
	ServerJitter         *actjitter.ActJitter
	// contains filtered or unexported fields
}

func New

func New(config ClientAIConfig, l *g2log.LogBase) *ClientAI

func (*ClientAI) CanUseCmd

func (cai *ClientAI) CanUseCmd(cmd c2t_idcmd.CommandID) bool

func (*ClientAI) Cleanup

func (cai *ClientAI) Cleanup()

func (*ClientAI) GetArg

func (cai *ClientAI) GetArg() interface{}

func (*ClientAI) GetPlayerXY

func (cai *ClientAI) GetPlayerXY() (int, int)

func (*ClientAI) GetRunResult

func (cai *ClientAI) GetRunResult() error

func (*ClientAI) ReqWithRspFn

func (cai *ClientAI) ReqWithRspFn(cmd c2t_idcmd.CommandID, body interface{},
	fn c2t_pid2rspfn.HandleRspFn) error

func (*ClientAI) ReqWithRspFnWithAuth

func (cai *ClientAI) ReqWithRspFnWithAuth(cmd c2t_idcmd.CommandID, body interface{},
	fn c2t_pid2rspfn.HandleRspFn) error

func (*ClientAI) Run

func (cai *ClientAI) Run(mainctx context.Context)

func (*ClientAI) String

func (cai *ClientAI) String() string

func (*ClientAI) TowerBias

func (cai *ClientAI) TowerBias() bias.Bias

type ClientAIConfig

type ClientAIConfig struct {
	ConnectToTower    string
	Nickname          string
	SessionUUID       string
	DisconnectOnDeath bool
	Auth              string
}

Jump to

Keyboard shortcuts

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