player

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2023 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Overview

Package player 玩家信息查询

Package player 战地相关战绩查询

Package player 战地相关战绩查询结构体

Index

Constants

View Source
const (
	ALL     string = "ALL"
	Elite   string = "ID_P_CAT_FIELDKIT"         // 精英兵
	LMG     string = "ID_P_CAT_LMG"              // 轻机枪
	Melee   string = "ID_P_CAT_MELEE"            // 近战武器
	Gadget  string = "ID_P_CAT_GADGET"           // 配备
	Semi    string = "ID_P_CAT_SEMI"             // 半自动
	Grenade string = "ID_P_CAT_GRENADE"          // 手榴弹
	SIR     string = "ID_P_CAT_SIR"              // 制式步枪
	Shotgun string = "ID_P_CAT_SHOTGUN"          // 霰弹枪
	Dirver  string = "ID_P_CAT_VEHICLEKITWEAPON" // 驾驶员
	SMG     string = "ID_P_CAT_SMG"              // 冲锋枪
	Sidearm string = "ID_P_CAT_SIDEARM"          // 手枪
	Bolt    string = "ID_P_CAT_BOLT"             // 步枪
)

武器种类

Variables

This section is empty.

Functions

func Get2k

func Get2k(pid string) (kd float64, kpm float64, err error)

Get2k battlelog 获取kd,kpm

Types

type Cheater

type Cheater struct {
	EAC   anticheat.HackEACResp
	BFBan anticheat.HackBFBanResp
}

Cheater 作弊玩家结构体

func IsHacker

func IsHacker(id string) *Cheater

IsHacker 借助id 获取举报信息

type Recent

type Recent []struct {
	Server   string  `json:"server"`
	Map      string  `json:"map"`
	Mode     string  `json:"mode"`
	Date     int64   `json:"date"`
	Score    int     `json:"score"`
	Kill     int     `json:"kill"`
	Death    int     `json:"death"`
	Kd       float64 `json:"kd"`
	Kpm      float64 `json:"kpm"`
	Accuracy float64 `json:"accuracy"`
	Time     int     `json:"time"`
}

Recent 最近战绩

func GetBF1Recent

func GetBF1Recent(id string) (result *Recent, err error)

GetBF1Recent 获取bf1最近战绩

type Stat

type Stat struct {
	SPM               string
	TotalKD           string
	WinPercent        string
	KillsPerGame      string
	Kills             string
	Deaths            string
	KPM               string
	Losses            string
	Wins              string
	InfantryKills     string
	InfantryKPM       string
	InfantryKD        string
	VehicleKills      string
	VehicleKPM        string
	Rank              string
	Skill             string
	TimePlayed        string
	MVP               string
	Accuracy          string
	DogtagsTaken      string
	Headshots         string
	HighestKillStreak string
	LongestHeadshot   string
	Revives           string
	CarriersKills     string
}

Stat 战绩

func GetStats

func GetStats(id string) (*Stat, error)

GetStats 获取战绩信息

type Vehicle

type Vehicle struct {
	Name      string
	Kills     float64
	Destroyed float64
	KPM       string
	Time      string
}

Vehicle 载具

type VehicleSort

type VehicleSort []Vehicle

VehicleSort Vehicles数组

func GetVehicles

func GetVehicles(pid string) (*VehicleSort, error)

GetVehicles 获取载具信息

func (VehicleSort) Len

func (a VehicleSort) Len() int

Len 获取长度

func (VehicleSort) Less

func (a VehicleSort) Less(i, j int) bool

Less 比较

func (VehicleSort) Swap

func (a VehicleSort) Swap(i, j int)

Swap 交换

type WeaponSort

type WeaponSort []Weapons

WeaponSort Weapons数组

func GetWeapons

func GetWeapons(pid, class string) (*WeaponSort, error)

GetWeapons 获取武器

func SortWeapon

func SortWeapon(weapons []gjson.Result) *WeaponSort

SortWeapon 武器排序

func (WeaponSort) Len

func (a WeaponSort) Len() int

Len 获取长度

func (WeaponSort) Less

func (a WeaponSort) Less(i, j int) bool

Less 比较

func (WeaponSort) Swap

func (a WeaponSort) Swap(i, j int)

Swap 交换

type Weapons

type Weapons struct {
	Name       string
	Kills      float64
	Accuracy   string
	KPM        string
	Headshots  string
	Efficiency string
}

Weapons 武器

Jump to

Keyboard shortcuts

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