From d49c78e71a9f0c81ba269a2b8c05762bc19fe654 Mon Sep 17 00:00:00 2001 From: Eccentric Date: Sat, 3 Feb 2024 02:41:29 +0000 Subject: [PATCH] Fix dogdy dances not saving in locker data --- handlers/client.go | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/handlers/client.go b/handlers/client.go index 9e4e51c..3f11c0e 100644 --- a/handlers/client.go +++ b/handlers/client.go @@ -438,7 +438,8 @@ func clientCopyCosmeticLoadoutAction(c *fiber.Ctx, person *p.Person, profile *p. clone := lastAppliedLoadout.Copy() clone.ID = uuid.New().String() clone.LockerName = body.OptNewNameForTarget - profile.Loadouts.AddLoadout(&clone).Save() + profile.Loadouts.AddLoadout(&clone) + go clone.Save() lastAppliedLoadout.CopyFrom(sandboxLoadout) go lastAppliedLoadout.Save() @@ -454,6 +455,11 @@ func clientCopyCosmeticLoadoutAction(c *fiber.Ctx, person *p.Person, profile *p. activeLoadoutIndexAttribute.ValueJSON = aid.JSONStringify(body.TargetIndex) go lastAppliedLoadoutAttribute.Save() go activeLoadoutIndexAttribute.Save() + + if len(profile.Changes) == 0{ + profile.CreateLoadoutChangedChange(sandboxLoadout, "DanceID") + } + return nil } @@ -470,6 +476,10 @@ func clientCopyCosmeticLoadoutAction(c *fiber.Ctx, person *p.Person, profile *p. go lastAppliedLoadoutAttribute.Save() go activeLoadoutIndexAttribute.Save() + if len(profile.Changes) == 0{ + profile.CreateLoadoutChangedChange(sandboxLoadout, "DanceID") + } + return nil } @@ -482,7 +492,6 @@ func clientCopyCosmeticLoadoutAction(c *fiber.Ctx, person *p.Person, profile *p. go sandboxLoadout.Save() if len(profile.Changes) == 0{ - // dance ids and item wrap ids are registered as changes in the client so force a fix profile.CreateLoadoutChangedChange(sandboxLoadout, "DanceID") }