Clang format ConeDirectional

This commit is contained in:
Michael Cook (mackal) 2016-10-14 13:52:01 -04:00
parent 1e865a5246
commit c90a436db3

View File

@ -5680,19 +5680,19 @@ void Mob::ConeDirectional(uint16 spell_id, int16 resist_adjust)
angle_end -= 360.0f;
std::list<Mob *> targets_in_range;
std::list<Mob*>::iterator iter;
entity_list.GetTargetsForConeArea(this, spells[spell_id].min_range, spells[spell_id].aoerange, spells[spell_id].aoerange / 2, targets_in_range);
iter = targets_in_range.begin();
entity_list.GetTargetsForConeArea(this, spells[spell_id].min_range, spells[spell_id].aoerange,
spells[spell_id].aoerange / 2, targets_in_range);
auto iter = targets_in_range.begin();
while (iter != targets_in_range.end()) {
if (!(*iter) || (beneficial_targets && ((*iter)->IsNPC() && !(*iter)->IsPetOwnerClient()))) {
++iter;
continue;
}
float heading_to_target = (CalculateHeadingToTarget((*iter)->GetX(), (*iter)->GetY()) * 360.0f / 256.0f);
float heading_to_target =
(CalculateHeadingToTarget((*iter)->GetX(), (*iter)->GetY()) * 360.0f / 256.0f);
while (heading_to_target < 0.0f)
heading_to_target += 360.0f;
@ -5701,15 +5701,15 @@ void Mob::ConeDirectional(uint16 spell_id, int16 resist_adjust)
heading_to_target -= 360.0f;
if (angle_start > angle_end) {
if((heading_to_target >= angle_start && heading_to_target <= 360.0f) || (heading_to_target >= 0.0f && heading_to_target <= angle_end)){
if ((heading_to_target >= angle_start && heading_to_target <= 360.0f) ||
(heading_to_target >= 0.0f && heading_to_target <= angle_end)) {
if (CheckLosFN((*iter)) || spells[spell_id].npc_no_los) {
(*iter)->CalcSpellPowerDistanceMod(spell_id, 0, this);
SpellOnTarget(spell_id, (*iter), false, true, resist_adjust);
maxtarget_count++;
}
}
}
else{
} else {
if (heading_to_target >= angle_start && heading_to_target <= angle_end) {
if (CheckLosFN((*iter)) || spells[spell_id].npc_no_los) {
(*iter)->CalcSpellPowerDistanceMod(spell_id, 0, this);