I don't remember doing anything in that area, and the comments don't look like my kind of writing...jfrazierjr wrote:Azhrei, it looks like when you refactored(I think you did...I don't remember making this change... of course... the past few weeks I have had mush brain) AppActions.PASTE_TOKENS that the check for duplicate exposedAreaGUID makes a new GUID, but does not add that new GUID to the zone. Perhaps that is the issue??? I don't see how a restart of the server would help that though. Even still, any update to the FOW should add the new GUID to the zone....
I've added some code to ensure the ExposedAreaMetaData object is in the zone and that the exposed area history is updated (I just copied this code from elsewhere). It includes the call to the ServerHandler, which is probably an important part of it. Here's what I have now. I'll play with it a bit.
Code: Select all
for (Token tok : allTokens) {
if (tok.getExposedAreaGUID().equals(token.getExposedAreaGUID())) {
GUID guid = new GUID();
token.setExposedAreaGUID(guid);
ExposedAreaMetaData meta = zone.getExposedAreaMetaData(guid);
// 'meta' references the object already stored in the zone's HashMap (that was created if necessary).
meta.addToExposedAreaHistory(new Area(meta.getExposedAreaHistory()));
MapTool.serverCommand().updateExposedAreaMeta(zone.getId(), token.getId(), meta);
}
}