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