aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Spells/Spell.cpp
diff options
context:
space:
mode:
authorQAston <none@none>2010-08-17 20:19:06 +0200
committerQAston <none@none>2010-08-17 20:19:06 +0200
commit0284ed4cfeefe7f84488975beb908bb597e610c4 (patch)
tree641e01985a209324b1e76f7af8237418881ab8b3 /src/server/game/Spells/Spell.cpp
parent67e7786ccc33119eeb3b08aed7c8ad52677d4b88 (diff)
*Core/Spells: Implement TARGET_UNIT_SUMMONER
*Rename TARGET_UNIT_MINIPET to TARGET_UNIT_TARGET_PUPPET. --HG-- branch : trunk
Diffstat (limited to 'src/server/game/Spells/Spell.cpp')
-rw-r--r--src/server/game/Spells/Spell.cpp10
1 files changed, 8 insertions, 2 deletions
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;
}