mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-01-14 01:19:08 +00:00
Run clang-format
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
/*
|
||||
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU GPL v2 license, you may redistribute it and/or modify it under version 2 of the License, or (at your option), any later version.
|
||||
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU GPL v2 license, you may redistribute it
|
||||
* and/or modify it under version 2 of the License, or (at your option), any later version.
|
||||
*/
|
||||
|
||||
#include "AoeValues.h"
|
||||
|
||||
#include "Playerbots.h"
|
||||
#include "ServerFacade.h"
|
||||
#include "SpellAuraEffects.h"
|
||||
@@ -77,15 +79,13 @@ WorldLocation AoePositionValue::Calculate()
|
||||
|
||||
float x = (x1 + x2) / 2;
|
||||
float y = (y1 + y2) / 2;
|
||||
float z = bot->GetPositionZ() + CONTACT_DISTANCE;;
|
||||
float z = bot->GetPositionZ() + CONTACT_DISTANCE;
|
||||
;
|
||||
bot->UpdateAllowedPositionZ(x, y, z);
|
||||
return WorldLocation(bot->GetMapId(), x, y, z, 0);
|
||||
}
|
||||
|
||||
uint8 AoeCountValue::Calculate()
|
||||
{
|
||||
return FindMaxDensity(bot).size();
|
||||
}
|
||||
uint8 AoeCountValue::Calculate() { return FindMaxDensity(bot).size(); }
|
||||
|
||||
bool HasAreaDebuffValue::Calculate()
|
||||
{
|
||||
@@ -104,7 +104,7 @@ bool HasAreaDebuffValue::Calculate()
|
||||
continue;
|
||||
|
||||
uint32 trigger_spell_id = proto->Effects[aurEff->GetEffIndex()].TriggerSpell;
|
||||
if (trigger_spell_id == 29767) //Overload
|
||||
if (trigger_spell_id == 29767) // Overload
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@@ -122,25 +122,32 @@ Aura* AreaDebuffValue::Calculate()
|
||||
{
|
||||
// Unit::AuraApplicationMap& map = bot->GetAppliedAuras();
|
||||
Unit::AuraEffectList const& aurasPeriodicDamage = bot->GetAuraEffectsByType(SPELL_AURA_PERIODIC_DAMAGE);
|
||||
Unit::AuraEffectList const& aurasPeriodicDamagePercent = bot->GetAuraEffectsByType(SPELL_AURA_PERIODIC_DAMAGE_PERCENT);
|
||||
Unit::AuraEffectList const& aurasPeriodicTriggerSpell = bot->GetAuraEffectsByType(SPELL_AURA_PERIODIC_TRIGGER_SPELL);
|
||||
Unit::AuraEffectList const& aurasPeriodicTriggerWithValueSpell = bot->GetAuraEffectsByType(SPELL_AURA_PERIODIC_TRIGGER_SPELL_WITH_VALUE);
|
||||
Unit::AuraEffectList const& aurasPeriodicDamagePercent =
|
||||
bot->GetAuraEffectsByType(SPELL_AURA_PERIODIC_DAMAGE_PERCENT);
|
||||
Unit::AuraEffectList const& aurasPeriodicTriggerSpell =
|
||||
bot->GetAuraEffectsByType(SPELL_AURA_PERIODIC_TRIGGER_SPELL);
|
||||
Unit::AuraEffectList const& aurasPeriodicTriggerWithValueSpell =
|
||||
bot->GetAuraEffectsByType(SPELL_AURA_PERIODIC_TRIGGER_SPELL_WITH_VALUE);
|
||||
Unit::AuraEffectList const& aurasDummy = bot->GetAuraEffectsByType(SPELL_AURA_DUMMY);
|
||||
for (const Unit::AuraEffectList& list : {aurasPeriodicDamage, aurasPeriodicDamagePercent, aurasPeriodicTriggerSpell, aurasPeriodicTriggerWithValueSpell, aurasDummy}) {
|
||||
for (const Unit::AuraEffectList& list : {aurasPeriodicDamage, aurasPeriodicDamagePercent, aurasPeriodicTriggerSpell,
|
||||
aurasPeriodicTriggerWithValueSpell, aurasDummy})
|
||||
{
|
||||
for (auto i = list.begin(); i != list.end(); ++i)
|
||||
{
|
||||
AuraEffect* aurEff = *i;
|
||||
Aura *aura = aurEff->GetBase();
|
||||
Aura* aura = aurEff->GetBase();
|
||||
AuraObjectType type = aura->GetType();
|
||||
bool isPositive = aura->GetSpellInfo()->IsPositive();
|
||||
if (type == DYNOBJ_AURA_TYPE && !isPositive) {
|
||||
if (type == DYNOBJ_AURA_TYPE && !isPositive)
|
||||
{
|
||||
DynamicObject* dynOwner = aura->GetDynobjOwner();
|
||||
if (!dynOwner) {
|
||||
if (!dynOwner)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
return aura;
|
||||
}
|
||||
}
|
||||
}
|
||||
return nullptr;
|
||||
return nullptr;
|
||||
}
|
||||
Reference in New Issue
Block a user