mirror of
https://github.com/EpinelPS/EpinelPS.git
synced 2025-12-12 23:14:34 +01:00
fix bonus reward
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user