feat(server): complete field talents, crafting, party recovery and pack monster lifecycle
This commit is contained in:
@@ -26,7 +26,6 @@ var emptyResponses = map[string]int{
|
||||
"/CommunityRewardInfo": 289,
|
||||
"/DailyStoryInfo": 538,
|
||||
"/DatingInfo": 361,
|
||||
"/DispatchInfo": 0,
|
||||
"/EquipPresetInfo": 253,
|
||||
"/EvilCastleDailyRewardState": 441,
|
||||
"/EvilCastleTowerInfo": 200,
|
||||
|
||||
@@ -19,6 +19,23 @@ type RecipeService struct {
|
||||
items RecipeItems
|
||||
}
|
||||
|
||||
func (s *RecipeService) Knows(id uint64) bool {
|
||||
if !s.design.IDs[id] {
|
||||
return false
|
||||
}
|
||||
for _, known := range s.initial {
|
||||
if known == id {
|
||||
return true
|
||||
}
|
||||
}
|
||||
for _, item := range s.items.All() {
|
||||
if item.Type == 7 && item.ID == id && item.Count > 0 {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func NewRecipeService(design *gamedata.CookingRecipeDesign, initial []uint64, items RecipeItems) (*RecipeService, error) {
|
||||
if design == nil || len(design.IDs) == 0 || items == nil {
|
||||
return nil, fmt.Errorf("recipes: missing design or inventory")
|
||||
|
||||
@@ -14,7 +14,6 @@ var standaloneDefaults = map[string]int{
|
||||
"/PvpBattleDeckInfo": 87,
|
||||
"/PvpBattleHistory": 97,
|
||||
"/PvpBattleOnceRewardInfo": 277,
|
||||
"/FieldDeckInfo": 273,
|
||||
"/FriendRecommend": 211,
|
||||
"/SupporterStatus": 438,
|
||||
"/SupporterBattleInfo": 439,
|
||||
@@ -24,10 +23,8 @@ var standaloneDefaults = map[string]int{
|
||||
// canonically empty. Domain persistence can be added without changing their
|
||||
// protocol contract. Core progress commands are handled by session first.
|
||||
var commandSuccess = map[string]int{
|
||||
"/UpdateAgeGate": 0,
|
||||
"/SaveFieldCharControlDeckType": 288,
|
||||
"/ActiveMap": 0,
|
||||
"/FieldDeckSave": 274,
|
||||
"/CostumeUse": 41,
|
||||
"/BattleExit": 388,
|
||||
"/UpdateAgeGate": 0,
|
||||
"/ActiveMap": 0,
|
||||
"/CostumeUse": 41,
|
||||
"/BattleExit": 388,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user