core

package
v0.0.0-...-254d333 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2015 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AUTO_EXPIRE = 300 // seconds
	EVENT_MAX   = 50000
)

Variables

This section is empty.

Functions

func Free

func Free(id int32) bool

func Host

func Host(id int32) (ret int32)

func LoadAllUsers

func LoadAllUsers()

----------------------------------------------- load all users into memory

func LoadUser

func LoadUser(id int32) bool

----------------------------------------------- load a single user

func Login

func Login(id, host int32) bool

------------------------------------------------ The State Machine Of Player

func Logout

func Logout(id int32) bool

func LogoutServer

func LogoutServer(host int32)

------------------------------------------------ when game disconnect, perform a logout for all players on that gs

func Protect

func Protect(id int32, until int64) bool

func Raid

func Raid(id int32) bool

func State

func State(id int32) (ret byte)

State Readers A->B

Types

type PlayerInfo

type PlayerInfo struct {
	Id             int32
	State          byte
	Host           int32 // host
	ProtectTimeout int64 // real protect timeout
	RaidStart      int64 // raid start time
	sync.Mutex           // Record lock
}

--------------------------------------------------------- player info

Jump to

Keyboard shortcuts

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