Previously, summoned creatures weren't being deleted in certain situations because they were encountered again before the cell they were in had a local authority.
The previous logic was meant to prevent packet spam from local scripts, but inadvertently prevented objects from being enabled or disabled correctly from dialogue in certain quests.
Enabling and disabling objects from dialogue and the console is now always allowed to go through.
Previously, a Container packet sent when using the Take All button included all the items in the container, not just all the items in the container window seen on the client. This was a problem when stealing from actors, as the container window does not give access to all of their items.
Previously, when using the Russian edition, all dialogue topics were translated into English before being sent to the server in an ObjectDialogueChoice packet and were then translated back into Russian when received again by the client. However, there were situations where different topics in English corresponded to the same Russian word, e.g. "chores" and "duties" were both translated as "задания", which led to the incorrect topic being used on the client in the end.
This commit makes it so that users of the Russian edition send ObjectDialogueChoice packets where the topicId variable contains both the untranslated topic and the translated one, delimited by a | character, with the client simply using the former when receiving the packet again.
This is a hotfix instead of the proper fix, as the proper fix would use different variables for the two versions of the topic and thus require the structure of the ObjectDialogueChoice packet to change.
* Reorder unlock and notify_all calls to avoid notifying when not all worker
threads are waiting.
* Make sure main thread does not attempt to exclusively lock mSimulationMutex
while not all workers are done with previous frame.
* Replace mNewFrame flag by counter to avoid modification from multiple
threads.