Fixed easy start profile templates lacking a Place of Fame stash #386
Fixed hideout stash item upgrades not being correctly sent to client
This commit is contained in:
@@ -283,8 +283,8 @@ public class HideoutController(
|
||||
|
||||
// Don't inform client when upgraded area is hall of fame or equipment stand, BSG doesn't inform client this specific upgrade has occurred
|
||||
// will break client if sent
|
||||
HashSet<HideoutAreas> check = [HideoutAreas.PlaceOfFame];
|
||||
if (!check.Contains(dbHideoutArea.Type ?? HideoutAreas.NotSet))
|
||||
|
||||
if (ShouldAddContainerUpgradeToClientResponse(dbHideoutArea, profileParentHideoutArea.Level.GetValueOrDefault(1)))
|
||||
{
|
||||
AddContainerUpgradeToClientOutput(sessionId, keyForHideoutAreaStash, dbHideoutArea, hideoutStage, output);
|
||||
}
|
||||
@@ -315,6 +315,22 @@ public class HideoutController(
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Should the newly completed hideout area container upgrade/addition be included in client response
|
||||
/// Deny when: area is place of fame + we're upgrading to level 1
|
||||
/// </summary>
|
||||
/// <param name="dbHideoutArea">Hideout area upgraded</param>
|
||||
/// <param name="areaLevel">Level of area upgraded to</param>
|
||||
/// <returns>True = it should be included</returns>
|
||||
private bool ShouldAddContainerUpgradeToClientResponse(HideoutArea dbHideoutArea, int areaLevel)
|
||||
{
|
||||
HashSet<HideoutAreas> areaBlacklist = [HideoutAreas.PlaceOfFame];
|
||||
var isOnAreaBlacklist = areaBlacklist.Contains(dbHideoutArea.Type ?? HideoutAreas.NotSet);
|
||||
var isFirstStage = areaLevel == 1;
|
||||
|
||||
return isOnAreaBlacklist && !isFirstStage;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Add an inventory item to profile from a hideout area stage data
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user