mirror of
https://github.com/Caraxi/mare.client.git
synced 2025-12-12 19:57:23 +01:00
potentially fix pet transient file removal
This commit is contained in:
parent
b4bd804ad1
commit
c8d5b14aba
2 changed files with 22 additions and 9 deletions
|
|
@ -1,4 +1,6 @@
|
|||
namespace MareSynchronos.MareConfiguration.Configurations;
|
||||
using MareSynchronos.API.Data.Enum;
|
||||
|
||||
namespace MareSynchronos.MareConfiguration.Configurations;
|
||||
|
||||
public class TransientConfig : IMareConfiguration
|
||||
{
|
||||
|
|
@ -35,13 +37,25 @@ public class TransientConfig : IMareConfiguration
|
|||
return false;
|
||||
}
|
||||
|
||||
public void RemovePath(string gamePath)
|
||||
public int RemovePath(string gamePath, ObjectKind objectKind)
|
||||
{
|
||||
GlobalPersistentCache.Remove(gamePath);
|
||||
foreach (var kvp in JobSpecificCache)
|
||||
int removedEntries = 0;
|
||||
if (objectKind == ObjectKind.Player)
|
||||
{
|
||||
kvp.Value.Remove(gamePath);
|
||||
if (GlobalPersistentCache.Remove(gamePath)) removedEntries++;
|
||||
foreach (var kvp in JobSpecificCache)
|
||||
{
|
||||
if (kvp.Value.Remove(gamePath)) removedEntries++;
|
||||
}
|
||||
}
|
||||
if (objectKind == ObjectKind.Pet)
|
||||
{
|
||||
foreach (var kvp in JobSpecificPetCache)
|
||||
{
|
||||
if (kvp.Value.Remove(gamePath)) removedEntries++;
|
||||
}
|
||||
}
|
||||
return removedEntries;
|
||||
}
|
||||
|
||||
public void AddOrElevate(uint jobId, string gamePath)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue