diff --git a/Libraries/Core/Models/Enums/HideoutEventActions.cs b/Libraries/Core/Models/Enums/HideoutEventActions.cs
index 3f741a46..15cd958a 100644
--- a/Libraries/Core/Models/Enums/HideoutEventActions.cs
+++ b/Libraries/Core/Models/Enums/HideoutEventActions.cs
@@ -2,20 +2,20 @@ namespace Core.Models.Enums;
public record HideoutEventActions
{
- public const string HIDEOUT_UPGRADE = "HideoutUpgrade"; // worked
- public const string HIDEOUT_UPGRADE_COMPLETE = "HideoutUpgradeComplete"; // worked
- public const string HIDEOUT_PUT_ITEMS_IN_AREA_SLOTS = "HideoutPutItemsInAreaSlots"; // worked
- public const string HIDEOUT_TAKE_ITEMS_FROM_AREA_SLOTS = "HideoutTakeItemsFromAreaSlots"; // worked
- public const string HIDEOUT_TOGGLE_AREA = "HideoutToggleArea"; // worked
- public const string HIDEOUT_SINGLE_PRODUCTION_START = "HideoutSingleProductionStart"; // worked
- public const string HIDEOUT_SCAV_CASE_PRODUCTION_START = "HideoutScavCaseProductionStart"; // worked
- public const string HIDEOUT_CONTINUOUS_PRODUCTION_START = "HideoutContinuousProductionStart"; // worked
- public const string HIDEOUT_TAKE_PRODUCTION = "HideoutTakeProduction"; // worked
- public const string HIDEOUT_RECORD_SHOOTING_RANGE_POINTS = "RecordShootingRangePoints"; // worked
+ public const string HIDEOUT_UPGRADE = "HideoutUpgrade";
+ public const string HIDEOUT_UPGRADE_COMPLETE = "HideoutUpgradeComplete";
+ public const string HIDEOUT_PUT_ITEMS_IN_AREA_SLOTS = "HideoutPutItemsInAreaSlots";
+ public const string HIDEOUT_TAKE_ITEMS_FROM_AREA_SLOTS = "HideoutTakeItemsFromAreaSlots";
+ public const string HIDEOUT_TOGGLE_AREA = "HideoutToggleArea";
+ public const string HIDEOUT_SINGLE_PRODUCTION_START = "HideoutSingleProductionStart";
+ public const string HIDEOUT_SCAV_CASE_PRODUCTION_START = "HideoutScavCaseProductionStart";
+ public const string HIDEOUT_CONTINUOUS_PRODUCTION_START = "HideoutContinuousProductionStart";
+ public const string HIDEOUT_TAKE_PRODUCTION = "HideoutTakeProduction";
+ public const string HIDEOUT_RECORD_SHOOTING_RANGE_POINTS = "RecordShootingRangePoints";
public const string HIDEOUT_IMPROVE_AREA = "HideoutImproveArea";
public const string HIDEOUT_CANCEL_PRODUCTION_COMMAND = "HideoutCancelProductionCommand";
- public const string HIDEOUT_CIRCLE_OF_CULTIST_PRODUCTION_START = "HideoutCircleOfCultistProductionStart"; // Borked
+ public const string HIDEOUT_CIRCLE_OF_CULTIST_PRODUCTION_START = "HideoutCircleOfCultistProductionStart";
public const string HIDEOUT_DELETE_PRODUCTION_COMMAND = "HideoutDeleteProductionCommand";
- public const string HIDEOUT_CUSTOMIZATION_APPLY_COMMAND = "HideoutCustomizationApply"; // worked
- public const string HIDEOUT_CUSTOMIZATION_SET_MANNEQUIN_POSE = "HideoutCustomizationSetMannequinPose"; // worked
+ public const string HIDEOUT_CUSTOMIZATION_APPLY_COMMAND = "HideoutCustomizationApply";
+ public const string HIDEOUT_CUSTOMIZATION_SET_MANNEQUIN_POSE = "HideoutCustomizationSetMannequinPose";
}
diff --git a/Libraries/Core/Models/Enums/ItemEventActions.cs b/Libraries/Core/Models/Enums/ItemEventActions.cs
index 32c33133..7ee9aa15 100644
--- a/Libraries/Core/Models/Enums/ItemEventActions.cs
+++ b/Libraries/Core/Models/Enums/ItemEventActions.cs
@@ -2,58 +2,58 @@
public record ItemEventActions
{
- public const string MOVE = "Move"; // worked
- public const string REMOVE = "Remove"; // worked
- public const string SPLIT = "Split"; // worked
- public const string MERGE = "Merge"; // worked
- public const string TRANSFER = "Transfer"; // worked
- public const string SWAP = "Swap"; // worked
- public const string FOLD = "Fold"; // worked
- public const string TOGGLE = "Toggle"; // worked
- public const string TAG = "Tag"; // worked
- public const string BIND = "Bind"; // worked
- public const string UNBIND = "Unbind"; // ??
- public const string EXAMINE = "Examine"; // worked
- public const string READ_ENCYCLOPEDIA = "ReadEncyclopedia"; // worked
- public const string APPLY_INVENTORY_CHANGES = "ApplyInventoryChanges"; // worked
- public const string CREATE_MAP_MARKER = "CreateMapMarker"; // worked
- public const string DELETE_MAP_MARKER = "DeleteMapMarker"; // worked
- public const string EDIT_MAP_MARKER = "EditMapMarker"; // Borked
- public const string OPEN_RANDOM_LOOT_CONTAINER = "OpenRandomLootContainer"; // worked
- public const string HIDEOUT_QTE_EVENT = "HideoutQuickTimeEvent"; // worked
- public const string SAVE_WEAPON_BUILD = "SaveWeaponBuild"; // this is an endpoint now?
- public const string REMOVE_WEAPON_BUILD = "RemoveWeaponBuild"; // this is an endpoint now?
- public const string REMOVE_BUILD = "RemoveBuild"; // this is an endpoint now?
- public const string SAVE_EQUIPMENT_BUILD = "SaveEquipmentBuild"; // this is an endpoint now?
- public const string REMOVE_EQUIPMENT_BUILD = "RemoveEquipmentBuild"; // this is an endpoint now?
- public const string REDEEM_PROFILE_REWARD = "RedeemProfileReward"; // ??
- public const string SET_FAVORITE_ITEMS = "SetFavoriteItems"; // worked
+ public const string MOVE = "Move";
+ public const string REMOVE = "Remove";
+ public const string SPLIT = "Split";
+ public const string MERGE = "Merge";
+ public const string TRANSFER = "Transfer";
+ public const string SWAP = "Swap";
+ public const string FOLD = "Fold";
+ public const string TOGGLE = "Toggle";
+ public const string TAG = "Tag";
+ public const string BIND = "Bind";
+ public const string UNBIND = "Unbind";
+ public const string EXAMINE = "Examine";
+ public const string READ_ENCYCLOPEDIA = "ReadEncyclopedia";
+ public const string APPLY_INVENTORY_CHANGES = "ApplyInventoryChanges";
+ public const string CREATE_MAP_MARKER = "CreateMapMarker";
+ public const string DELETE_MAP_MARKER = "DeleteMapMarker";
+ public const string EDIT_MAP_MARKER = "EditMapMarker";
+ public const string OPEN_RANDOM_LOOT_CONTAINER = "OpenRandomLootContainer";
+ public const string HIDEOUT_QTE_EVENT = "HideoutQuickTimeEvent";
+ public const string SAVE_WEAPON_BUILD = "SaveWeaponBuild";
+ public const string REMOVE_WEAPON_BUILD = "RemoveWeaponBuild";
+ public const string REMOVE_BUILD = "RemoveBuild";
+ public const string SAVE_EQUIPMENT_BUILD = "SaveEquipmentBuild";
+ public const string REMOVE_EQUIPMENT_BUILD = "RemoveEquipmentBuild";
+ public const string REDEEM_PROFILE_REWARD = "RedeemProfileReward";
+ public const string SET_FAVORITE_ITEMS = "SetFavoriteItems";
public const string QUEST_FAIL = "QuestFail";
- public const string PIN_LOCK = "PinLock"; // worked
- public const string ADD_NOTE = "AddNote"; // worked
- public const string EDIT_NOTE = "EditNote"; // worked
- public const string DELETE_NOTE = "DeleteNote"; // worked
- public const string REPEATABLE_QUEST_CHANGE = "RepeatableQuestChange"; // worked
- public const string QUEST_HANDOVER = "QuestHandover"; // worked
- public const string QUEST_COMPLETE = "QuestComplete"; // worked
- public const string QUEST_ACCEPT = "QuestAccept"; // worked
- public const string RAGFAIR_RENEW_OFFER = "RagFairRenewOffer"; // worked
- public const string RAGFAIR_REMOVE_OFFER = "RagFairRemoveOffer"; // worked
- public const string RAGFAIR_ADD_OFFER = "RagFairAddOffer"; // worked
- public const string TRADER_REPAIR = "TraderRepair"; // worked
- public const string REPAIR = "Repair"; // worked
+ public const string PIN_LOCK = "PinLock";
+ public const string ADD_NOTE = "AddNote";
+ public const string EDIT_NOTE = "EditNote";
+ public const string DELETE_NOTE = "DeleteNote";
+ public const string REPEATABLE_QUEST_CHANGE = "RepeatableQuestChange";
+ public const string QUEST_HANDOVER = "QuestHandover";
+ public const string QUEST_COMPLETE = "QuestComplete";
+ public const string QUEST_ACCEPT = "QuestAccept";
+ public const string RAGFAIR_RENEW_OFFER = "RagFairRenewOffer";
+ public const string RAGFAIR_REMOVE_OFFER = "RagFairRemoveOffer";
+ public const string RAGFAIR_ADD_OFFER = "RagFairAddOffer";
+ public const string TRADER_REPAIR = "TraderRepair";
+ public const string REPAIR = "Repair";
public const string SELL_ALL_FROM_SAVAGE = "SellAllFromSavage";
- public const string RAGFAIR_BUY_OFFER = "RagFairBuyOffer"; // worked
- public const string TRADING_CONFIRM = "TradingConfirm"; // worked
- public const string BUY_FROM_TRADER = "buy_from_trader"; // worked
- public const string SELL_TO_TRADER = "sell_to_trader"; // worked
- public const string CHANGE_WISHLIST_ITEM_CATEGORY = "ChangeWishlistItemCategory"; // cant test till add works
- public const string REMOVE_FROM_WISHLIST = "RemoveFromWishList"; // cant test till add works
- public const string ADD_TO_WISHLIST = "AddToWishList"; // Borked
- public const string INSURE = "Insure"; // worked
+ public const string RAGFAIR_BUY_OFFER = "RagFairBuyOffer";
+ public const string TRADING_CONFIRM = "TradingConfirm";
+ public const string BUY_FROM_TRADER = "buy_from_trader";
+ public const string SELL_TO_TRADER = "sell_to_trader";
+ public const string CHANGE_WISHLIST_ITEM_CATEGORY = "ChangeWishlistItemCategory";
+ public const string REMOVE_FROM_WISHLIST = "RemoveFromWishList";
+ public const string ADD_TO_WISHLIST = "AddToWishList";
+ public const string INSURE = "Insure";
public const string RESTORE_HEALTH = "RestoreHealth";
public const string HEAL = "Heal";
- public const string EAT = "Eat"; // worked
- public const string CUSTOMIZATION_SET = "CustomizationSet"; // worked
- public const string CUSTOMIZATION_BUY = "CustomizationBuy"; // worked
+ public const string EAT = "Eat";
+ public const string CUSTOMIZATION_SET = "CustomizationSet";
+ public const string CUSTOMIZATION_BUY = "CustomizationBuy";
}
diff --git a/Libraries/Core/Services/MapMarkerService.cs b/Libraries/Core/Services/MapMarkerService.cs
index 0c3b5eec..6eb1eb9b 100644
--- a/Libraries/Core/Services/MapMarkerService.cs
+++ b/Libraries/Core/Services/MapMarkerService.cs
@@ -57,15 +57,24 @@ public class MapMarkerService(
/// Player profile
/// Edit marker request
/// Item
- public Item EditMarkerOnMap(PmcData pmcData, InventoryEditMarkerRequestData request)
+ public Item? EditMarkerOnMap(PmcData pmcData, InventoryEditMarkerRequestData request)
{
// Get map from inventory
var mapItem = pmcData.Inventory.Items.FirstOrDefault((item) => item.Id == request.Item);
// edit marker
- var indexOfExistingNote = mapItem.Upd.Map.Markers.IndexOf(request.MapMarker);
+ // the only thing that is consistent between the old and edit is the X and Y
+ // find the marker where X and Y match
+ var markerToRemove = mapItem.Upd.Map.Markers.FirstOrDefault(x => x.X == request.X && x.Y == request.Y);
+
+ if (markerToRemove is null)
+ {
+ _logger.Warning($"No marker found for item {request.Item}");
+ return null;
+ }
+
request.MapMarker.Note = SanitiseMapMarkerText(request.MapMarker.Note);
- mapItem.Upd.Map.Markers.RemoveAt(indexOfExistingNote);
+ mapItem.Upd.Map.Markers.Remove(markerToRemove);
mapItem.Upd.Map.Markers.Add(request.MapMarker);
return mapItem;