Documentation
¶
Overview ¶
Package session stores account, character, and player-session values shared across login, character selection, map transitions, and game UI.
Index ¶
- Constants
- type Cart
- type CharServer
- type Character
- type Companion
- type Friend
- type Friends
- type Guild
- type GuildExpelHistory
- type GuildMember
- type GuildPosition
- type GuildRelation
- type HotkeySlot
- type Hotkeys
- type Inventory
- type InventoryItem
- type Movement
- type Party
- type PartyMember
- type Progress
- type Session
- func (s *Session) ElapsedSinceServerTick(start uint32, at time.Time) (time.Duration, bool)
- func (s *Session) EstimatedServerTick(at time.Time) (uint32, bool)
- func (s *Session) IsAdminID(id uint32) bool
- func (s *Session) SelectCharacter(character Character)
- func (s *Session) SelectedCharacter() Character
- func (s *Session) SyncServerTick(tick uint32, at time.Time)
- type Skill
- type Skills
- type Stats
- type StatusEffect
- type Statuses
- type Storage
- type Vitals
- type WhisperSettings
- type ZoneServer
Constants ¶
View Source
const ( GuildRelationAlliance uint32 = 0 GuildRelationOpposition uint32 = 1 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CharServer ¶
type Character ¶
type Character struct {
ID uint32
Exp int64
Money int64
Name string
Slot uint8
Level int16
JobLevel int16
Job int16
HP int16
MaxHP int16
SP int16
MaxSP int16
Str uint8
Agi uint8
Vit uint8
Int uint8
Dex uint8
Luk uint8
Hair int16
HairColor uint8
HeadPal int16
BodyPal int16
Weapon int16
Shield int16
HeadTop int16
HeadMid int16
HeadLow int16
Option uint32
}
type Companion ¶
type Companion struct {
ID uint32
Active bool
Name string
Flags uint8
Level int
Hunger int
Intimacy int
ItemID uint32
Faith int
SummonCount int
Calls uint32
Kills uint32
ExpireTick uint32
Attack int
MagicAttack int
Hit int
Critical int
Defense int
MagicDefense int
Flee int
ASPD int
HP int
MaxHP int
SP int
MaxSP int
Exp uint64
MaxExp uint64
AttackRange int
Job int16
Skills Skills
}
type Guild ¶
type Guild struct {
ID uint32
IsMaster bool
Right uint32
MenuAccess uint32
Level uint32
UserNum uint32
MaxUserNum uint32
UserAverageLevel uint32
Exp uint32
MaxExp uint32
Point uint32
Honor uint32
Virtue uint32
EmblemVersion uint32
Name string
MasterName string
ManageLand string
Zeny uint32
Members []GuildMember
Positions []GuildPosition
SkillPoints int
Skills []Skill
ExpelHistory []GuildExpelHistory
NoticeSubject string
Notice string
Relations []GuildRelation
}
type GuildExpelHistory ¶
type GuildMember ¶
type GuildMember struct {
AccountID uint32
CharID uint32
HeadType uint16
HeadPalette uint16
Sex uint16
Job uint16
Level uint16
MemberExp uint32
CurrentState uint32
PositionID uint32
Memo string
CharName string
}
func (GuildMember) Online ¶ added in v0.8.0
func (m GuildMember) Online() bool
type GuildPosition ¶
type GuildRelation ¶ added in v0.8.0
type HotkeySlot ¶
type Hotkeys ¶
type Hotkeys struct {
Loaded bool
Version int
Slots []HotkeySlot
}
type Inventory ¶
type Inventory struct {
Zeny int64
Weight int
MaxWeight int
Items []InventoryItem
}
type InventoryItem ¶
type Party ¶
type Party struct {
Name string
Members []PartyMember
ItemPickupRule uint8
ItemDivisionRule uint8
RefuseInvites bool
}
type PartyMember ¶
type PartyMember struct {
AccountID uint32
Name string
MapName string
Role uint32
State uint8
X int
Y int
HP int
MaxHP int
Dead bool
}
func (PartyMember) Leader ¶
func (m PartyMember) Leader() bool
func (PartyMember) Online ¶
func (m PartyMember) Online() bool
type Progress ¶
type Progress struct {
BaseLevel int
JobLevel int
BaseExp int64
NextBaseExp int64
JobExp int64
NextJobExp int64
}
func ProgressFromCharacter ¶
type Session ¶
type Session struct {
AccountID uint32
CharID uint32
AuthCode uint32
UserLevel uint32
Sex byte
AdminList []uint32
Playing bool
Dead bool
NoShift bool
NoCtrl bool
LessEffects bool
HomunculusCustomAI bool
HomunculusAggressive bool
MercenaryCustomAI bool
MercenaryAggressive bool
ShowEquip bool
GuildID uint32
EmblemVersion uint32
GuildName string
Guild Guild
PendingGuildName string
SnapTargets bool
SnapItems bool
AttackRange int
CharServers []CharServer
CharServerIndex int
Characters []Character
Selected Character
Zone ZoneServer
ServerTick uint32
ServerTickAt time.Time
PlayerX int
PlayerY int
PlayerDir int
Vitals Vitals
Progress Progress
Inventory Inventory
Storage Storage
Cart Cart
Stats Stats
Skills Skills
Hotkeys Hotkeys
Statuses Statuses
Friends Friends
Whisper WhisperSettings
Party Party
Movement Movement
Homunculus Companion
Mercenary Companion
}
func (*Session) ElapsedSinceServerTick ¶
func (*Session) EstimatedServerTick ¶
func (*Session) SelectCharacter ¶
func (*Session) SelectedCharacter ¶
type Stats ¶
type Stats struct {
Points int
Str int
Agi int
Vit int
Int int
Dex int
Luk int
StrBonus int
AgiBonus int
VitBonus int
IntBonus int
DexBonus int
LukBonus int
StrCost int
AgiCost int
VitCost int
IntCost int
DexCost int
LukCost int
Attack int
AttackBonus int
MatkMin int
MatkMax int
Defense int
DefenseBonus int
MDefense int
MDefenseBonus int
Hit int
Flee int
FleeBonus int
Critical int
ASPD int
ASPDBonus int
}
func StatsFromCharacter ¶
type StatusEffect ¶
type Statuses ¶
type Statuses struct {
Active map[uint16]StatusEffect
}
type Storage ¶
type Storage struct {
Open bool
PasswordPending bool
Amount int
MaxAmount int
Items []InventoryItem
}
type Vitals ¶
func VitalsFromCharacter ¶
type WhisperSettings ¶
func DefaultWhisperSettings ¶
func DefaultWhisperSettings() WhisperSettings
type ZoneServer ¶
Click to show internal directories.
Click to hide internal directories.