load deck warning
This commit is contained in:
parent
88c66f455c
commit
7447fc8a59
@ -95,6 +95,10 @@ func (s *Session) LoadDeck(id uuid.UUID, data string) SessionResp {
|
|||||||
log.Printf("%v attempted to load invalid deck: %v", id, data)
|
log.Printf("%v attempted to load invalid deck: %v", id, data)
|
||||||
return SessionRespLoadDeckError
|
return SessionRespLoadDeckError
|
||||||
}
|
}
|
||||||
|
if s.Game == nil {
|
||||||
|
log.Println("attmpted to load deck before game created")
|
||||||
|
return SessionRespError
|
||||||
|
}
|
||||||
if id == s.p1 {
|
if id == s.p1 {
|
||||||
s.p1Deck = deck
|
s.p1Deck = deck
|
||||||
s.Game.SentinalDeck = LoadDeck(SentinalID, s.p1Deck)
|
s.Game.SentinalDeck = LoadDeck(SentinalID, s.p1Deck)
|
||||||
|
Loading…
Reference in New Issue
Block a user