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,
MaxTicketCount = JsonDb.Instance.MaxInterceptionCount,
NormalReward = sRes.NormalReward,
BonusReward = sRes.BonusReward
};
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);
if (percentReward != 0)
{
var r = RewardUtils.RegisterRewardsForUser(user, normReward);
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}");
response.BonusReward = RewardUtils.RegisterRewardsForUser(user, percentReward);
}
JsonDb.Save();
@@ -45,5 +40,6 @@ namespace EpinelPS.Utils
public class InterceptionClearResult
{
public NetRewardData NormalReward = new();
public NetRewardData BonusReward = new();
}
}