feat: implement claimlink link
This commit is contained in:
@@ -44,7 +44,17 @@ public class ClaimLinkRegistry
|
||||
Save();
|
||||
}
|
||||
|
||||
private void Save()
|
||||
public bool IsClaimLinked(string ownerPlayerUid, int localIndex)
|
||||
{
|
||||
foreach (ClaimLink link in byGroupId.Values)
|
||||
foreach (ClaimLinkMember member in link.Members)
|
||||
if (member.OwnerPlayerUid == ownerPlayerUid && member.LocalClaimIndices.Contains(localIndex))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public void Save()
|
||||
{
|
||||
saveGame.StoreData(SaveKey, new ClaimLinkData { Links = new List<ClaimLink>(byGroupId.Values) });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user