From 0284ed4cfeefe7f84488975beb908bb597e610c4 Mon Sep 17 00:00:00 2001 From: QAston Date: Tue, 17 Aug 2010 20:19:06 +0200 Subject: *Core/Spells: Implement TARGET_UNIT_SUMMONER *Rename TARGET_UNIT_MINIPET to TARGET_UNIT_TARGET_PUPPET. --HG-- branch : trunk --- src/server/game/Spells/Spell.cpp | 10 ++++++++-- 1 file changed, 8 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 2a9d7ecbe8b..f65f7e5bb78 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -2015,6 +2015,11 @@ void Spell::SelectEffectTargets(uint32 i, uint32 cur) if (Guardian* pet = m_caster->GetGuardianPet()) AddUnitTarget(pet, i); break; + case TARGET_UNIT_SUMMONER: + if (m_caster->isSummon()) + if (Unit* unit = m_caster->ToTempSummon()->GetSummoner()) + AddUnitTarget(unit, i); + break; case TARGET_UNIT_PARTY_CASTER: case TARGET_UNIT_RAID_CASTER: pushType = PUSH_CASTER_CENTER; @@ -2069,8 +2074,7 @@ void Spell::SelectEffectTargets(uint32 i, uint32 cur) case TARGET_UNIT_TARGET_ALLY: case TARGET_UNIT_TARGET_RAID: case TARGET_UNIT_TARGET_PARTY: - case TARGET_UNIT_MINIPET: - case TARGET_UNIT_UNK_92: + case TARGET_UNIT_TARGET_PUPPET: AddUnitTarget(target, i); break; case TARGET_UNIT_PARTY_TARGET: @@ -6877,6 +6881,8 @@ bool Spell::IsValidSingleTargetEffect(Unit const* target, Targets type) const return m_caster != target && m_caster->IsInPartyWith(target); case TARGET_UNIT_TARGET_RAID: return m_caster->IsInRaidWith(target); + case TARGET_UNIT_TARGET_PUPPET: + return target->HasUnitTypeMask(UNIT_MASK_PUPPET) && m_caster == target->GetOwner(); } return true; } -- cgit v1.2.3