Unstable 1.2.4.0
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
#nullable enable
|
||||
using Barotrauma.Networking;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace Barotrauma;
|
||||
|
||||
partial class HighlightAction : EventAction
|
||||
{
|
||||
partial void SetHighlightProjSpecific(Entity entity, IEnumerable<Character>? targetCharacters)
|
||||
{
|
||||
if (entity is Item item && GameMain.Server != null)
|
||||
{
|
||||
IEnumerable<Client>? targetClients = null;
|
||||
if (targetCharacters != null)
|
||||
{
|
||||
targetClients = targetCharacters
|
||||
.Select(c => GameMain.Server.ConnectedClients.FirstOrDefault(client => client.Character == c))
|
||||
.Where(c => c != null)!;
|
||||
}
|
||||
GameMain.Server?.CreateEntityEvent(item, new Item.SetHighlightEventData(State, highlightColor, targetClients));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -97,7 +97,13 @@ namespace Barotrauma
|
||||
void GiveMissionExperience(CharacterInfo info)
|
||||
{
|
||||
if (info == null) { return; }
|
||||
var experienceGainMultiplierIndividual = new AbilityMissionExperienceGainMultiplier(this, 1f);
|
||||
var experienceGainMultiplierIndividual = new AbilityMissionExperienceGainMultiplier(this, 1f, info.Character);
|
||||
//check if anyone else in the crew has talents that could give a bonus to this one
|
||||
foreach (var c in crew)
|
||||
{
|
||||
if (c == info.Character) { continue; }
|
||||
c.CheckTalents(AbilityEffectType.OnAllyGainMissionExperience, experienceGainMultiplierIndividual);
|
||||
}
|
||||
info.Character?.CheckTalents(AbilityEffectType.OnGainMissionExperience, experienceGainMultiplierIndividual);
|
||||
|
||||
int finalExperienceGain = (int)(experienceGain * experienceGainMultiplierIndividual.Value);
|
||||
|
||||
Reference in New Issue
Block a user