protected override async Task OnActionAsync(UpdateCurrencyEvent value) { _trackingController.AddNotification(SetFactionPointsNotification(value.CityFaction, value.GainedFactionCoins.DoubleValue, value.BonusPremiumGainedFractionFlagPoints.DoubleValue)); _countUpTimer.Add(ValueType.FactionPoints, value.GainedFactionCoins.DoubleValue, value.CityFaction); _trackingController.DungeonController?.AddValueToDungeon(value.GainedFactionCoins.DoubleValue, ValueType.FactionPoints, value.CityFaction); await Task.CompletedTask; }
protected override async Task OnActionAsync(TakeSilverEvent value) { var localEntity = _trackingController.EntityController.GetLocalEntity()?.Value; var IsObjectLocalEntity = value.ObjectId != null && localEntity?.ObjectId == value.ObjectId; var IsObjectPartyEntityAndNotTargetEntity = value.ObjectId != null && _trackingController.EntityController.IsEntityInParty((long)value.ObjectId) && value.ObjectId != value.TargetEntityId; var IsObjectLocalEntityAndTargetEntity = value.ObjectId != null && localEntity?.ObjectId == value.ObjectId && value.ObjectId == value.TargetEntityId; if (IsObjectLocalEntity || IsObjectPartyEntityAndNotTargetEntity || IsObjectLocalEntityAndTargetEntity) { // Set guild tax % to local player if (IsObjectLocalEntity && !IsObjectLocalEntityAndTargetEntity) { _trackingController.EntityController.SetLastLocalEntityGuildTax(value.YieldPreTax, value.GuildTax); _trackingController.EntityController.SetLastLocalEntityClusterTax(value.YieldPreTax, value.ClusterTax); } // Include guild + cluster tax if a party member takes silver if (IsObjectPartyEntityAndNotTargetEntity && !IsObjectLocalEntity) { value.GuildTax = _trackingController.EntityController.GetLastLocalEntityGuildTax(value.YieldPreTax); var YieldAfterGuildTax = value.YieldPreTax - value.GuildTax; value.ClusterTax = _trackingController.EntityController.GetLastLocalEntityClusterTax(YieldAfterGuildTax); var yieldAfterGuildTaxAndClusterTax = YieldAfterGuildTax - value.ClusterTax; value.YieldAfterTax = yieldAfterGuildTaxAndClusterTax; } _trackingController.AddNotification(SetNotification(value.YieldAfterTax, value.ClusterYieldAfterTax, value.PremiumAfterTax, value.ClusterTax)); _trackingController.CountUpTimer.Add(ValueType.Silver, value.YieldAfterTax.DoubleValue); _trackingController.DungeonController?.AddValueToDungeon(value.YieldAfterTax.DoubleValue, ValueType.Silver); } await Task.CompletedTask; }
protected override async Task OnActionAsync(UpdateFameEvent value) { _trackingController.AddNotification(SetPveFameNotification(value.TotalPlayerFame.DoubleValue, value.TotalGainedFame.DoubleValue, value.ZoneFame.DoubleValue, value.PremiumFame.DoubleValue, value.SatchelFame.DoubleValue, value.IsPremiumBonus)); _countUpTimer.Add(ValueType.Fame, value.TotalGainedFame.DoubleValue); _trackingController.DungeonController?.AddValueToDungeon(value.TotalGainedFame.DoubleValue, ValueType.Fame); await Task.CompletedTask; }