mirror of
https://github.com/kwsch/NHSE.git
synced 2026-04-25 15:47:17 -05:00
Only replace occurrences if different sequences
This commit is contained in:
parent
c56ff63354
commit
447916e120
|
|
@ -39,6 +39,8 @@ private static void ChangeToHostTown(this IVillagerOrigin visit, IVillagerOrigin
|
|||
{
|
||||
var hostTown = host.GetTownIdentity();
|
||||
var visitTown = visit.GetTownIdentity();
|
||||
if (hostTown.SequenceEqual(visitTown))
|
||||
return;
|
||||
visitData.ReplaceOccurrences(visitTown, hostTown);
|
||||
}
|
||||
|
||||
|
|
@ -46,6 +48,8 @@ private static void ChangeToHostPlayer(this IVillagerOrigin visit, IVillagerOrig
|
|||
{
|
||||
var hostPlayer = host.GetPlayerIdentity();
|
||||
var visitPlayer = visit.GetPlayerIdentity();
|
||||
if (hostPlayer.SequenceEqual(visitPlayer))
|
||||
return;
|
||||
visitData.ReplaceOccurrences(visitPlayer, hostPlayer);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user