From 5f545f540216d3b94c26e4aeda50c8bb8d5c3d74 Mon Sep 17 00:00:00 2001 From: Giacomo Pozzoni Date: Thu, 23 May 2019 21:08:29 +0200 Subject: 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) --- src/server/game/Spells/Spell.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/server/game/Spells/Spell.cpp') diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index 20d5eb080fd..bd520ec8b02 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -1384,7 +1384,7 @@ void Spell::SelectImplicitCasterDestTargets(SpellEffectInfo const& spellEffectIn case TARGET_DEST_SUMMONER: if (Unit const* unitCaster = m_caster->ToUnit()) if (TempSummon const* casterSummon = unitCaster->ToTempSummon()) - if (Unit const* summoner = casterSummon->GetSummoner()) + if (WorldObject const* summoner = casterSummon->GetSummoner()) dest = SpellDestination(*summoner); break; default: @@ -1520,7 +1520,7 @@ void Spell::SelectImplicitCasterObjectTargets(SpellEffectInfo const& spellEffect case TARGET_UNIT_SUMMONER: if (Unit* unitCaster = m_caster->ToUnit()) if (unitCaster->IsSummon()) - target = unitCaster->ToTempSummon()->GetSummoner(); + target = unitCaster->ToTempSummon()->GetSummonerUnit(); break; case TARGET_UNIT_VEHICLE: if (Unit* unitCaster = m_caster->ToUnit()) -- cgit v1.2.3