config

package
v0.0.0-...-2692626 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package config 逻辑配置

Index

Constants

View Source
const BattleVersion = 9000
View Source
const DefaultArea = 1101 // 初始区域ID
View Source
const DefaultLevel = 1001 // 初始关卡ID
View Source
const DefaultRegion = 1001 // 初始章节ID

Variables

View Source
var GActionMessageIDAll = make(map[string][]uint32) // 行为组所有消息ID
View Source
var GActionWeightAll = make(map[string]int) // 行为组及权重
View Source
var GFrameData = []byte{'1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1'}

GFrameData 模拟器战斗房间玩家帧数据

Functions

func GetKeyByWeight

func GetKeyByWeight(ActionWeight map[string]int) string

Types

type RobotCfg

type RobotCfg struct {
	Account struct {
		AccountPre   string `yaml:"accountPre"`
		AccountBegin uint32 `yaml:"accountBegin"`
		TotalNum     uint32 `yaml:"totalNum"`
		OnlineNum    uint32 `yaml:"onlineNum"`
	}
	Base struct {
		LogAbsPath      string `yaml:"logAbsPath"`
		LogLevel        uint32 `yaml:"logLevel"`
		LoginAddr       string `yaml:"loginAddr"`
		BattleVersion   string `yaml:"battleVersion"`
		IsBattle        bool   `yaml:"isBattle"`
		CheckInterval   uint32 `yaml:"checkInterval"`
		MessageInterval uint32 `yaml:"messageInterval"`
	}
	Action []struct {
		Name     string `yaml:"name"`
		Desc     string `yaml:"desc"`
		Required bool   `yaml:"required"`
		Weight   int    `yaml:"weight"`
		Message  []struct {
			Id   uint32 `yaml:"id"`
			Name string `yaml:"name"`
			Desc string `yaml:"desc"`
		}
	}
}
var GRobotCfg *RobotCfg

func ParseCfg

func ParseCfg(pathFile string) (*RobotCfg, error)

Jump to

Keyboard shortcuts

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