Skip to content

Commit

Permalink
Fix SD smoke color
Browse files Browse the repository at this point in the history
  • Loading branch information
MSWS committed Dec 18, 2024
1 parent 3e4734e commit 9907a80
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/GangsImpl/AbstractDB/AbstractInstanceManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public abstract class AbstractInstanceManager<TK>(string connectionString,
$"SELECT {(typeof(TV).IsBasicallyPrimitive() ? statId : GetFieldNames<TV>())} FROM {table_prefix}_{statId} WHERE {PrimaryKey} = @{PrimaryKey}",
dynamic);
if (result == null) return (true, result);
if (!cache.ContainsKey(statId)) cache[statId] = new();
if (!cache.ContainsKey(statId)) cache[statId] = new Dictionary<TK, object>();
cache[statId][key] = result;
return (true, result);
} catch (InvalidOperationException e) {
Expand Down
2 changes: 1 addition & 1 deletion src/GangsImpl/Stats/Perk/Smoke/SmokeListener.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ await gangStats.GetForGang<SmokePerkData>(gang,
continue;
}

color = data.Equipped.GetColor() ?? data.Equipped.PickRandom();
color = data.Equipped.GetColor() ?? data.Unlocked.PickRandom();
cachedGangs.Add(player.GangId.Value, color);
}

Expand Down

0 comments on commit 9907a80

Please sign in to comment.