*Core/Spells: Implement TARGET_UNIT_SUMMONER
*Rename TARGET_UNIT_MINIPET to TARGET_UNIT_TARGET_PUPPET. --HG-- branch : trunk
This commit is contained in:
@@ -1187,9 +1187,9 @@ enum Targets
|
|||||||
TARGET_DEST_DEST = 87,
|
TARGET_DEST_DEST = 87,
|
||||||
TARGET_DEST_DYNOBJ_NONE = 88,
|
TARGET_DEST_DYNOBJ_NONE = 88,
|
||||||
TARGET_DEST_TRAJ = 89,
|
TARGET_DEST_TRAJ = 89,
|
||||||
TARGET_UNIT_MINIPET = 90,
|
TARGET_UNIT_TARGET_PUPPET = 90,
|
||||||
TARGET_DEST_DEST_RANDOM_DIR_DIST = 91,
|
TARGET_DEST_DEST_RANDOM_DIR_DIST = 91,
|
||||||
TARGET_UNIT_UNK_92 = 92,
|
TARGET_UNIT_SUMMONER = 92,
|
||||||
TARGET_CORPSE_AREA_ENEMY_PLAYER_SRC= 93, // TODO
|
TARGET_CORPSE_AREA_ENEMY_PLAYER_SRC= 93, // TODO
|
||||||
TARGET_UNIT_VEHICLE = 94,
|
TARGET_UNIT_VEHICLE = 94,
|
||||||
TARGET_UNIT_DRIVER = 95,
|
TARGET_UNIT_DRIVER = 95,
|
||||||
|
|||||||
@@ -2015,6 +2015,11 @@ void Spell::SelectEffectTargets(uint32 i, uint32 cur)
|
|||||||
if (Guardian* pet = m_caster->GetGuardianPet())
|
if (Guardian* pet = m_caster->GetGuardianPet())
|
||||||
AddUnitTarget(pet, i);
|
AddUnitTarget(pet, i);
|
||||||
break;
|
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_PARTY_CASTER:
|
||||||
case TARGET_UNIT_RAID_CASTER:
|
case TARGET_UNIT_RAID_CASTER:
|
||||||
pushType = PUSH_CASTER_CENTER;
|
pushType = PUSH_CASTER_CENTER;
|
||||||
@@ -2069,8 +2074,7 @@ void Spell::SelectEffectTargets(uint32 i, uint32 cur)
|
|||||||
case TARGET_UNIT_TARGET_ALLY:
|
case TARGET_UNIT_TARGET_ALLY:
|
||||||
case TARGET_UNIT_TARGET_RAID:
|
case TARGET_UNIT_TARGET_RAID:
|
||||||
case TARGET_UNIT_TARGET_PARTY:
|
case TARGET_UNIT_TARGET_PARTY:
|
||||||
case TARGET_UNIT_MINIPET:
|
case TARGET_UNIT_TARGET_PUPPET:
|
||||||
case TARGET_UNIT_UNK_92:
|
|
||||||
AddUnitTarget(target, i);
|
AddUnitTarget(target, i);
|
||||||
break;
|
break;
|
||||||
case TARGET_UNIT_PARTY_TARGET:
|
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);
|
return m_caster != target && m_caster->IsInPartyWith(target);
|
||||||
case TARGET_UNIT_TARGET_RAID:
|
case TARGET_UNIT_TARGET_RAID:
|
||||||
return m_caster->IsInRaidWith(target);
|
return m_caster->IsInRaidWith(target);
|
||||||
|
case TARGET_UNIT_TARGET_PUPPET:
|
||||||
|
return target->HasUnitTypeMask(UNIT_MASK_PUPPET) && m_caster == target->GetOwner();
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -119,9 +119,10 @@ SpellMgr::SpellMgr()
|
|||||||
case TARGET_UNIT_PASSENGER_5:
|
case TARGET_UNIT_PASSENGER_5:
|
||||||
case TARGET_UNIT_PASSENGER_6:
|
case TARGET_UNIT_PASSENGER_6:
|
||||||
case TARGET_UNIT_PASSENGER_7:
|
case TARGET_UNIT_PASSENGER_7:
|
||||||
|
case TARGET_UNIT_SUMMONER:
|
||||||
SpellTargetType[i] = TARGET_TYPE_UNIT_CASTER;
|
SpellTargetType[i] = TARGET_TYPE_UNIT_CASTER;
|
||||||
break;
|
break;
|
||||||
case TARGET_UNIT_MINIPET:
|
case TARGET_UNIT_TARGET_PUPPET:
|
||||||
case TARGET_UNIT_TARGET_ALLY:
|
case TARGET_UNIT_TARGET_ALLY:
|
||||||
case TARGET_UNIT_TARGET_RAID:
|
case TARGET_UNIT_TARGET_RAID:
|
||||||
case TARGET_UNIT_TARGET_ANY:
|
case TARGET_UNIT_TARGET_ANY:
|
||||||
@@ -130,7 +131,6 @@ SpellMgr::SpellMgr()
|
|||||||
case TARGET_UNIT_PARTY_TARGET:
|
case TARGET_UNIT_PARTY_TARGET:
|
||||||
case TARGET_UNIT_CLASS_TARGET:
|
case TARGET_UNIT_CLASS_TARGET:
|
||||||
case TARGET_UNIT_CHAINHEAL:
|
case TARGET_UNIT_CHAINHEAL:
|
||||||
case TARGET_UNIT_UNK_92:
|
|
||||||
SpellTargetType[i] = TARGET_TYPE_UNIT_TARGET;
|
SpellTargetType[i] = TARGET_TYPE_UNIT_TARGET;
|
||||||
break;
|
break;
|
||||||
case TARGET_UNIT_NEARBY_ENEMY:
|
case TARGET_UNIT_NEARBY_ENEMY:
|
||||||
|
|||||||
Reference in New Issue
Block a user