mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-02 18:43:48 +00:00
fix(Core/Misc): bunch of crashfixes (#7307)
This commit is contained in:
@@ -103,7 +103,7 @@ public:
|
||||
bool Execute(uint64 /*eventTime*/, uint32 /*diff*/) override
|
||||
{
|
||||
if (_owner.IsSummon())
|
||||
if (Unit* summoner = _owner.ToTempSummon()->GetSummoner())
|
||||
if (Unit* summoner = _owner.ToTempSummon()->GetSummonerUnit())
|
||||
{
|
||||
summoner->GetAI()->DoAction(_action);
|
||||
_owner.SetStandState(UNIT_STAND_STATE_SUBMERGED);
|
||||
@@ -514,7 +514,7 @@ public:
|
||||
{
|
||||
Talk(ANGER_SAY_DEATH);
|
||||
if (me->IsSummon())
|
||||
if (Unit* summoner = me->ToTempSummon()->GetSummoner())
|
||||
if (Unit* summoner = me->ToTempSummon()->GetSummonerUnit())
|
||||
Unit::Kill(summoner, summoner);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user