Core/Spells: Remove some obsolete code
This commit is contained in:
@@ -826,7 +826,7 @@ void Spell::SelectEffectImplicitTargets(SpellEffIndex effIndex, SpellImplicitTar
|
|||||||
m_targets.SetSrc(*m_caster);
|
m_targets.SetSrc(*m_caster);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
ASSERT("Spell::SelectEffectImplicitTargets: received not implemented select target reference type for TARGET_TYPE_OBJECT_SRC");
|
ASSERT(false && "Spell::SelectEffectImplicitTargets: received not implemented select target reference type for TARGET_TYPE_OBJECT_SRC");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -843,7 +843,7 @@ void Spell::SelectEffectImplicitTargets(SpellEffIndex effIndex, SpellImplicitTar
|
|||||||
SelectImplicitDestDestTargets(effIndex, targetType);
|
SelectImplicitDestDestTargets(effIndex, targetType);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
ASSERT("Spell::SelectEffectImplicitTargets: received not implemented select target reference type for TARGET_TYPE_OBJECT_DEST");
|
ASSERT(false && "Spell::SelectEffectImplicitTargets: received not implemented select target reference type for TARGET_TYPE_OBJECT_DEST");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -857,7 +857,7 @@ void Spell::SelectEffectImplicitTargets(SpellEffIndex effIndex, SpellImplicitTar
|
|||||||
SelectImplicitTargetObjectTargets(effIndex, targetType);
|
SelectImplicitTargetObjectTargets(effIndex, targetType);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
ASSERT("Spell::SelectEffectImplicitTargets: received not implemented select target reference type for TARGET_TYPE_OBJECT");
|
ASSERT(false && "Spell::SelectEffectImplicitTargets: received not implemented select target reference type for TARGET_TYPE_OBJECT");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -2861,34 +2861,6 @@ bool Spell::UpdateChanneledTargetList()
|
|||||||
return channelTargetEffectMask == 0;
|
return channelTargetEffectMask == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Helper for Chain Healing
|
|
||||||
// Spell target first
|
|
||||||
// Raidmates then descending by injury suffered (MaxHealth - Health)
|
|
||||||
// Other players/mobs then descending by injury suffered (MaxHealth - Health)
|
|
||||||
struct ChainHealingOrder : public std::binary_function<const Unit*, const Unit*, bool>
|
|
||||||
{
|
|
||||||
const Unit* MainTarget;
|
|
||||||
ChainHealingOrder(Unit const* Target) : MainTarget(Target) {};
|
|
||||||
// functor for operator ">"
|
|
||||||
bool operator()(Unit const* _Left, Unit const* _Right) const
|
|
||||||
{
|
|
||||||
return (ChainHealingHash(_Left) < ChainHealingHash(_Right));
|
|
||||||
}
|
|
||||||
|
|
||||||
int32 ChainHealingHash(Unit const* Target) const
|
|
||||||
{
|
|
||||||
if (Target->GetTypeId() == TYPEID_PLAYER && MainTarget->GetTypeId() == TYPEID_PLAYER && Target->ToPlayer()->IsInSameRaidWith(MainTarget->ToPlayer()))
|
|
||||||
{
|
|
||||||
if (Target->IsFullHealth())
|
|
||||||
return 40000;
|
|
||||||
else
|
|
||||||
return 20000 - Target->GetMaxHealth() + Target->GetHealth();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
return 40000 - Target->GetMaxHealth() + Target->GetHealth();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
void Spell::prepare(SpellCastTargets const* targets, AuraEffect const* triggeredByAura)
|
void Spell::prepare(SpellCastTargets const* targets, AuraEffect const* triggeredByAura)
|
||||||
{
|
{
|
||||||
if (m_CastItem)
|
if (m_CastItem)
|
||||||
|
|||||||
Reference in New Issue
Block a user