Documentation ¶
Index ¶
- func BindSession(s *Server, hostSess *bnet.Session)
- func ChoicesToCardDefs(choices []DraftChoice) (defs []*shared.CardDef)
- func MakeCardDef(id, premium int32) *shared.CardDef
- func MakeChest() (chest shared.RewardChest)
- func MakeDeckInfo(deck *Deck) *shared.DeckInfo
- func Migrate()
- func PegasusDate(t time.Time) *shared.Date
- type Account
- type AccountLicense
- type Achieve
- type Booster
- type BoosterCard
- type Bundle
- type CollectionCard
- type DbfAchieve
- type DbfCard
- type DbfCardBack
- type Deck
- type DeckCard
- type Draft
- type DraftChoice
- type FavoriteHero
- type License
- type Packet
- func EncodePacket(x interface{}, msg proto.Message) *Packet
- func OnAckAchieveProgress(s *Session, body []byte) *Packet
- func OnAckCardSeen(s *Session, body []byte) *Packet
- func OnAssetsVersion(s *Session, body []byte) *Packet
- func OnCancelQuest(s *Session, body []byte) *Packet
- func OnCheckAccountLicenses(s *Session, body []byte) *Packet
- func OnCheckGameLicenses(s *Session, body []byte) *Packet
- func OnCheckLicenses(accountLevel bool) *Packet
- func OnCreateDeck(s *Session, body []byte) *Packet
- func OnDeckSetData(s *Session, body []byte) *Packet
- func OnDeleteDeck(s *Session, body []byte) *Packet
- func OnDraftAckRewards(s *Session, body []byte) *Packet
- func OnDraftBegin(s *Session, body []byte) *Packet
- func OnDraftGetPicksAndContents(s *Session, body []byte) *Packet
- func OnDraftMakePick(s *Session, body []byte) *Packet
- func OnDraftRetire(s *Session, body []byte) *Packet
- func OnGetAccountInfo(s *Session, body []byte) *Packet
- func OnGetAchieves(s *Session, body []byte) *Packet
- func OnGetAdventureProgress(s *Session, body []byte) *Packet
- func OnGetBattlePayConfig(s *Session, body []byte) *Packet
- func OnGetBattlePayStatus(s *Session, body []byte) *Packet
- func OnGetDeck(s *Session, body []byte) *Packet
- func OnGetOptions(s *Session, body []byte) *Packet
- func OnOpenBooster(s *Session, body []byte) *Packet
- func OnPurchaseWithGold(s *Session, body []byte) *Packet
- func OnRenameDeck(s *Session, body []byte) *Packet
- func OnSetCardBack(s *Session, body []byte) *Packet
- func OnSetFavoriteHero(s *Session, body []byte) *Packet
- func OnSetOptions(s *Session, body []byte) *Packet
- func OnUpdateLogin(s *Session, body []byte) *Packet
- func OnUtilSubscribe(s *Session, body []byte) *Packet
- func OnValidateAchieve(s *Session, body []byte) *Packet
- type PacketID
- type Product
- type ProductGoldCost
- type SeasonProgress
- type Server
- type Session
- func (s *Session) GetBoosterInfo(kind int32) *shared.BoosterInfo
- func (s *Session) HandleNotifications()
- func (s *Session) HandleUtilRequest(req []*attribute.Attribute)
- func (s *Session) RegisterPacket(packetId interface{}, handler UtilHandler)
- func (s *Session) UnregisterPacket(packetId interface{}, handler UtilHandler)
- type Store
- type Subscription
- type UtilHandler
- type Version
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BindSession ¶
func ChoicesToCardDefs ¶
func ChoicesToCardDefs(choices []DraftChoice) (defs []*shared.CardDef)
func MakeCardDef ¶
func MakeChest ¶
func MakeChest() (chest shared.RewardChest)
func MakeDeckInfo ¶
Types ¶
type Account ¶
type AccountLicense ¶
type Booster ¶
type Booster struct { ID int64 AccountID int64 BoosterType int Opened bool Cards []BoosterCard }
type CollectionCard ¶
type DbfAchieve ¶
type DbfCardBack ¶
type Draft ¶
type DraftChoice ¶
func MakeCardChoices ¶
func MakeCardChoices(slot int32) (choices []DraftChoice)
func MakeHeroChoices ¶
func MakeHeroChoices() (choices []DraftChoice)
type FavoriteHero ¶
type Packet ¶
func EncodePacket ¶
EncodePacket builds a Packet with the protobuf message and packet id.
func OnAckAchieveProgress ¶
func OnAckCardSeen ¶
func OnAssetsVersion ¶
func OnCancelQuest ¶
func OnCheckAccountLicenses ¶
func OnCheckGameLicenses ¶
func OnCheckLicenses ¶
func OnCreateDeck ¶
func OnDeckSetData ¶
func OnDeleteDeck ¶
func OnDraftAckRewards ¶
func OnDraftBegin ¶
func OnDraftMakePick ¶
func OnDraftRetire ¶
func OnGetAccountInfo ¶
func OnGetAchieves ¶
func OnGetAdventureProgress ¶
func OnGetBattlePayConfig ¶
func OnGetBattlePayStatus ¶
func OnGetOptions ¶
func OnOpenBooster ¶
func OnPurchaseWithGold ¶
func OnRenameDeck ¶
func OnSetCardBack ¶
func OnSetFavoriteHero ¶
func OnSetOptions ¶
func OnUpdateLogin ¶
func OnUtilSubscribe ¶
Handle a client's subscribe request. The response may specify a timeout, after which an active client must resubscribe to renew their session.
func OnValidateAchieve ¶
type ProductGoldCost ¶
type SeasonProgress ¶
type Session ¶
type Session struct { Account Draft Store Subscription Version // contains filtered or unexported fields }
func (*Session) GetBoosterInfo ¶
func (s *Session) GetBoosterInfo(kind int32) *shared.BoosterInfo
func (*Session) HandleNotifications ¶
func (s *Session) HandleNotifications()
func (*Session) HandleUtilRequest ¶
HandleUtilRequest processes an encoded client request from GameUtilities, possibly returning an encoded response.
func (*Session) RegisterPacket ¶
func (s *Session) RegisterPacket(packetId interface{}, handler UtilHandler)
func (*Session) UnregisterPacket ¶
func (s *Session) UnregisterPacket(packetId interface{}, handler UtilHandler)
type Subscription ¶
type Subscription struct {
// contains filtered or unexported fields
}
The subscription system is a way to reduce the server resource usage of idling players.
func (*Subscription) Init ¶
func (s *Subscription) Init(sess *Session)
func (*Subscription) IsValid ¶
func (s *Subscription) IsValid() bool
type UtilHandler ¶
Click to show internal directories.
Click to hide internal directories.