host

package
v0.0.0-...-9d7a3c8 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	WeaponsPoint = 3
	UserKillOne  = 7
	UserDeath    = 8
	UserAssist   = 9
	GameScore    = 10 //比分类
	TeamChanging = 11
	HostUnk00    = 12 //未知
	BuyItem      = 14
	UserRevived  = 20
	OnGameEnd    = 21

	SetInventory = 101 // 不一定是101,可能其他的数据包
	ItemUsing    = 105
	SetLoadout   = 107
	SetBuyMenu   = 111

	//kill类型
	KillSelf   = 0xFF //自杀
	KillOne    = 1
	KillTeamCt = 2
	KillTeamTr = 1
)

Variables

This section is empty.

Functions

func BuildChangingTeam

func BuildChangingTeam(id uint32, team uint8) []byte

func BuildGameResult

func BuildGameResult(u *User, boxids []uint32) []byte

func BuildGameResultHeader

func BuildGameResultHeader(rm *Room) []byte

func BuildHostStop

func BuildHostStop() []byte

func BuildItemUsing

func BuildItemUsing(uid uint32, itemid uint32, num int) []byte

func BuildSetBuyMenu

func BuildSetBuyMenu(id uint32, inventory *UserInventory) []byte

func BuildSetUserInventory

func BuildSetUserInventory(u *User, destid uint32) []byte

BuildSetUserInventory 建立要发给主机的玩家装备信息,按理来说应该是所有玩家的装备,待定,L-Leite是发的主机的装备加普通用户ID

func BuildSetUserLoadout

func BuildSetUserLoadout(u *User) []byte

func GetGainExp

func GetGainExp(u *User, bot uint8) uint64

func GetGainPoints

func GetGainPoints(u *User, bot uint8) uint64

func GetRandomBox

func GetRandomBox() uint32

func OnChangingTeam

func OnChangingTeam(p *PacketData, client net.Conn)

func OnHost

func OnHost(p *PacketData, client net.Conn)

func OnHostAssistPacket

func OnHostAssistPacket(p *PacketData, client net.Conn)

func OnHostBuyItem

func OnHostBuyItem(p *PacketData, client net.Conn)

func OnHostDeathPacket

func OnHostDeathPacket(p *PacketData, client net.Conn)

func OnHostGameEnd

func OnHostGameEnd(p *PacketData, client net.Conn)

func OnHostGameScorePacket

func OnHostGameScorePacket(p *PacketData, client net.Conn)

func OnHostGameStart

func OnHostGameStart(client net.Conn)

func OnHostItemUsing

func OnHostItemUsing(p *PacketData, client net.Conn)

func OnHostKillPacket

func OnHostKillPacket(p *PacketData, client net.Conn)

func OnHostRevivedPacket

func OnHostRevivedPacket(p *PacketData, client net.Conn)

func OnHostSetUserBuyMenu

func OnHostSetUserBuyMenu(p *PacketData, client net.Conn)

func OnHostSetUserInventory

func OnHostSetUserInventory(p *PacketData, client net.Conn)

OnHostSetUserInventory 用户发来请求将自己的装备信息发给指定user

func OnHostSetUserLoadout

func OnHostSetUserLoadout(p *PacketData, client net.Conn)

func OnHostWeaponPoint

func OnHostWeaponPoint(p *PacketData, client net.Conn)

Types

This section is empty.

Jump to

Keyboard shortcuts

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