3.3.5 gameobject summoner (#23289)

* Scripts/Misc: Change IsSummonedBy(Unit*) to IsSummonedBy(WorldObject*)

* Scripts/Misc: Fix build

* Core/TempSummons: Rename GetSummoner() to GetSummonerUnit()

* Core/TempSummons: Add support to TempSummons::GetSummoner() to return GameObject too

* Fix build

* Core/TempSummons: Allow GameObject to be owner of TempSummon

* Core/TempSummons: Add support to SAI for GameObject owner of TempSummon

* Scripts/Misc: Fix no-pch build

* Core/TempSummons: Implement PR comments

(cherry picked from commit 797fba98e95da1236465a15061ec4122d7ec33fe)
This commit is contained in:
Giacomo Pozzoni
2021-12-07 00:02:03 +01:00
committed by Shauren
parent 54044bda82
commit 5f545f5402
73 changed files with 217 additions and 138 deletions
+1 -1
View File
@@ -1344,7 +1344,7 @@ class spell_gen_defend : public AuraScript
{
if (Unit* caster = GetCaster())
if (TempSummon* vehicle = caster->ToTempSummon())
if (Unit* rider = vehicle->GetSummoner())
if (Unit* rider = vehicle->GetSummonerUnit())
rider->RemoveAurasDueToSpell(GetId());
}