Fix repeated weapon story unlock notifications by sending only changed stories in diffs

This commit is contained in:
Ilya Groshev
2026-04-16 14:36:05 +03:00
parent a61ae6b93e
commit 0ab2589277
17 changed files with 260 additions and 150 deletions
+1 -1
View File
@@ -32,7 +32,6 @@ var shopDiffTables = []string{
"IUserWeaponSkill",
"IUserWeaponAbility",
"IUserWeaponNote",
"IUserWeaponStory",
}
type ShopServiceServer struct {
@@ -92,6 +91,7 @@ func (s *ShopServiceServer) Buy(ctx context.Context, req *pb.BuyRequest) (*pb.Bu
tables := userdata.FullClientTableMap(snapshot)
diff := userdata.BuildDiffFromTables(userdata.SelectTables(tables, shopDiffTables))
userdata.AddWeaponStoryDiff(diff, snapshot, s.granter.DrainChangedStoryWeaponIds())
return &pb.BuyResponse{
OverflowPossession: []*pb.Possession{},