nats

package
v0.0.0-...-a063660 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2020 License: MIT Imports: 5 Imported by: 4

Documentation

Index

Constants

View Source
const (
	PLAYER_HANDSHAKE = iota
	PLAYER_MOVEMENT
	PLAYER_SPAWN
	PLAYER_RESPAWN
	CHAT_NORMAL
	CHAT_PRIVATE
	SHOW_ITEMS
	MOB_ATTACK
	PLAYER_ATTACK
	MOB_MOVEMENT
	PET_MOVEMENT
	CHARACTER_DEATH
	ITEM_DROP
	BOSS_DROP
	DROP_DISAPPEAR
	BATTLE_MODE
	PVP_START
	PVP_FINISHED
	MEDITATION_MODE
	CAST_SKILL
)
View Source
const (
	HOUSTON_CH = "Houston"
)

Variables

View Source
var DefaultOptions = server.Options{
	Host:           "127.0.0.1",
	Port:           4222,
	NoLog:          false,
	NoSigs:         false,
	MaxControlLine: 256,
}

DefaultTestOptions are default options for the unit tests.

Functions

func ConnectSelf

func ConnectSelf(opts *server.Options) (*nats.Conn, error)

func Connection

func Connection() *nats.Conn

func RunServer

func RunServer(opts *server.Options) *server.Server

RunServer starts a new Go routine based server

Types

type CastPacket

type CastPacket struct {
	CastNear    bool `json:"cast_near"`
	CharacterID int  `json:"character_id"`
	MobID       int  `json:"mob_id"`
	PetID       int  `json:"pet_id"`
	DropID      int  `json:"loot_id"`
	Location    *struct {
		X float64
		Y float64
	} `json:"location"`
	MaxDistance float64 `json:"max_distance"`
	Data        []byte  `json:"data"`
	Type        int8    `json:"type"`
}

func (*CastPacket) Cast

func (p *CastPacket) Cast() error

Jump to

Keyboard shortcuts

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