player

package
v0.0.0-...-e57d4e3 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2020 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PacketPlayerEnterGame

func PacketPlayerEnterGame(plr Data, channelID int32) mpacket.Packet

PacketPlayerEnterGame - packet that is sent to player when connecting to the channel server

Types

type Data

type Data struct {
	// contains filtered or unexported fields
}

Data connected to server

func GetCharactersFromAccountWorldID

func GetCharactersFromAccountWorldID(db *sql.DB, accountID int32, worldID byte) []Data

GetCharactersFromAccountWorldID - characters under a specific account

func LoadFromID

func LoadFromID(db *sql.DB, id int32, conn mnet.Client) Data

LoadFromID - player id to load from database

func (Data) AP

func (d Data) AP() int16

AP of Data

func (Data) AccountID

func (d Data) AccountID() int32

AccountID of Data

func (*Data) AddEquip

func (d *Data) AddEquip(item item.Data)

AddEquip item to slice

func (Data) CashSlotSize

func (d Data) CashSlotSize() byte

CashSlotSize in inventory

func (Data) ChairID

func (d Data) ChairID() int32

ChairID of the chair the Data is sitting on

func (Data) CheckPos

func (d Data) CheckPos(pos pos.Data, xRange, yRange int16) bool

CheckPos - checks Data is within a certain range of a position

func (Data) Conn

func (d Data) Conn() mnet.Client

Conn - client connection associated with this Data

func (Data) Dex

func (d Data) Dex() int16

Dex of Data

func (Data) DisplayBytes

func (d Data) DisplayBytes() []byte

DisplayBytes used in packets for displaying Data in various situations e.g. in field, in mini game room

func (Data) EquipSlotSize

func (d Data) EquipSlotSize() byte

EquipSlotSize in inventory

func (Data) EtcSlotSize

func (d Data) EtcSlotSize() byte

EtcSlotSize in inventory

func (Data) Exp

func (d Data) Exp() int32

Exp of Data

func (Data) Face

func (d Data) Face() int32

Face id of Data

func (Data) Fame

func (d Data) Fame() int16

Fame of Data

func (Data) Gender

func (d Data) Gender() byte

Gender of Data

func (*Data) GiveAP

func (d *Data) GiveAP(amount int16)

GiveAP to Data

func (*Data) GiveDex

func (d *Data) GiveDex(amount int16)

GiveDex to Data

func (*Data) GiveEXP

func (d *Data) GiveEXP(amount int32, fromMob, fromParty bool)

GiveEXP to the Data

func (*Data) GiveHP

func (d *Data) GiveHP(amount int16)

GiveHP to Data

func (*Data) GiveInt

func (d *Data) GiveInt(amount int16)

GiveInt to Data

func (*Data) GiveItem

func (d *Data) GiveItem(newItem item.Data, db *sql.DB) error

GiveItem to Data

func (*Data) GiveLevel

func (d *Data) GiveLevel(amount byte)

GiveLevel amount ot the Data

func (*Data) GiveLuk

func (d *Data) GiveLuk(amount int16)

GiveLuk to Data

func (*Data) GiveMP

func (d *Data) GiveMP(amount int16)

GiveMP to Data

func (*Data) GiveMesos

func (d *Data) GiveMesos(amount int32)

GiveMesos to Data

func (*Data) GiveSP

func (d *Data) GiveSP(amount int16)

GiveSP to Data

func (*Data) GiveStr

func (d *Data) GiveStr(amount int16)

GiveStr to Data

func (Data) Guild

func (d Data) Guild() string

Guild name Data is currenty part of

func (Data) HP

func (d Data) HP() int16

HP of Data

func (Data) Hair

func (d Data) Hair() int32

Hair id of Data

func (Data) ID

func (d Data) ID() int32

ID of Data

func (Data) InstanceID

func (d Data) InstanceID() int

InstanceID - field instance id the Data is currently on

func (Data) Int

func (d Data) Int() int16

Int of Data

func (Data) Job

func (d Data) Job() int16

Job of Data

func (*Data) LastAttackPacketTime

func (d *Data) LastAttackPacketTime() int64

LastAttackPacketTime of player

func (Data) Level

func (d Data) Level() byte

Level of Data

func (Data) Luk

func (d Data) Luk() int16

Luk of Data

func (Data) MP

func (d Data) MP() int16

MP of Data

func (Data) MapID

func (d Data) MapID() int32

MapID of Data

func (Data) MapPos

func (d Data) MapPos() byte

MapPos of Data

func (Data) MaxHP

func (d Data) MaxHP() int16

MaxHP of Data

func (Data) MaxMP

func (d Data) MaxMP() int16

MaxMP of Data

func (Data) Mesos

func (d Data) Mesos() int32

Mesos Data currently has

func (Data) MiniGameDraw

func (d Data) MiniGameDraw() int32

MiniGameDraw betweeen omok and memory

func (Data) MiniGameLoss

func (d Data) MiniGameLoss() int32

MiniGameLoss between omok and memory

func (Data) MiniGamePoints

func (d Data) MiniGamePoints() int32

MiniGamePoints between omok and memory

func (Data) MiniGameWins

func (d Data) MiniGameWins() int32

MiniGameWins between omok and memory

func (*Data) MoveItem

func (d *Data) MoveItem(start, end, amount int16, invID byte, inst instance, db *sql.DB) error

MoveItem from one slot to another, if the final slot is zero then this is a drop action

