mirror of
https://github.com/Walter-Sparrow/lunar-tear.git
synced 2026-07-02 05:43:41 +03:00
Fix repeated weapon story unlock notifications by sending only changed stories in diffs
This commit is contained in:
@@ -170,3 +170,13 @@ func BuildDiffFromTablesOrdered(tables map[string]string, order []string) map[st
|
||||
}
|
||||
return diff
|
||||
}
|
||||
|
||||
func AddWeaponStoryDiff(diff map[string]*pb.DiffData, user store.UserState, weaponIds []int32) {
|
||||
if len(weaponIds) == 0 {
|
||||
return
|
||||
}
|
||||
diff["IUserWeaponStory"] = &pb.DiffData{
|
||||
UpdateRecordsJson: WeaponStoryRecordsForIds(user, weaponIds),
|
||||
DeleteKeysJson: "[]",
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user