mirror of
https://github.com/araxiaonline/mod-mythic-plus.git
synced 2026-06-13 03:02:24 -04:00
fixed issue with misaligned group deaths
This commit is contained in:
@@ -303,7 +303,13 @@ private:
|
||||
_instanceCreatureData->reserve(500);
|
||||
};
|
||||
|
||||
inline ~MpDataStore() {}
|
||||
inline ~MpDataStore() {
|
||||
for (auto& [guid, playerData] : *_playerData) {
|
||||
delete playerData;
|
||||
}
|
||||
|
||||
_playerData->clear();
|
||||
}
|
||||
|
||||
std::unique_ptr<std::unordered_map<ObjectGuid, MpPlayerData*>> _playerData;
|
||||
|
||||
|
||||
@@ -107,8 +107,8 @@ public:
|
||||
// get the player data or set it up
|
||||
MpPlayerData* playerData = sMpDataStore->GetPlayerData(player->GetGUID());
|
||||
if(!playerData) {
|
||||
auto newPlayerData = MpPlayerData(player, data->difficulty, group->GetGUID().GetCounter());
|
||||
sMpDataStore->AddPlayerData(player->GetGUID(), &newPlayerData);
|
||||
playerData = new MpPlayerData(player, data->difficulty, group->GetGUID().GetCounter());
|
||||
sMpDataStore->AddPlayerData(player->GetGUID(), playerData);
|
||||
}
|
||||
|
||||
// Add this players data to the group data
|
||||
|
||||
Reference in New Issue
Block a user