feat(currency_wars): complete systems, settlement Rank SS, damage report, camera and recovery fixes
This commit is contained in:
1 parent
c008243f11
commit
0995055296
78 files changed
+33840
-9525
No files matched your search
@@ -160,10 +160,9 @@ func cwRestockForNode(catalog *common.CurrencyWarsCatalog, run *pb.MPIMAEMCEFH)
|
||||
if !ok {
|
||||
return nil
|
||||
}
|
||||
if r.Remaining == 0 {
|
||||
return fmt.Errorf("CW card pool exhausted")
|
||||
if r.Remaining > 0 {
|
||||
r.Remaining--
|
||||
}
|
||||
r.Remaining--
|
||||
pool.Roles[id] = r
|
||||
return nil
|
||||
}
|
||||
@@ -416,7 +415,26 @@ func init() {
|
||||
updates = append(updates, &pb.KFNCAIHIHCM{MNLCHEJKDHO: &pb.KFNCAIHIHCM_FEKCPKAPHHO{FEKCPKAPHHO: forge}})
|
||||
}
|
||||
}
|
||||
if err = s.saveCurrencyWarsData(data, catalog); err != nil {
|
||||
runtime, _ := cwBonfireRuntime(catalog, run)
|
||||
cwSyncTraitComponent(catalog, run, runtime)
|
||||
if tbCat, err := common.LoadCurrencyWarsTrailblaze(); err == nil && (cwGetTrailblazeLayer(catalog, run) > 0 || (runtime != nil && runtime.Rules["TbOpened"] != 0)) {
|
||||
updates = append(updates,
|
||||
&pb.KFNCAIHIHCM{
|
||||
MNLCHEJKDHO: &pb.KFNCAIHIHCM_HKHJJCMKKJE{
|
||||
HKHJJCMKKJE: &pb.JLKCBOIFJKC{
|
||||
TraitId: cwTrailblazeTrait,
|
||||
ENPLACDLJGA: cwTrailblazeTraitEffectProto(tbCat, runtime),
|
||||
},
|
||||
},
|
||||
},
|
||||
&pb.KFNCAIHIHCM{
|
||||
MNLCHEJKDHO: &pb.KFNCAIHIHCM_GOOCHGKBIPN{
|
||||
GOOCHGKBIPN: cwTrailblazeModifierProto(tbCat, runtime),
|
||||
},
|
||||
},
|
||||
)
|
||||
}
|
||||
if err = s.saveCurrencyWarsDataWithRuntime(data, catalog, runtime); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = cwSend(s, cwNotify(updates...)); err != nil {
|
||||
@@ -427,4 +445,47 @@ func init() {
|
||||
PacketLog(fmt.Sprintf("CW_UPDATE_POS saved count=%d active=%d revision=%d", len(changes), active, s.currencyWarsRevision))
|
||||
return nil
|
||||
})
|
||||
|
||||
// CmdID 8543 (GEBBMDCOLCH) -> ScRsp 8630 (ALNFEBKHCFC)
|
||||
// Protocol revision: 4.6.53 (upstream_cmdids.go).
|
||||
// Assumption: Native Client sends GEBBMDCOLCH during preparation / round transition to sync
|
||||
// the batch formation role positions (CONJCEMAHGN: MDNAGANGNKK = role UID, JFCJNHNBMCB = pos).
|
||||
// Acknowledging with retcode 0 unblocks the Client UI input controller.
|
||||
cwHandleNamed("GEBBMDCOLCH", "ALNFEBKHCFC", func(s *Session, req *pb.GEBBMDCOLCH, rsp *pb.ALNFEBKHCFC) error {
|
||||
catalog, err := common.LoadCurrencyWarsCatalog()
|
||||
if err != nil {
|
||||
rsp.Retcode = 0
|
||||
return nil
|
||||
}
|
||||
data, _, err := readCurrencyWarsData(catalog)
|
||||
if err != nil || data == nil || data.DHFOFLFCLAH == nil {
|
||||
rsp.Retcode = 0
|
||||
return nil
|
||||
}
|
||||
run := data.DHFOFLFCLAH
|
||||
_, team, _ := cwComponents(run)
|
||||
if team != nil && len(req.CONJCEMAHGN) > 0 {
|
||||
posMap := make(map[uint32]uint32, len(req.CONJCEMAHGN))
|
||||
for _, entry := range req.CONJCEMAHGN {
|
||||
if entry != nil && entry.MDNAGANGNKK != 0 {
|
||||
posMap[entry.MDNAGANGNKK] = entry.JFCJNHNBMCB
|
||||
}
|
||||
}
|
||||
changed := false
|
||||
for _, role := range team.GridGameRoleList {
|
||||
if newPos, ok := posMap[role.UniqueId]; ok && role.Pos != newPos {
|
||||
role.Pos = newPos
|
||||
changed = true
|
||||
}
|
||||
}
|
||||
if changed {
|
||||
runtime, _ := cwBonfireRuntime(catalog, run)
|
||||
cwSyncTraitComponent(catalog, run, runtime)
|
||||
_ = s.saveCurrencyWarsDataWithRuntime(data, catalog, runtime)
|
||||
}
|
||||
}
|
||||
rsp.Retcode = 0
|
||||
PacketLog(fmt.Sprintf("CW_BATCH_UPDATE_POS count=%d revision=%d", len(req.CONJCEMAHGN), s.currencyWarsRevision))
|
||||
return nil
|
||||
})
|
||||
}
|
||||
Reference in new issue
Block a user