mirror of
https://github.com/mangosfour/server.git
synced 2025-12-30 10:37:12 +00:00
[8023] Move guardian list at Unit level and unsummon guardians at owner-creature death/unload.
This expected to fix well known crash at intances unload with creature with summoned guardians. Note: this "fix" special case but not original source of problem in general.
This commit is contained in:
parent
02a71edb86
commit
309ac7ead0
6 changed files with 56 additions and 46 deletions
|
|
@ -859,6 +859,8 @@ enum ReactiveType
|
|||
#define MAX_REACTIVE 3
|
||||
#define MAX_TOTEM 4
|
||||
|
||||
typedef std::set<uint64> GuardianPetList;
|
||||
|
||||
// delay time next attack to prevent client attack animation problems
|
||||
#define ATTACK_DISPLAY_DELAY 200
|
||||
|
||||
|
|
@ -1191,6 +1193,11 @@ class MANGOS_DLL_SPEC Unit : public WorldObject
|
|||
void SetPet(Pet* pet);
|
||||
void SetCharm(Unit* pet);
|
||||
|
||||
void AddGuardian(Pet* pet);
|
||||
void RemoveGuardian(Pet* pet);
|
||||
void RemoveGuardians();
|
||||
bool HasGuardianWithEntry(uint32 entry);
|
||||
|
||||
bool isCharmed() const { return GetCharmerGUID() != 0; }
|
||||
|
||||
CharmInfo* GetCharmInfo() { return m_charmInfo; }
|
||||
|
|
@ -1581,5 +1588,7 @@ class MANGOS_DLL_SPEC Unit : public WorldObject
|
|||
FollowerRefManager m_FollowingRefManager;
|
||||
|
||||
ComboPointHolderSet m_ComboPointHolders;
|
||||
|
||||
GuardianPetList m_guardianPets;
|
||||
};
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue