diff options
| author | xinef1 <w.szyszko2@gmail.com> | 2017-02-04 22:37:16 +0100 | 
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2017-02-04 22:37:16 +0100 | 
| commit | 86da1a19bb36edf3242dafac6e45e87434ddff73 (patch) | |
| tree | 5c445d5763a46adbbbfa6d605f40fb8c6ee2f0e6 /src/server/game/Loot/LootMgr.cpp | |
| parent | 9e1b286984c63b801561a67dd4eae7910ec1af10 (diff) | |
Core/Misc: Fix various crashes, also related to multithreading (#19012)
* When iterating groups we have to either do it not in multithreaded context (map updates) or start with checking maps (they are guaranteed to change in single thread update).
* Properly clear ComboPoint references on player remove 
* remove some possible references item may have when it is deleted during save. 
* Also clear all hostile references when unit is removed from map.
Diffstat (limited to 'src/server/game/Loot/LootMgr.cpp')
| -rw-r--r-- | src/server/game/Loot/LootMgr.cpp | 3 | 
1 files changed, 2 insertions, 1 deletions
diff --git a/src/server/game/Loot/LootMgr.cpp b/src/server/game/Loot/LootMgr.cpp index d25eca4b036..9d56d8decb3 100644 --- a/src/server/game/Loot/LootMgr.cpp +++ b/src/server/game/Loot/LootMgr.cpp @@ -464,7 +464,8 @@ bool Loot::FillLoot(uint32 lootId, LootStore const& store, Player* lootOwner, bo          for (GroupReference* itr = group->GetFirstMember(); itr != NULL; itr = itr->next())              if (Player* player = itr->GetSource())   // should actually be looted object instead of lootOwner but looter has to be really close so doesnt really matter -                FillNotNormalLootFor(player, player->IsAtGroupRewardDistance(lootOwner)); +                if (player->IsInMap(lootOwner)) +                    FillNotNormalLootFor(player, player->IsAtGroupRewardDistance(lootOwner));          for (uint8 i = 0; i < items.size(); ++i)          {  | 
