This is just Jetbrains formatting and code syntax styling
This commit is contained in:
@@ -55,10 +55,7 @@ public class CustomizationController(
|
||||
)
|
||||
.ToList();
|
||||
|
||||
if (matchingSuits == null)
|
||||
{
|
||||
throw new Exception(_localisationService.GetText("customisation-unable_to_get_trader_suits", traderId));
|
||||
}
|
||||
if (matchingSuits == null) throw new Exception(_localisationService.GetText("customisation-unable_to_get_trader_suits", traderId));
|
||||
|
||||
return matchingSuits;
|
||||
}
|
||||
@@ -104,7 +101,7 @@ public class CustomizationController(
|
||||
|
||||
return output;
|
||||
}
|
||||
|
||||
|
||||
// Charge player for buying item
|
||||
PayForClothingItems(sessionId, pmcData, buyClothingRequest.Items, output);
|
||||
|
||||
@@ -127,20 +124,14 @@ public class CustomizationController(
|
||||
{
|
||||
var suits = _saveServer.GetProfile(sessionId).Suits;
|
||||
|
||||
if (suits is null || suits.Count == 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (suits is null || suits.Count == 0) return false;
|
||||
return suits.Contains(suitId);
|
||||
}
|
||||
|
||||
private Suit? GetTraderClothingOffer(string sessionId, string? offerId)
|
||||
{
|
||||
var foundSuit = GetAllTraderSuits(sessionId).FirstOrDefault(s => s.Id == offerId);
|
||||
if (foundSuit is null)
|
||||
{
|
||||
_logger.Error(_localisationService.GetText("customisation-unable_to_find_suit_with_id", offerId));
|
||||
}
|
||||
if (foundSuit is null) _logger.Error(_localisationService.GetText("customisation-unable_to_find_suit_with_id", offerId));
|
||||
|
||||
return foundSuit;
|
||||
}
|
||||
@@ -156,11 +147,8 @@ public class CustomizationController(
|
||||
List<PaymentItemForClothing>? itemsToPayForClothingWith,
|
||||
ItemEventRouterResponse output)
|
||||
{
|
||||
if (itemsToPayForClothingWith is null || itemsToPayForClothingWith.Count == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (itemsToPayForClothingWith is null || itemsToPayForClothingWith.Count == 0) return;
|
||||
|
||||
foreach (var inventoryItemToProcess in itemsToPayForClothingWith)
|
||||
{
|
||||
var options = new ProcessBuyTradeRequestData
|
||||
@@ -189,9 +177,7 @@ public class CustomizationController(
|
||||
|
||||
foreach (var trader in traders)
|
||||
if (trader.Value.Base?.CustomizationSeller is not null && trader.Value.Base.CustomizationSeller.Value)
|
||||
{
|
||||
result.AddRange(GetTraderSuits(trader.Key, sessionId));
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
@@ -220,10 +206,7 @@ public class CustomizationController(
|
||||
var customisationResultsClone = _cloner.Clone(_databaseService.GetTemplates().CustomisationStorage);
|
||||
|
||||
var profile = _profileHelper.GetFullProfile(sessionId);
|
||||
if (profile is null)
|
||||
{
|
||||
return customisationResultsClone!;
|
||||
}
|
||||
if (profile is null) return customisationResultsClone!;
|
||||
|
||||
customisationResultsClone!.AddRange(profile.CustomisationUnlocks ?? []);
|
||||
|
||||
@@ -240,7 +223,6 @@ public class CustomizationController(
|
||||
public ItemEventRouterResponse SetCustomisation(string sessionId, CustomizationSetRequest request, PmcData pmcData)
|
||||
{
|
||||
foreach (var customisation in request.Customizations)
|
||||
{
|
||||
switch (customisation.Type)
|
||||
{
|
||||
case "dogTag":
|
||||
@@ -253,7 +235,6 @@ public class CustomizationController(
|
||||
_logger.Error($"Unhandled customisation type: {customisation.Type}");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return _eventOutputHolder.GetOutput(sessionId);
|
||||
}
|
||||
@@ -285,9 +266,6 @@ public class CustomizationController(
|
||||
}
|
||||
|
||||
// Feet
|
||||
if (dbSuit.Parent == _lowerParentClothingId)
|
||||
{
|
||||
pmcData.Customization.Feet = dbSuit.Properties.Feet;
|
||||
}
|
||||
if (dbSuit.Parent == _lowerParentClothingId) pmcData.Customization.Feet = dbSuit.Properties.Feet;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user