Skip to content

Commit

Permalink
Improve rep gains
Browse files Browse the repository at this point in the history
  • Loading branch information
Lacyway committed Jul 10, 2024
1 parent c746460 commit 1cf4e4b
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions Fika.Core/Coop/Players/CoopPlayer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ public class CoopPlayer : LocalPlayer
public PacketReceiver PacketReceiver;
public IPacketSender PacketSender;
private DateTime lastPingTime;
public bool hasSkilledScav = false;
//public bool hasKilledScav = false;
public float observedOverlap = 0f;
public bool leftStanceDisabled = false;
Expand Down Expand Up @@ -421,6 +422,20 @@ public override void OnBeenKilledByAggressor(IPlayer aggressor, DamageInfo damag
{
base.OnBeenKilledByAggressor(aggressor, damageInfo, bodyPart, lethalDamageType);
aggressor.Loyalty?.method_1(this);

// Handle 'Help Scav' rep gains
if (aggressor is CoopPlayer coopPlayer)
{
if (Side == EPlayerSide.Savage && coopPlayer.Side != EPlayerSide.Savage && !coopPlayer.hasSkilledScav)
{
coopPlayer.hasSkilledScav = true;
return;
}
else if (Side != EPlayerSide.Savage && hasSkilledScav && aggressor.Side == EPlayerSide.Savage)
{
aggressor.Profile?.FenceInfo?.AddStanding(Profile.Info.Settings.StandingForKill, EFT.Counters.EFenceStandingSource.ScavHelp);
}
}
}

public override void SetInventoryOpened(bool opened)
Expand Down

0 comments on commit 1cf4e4b

Please sign in to comment.