Documentation
¶
Index ¶
- Constants
- Variables
- func CreateGuild(s *Session, guildName string) (int32, error)
- type CharacterSaveData
- type Config
- type FestivalColour
- type Guild
- func (guild *Guild) AcceptCharacter(s *Session, charID uint32) error
- func (guild *Guild) Apply(s *Session, charID uint32) error
- func (guild *Guild) ArrangeCharacters(s *Session, charIDs []uint32) error
- func (guild *Guild) Disband(s *Session) error
- func (guild *Guild) DonateRP(s *Session, rp uint16, transaction *sql.Tx) (err error)
- func (guild *Guild) RemoveCharacter(s *Session, charID uint32) error
- func (guild *Guild) Save(s *Session) error
- type GuildLeader
- type GuildMember
- type Server
- type Session
- type Stage
- type StageObject
Constants ¶
View Source
const ( FestivalColourNone = "none" FestivalColourRed = "red" FestivalColourBlue = "blue" )
View Source
const ( BinaryMessageTypeState = 0 BinaryMessageTypeChat = 1 BinaryMessageTypeEmote = 6 )
MSG_SYS_CAST[ED]_BINARY types enum
View Source
const ( BroadcastTypeTargeted = 0x01 BroadcastTypeStage = 0x03 BroadcastTypeWorld = 0x0a )
MSG_SYS_CAST[ED]_BINARY broadcast types enum
View Source
const (
CharacterSaveRPPointer = 0x22D16
)
Variables ¶
View Source
var FestivalColourCodes = map[FestivalColour]uint8{ FestivalColourBlue: 0x00, FestivalColourRed: 0x01, FestivalColourNone: 0xFF, }
Functions ¶
Types ¶
type CharacterSaveData ¶
type CharacterSaveData struct {
CharID uint32
RP uint16
IsNewCharacter bool
// contains filtered or unexported fields
}
func GetCharacterSaveData ¶
func GetCharacterSaveData(s *Session, charID uint32) (*CharacterSaveData, error)
func (*CharacterSaveData) BaseSaveData ¶
func (save *CharacterSaveData) BaseSaveData() []byte
func (*CharacterSaveData) CompressedBaseData ¶
func (save *CharacterSaveData) CompressedBaseData(s *Session) ([]byte, error)
func (*CharacterSaveData) Save ¶
func (save *CharacterSaveData) Save(s *Session, transaction *sql.Tx) error
func (*CharacterSaveData) SetBaseSaveData ¶
func (save *CharacterSaveData) SetBaseSaveData(data []byte)
type FestivalColour ¶
type FestivalColour string
type Guild ¶
type Guild struct {
ID uint32 `db:"id"`
Name string `db:"name"`
MainMotto string `db:"main_motto"`
CreatedAt time.Time `db:"created_at"`
MemberCount uint16 `db:"member_count"`
RP uint32 `db:"rp"`
Comment string `db:"comment"`
FestivalColour FestivalColour `db:"festival_colour"`
GuildHallType uint16 `db:"guild_hall"`
GuildLeader
}
func (*Guild) AcceptCharacter ¶
func (*Guild) ArrangeCharacters ¶
func (*Guild) RemoveCharacter ¶
type GuildLeader ¶
type GuildMember ¶
type GuildMember struct {
GuildID uint32 `db:"guild_id"`
CharID uint32 `db:"character_id"`
JoinedAt time.Time `db:"joined_at"`
Name string `db:"name"`
IsApplicant bool `db:"is_applicant"`
IsSubLeader bool `db:"is_sub_leader"`
OrderIndex uint16 `db:"order_index"`
LastLogin uint32 `db:"last_login"`
}
func GetCharacterGuildData ¶
func GetCharacterGuildData(s *Session, charID uint32) (*GuildMember, error)
func GetGuildMembers ¶
func GetGuildMembers(s *Session, guildID uint32, applicants bool) ([]*GuildMember, error)
type Server ¶
Server is a MHF channel server.
func (*Server) BroadcastChatMessage ¶
BroadcastChatMessage broadcasts a simple chat message to all the sessions.
func (*Server) BroadcastMHF ¶
BroadcastMHF queues a MHFPacket to be sent to all sessions.
func (*Server) FindSessionByCharID ¶
type Session ¶
Session holds state for the channel server connection.
func NewSession ¶
NewSession creates a new Session type.
func (*Session) QueueAck ¶
QueueAck is a helper function to queue an MSG_SYS_ACK with the given ack handle and data.
func (*Session) QueueSendMHF ¶
QueueSendMHF queues a MHFPacket to be sent.
func (*Session) QueueSendNonBlocking ¶
QueueSendNonBlocking queues a packet (raw []byte) to be sent, dropping the packet entirely if the queue is full.
type Stage ¶
Stage holds stage-specific information
type StageObject ¶
StageObject holds infomation about a specific stage object.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.