fix: restore battle entry and character profile initialization
This commit is contained in:
1 parent
cfbbc7b970
commit
5c4d0d4149
16 files changed
+888
-228
No files matched your search
@@ -95,24 +95,49 @@ func init() {
|
||||
})
|
||||
|
||||
handle("GetPlayerBoardData", func(s *Session, req *goproto.GetPlayerBoardDataCsReq, rsp *goproto.GetPlayerBoardDataScRsp) error {
|
||||
profile, err := loadProfileResources()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
rsp.Retcode = 0
|
||||
rsp.CurrentHeadIconId = 200001
|
||||
rsp.CurrentPersonalCardId = 253001
|
||||
rsp.CurrentHeadIconId = profile.Icons[0]
|
||||
rsp.CurrentPersonalCardId = profile.CurrentPersonalCard
|
||||
rsp.HeadFrameInfo = profile.HeadFrame
|
||||
rsp.NBIEJKLENOB = &goproto.DisplayAvatarVec{IsDisplay: true}
|
||||
rsp.Signature = "Trailblazer"
|
||||
rsp.JJDDEKIAOFC = []uint32{200001, 200002, 200101, 200102, 200103, 200104}
|
||||
rsp.KJAABDABLJJ = []uint32{253001, 253002}
|
||||
// PearlSR 005d2c1 GetPlayerBoardDataScRsp: field 4 is personal
|
||||
// cards, field 8 is head icons, and field 9 is assist avatar IDs.
|
||||
rsp.JJDDEKIAOFC = profile.PersonalCards
|
||||
for _, id := range profile.Icons {
|
||||
rsp.KNINLDPFLMA = append(rsp.KNINLDPFLMA, &goproto.HeadIconData{Id: id})
|
||||
}
|
||||
if player := s.JSON(); player != nil {
|
||||
for _, slot := range player.SortedLineupKeys() {
|
||||
id := player.Lineups[slot]
|
||||
if _, ok := player.Avatars[id]; !ok {
|
||||
continue
|
||||
}
|
||||
rsp.KJAABDABLJJ = append(rsp.KJAABDABLJJ, id)
|
||||
rsp.NBIEJKLENOB.DisplayAvatarList = append(rsp.NBIEJKLENOB.DisplayAvatarList,
|
||||
&goproto.DisplayAvatarData{AvatarId: id, Pos: slot})
|
||||
}
|
||||
}
|
||||
SceneDebugLog("GET_PLAYER_BOARD_DATA sent")
|
||||
return nil
|
||||
})
|
||||
|
||||
handle("GetPhoneData", func(s *Session, req *goproto.GetPhoneDataCsReq, rsp *goproto.GetPhoneDataScRsp) error {
|
||||
profile, err := loadProfileResources()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
rsp.Retcode = 0
|
||||
rsp.CurPhoneTheme = 1
|
||||
rsp.CurPhoneCase = 200001
|
||||
rsp.CurChatBubble = 220001
|
||||
rsp.OwnedPhoneThemes = []uint32{1}
|
||||
rsp.OwnedPhoneCases = []uint32{200001}
|
||||
rsp.OwnedChatBubbles = []uint32{220001}
|
||||
rsp.CurPhoneTheme = profile.CurrentPhoneTheme
|
||||
rsp.CurPhoneCase = profile.CurrentPhoneCase
|
||||
rsp.CurChatBubble = profile.CurrentChatBubble
|
||||
rsp.OwnedPhoneThemes = profile.PhoneThemes
|
||||
rsp.OwnedPhoneCases = profile.PhoneCases
|
||||
rsp.OwnedChatBubbles = profile.ChatBubbles
|
||||
SceneDebugLog("GET_PHONE_DATA sent")
|
||||
return nil
|
||||
})
|
||||
|
||||
Reference in new issue
Block a user