mirror of
https://github.com/Walter-Sparrow/lunar-tear.git
synced 2026-07-02 05:43:41 +03:00
Add consumable item sell functionality
This commit is contained in:
@@ -55,6 +55,7 @@ func startGRPC(
|
||||
characterRebirthCatalog *masterdata.CharacterRebirthCatalog,
|
||||
companionCatalog *masterdata.CompanionCatalog,
|
||||
materialCatalog *masterdata.MaterialCatalog,
|
||||
consumableItemCatalog *masterdata.ConsumableItemCatalog,
|
||||
gameConfig *masterdata.GameConfig,
|
||||
sideStoryCatalog *masterdata.SideStoryCatalog,
|
||||
bigHuntCatalog *masterdata.BigHuntCatalog,
|
||||
@@ -90,6 +91,7 @@ func startGRPC(
|
||||
characterRebirthCatalog,
|
||||
companionCatalog,
|
||||
materialCatalog,
|
||||
consumableItemCatalog,
|
||||
gameConfig,
|
||||
sideStoryCatalog,
|
||||
bigHuntCatalog,
|
||||
@@ -126,6 +128,7 @@ func registerServices(
|
||||
characterRebirthCatalog *masterdata.CharacterRebirthCatalog,
|
||||
companionCatalog *masterdata.CompanionCatalog,
|
||||
materialCatalog *masterdata.MaterialCatalog,
|
||||
consumableItemCatalog *masterdata.ConsumableItemCatalog,
|
||||
gameConfig *masterdata.GameConfig,
|
||||
sideStoryCatalog *masterdata.SideStoryCatalog,
|
||||
bigHuntCatalog *masterdata.BigHuntCatalog,
|
||||
@@ -163,6 +166,7 @@ func registerServices(
|
||||
pb.RegisterCharacterServiceServer(srv, service.NewCharacterServiceServer(userStore, userStore, characterRebirthCatalog, gameConfig))
|
||||
pb.RegisterCompanionServiceServer(srv, service.NewCompanionServiceServer(userStore, userStore, companionCatalog, gameConfig))
|
||||
pb.RegisterMaterialServiceServer(srv, service.NewMaterialServiceServer(userStore, userStore, materialCatalog, gameConfig))
|
||||
pb.RegisterConsumableItemServiceServer(srv, service.NewConsumableItemServiceServer(userStore, userStore, consumableItemCatalog, gameConfig))
|
||||
pb.RegisterSideStoryQuestServiceServer(srv, service.NewSideStoryQuestServiceServer(userStore, userStore, sideStoryCatalog))
|
||||
pb.RegisterBigHuntServiceServer(srv, service.NewBigHuntServiceServer(userStore, userStore, bigHuntCatalog, questEngine))
|
||||
pb.RegisterRewardServiceServer(srv, service.NewRewardServiceServer(userStore, userStore, bigHuntCatalog, questEngine.Granter))
|
||||
|
||||
@@ -120,6 +120,12 @@ func main() {
|
||||
}
|
||||
log.Printf("material catalog loaded: %d materials", len(materialCatalog.All))
|
||||
|
||||
consumableItemCatalog, err := masterdata.LoadConsumableItemCatalog()
|
||||
if err != nil {
|
||||
log.Fatalf("load consumable item catalog: %v", err)
|
||||
}
|
||||
log.Printf("consumable item catalog loaded: %d items", len(consumableItemCatalog.All))
|
||||
|
||||
costumeCatalog, err := masterdata.LoadCostumeCatalog(materialCatalog)
|
||||
if err != nil {
|
||||
log.Fatalf("load costume catalog: %v", err)
|
||||
@@ -184,6 +190,7 @@ func main() {
|
||||
characterRebirthCatalog,
|
||||
companionCatalog,
|
||||
materialCatalog,
|
||||
consumableItemCatalog,
|
||||
gameConfig,
|
||||
sideStoryCatalog,
|
||||
bigHuntCatalog,
|
||||
|
||||
Reference in New Issue
Block a user