We might have the special faction id but not the faction on update. Probably Fixes #722.
This commit is contained in:
parent
5c9c2a6123
commit
442bbd1139
@ -159,15 +159,16 @@ public class UpdateUtil
|
|||||||
// Get the coll.
|
// Get the coll.
|
||||||
FactionColl coll = FactionColl.get();
|
FactionColl coll = FactionColl.get();
|
||||||
|
|
||||||
|
// Get the faction and detach it
|
||||||
|
Faction faction = coll.detachId(from);
|
||||||
|
if (faction == null) return;
|
||||||
|
coll.syncId(from);
|
||||||
|
|
||||||
// A faction may already be occupying the to-id.
|
// A faction may already be occupying the to-id.
|
||||||
// We must remove it to make space for renaming.
|
// We must remove it to make space for renaming.
|
||||||
// This faction is simply an auto-created faction with no references yet.
|
// This faction is simply an auto-created faction with no references yet.
|
||||||
coll.detachId(to);
|
coll.detachId(to);
|
||||||
coll.syncId(to);
|
coll.syncId(to);
|
||||||
|
|
||||||
// Get the faction and detach it
|
|
||||||
Faction faction = coll.detachId(from);
|
|
||||||
coll.syncId(from);
|
|
||||||
|
|
||||||
// Attach it
|
// Attach it
|
||||||
coll.attach(faction, to);
|
coll.attach(faction, to);
|
||||||
|
Loading…
Reference in New Issue
Block a user