diff options
author | Andrew <47818697+Nyeriah@users.noreply.github.com> | 2024-11-14 00:01:22 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-14 00:01:22 -0300 |
commit | 587762ca36a69ab311b7ce87c6e48f76ed87b714 (patch) | |
tree | 94d44b5f046d2fdfa1f85b26d8012ae82c0746d6 /src | |
parent | b7732690c97a285026db6653f296ad01c7ca72b6 (diff) |
fix(Core/Instance): Save persistent data to DB on updates (#20555)
Diffstat (limited to 'src')
-rw-r--r-- | src/server/game/Instances/InstanceScript.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/server/game/Instances/InstanceScript.cpp b/src/server/game/Instances/InstanceScript.cpp index 593aab04aa..bbc160c010 100644 --- a/src/server/game/Instances/InstanceScript.cpp +++ b/src/server/game/Instances/InstanceScript.cpp @@ -393,7 +393,11 @@ void InstanceScript::StorePersistentData(uint32 index, uint32 data) return; } - persistentData[index] = data; + if (persistentData[index] != data) + { + persistentData[index] = data; + SaveToDB(); + } } void InstanceScript::DoForAllMinions(uint32 id, std::function<void(Creature*)> exec) |