conf

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2020 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConfigUrl = "./conf/robot.ini"
	HeaderLen = 4

	WorldW      = 990
	WorldH      = 990
	WorldOffset = 1000

	UserCityID = 100001
)

Variables

View Source
var (
	MassWaitDur     = []uint64{5, 10, 30, 60}
	WorldExploreDur = []uint64{15, 60, 480, 720}
	StttRecorder    chan *StttData
	CallServerChan  chan *RoundChanInfo
	RobType         uint32

	NumTicker int64
	Caller    chan bool
)

Functions

func ConvertToWorldPos

func ConvertToWorldPos(tileID int32) (int32, int32, int32)

func ConvertToWorldTileID

func ConvertToWorldTileID(x int32, y int32, sid int32) int32

func StttRecord

func StttRecord(name string, tp StttType, val int64)

Types

type ActionType

type ActionType uint32
const (
	ActionType_Common ActionType = iota + 1
	ActionType_Castle
	ActionType_Global
	ActionType_League
	ActionType_Wonder
	ActionType_Max
)

type MSGType

type MSGType uint32
const (
	/// First Of All
	MSGType_JoinAction MSGType = iota

	/// client
	MSGType_Dirty //请求脏数据
	MSGType_Cheat
	MSGType_CharInfo
	MSGType_Draw
	MSGType_ChatREQ // 聊天请求
	MSGType_TopList
	MSGType_SevenDay
	MSGType_Novice //开服七日活动
	MSGType_AirShip
	MSGType_Tutorial
	MSGType_Talent
	MSGType_AirShipGift //点小火车领礼物

	MSGType_HeroDetail
	MSGType_HeroRecuit
	MSGType_HeroStarUp
	MSGType_HeroWearUp
	MSGType_HeroRankUp
	MSGType_HeroGuarde

	MSGType_MailList
	MSGType_MailBody
	MSGType_MailRead
	MSGType_MailKeep
	MSGType_MailLock
	MSGType_MailDele

	/// castle
	MSGType_CastleMSGs
	MSGType_ActionS
	MSGType_ActionC
	MSGType_ActionE
	MSGType_TaskAch    // 发展任务
	MSGType_UseResItem //使用资源道具

	/// globalWorld
	MSGType_GlobalMSGs
	MSGType_EnterMap
	MSGType_SettleCity
	MSGType_SettleWonder
	MSGType_WorldTiles
	MSGType_WorldSimple
	MSGType_WorldDetail
	MSGType_WorldEntry
	MSGType_WorldAction

	/// globalAction
	MSGType_WorldMonster
	MSGType_WorldCamp
	MSGType_WorldGather
	MSGType_WorldSiege
	MSGType_WorldPortal
	MSGType_MinorMiracle //小奇迹
	MSGType_SuperMiracle //大奇迹
	MSGType_StartGroup   //集结
	MSGType_JoinGroup    //加入集结

	/// leagueAction
	MSGType_LeagueList
	//MSGType_LeagueSimple
	MSGType_LeagueJoin
	MSGType_LeagueMake
	MSGType_LeagueBoxRefresh
	MSGType_LeagueGift
	MSGType_LeagueDevote //联盟科技捐献

	MSGType_Logout
	MSGType_MAX
)

type ObjectType

type ObjectType uint32
const (
	ObjectType_Nothing ObjectType = iota
	ObjectType_UserCity
	ObjectType_Monster
	ObjectType_MMonster
	ObjectType_Veins
	ObjectType_NpcCity
	ObjectType_Wonder
	ObjectType_Miracle
	ObjectType_Portal
)

type RobSimple

type RobSimple struct {
	Uid  string
	Name string
}

type RobSttts

type RobSttts struct {
	RobID     string
	LoginTime int64
	LoginFail []int64
	LoginCost int64
	EnterFail []int64
	EnterCost int64

	LastMSGTime int64 //每当发消息的时候,把下面那些数据置空,便于记录
	LastMSGType uint32
	LastMSGFail int64
	LastMSGSucc int64
	LastParse1  int64
	LastParse2  int64
}

type RobotType

type RobotType uint32
const (
	RobotType_Login RobotType = iota
	RobotType_NoGlobal
	RobotType_BattleSim
	RobotType_MiracleWar

	RobotType_FullRobot
)

type RoundChanInfo

type RoundChanInfo struct {
	Time   uint64
	Path   string
	Action string
}

type RoundInfo

type RoundInfo struct {
	Max       uint64
	Min       uint64
	Total     uint64
	Tms       uint32
	Avg       uint64
	BeginTime uint64
}

type StttData

type StttData struct {
	Type  StttType
	RobID string
	Cost  int64
}

type StttType

type StttType uint32
const (
	Sttt_NewRobot StttType = iota
	Sttt_LoginFail
	Sttt_LoginSucc
	Sttt_EnterFail
	Sttt_EnterSucc
	Sttt_PackTime
	Sttt_PackType
	Sttt_PackFail
	Sttt_PackSucc
	Sttt_Parse1st
	Sttt_Parse2nd
)

Jump to

Keyboard shortcuts

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