feat: expand growth, equipment, and mail
- add character promotion and costume potential flows - add equipment management and enhancement - harden development mail and save tools
This commit is contained in:
@@ -47,6 +47,13 @@ func (s *Service) AttachEquipmentGacha(catalog *gamedata.EquipmentGachaCatalog,
|
||||
s.equipmentCatalog, s.equipmentInventory = catalog, inventory
|
||||
}
|
||||
|
||||
// FirstGachaCompleted reflects UserDBInfo.IsFirstGacha. The official symbol
|
||||
// map names the client-side property IsDoneFirstGachaPick, and the client sets
|
||||
// it after a GachaSubType=3 purchase succeeds.
|
||||
func (s *Service) FirstGachaCompleted() bool {
|
||||
return s.collection.FirstGachaCompleted()
|
||||
}
|
||||
|
||||
// BeginSession is called by the transport session after each successful
|
||||
// login. Request sequence numbers restart with the client, so the login ID is
|
||||
// part of the durable idempotency key: retries in one login remain idempotent,
|
||||
@@ -408,7 +415,7 @@ func (s *Service) buyEquipment(seq, buyType uint64, tickets []player.Item, desig
|
||||
if err != nil {
|
||||
return 146, nil, true, err
|
||||
}
|
||||
entry := player.Equipment{ID: equipmentID, SortID: uint64(sort)}
|
||||
entry := player.Equipment{ID: equipmentID, SortID: uint64(sort), Rank: []uint64{0, 0, 0}}
|
||||
for _, o := range main {
|
||||
entry.MainOption = append(entry.MainOption, player.EquipmentOption{GroupID: o.GroupID, ID: o.ID})
|
||||
}
|
||||
|
||||
@@ -74,6 +74,9 @@ func TestInfinitePreviewAndFreeConfirmationPersist(t *testing.T) {
|
||||
if err != nil || !ok || code != 61 {
|
||||
t.Fatalf("confirm code=%d ok=%v err=%v", code, ok, err)
|
||||
}
|
||||
if service.FirstGachaCompleted() {
|
||||
t.Fatal("infinite product incorrectly completed the subtype-3 first pick")
|
||||
}
|
||||
reward, found, err := wire.Bytes(response, 1)
|
||||
if err != nil || !found || countFields(reward, 2) != 1 || countFields(reward, 3) != 1 || countFields(reward, 9) != 9 || countFields(reward, 8) != 4 {
|
||||
t.Fatalf("reward chars=%d costumes=%d upgrades=%d exchanges=%d found=%v err=%v", countFields(reward, 2), countFields(reward, 3), countFields(reward, 9), countFields(reward, 8), found, err)
|
||||
|
||||
Reference in New Issue
Block a user