mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-31 01:23:47 +00:00
fix(Core/TempSummon): Fix crash concerning PlayerScript hook (#2650)
This commit is contained in:
@@ -149,8 +149,9 @@ void TempSummon::InitStats(uint32 duration)
|
||||
ASSERT(!IsPet());
|
||||
|
||||
Unit* owner = GetSummoner();
|
||||
if (Player* player = owner->ToPlayer())
|
||||
sScriptMgr->OnBeforeTempSummonInitStats(player, this, duration);
|
||||
if (owner)
|
||||
if (Player* player = owner->ToPlayer())
|
||||
sScriptMgr->OnBeforeTempSummonInitStats(player, this, duration);
|
||||
|
||||
m_timer = duration;
|
||||
m_lifetime = duration;
|
||||
|
||||
Reference in New Issue
Block a user