mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-04 03:23:48 +00:00
fix(Core/Pets): Fix crash when pet tries to attack deleted object (#17034)
This situation occurs when, during a fight, a pet receives a command to apply a positive spell to an ally and then resume attacking its previous target.
This commit is contained in:
committed by
GitHub
parent
7529994a5c
commit
f6b77f9d64
@@ -96,7 +96,7 @@ public:
|
||||
void LearnPetPassives();
|
||||
void CastPetAuras(bool current);
|
||||
|
||||
void CastWhenWillAvailable(uint32 spellid, Unit* spellTarget, Unit* oldTarget, bool spellIsPositive = false);
|
||||
void CastWhenWillAvailable(uint32 spellid, Unit* spellTarget, ObjectGuid oldTarget, bool spellIsPositive = false);
|
||||
void ClearCastWhenWillAvailable();
|
||||
void RemoveSpellCooldown(uint32 spell_id, bool update /* = false */);
|
||||
|
||||
@@ -157,10 +157,10 @@ protected:
|
||||
|
||||
std::unique_ptr<DeclinedName> m_declinedname;
|
||||
|
||||
Unit* m_tempspellTarget;
|
||||
Unit* m_tempoldTarget;
|
||||
bool m_tempspellIsPositive;
|
||||
uint32 m_tempspell;
|
||||
Unit* m_tempspellTarget;
|
||||
ObjectGuid m_tempoldTarget;
|
||||
bool m_tempspellIsPositive;
|
||||
uint32 m_tempspell;
|
||||
|
||||
private:
|
||||
void SaveToDB(uint32, uint8, uint32) override // override of Creature::SaveToDB - must not be called
|
||||
|
||||
Reference in New Issue
Block a user