Core/Db/Conditions:

-Drop condition CONDITION_SPELL_SCRIPT_TARGET, use other condition types instead
-Change CONDITION_SOURCE_TYPE_SPELL_SCRIPT_TARGET to CONDITION_SOURCE_TYPE_SPELL_IMPLICIT_TARGET:
--allow using this condition for more spell implicit target types (not just ENTRY)
--SourceGroup value for this src type is now effMask and it's now required

Core/Spells: Unify the way implicit targets are handled, fully implement some partially implemented target types, fix some minor bugs found on the way, general improvements and cleanup.
This commit is contained in:
QAston committed 2012-02-21 20:17:45 +01:00
1 parent 6155fdd103
commit f09b5a6bea
23 files changed
+5721 -1823

No files matched your search

+1 -20
View File
@@ -10004,6 +10004,7 @@ Unit* Unit::GetMagicHitRedirectTarget(Unit* victim, SpellInfo const* spellInfo)
&& _IsValidAttackTarget(magnet, spellInfo)
&& IsWithinLOSInMap(magnet))
{
// TODO: handle this charge drop by proc in cast phase on explicit target
(*itr)->GetBase()->DropCharge(AURA_REMOVE_BY_EXPIRE);
return magnet;
}
@@ -16178,26 +16179,6 @@ bool Unit::IsInRaidWith(Unit const* unit) const
return false;
}
bool Unit::IsTargetMatchingCheck(Unit const* target, SpellTargetSelectionCheckTypes check) const
{
switch (check)
{
case TARGET_SELECT_CHECK_ENEMY:
if (IsControlledByPlayer())
return !IsFriendlyTo(target);
else
return IsHostileTo(target);
case TARGET_SELECT_CHECK_ALLY:
return IsFriendlyTo(target);
case TARGET_SELECT_CHECK_PARTY:
return IsInPartyWith(target);
case TARGET_SELECT_CHECK_RAID:
return IsInRaidWith(target);
default:
return true;
}
}
void Unit::GetRaidMember(std::list<Unit*> &nearMembers, float radius)
{
Player* owner = GetCharmerOrOwnerPlayerOrPlayerItself();