Skip to content

Commit

Permalink
More work
Browse files Browse the repository at this point in the history
  • Loading branch information
MSWS committed Nov 1, 2024
1 parent 7d6ccf1 commit aa381d1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion mod/Gangs.BaseImpl/Stats/LGStat.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ public class LGData {
public int CtLgs { get; set; }
public int TLgs { get; set; }

public override string ToString() { return $"{CtLgs}/{TLgs}"; }
public override string ToString() { return $"CT/T Last Guards: {CtLgs}/{TLgs}"; }
}
2 changes: 1 addition & 1 deletion mod/Gangs.BaseImpl/Stats/LRStat.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ public class LRData {
public int TLrsWon { get; set; }

public override string ToString() {
return $"{CtLrs}/{TLrs} {CTLrsWon}/{TLrsWon}";
return $"CT/T LRs, CT/T LR Wins: {CtLrs}/{TLrs} {CTLrsWon}/{TLrsWon}";
}
}
10 changes: 5 additions & 5 deletions mod/Jailbreak.Warden/Global/WardenBehavior.cs
Original file line number Diff line number Diff line change
Expand Up @@ -245,11 +245,10 @@ public bool TryRemoveWarden(bool isPass = false) {

logs.Append(logs.Player(Warden), "is no longer the warden.");

if (API.Gangs != null && !isPass) {
var stats = API.Gangs.Services.GetService<IPlayerStatManager>();
if (!isPass) {
var stats = API.Gangs?.Services.GetService<IPlayerStatManager>();
if (stats != null) {
var wardenSteam = Warden.SteamID;
var wrapper = new PlayerWrapper(Warden);
var wrapper = new PlayerWrapper(Warden);
Task.Run(async () => await updateWardenDeathStats(wrapper));
}
}
Expand Down Expand Up @@ -301,7 +300,8 @@ public HookResult OnDeath(EventPlayerDeath ev, GameEventInfo info) {
if (player == null || !player.IsValid) return HookResult.Continue;
var isWarden = ((IWardenService)this).IsWarden(ev.Userid);
if (API.Gangs != null) {
if (ev.Attacker != null && ev.Attacker.IsValid && isWarden) {
if (ev.Attacker != null && ev.Attacker != player && ev.Attacker.IsValid
&& isWarden) {
var wrapper = new PlayerWrapper(ev.Attacker);
Task.Run(async () => await incrementWardenKills(wrapper));
}
Expand Down

0 comments on commit aa381d1

Please sign in to comment.