fix bonus reward

This commit is contained in:
Mikhail Tyukin
2025-06-25 11:21:22 +04:00
parent 4e568390ed
commit 2b0784f4db
2 changed files with 3 additions and 6 deletions

View File

@@ -27,6 +27,7 @@ namespace EpinelPS.LobbyServer.Intercept
TicketCount = user.ResetableData.InterceptionTickets, TicketCount = user.ResetableData.InterceptionTickets,
MaxTicketCount = JsonDb.Instance.MaxInterceptionCount, MaxTicketCount = JsonDb.Instance.MaxInterceptionCount,
NormalReward = sRes.NormalReward, NormalReward = sRes.NormalReward,
BonusReward = sRes.BonusReward
}; };
user.AddTrigger(Data.TriggerType.InterceptClear, 1); user.AddTrigger(Data.TriggerType.InterceptClear, 1);

View File

@@ -28,12 +28,7 @@ namespace EpinelPS.Utils
var percentReward = GameData.Instance.GetConditionReward(record.percent_condition_reward_group, damage); var percentReward = GameData.Instance.GetConditionReward(record.percent_condition_reward_group, damage);
if (percentReward != 0) if (percentReward != 0)
{ {
var r = RewardUtils.RegisterRewardsForUser(user, normReward); response.BonusReward = RewardUtils.RegisterRewardsForUser(user, percentReward);
response.NormalReward = NetUtils.MergeRewards([response.NormalReward, r], user);
}
else
{
Logging.WriteLine($"unable to find reward which meets condition of damage {damage} and group {record.condition_reward_group}");
} }
JsonDb.Save(); JsonDb.Save();
@@ -45,5 +40,6 @@ namespace EpinelPS.Utils
public class InterceptionClearResult public class InterceptionClearResult
{ {
public NetRewardData NormalReward = new(); public NetRewardData NormalReward = new();
public NetRewardData BonusReward = new();
} }
} }