mirror of
https://github.com/DorkSquadRR/DorkNet.git
synced 2026-10-25 23:18:44 -07:00
Refactor AvatarGiftsController: change ToWire method to public for external access; update AdminController to use ToWire for gift notifications
This commit is contained in:
@@ -262,7 +262,7 @@ public class AvatarGiftsController(
|
||||
// GiftRarity, GiftContext. Missing any one → KeyNotFoundException
|
||||
// surfaces as "Failed to download gifts: Malformed Response" from
|
||||
// BootSequence and BLOCKS LOGIN.
|
||||
private static object ToWire(GiftPackageEntity g) => new
|
||||
public static object ToWire(GiftPackageEntity g) => new
|
||||
{
|
||||
g.Id,
|
||||
g.FromPlayerId,
|
||||
|
||||
@@ -2318,31 +2318,7 @@ public class AdminController(
|
||||
// one that ends up invoking the GiftManager popup path.
|
||||
await notifications.NotifyAsync(id,
|
||||
PushNotificationId.GiftPackageReceivedImmediate,
|
||||
new
|
||||
{
|
||||
gift.Id,
|
||||
gift.FromPlayerId,
|
||||
gift.AvatarItemType,
|
||||
AvatarItemDesc = gift.AvatarItemDescOrHairDyeDesc,
|
||||
gift.AvatarItemDescOrHairDyeDesc,
|
||||
gift.EquipmentPrefabName,
|
||||
gift.EquipmentModificationGuid,
|
||||
gift.CurrencyType,
|
||||
gift.Currency,
|
||||
gift.Xp,
|
||||
gift.Level,
|
||||
gift.GiftContext,
|
||||
gift.GiftRarity,
|
||||
gift.Message,
|
||||
gift.Platform,
|
||||
gift.PackageMaterial,
|
||||
gift.PackageVariant,
|
||||
gift.Consumed,
|
||||
gift.IsValid,
|
||||
gift.ErrorMessage,
|
||||
gift.SupportsCurrentPlatform,
|
||||
gift.IsGifted,
|
||||
});
|
||||
DorkNet.Server.Controllers.API.Avatar.V2.AvatarGiftsController.ToWire(gift));
|
||||
|
||||
return Ok(new { gift.Id, gift.RecipientPlayerId });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user