Documentation ¶
Index ¶
- Constants
- Variables
- func NewGroupServiceUnavailableErr(err error) error
- func NewMailServiceUnavailableErr(err error) error
- type ChatType
- type EventHandler
- type EventsHandlersQueue
- type GameSession
- func (s *GameSession) CanInteractWithMailingObject(ctx context.Context, object uint64) (bool, error)
- func (s *GameSession) CharactersList(ctx context.Context, p *packet.Packet) error
- func (s *GameSession) CreateCharacter(ctx context.Context, p *packet.Packet) error
- func (s *GameSession) DeleteCharacter(ctx context.Context, p *packet.Packet) error
- func (s *GameSession) GuildLoginCommand(ctx context.Context) error
- func (s *GameSession) HandleChatMessage(ctx context.Context, p *packet.Packet) error
- func (s *GameSession) HandleDeleteMail(ctx context.Context, p *packet.Packet) error
- func (s *GameSession) HandleEventGroupConvertedToRaid(ctx context.Context, e *eBroadcaster.Event) error
- func (s *GameSession) HandleEventGroupCreated(ctx context.Context, e *eBroadcaster.Event) error
- func (s *GameSession) HandleEventGroupDifficultyChanged(ctx context.Context, e *eBroadcaster.Event) error
- func (s *GameSession) HandleEventGroupDisband(ctx context.Context, e *eBroadcaster.Event) error
- func (s *GameSession) HandleEventGroupInviteCreated(ctx context.Context, e *eBroadcaster.Event) error
- func (s *GameSession) HandleEventGroupLeaderChanged(ctx context.Context, e *eBroadcaster.Event) error
- func (s *GameSession) HandleEventGroupLootTypeChanged(ctx context.Context, e *eBroadcaster.Event) error
- func (s *GameSession) HandleEventGroupMemberAdded(ctx context.Context, e *eBroadcaster.Event) error
- func (s *GameSession) HandleEventGroupMemberLeft(ctx context.Context, e *eBroadcaster.Event) error
- func (s *GameSession) HandleEventGroupMemberOnlineStatusChanged(ctx context.Context, e *eBroadcaster.Event) error
- func (s *GameSession) HandleEventGroupNewMessage(ctx context.Context, e *eBroadcaster.Event) error
- func (s *GameSession) HandleEventGroupNewTargetIcon(ctx context.Context, e *eBroadcaster.Event) error
- func (s *GameSession) HandleEventGuildInviteCreated(ctx context.Context, e *eBroadcaster.Event) error
- func (s *GameSession) HandleEventGuildMOTDUpdated(_ context.Context, e *eBroadcaster.Event) error
- func (s *GameSession) HandleEventGuildMemberAdded(_ context.Context, e *eBroadcaster.Event) error
- func (s *GameSession) HandleEventGuildMemberDemoted(ctx context.Context, e *eBroadcaster.Event) error
- func (s *GameSession) HandleEventGuildMemberKicked(_ context.Context, e *eBroadcaster.Event) error
- func (s *GameSession) HandleEventGuildMemberLeft(_ context.Context, e *eBroadcaster.Event) error
- func (s *GameSession) HandleEventGuildMemberPromoted(ctx context.Context, e *eBroadcaster.Event) error
- func (s *GameSession) HandleEventGuildNewMessage(_ context.Context, e *eBroadcaster.Event) error
- func (s *GameSession) HandleEventGuildRankCreated(_ context.Context, e *eBroadcaster.Event) error
- func (s *GameSession) HandleEventGuildRankDeleted(_ context.Context, e *eBroadcaster.Event) error
- func (s *GameSession) HandleEventGuildRankUpdated(_ context.Context, e *eBroadcaster.Event) error
- func (s *GameSession) HandleEventIncomingMail(_ context.Context, e *eBroadcaster.Event) error
- func (s *GameSession) HandleEventIncomingWhisperMessage(ctx context.Context, e *eBroadcaster.Event) error
- func (s *GameSession) HandleGetMailList(ctx context.Context, p *packet.Packet) error
- func (s *GameSession) HandleGroupConvertToRaid(ctx context.Context, _ *packet.Packet) error
- func (s *GameSession) HandleGroupInvite(ctx context.Context, p *packet.Packet) error
- func (s *GameSession) HandleGroupInviteAccept(ctx context.Context, _ *packet.Packet) error
- func (s *GameSession) HandleGroupInviteDeclined(ctx context.Context, _ *packet.Packet) error
- func (s *GameSession) HandleGroupLeave(ctx context.Context, _ *packet.Packet) error
- func (s *GameSession) HandleGroupSetLeader(ctx context.Context, p *packet.Packet) error
- func (s *GameSession) HandleGroupUninvite(ctx context.Context, p *packet.Packet) error
- func (s *GameSession) HandleGroupUninviteGUID(ctx context.Context, p *packet.Packet) error
- func (s *GameSession) HandleGuildBankMoneyWithdrawn(ctx context.Context, p *packet.Packet) error
- func (s *GameSession) HandleGuildDemote(ctx context.Context, p *packet.Packet) error
- func (s *GameSession) HandleGuildInvite(ctx context.Context, p *packet.Packet) error
- func (s *GameSession) HandleGuildInviteAccept(ctx context.Context, _ *packet.Packet) error
- func (s *GameSession) HandleGuildKick(ctx context.Context, p *packet.Packet) error
- func (s *GameSession) HandleGuildLeave(ctx context.Context, p *packet.Packet) error
- func (s *GameSession) HandleGuildPermissions(ctx context.Context, p *packet.Packet) error
- func (s *GameSession) HandleGuildPromote(ctx context.Context, p *packet.Packet) error
- func (s *GameSession) HandleGuildQuery(ctx context.Context, p *packet.Packet) error
- func (s *GameSession) HandleGuildRankAdd(ctx context.Context, p *packet.Packet) error
- func (s *GameSession) HandleGuildRankDelete(ctx context.Context, p *packet.Packet) error
- func (s *GameSession) HandleGuildRankUpdate(ctx context.Context, p *packet.Packet) error
- func (s *GameSession) HandleGuildRoster(ctx context.Context, p *packet.Packet) error
- func (s *GameSession) HandleGuildSetInfoText(ctx context.Context, p *packet.Packet) error
- func (s *GameSession) HandleGuildSetMessageOfTheDay(ctx context.Context, p *packet.Packet) error
- func (s *GameSession) HandleGuildSetOfficerNote(ctx context.Context, p *packet.Packet) error
- func (s *GameSession) HandleGuildSetPublicNote(ctx context.Context, p *packet.Packet) error
- func (s *GameSession) HandleMailMarksAsRead(ctx context.Context, p *packet.Packet) error
- func (s *GameSession) HandleMailTakeItem(ctx context.Context, p *packet.Packet) error
- func (s *GameSession) HandleMailTakeMoney(ctx context.Context, p *packet.Packet) error
- func (s *GameSession) HandlePackets(ctx context.Context)
- func (s *GameSession) HandlePing(ctx context.Context, p *packet.Packet) error
- func (s *GameSession) HandleQueryNextMailTime(ctx context.Context, p *packet.Packet) error
- func (s *GameSession) HandleSendMail(ctx context.Context, p *packet.Packet) error
- func (s *GameSession) HandleSetDungeonDifficulty(ctx context.Context, p *packet.Packet) error
- func (s *GameSession) HandleSetGroupTargetIcon(ctx context.Context, p *packet.Packet) error
- func (s *GameSession) HandleSetLootMethod(ctx context.Context, p *packet.Packet) error
- func (s *GameSession) HandleSetRaidDifficulty(ctx context.Context, p *packet.Packet) error
- func (s *GameSession) HandleWho(ctx context.Context, p *packet.Packet) error
- func (s *GameSession) InterceptAccountDataTimes(ctx context.Context, p *packet.Packet) error
- func (s *GameSession) InterceptInitWorldStates(ctx context.Context, p *packet.Packet) error
- func (s *GameSession) InterceptLevelUpInfo(ctx context.Context, p *packet.Packet) error
- func (s *GameSession) InterceptMessageOfTheDay(ctx context.Context, p *packet.Packet) error
- func (s *GameSession) InterceptMoveWorldPortAck(ctx context.Context, p *packet.Packet) error
- func (s *GameSession) InterceptNewWorld(ctx context.Context, p *packet.Packet) error
- func (s *GameSession) InterceptPong(ctx context.Context, p *packet.Packet) error
- func (s *GameSession) LoadGroupForPlayer(ctx context.Context) error
- func (s *GameSession) Login(ctx context.Context, p *packet.Packet) error
- func (s *GameSession) ReadyForAccountDataTimes(ctx context.Context, p *packet.Packet) error
- func (s *GameSession) RealmSplit(ctx context.Context, p *packet.Packet) error
- func (s *GameSession) SendGroupUpdate(ctx context.Context, groupID uint) error
- func (s *GameSession) SendSysMessage(msg string)
- type GameSessionParams
- type GroupOperation
- type GroupResult
- type GuildEventType
- type Handler
- type HandlersQueue
- type MailResponseStatus
- type MailResponseType
- type PacketSendingControl
- type UserFriendlyError
Constants ¶
View Source
const MaxVisibleMailsCount = 100
Variables ¶
View Source
var EventsHandleMap = map[eBroadcaster.EventType]EventsHandlersQueue{ eBroadcaster.EventTypeIncomingWhisper: NewEventHandler("IncomingWhisper", (*GameSession).HandleEventIncomingWhisperMessage), eBroadcaster.EventTypeGuildInviteCreated: NewEventHandler("GuildInviteCreated", (*GameSession).HandleEventGuildInviteCreated), eBroadcaster.EventTypeGuildMemberPromoted: NewEventHandler("GuildMemberPromoted", (*GameSession).HandleEventGuildMemberPromoted), eBroadcaster.EventTypeGuildMemberDemoted: NewEventHandler("GuildMemberDemoted", (*GameSession).HandleEventGuildMemberDemoted), eBroadcaster.EventTypeGuildMOTDUpdated: NewEventHandler("GuildMOTDUpdated", (*GameSession).HandleEventGuildMOTDUpdated), eBroadcaster.EventTypeGuildMemberAdded: NewEventHandler("GuildMemberAdded", (*GameSession).HandleEventGuildMemberAdded), eBroadcaster.EventTypeGuildMemberLeft: NewEventHandler("GuildMemberLeft", (*GameSession).HandleEventGuildMemberLeft), eBroadcaster.EventTypeGuildMemberKicked: NewEventHandler("GuildMemberKicked", (*GameSession).HandleEventGuildMemberKicked), eBroadcaster.EventTypeGuildRankCreated: NewEventHandler("GuildRankCreated", (*GameSession).HandleEventGuildRankCreated), eBroadcaster.EventTypeGuildRankUpdated: NewEventHandler("GuildRankUpdated", (*GameSession).HandleEventGuildRankUpdated), eBroadcaster.EventTypeGuildRankDeleted: NewEventHandler("GuildRankDeleted", (*GameSession).HandleEventGuildRankDeleted), eBroadcaster.EventTypeGuildNewMessage: NewEventHandler("GuildNewMessage", (*GameSession).HandleEventGuildNewMessage), eBroadcaster.EventTypeIncomingMail: NewEventHandler("IncomingMail", (*GameSession).HandleEventIncomingMail), eBroadcaster.EventTypeGroupInviteCreated: NewEventHandler("EventTypeGroupInviteCreated", (*GameSession).HandleEventGroupInviteCreated), eBroadcaster.EventTypeGroupCreated: NewEventHandler("EventTypeGroupCreated", (*GameSession).HandleEventGroupCreated), eBroadcaster.EventTypeGroupMemberOnlineStatusChanged: NewEventHandler("EventTypeGroupMemberOnlineStatusChanged", (*GameSession).HandleEventGroupMemberOnlineStatusChanged), eBroadcaster.EventTypeGroupMemberLeft: NewEventHandler("EventTypeGroupMemberLeft", (*GameSession).HandleEventGroupMemberLeft), eBroadcaster.EventTypeGroupDisband: NewEventHandler("EventTypeGroupDisband", (*GameSession).HandleEventGroupDisband), eBroadcaster.EventTypeGroupMemberAdded: NewEventHandler("EventTypeGroupMemberAdded", (*GameSession).HandleEventGroupMemberAdded), eBroadcaster.EventTypeGroupLeaderChanged: NewEventHandler("EventTypeGroupLeaderChanged", (*GameSession).HandleEventGroupLeaderChanged), eBroadcaster.EventTypeGroupLootTypeChanged: NewEventHandler("EventTypeGroupLootTypeChanged", (*GameSession).HandleEventGroupLootTypeChanged), eBroadcaster.EventTypeGroupConvertedToRaid: NewEventHandler("EventTypeGroupConvertedToRaid", (*GameSession).HandleEventGroupConvertedToRaid), eBroadcaster.EventTypeGroupNewMessage: NewEventHandler("EventTypeGroupNewMessage", (*GameSession).HandleEventGroupNewMessage), eBroadcaster.EventTypeGroupNewTargetIcon: NewEventHandler("EventTypeGroupNewTargetIcon", (*GameSession).HandleEventGroupNewTargetIcon), eBroadcaster.EventTypeGroupDifficultyChanged: NewEventHandler("EventTypeGroupDifficultyChanged", (*GameSession).HandleEventGroupDifficultyChanged), }
View Source
var HandleMap = map[packet.Opcode]HandlersQueue{ packet.CMsgCharCreate: NewHandler("CMsgCharCreate", (*GameSession).CreateCharacter), packet.CMsgPlayerLogin: NewHandler("CMsgPlayerLogin", (*GameSession).Login), packet.CMsgCharDelete: NewHandler("CMsgCharDelete", (*GameSession).DeleteCharacter), packet.CMsgCharEnum: NewHandler("CMsgCharEnum", (*GameSession).CharactersList), packet.CMsgRealmSplit: NewHandler("CMsgRealmSplit", (*GameSession).RealmSplit), packet.CMsgReadyForAccountDataTimes: NewHandler("CMsgReadyForAccountDataTimes", (*GameSession).ReadyForAccountDataTimes), packet.CMsgMessageChat: NewHandler("CMsgMessageChat", (*GameSession).HandleChatMessage), packet.CMsgGuildQuery: NewHandler("CMsgGuildQuery", (*GameSession).HandleGuildQuery), packet.CMsgWho: NewHandler("CMsgWho", (*GameSession).HandleWho), packet.CMsgGuildInvite: NewHandler("CMsgGuildInvite", (*GameSession).HandleGuildInvite), packet.CMsgGuildInviteAccept: NewHandler("CMsgGuildInviteAccept", (*GameSession).HandleGuildInviteAccept), packet.CMsgGuildRoster: NewHandler("CMsgGuildRoster", (*GameSession).HandleGuildRoster), packet.CMsgGuildLeave: NewHandler("CMsgGuildLeave", (*GameSession).HandleGuildLeave), packet.CMsgGuildRemove: NewHandler("CMsgGuildRemove", (*GameSession).HandleGuildKick), packet.CMsgGuildMOTD: NewHandler("CMsgGuildSMTD", (*GameSession).HandleGuildSetMessageOfTheDay), packet.CMsgGuildSetPublicNote: NewHandler("CMsgGuildSetPublicNote", (*GameSession).HandleGuildSetPublicNote), packet.CMsgGuildSetOfficerNote: NewHandler("CMsgGuildSetOfficerNote", (*GameSession).HandleGuildSetOfficerNote), packet.CMsgGuildInfoText: NewHandler("CMsgGuildInfoText", (*GameSession).HandleGuildSetInfoText), packet.CMsgGuildRank: NewHandler("CMsgGuildRank", (*GameSession).HandleGuildRankUpdate), packet.CMsgGuildAddRank: NewHandler("CMsgGuildAddRank", (*GameSession).HandleGuildRankAdd), packet.CMsgGuildDelRank: NewHandler("CMsgGuildDelRank", (*GameSession).HandleGuildRankDelete), packet.CMsgGuildPromote: NewHandler("CMsgGuildPromote", (*GameSession).HandleGuildPromote), packet.CMsgGuildDemote: NewHandler("CMsgGuildDemote", (*GameSession).HandleGuildDemote), packet.CMsgSendMail: NewHandler("CMsgSendMail", (*GameSession).HandleSendMail), packet.CMsgGetMailList: NewHandler("CMsgGetMailList", (*GameSession).HandleGetMailList), packet.CMsgMailMarkAsRead: NewHandler("CMsgMailMarkAsRead", (*GameSession).HandleMailMarksAsRead), packet.CMsgMailTakeMoney: NewHandler("CMsgMailTakeMoney", (*GameSession).HandleMailTakeMoney), packet.CMsgMailTakeItem: NewHandler("CMsgMailTakeItem", (*GameSession).HandleMailTakeItem), packet.CMsgMailDelete: NewHandler("CMsgMailDelete", (*GameSession).HandleDeleteMail), packet.MsgQueryNextMailTime: NewHandler("MsgQueryNextMailTime", (*GameSession).HandleQueryNextMailTime), packet.SMsgInitWorldStates: NewHandler("SMsgInitWorldStates", (*GameSession).InterceptInitWorldStates), packet.SMsgLevelUpInfo: NewHandler("SMsgLevelUpInfo", (*GameSession).InterceptLevelUpInfo), packet.CMsgPing: NewHandler("CMsgPing", (*GameSession).HandlePing), packet.SMsgPong: NewHandler("SMsgPong", (*GameSession).InterceptPong), packet.SMsgNewWorld: NewHandler("SMsgNewWorld", (*GameSession).InterceptNewWorld), packet.MsgGuildPermissions: NewHandler("MsgGuildPermissions", (*GameSession).HandleGuildPermissions), packet.MsgGuildBankMoneyWithdrawn: NewHandler("MsgGuildBankMoneyWithdrawn", (*GameSession).HandleGuildBankMoneyWithdrawn), packet.MsgMoveWorldPortAck: NewHandler("MsgMoveWorldPortAck", (*GameSession).InterceptMoveWorldPortAck), packet.SMsgMOTD: NewHandler("SMsgMOTD", (*GameSession).InterceptMessageOfTheDay), packet.SMsgAccountDataTimes: NewHandler("SMsgAccountDataTimes", (*GameSession).InterceptAccountDataTimes), packet.CMsgGroupInvite: NewHandler("CMsgGroupInvite", (*GameSession).HandleGroupInvite), packet.CMsgGroupAccept: NewHandler("CMsgGroupAccept", (*GameSession).HandleGroupInviteAccept), packet.CMsgGroupDecline: NewHandler("CMsgGroupDecline", (*GameSession).HandleGroupInviteDeclined), packet.CMsgGroupUnInvite: NewHandler("CMsgGroupUnInvite", (*GameSession).HandleGroupUninvite), packet.CMsgGroupUnInviteGuid: NewHandler("CMsgGroupUnInviteGuid", (*GameSession).HandleGroupUninviteGUID), packet.CMsgGroupDisband: NewHandler("CMsgGroupDisband", (*GameSession).HandleGroupLeave), packet.CMsgGroupRaidConvert: NewHandler("CMsgGroupRaidConvert", (*GameSession).HandleGroupConvertToRaid), packet.CMsgGroupSetLeader: NewHandler("CMsgGroupSetLeader", (*GameSession).HandleGroupSetLeader), packet.MsgRaidTargetUpdate: NewHandler("MsgRaidTargetUpdate", (*GameSession).HandleSetGroupTargetIcon), packet.CMsgLootMethod: NewHandler("CMsgLootMethod", (*GameSession).HandleSetLootMethod), packet.MsgSetDungeonDifficulty: NewHandler("MsgSetDungeonDifficulty", (*GameSession).HandleSetDungeonDifficulty), packet.MsgSetRaidDifficulty: NewHandler("MsgSetRaidDifficulty", (*GameSession).HandleSetRaidDifficulty), }
View Source
var WorldSocketCreator = worldsocket.NewWorldSocketWithAddress
Functions ¶
func NewGroupServiceUnavailableErr ¶ added in v0.0.2
Types ¶
type EventHandler ¶
type EventHandler func(*GameSession, context.Context, *eBroadcaster.Event) error
type EventsHandlersQueue ¶
type EventsHandlersQueue struct {
// contains filtered or unexported fields
}
func NewEventHandler ¶
func NewEventHandler(name string, handlers ...EventHandler) EventsHandlersQueue
func (*EventsHandlersQueue) Handle ¶
func (q *EventsHandlersQueue) Handle(ctx context.Context, session *GameSession, e *eBroadcaster.Event) error
type GameSession ¶
type GameSession struct {
// contains filtered or unexported fields
}
GameSession represents session of the player, holds world and game sockets, routes and handles packets.
func NewGameSession ¶
func (*GameSession) CanInteractWithMailingObject ¶
func (*GameSession) CharactersList ¶
func (*GameSession) CreateCharacter ¶ added in v0.0.3
func (*GameSession) DeleteCharacter ¶ added in v0.0.3
func (*GameSession) GuildLoginCommand ¶
func (s *GameSession) GuildLoginCommand(ctx context.Context) error
func (*GameSession) HandleChatMessage ¶
func (*GameSession) HandleDeleteMail ¶
func (*GameSession) HandleEventGroupConvertedToRaid ¶ added in v0.0.2
func (s *GameSession) HandleEventGroupConvertedToRaid(ctx context.Context, e *eBroadcaster.Event) error
func (*GameSession) HandleEventGroupCreated ¶ added in v0.0.2
func (s *GameSession) HandleEventGroupCreated(ctx context.Context, e *eBroadcaster.Event) error
func (*GameSession) HandleEventGroupDifficultyChanged ¶ added in v0.0.2
func (s *GameSession) HandleEventGroupDifficultyChanged(ctx context.Context, e *eBroadcaster.Event) error
func (*GameSession) HandleEventGroupDisband ¶ added in v0.0.2
func (s *GameSession) HandleEventGroupDisband(ctx context.Context, e *eBroadcaster.Event) error
func (*GameSession) HandleEventGroupInviteCreated ¶ added in v0.0.2
func (s *GameSession) HandleEventGroupInviteCreated(ctx context.Context, e *eBroadcaster.Event) error
func (*GameSession) HandleEventGroupLeaderChanged ¶ added in v0.0.2
func (s *GameSession) HandleEventGroupLeaderChanged(ctx context.Context, e *eBroadcaster.Event) error
func (*GameSession) HandleEventGroupLootTypeChanged ¶ added in v0.0.2
func (s *GameSession) HandleEventGroupLootTypeChanged(ctx context.Context, e *eBroadcaster.Event) error
func (*GameSession) HandleEventGroupMemberAdded ¶ added in v0.0.2
func (s *GameSession) HandleEventGroupMemberAdded(ctx context.Context, e *eBroadcaster.Event) error
func (*GameSession) HandleEventGroupMemberLeft ¶ added in v0.0.2
func (s *GameSession) HandleEventGroupMemberLeft(ctx context.Context, e *eBroadcaster.Event) error
func (*GameSession) HandleEventGroupMemberOnlineStatusChanged ¶ added in v0.0.2
func (s *GameSession) HandleEventGroupMemberOnlineStatusChanged(ctx context.Context, e *eBroadcaster.Event) error
func (*GameSession) HandleEventGroupNewMessage ¶ added in v0.0.2
func (s *GameSession) HandleEventGroupNewMessage(ctx context.Context, e *eBroadcaster.Event) error
func (*GameSession) HandleEventGroupNewTargetIcon ¶ added in v0.0.2
func (s *GameSession) HandleEventGroupNewTargetIcon(ctx context.Context, e *eBroadcaster.Event) error
func (*GameSession) HandleEventGuildInviteCreated ¶
func (s *GameSession) HandleEventGuildInviteCreated(ctx context.Context, e *eBroadcaster.Event) error
func (*GameSession) HandleEventGuildMOTDUpdated ¶
func (s *GameSession) HandleEventGuildMOTDUpdated(_ context.Context, e *eBroadcaster.Event) error
func (*GameSession) HandleEventGuildMemberAdded ¶
func (s *GameSession) HandleEventGuildMemberAdded(_ context.Context, e *eBroadcaster.Event) error
func (*GameSession) HandleEventGuildMemberDemoted ¶
func (s *GameSession) HandleEventGuildMemberDemoted(ctx context.Context, e *eBroadcaster.Event) error
func (*GameSession) HandleEventGuildMemberKicked ¶
func (s *GameSession) HandleEventGuildMemberKicked(_ context.Context, e *eBroadcaster.Event) error
func (*GameSession) HandleEventGuildMemberLeft ¶
func (s *GameSession) HandleEventGuildMemberLeft(_ context.Context, e *eBroadcaster.Event) error
func (*GameSession) HandleEventGuildMemberPromoted ¶
func (s *GameSession) HandleEventGuildMemberPromoted(ctx context.Context, e *eBroadcaster.Event) error
func (*GameSession) HandleEventGuildNewMessage ¶
func (s *GameSession) HandleEventGuildNewMessage(_ context.Context, e *eBroadcaster.Event) error
func (*GameSession) HandleEventGuildRankCreated ¶
func (s *GameSession) HandleEventGuildRankCreated(_ context.Context, e *eBroadcaster.Event) error
func (*GameSession) HandleEventGuildRankDeleted ¶
func (s *GameSession) HandleEventGuildRankDeleted(_ context.Context, e *eBroadcaster.Event) error
func (*GameSession) HandleEventGuildRankUpdated ¶
func (s *GameSession) HandleEventGuildRankUpdated(_ context.Context, e *eBroadcaster.Event) error
func (*GameSession) HandleEventIncomingMail ¶
func (s *GameSession) HandleEventIncomingMail(_ context.Context, e *eBroadcaster.Event) error
func (*GameSession) HandleEventIncomingWhisperMessage ¶
func (s *GameSession) HandleEventIncomingWhisperMessage(ctx context.Context, e *eBroadcaster.Event) error
func (*GameSession) HandleGetMailList ¶
func (*GameSession) HandleGroupConvertToRaid ¶ added in v0.0.2
func (*GameSession) HandleGroupInvite ¶ added in v0.0.2
func (*GameSession) HandleGroupInviteAccept ¶ added in v0.0.2
func (*GameSession) HandleGroupInviteDeclined ¶ added in v0.0.2
func (*GameSession) HandleGroupLeave ¶ added in v0.0.2
func (*GameSession) HandleGroupSetLeader ¶ added in v0.0.2
func (*GameSession) HandleGroupUninvite ¶ added in v0.0.2
func (*GameSession) HandleGroupUninviteGUID ¶ added in v0.0.2
func (*GameSession) HandleGuildBankMoneyWithdrawn ¶
func (*GameSession) HandleGuildDemote ¶
func (*GameSession) HandleGuildInvite ¶
func (*GameSession) HandleGuildInviteAccept ¶
func (*GameSession) HandleGuildKick ¶
func (*GameSession) HandleGuildLeave ¶
func (*GameSession) HandleGuildPermissions ¶
func (*GameSession) HandleGuildPromote ¶
func (*GameSession) HandleGuildQuery ¶
func (*GameSession) HandleGuildRankAdd ¶
func (*GameSession) HandleGuildRankDelete ¶
func (*GameSession) HandleGuildRankUpdate ¶
func (*GameSession) HandleGuildRoster ¶
func (*GameSession) HandleGuildSetInfoText ¶
func (*GameSession) HandleGuildSetMessageOfTheDay ¶
func (*GameSession) HandleGuildSetOfficerNote ¶
func (*GameSession) HandleGuildSetPublicNote ¶
func (*GameSession) HandleMailMarksAsRead ¶
func (*GameSession) HandleMailTakeItem ¶
func (*GameSession) HandleMailTakeMoney ¶
func (*GameSession) HandlePackets ¶
func (s *GameSession) HandlePackets(ctx context.Context)
HandlePackets handles game and world packets, as well as general events (like messages). Has infinite loop that can be broken with ctx or by closing gameSocket read channel.
func (*GameSession) HandlePing ¶
func (*GameSession) HandleQueryNextMailTime ¶
func (*GameSession) HandleSendMail ¶
func (*GameSession) HandleSetDungeonDifficulty ¶ added in v0.0.2
func (*GameSession) HandleSetGroupTargetIcon ¶ added in v0.0.2
func (*GameSession) HandleSetLootMethod ¶ added in v0.0.2
func (*GameSession) HandleSetRaidDifficulty ¶ added in v0.0.2
func (*GameSession) InterceptAccountDataTimes ¶ added in v0.0.3
func (*GameSession) InterceptInitWorldStates ¶
func (*GameSession) InterceptLevelUpInfo ¶
func (*GameSession) InterceptMessageOfTheDay ¶ added in v0.0.3
func (*GameSession) InterceptMoveWorldPortAck ¶
func (*GameSession) InterceptNewWorld ¶
func (*GameSession) InterceptPong ¶
func (*GameSession) LoadGroupForPlayer ¶ added in v0.0.2
func (s *GameSession) LoadGroupForPlayer(ctx context.Context) error
func (*GameSession) ReadyForAccountDataTimes ¶
func (*GameSession) RealmSplit ¶
func (*GameSession) SendGroupUpdate ¶ added in v0.0.2
func (s *GameSession) SendGroupUpdate(ctx context.Context, groupID uint) error
func (*GameSession) SendSysMessage ¶
func (s *GameSession) SendSysMessage(msg string)
type GameSessionParams ¶
type GameSessionParams struct { CharServiceClient pbChar.CharactersServiceClient ServersRegistryClient pbServ.ServersRegistryServiceClient ChatServiceClient pbChat.ChatServiceClient GuildsServiceClient pbGuild.GuildServiceClient MailServiceClient pbMail.MailServiceClient GroupServiceClient pbGroup.GroupServiceClient EventsProducer events.LoadBalancerProducer CharsUpdsBarrier *service.CharactersUpdatesBarrier EventsBroadcaster eBroadcaster.Broadcaster GameServerGRPCConnMgr service.GameServerGRPCConnMgr PacketProcessTimeout time.Duration ShowGameserverConnChangeToClient bool }
type GroupOperation ¶ added in v0.0.2
type GroupOperation uint8
const ( GroupOperationInvite GroupOperation = iota GroupOperationUninvite GroupOperationLeave GroupOperationSwap )
type GroupResult ¶ added in v0.0.2
type GroupResult uint8
const ( GroupResultOk GroupResult = iota GroupResultBadPlayerName GroupResultTargetNotInGroupS GroupResultTargetNotInInstanceS GroupResultGroupFull GroupResultAlreadyInGroup GroupResultNotInGroup GroupResultNotLeader )
type GuildEventType ¶
type GuildEventType uint8
const ( GuildEventTypePromotion GuildEventType = iota GuildEventTypeDemotion GuildEventTypeMessageOfTheDay GuildEventTypeJoined GuildEventTypeLeft GuildEventTypeRemoved GuildEventTypeLeaderIS // don't know what is it GuildEventTypeLeaderChanged GuildEventTypeDisbanded GuildEventTypeTabardChanged GuildEventTypeRankUpdated GuildEventTypeRankDeleted GuildEventTypeSignedOn GuildEventTypeSignedOff GuildEventTypeBankSlotsChanged GuildEventTypeTabPurchased GuildEventTypeTabUpdated GuildEventTypeBankMoneySet GuildEventTypeTabAndMoneyUpdated GuildEventTypeBankTextChanged )
type Handler ¶
type HandlersQueue ¶
type HandlersQueue struct {
// contains filtered or unexported fields
}
func NewHandler ¶
func NewHandler(name string, handlers ...Handler) HandlersQueue
func (*HandlersQueue) Handle ¶
func (q *HandlersQueue) Handle(ctx context.Context, session *GameSession, p *packet.Packet) error
type MailResponseStatus ¶
type MailResponseStatus uint8
const ( MailResponseStatusOk MailResponseStatus = iota MailResponseStatusEquipErr MailResponseStatusCannotSendToSelf MailResponseStatusNotEnoughMoney MailResponseStatusRecipientNotFound MailResponseStatusNotYourTeam MailResponseStatusInternalError MailResponseStatusDisabledForTrialAcc MailResponseStatusRecipientCapReached MailResponseStatusCantSendWrappedCOD MailResponseStatusMailAndChatSuspended MailResponseStatusTooManyAttachments MailResponseStatusMailAttachmentInvalid MailResponseStatusItemHasExpired )
type MailResponseType ¶
type MailResponseType uint8
const ( MailResponseTypeMailSend MailResponseType = iota MailResponseTypeMoneyTaken MailResponseTypeItemTaken MailResponseTypeReturnedToSender MailResponseTypeDeleted MailResponseTypeMadePermanent )
type PacketSendingControl ¶ added in v0.0.3
type PacketSendingControl struct {
// contains filtered or unexported fields
}
PacketSendingControl contains flags to track sending of some packets that needs to be sent only once or similar to that.
type UserFriendlyError ¶
func (*UserFriendlyError) Error ¶
func (e *UserFriendlyError) Error() string
Click to show internal directories.
Click to hide internal directories.