func (Data) Name

func (d Data) Name() string

Name of Data

func (Data) PortalCount

func (d Data) PortalCount() byte

PortalCount of Data, used in detecting warp hacking

func (Data) Pos

func (d Data) Pos() pos.Data

Pos of Data

func (Data) PreviousMap

func (d Data) PreviousMap() int32

PreviousMap the Data was on

func (Data) SP

func (d Data) SP() int16

SP of Data

func (Data) Save

func (d Data) Save(db *sql.DB) error

Save data

func (Data) Send

func (d Data) Send(packet mpacket.Packet)

Send the Data a packet

func (*Data) SetAP

func (d *Data) SetAP(amount int16)

SetAP of Data

func (*Data) SetCashSlotSize

func (d *Data) SetCashSlotSize(size byte)

SetCashSlotSize of Data

func (*Data) SetDex

func (d *Data) SetDex(amount int16)

SetDex of Data

func (*Data) SetEXP

func (d *Data) SetEXP(amount int32)

SetEXP of the Data

func (*Data) SetEquipSlotSize

func (d *Data) SetEquipSlotSize(size byte)

SetEquipSlotSize of Data

func (*Data) SetEtcSlotSize

func (d *Data) SetEtcSlotSize(size byte)

SetEtcSlotSize of Data

func (*Data) SetFame

func (d *Data) SetFame(amount int16)

SetFame of Data

func (*Data) SetGuild

func (d *Data) SetGuild(name string)

SetGuild of Data

func (*Data) SetHP

func (d *Data) SetHP(amount int16)

SetHP of Data

func (*Data) SetInstance

func (d *Data) SetInstance(inst interface{})

SetInstance of player

func (*Data) SetInt

func (d *Data) SetInt(amount int16)

SetInt of Data

func (*Data) SetJob

func (d *Data) SetJob(id int16)

SetJob id of the Data

func (*Data) SetLastAttackPacketTime

func (d *Data) SetLastAttackPacketTime(t int64)

SetLastAttackPacketTime of player

func (*Data) SetLevel

func (d *Data) SetLevel(amount byte)

SetLevel of the Data

func (*Data) SetLuk

func (d *Data) SetLuk(amount int16)

SetLuk of Data

func (*Data) SetMP

func (d *Data) SetMP(amount int16)

SetMP of Data

func (*Data) SetMapID

func (d *Data) SetMapID(id int32)

SetMapID of Data

func (*Data) SetMapPosID

func (d *Data) SetMapPosID(pos byte)

SetMapPosID of Data

func (*Data) SetMaxHP

func (d *Data) SetMaxHP(amount int16)

SetMaxHP of Data

func (*Data) SetMaxMP

func (d *Data) SetMaxMP(amount int16)

SetMaxMP of Data

func (*Data) SetMesos

func (d *Data) SetMesos(amount int32)

SetMesos of Data

func (*Data) SetMiniGameDraw

func (d *Data) SetMiniGameDraw(v int32)

SetMiniGameDraw of Data

func (*Data) SetMiniGameLoss

func (d *Data) SetMiniGameLoss(v int32)

SetMiniGameLoss of Data

func (*Data) SetMiniGamePoints

func (d *Data) SetMiniGamePoints(v int32)

SetMiniGamePoints of data

func (*Data) SetMiniGameWins

func (d *Data) SetMiniGameWins(v int32)

SetMiniGameWins of Data

func (*Data) SetPos

func (d *Data) SetPos(pos pos.Data)

SetPos of Data

func (*Data) SetSP

func (d *Data) SetSP(amount int16)

SetSP of Data

func (*Data) SetSetUpSlotSize

func (d *Data) SetSetUpSlotSize(size byte)

SetSetUpSlotSize of Data

func (*Data) SetStr

func (d *Data) SetStr(amount int16)

SetStr of the Data

func (*Data) SetUseSlotSize

func (d *Data) SetUseSlotSize(size byte)

SetUseSlotSize of Data

func (Data) SetupSlotSize

func (d Data) SetupSlotSize() byte

SetupSlotSize in inventory

func (Data) Skills

func (d Data) Skills() map[int32]Skill

Skills and their levels the Data currently has

func (Data) Skin

func (d Data) Skin() byte

Skin id of Data

func (Data) Stance

func (d Data) Stance() byte

Stance id

func (Data) Str

func (d Data) Str() int16

Str of Data

func (*Data) TakeItem

func (d *Data) TakeItem(itemID int32, amount int16) (item.Data, error)

TakeItem from Data

func (*Data) UpdateGuildInfo

func (d *Data) UpdateGuildInfo()

UpdateGuildInfo for the player

func (*Data) UpdateMovement

func (d *Data) UpdateMovement(frag movementFrag)

UpdateMovement - update Data from position data

func (*Data) UpdateSkill

func (d *Data) UpdateSkill(updatedSkill Skill)

UpdateSkill map entry

func (Data) Use

func (d Data) Use() []item.Data

Use items

func (Data) UseSlotSize

func (d Data) UseSlotSize() byte

UseSlotSize in inventory

func (Data) WorldID

func (d Data) WorldID() byte

WorldID of Data

type Skill

type Skill struct {
	ID             int32
	Level, Mastery byte
	Cooldown       int16
	TimeLastUsed   int64
}

func CreateSkillFromData

func CreateSkillFromData(ID int32, level byte) (Skill, error)

Jump to

Keyboard shortcuts

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