summaryrefslogtreecommitdiff
path: root/src/server/game/Spells/Spell.cpp
diff options
context:
space:
mode:
authorKitzunu <24550914+Kitzunu@users.noreply.github.com>2023-02-12 14:05:34 +0100
committerGitHub <noreply@github.com>2023-02-12 10:05:34 -0300
commitf039836a2fd7f615c51a1a2efe896181ae56c103 (patch)
treea0e849fdf22e56790034041f8844be9eb1954049 /src/server/game/Spells/Spell.cpp
parente37e6327f046037299e77ea42cc1e837bf5f7da2 (diff)
chore(Core/Misc): Change all TODO to doxygen comment (#14966)
Diffstat (limited to 'src/server/game/Spells/Spell.cpp')
-rw-r--r--src/server/game/Spells/Spell.cpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp
index 54a7001707..e22e99eb60 100644
--- a/src/server/game/Spells/Spell.cpp
+++ b/src/server/game/Spells/Spell.cpp
@@ -1890,7 +1890,7 @@ void Spell::SelectImplicitTrajTargets(SpellEffIndex effIndex, SpellImplicitTarge
continue;
const float size = std::max((*itr)->GetObjectSize() * 0.7f, 1.0f); // 1/sqrt(3)
- // TODO: all calculation should be based on src instead of m_caster
+ /// @todo: all calculation should be based on src instead of m_caster
const float objDist2d = std::fabs(m_targets.GetSrcPos()->GetExactDist2d(*itr) * cos(m_targets.GetSrcPos()->GetRelativeAngle(*itr)));
const float dz = std::fabs((*itr)->GetPositionZ() - m_targets.GetSrcPos()->m_positionZ);
@@ -2011,7 +2011,7 @@ void Spell::SelectImplicitTrajTargets(SpellEffIndex effIndex, SpellImplicitTarge
void Spell::SelectEffectTypeImplicitTargets(uint8 effIndex)
{
// special case for SPELL_EFFECT_SUMMON_RAF_FRIEND and SPELL_EFFECT_SUMMON_PLAYER
- // TODO: this is a workaround - target shouldn't be stored in target map for those spells
+ /// @todo: this is a workaround - target shouldn't be stored in target map for those spells
switch (m_spellInfo->Effects[effIndex].Effect)
{
case SPELL_EFFECT_SUMMON_RAF_FRIEND:
@@ -2054,7 +2054,7 @@ void Spell::SelectEffectTypeImplicitTargets(uint8 effIndex)
{
if (Corpse* corpseTarget = m_targets.GetCorpseTarget())
{
- // TODO: this is a workaround - corpses should be added to spell target map too, but we can't do that so we add owner instead
+ /// @todo: this is a workaround - corpses should be added to spell target map too, but we can't do that so we add owner instead
if (Player* owner = ObjectAccessor::FindPlayer(corpseTarget->GetOwnerGUID()))
target = owner;
}
@@ -2442,7 +2442,7 @@ void Spell::AddUnitTarget(Unit* target, uint32 effectMask, bool checkIfValid /*=
if (m_spellInfo->Speed > 0.0f && m_caster != target)
{
// calculate spell incoming interval
- // TODO: this is a hack
+ /// @todo: this is a hack
float dist = m_caster->GetDistance(target->GetPositionX(), target->GetPositionY(), target->GetPositionZ());
if (dist < 5.0f)
@@ -2472,7 +2472,7 @@ void Spell::AddUnitTarget(Unit* target, uint32 effectMask, bool checkIfValid /*=
m_spellFlags |= SPELL_FLAG_REFLECTED;
// HACK: workaround check for succubus seduction case
- // TODO: seduction should be casted only on humanoids (not demons)
+ /// @todo: seduction should be casted only on humanoids (not demons)
if (m_caster->IsPet())
{
CreatureTemplate const* ci = sObjectMgr->GetCreatureTemplate(m_caster->GetEntry());
@@ -2702,7 +2702,7 @@ void Spell::DoAllEffectOnTarget(TargetInfo* target)
{
m_needComboPoints = false;
// Restore spell mods for a miss/dodge/parry Cold Blood
- // TODO: check how broad this rule should be
+ /// @todo: check how broad this rule should be
if (m_caster->GetTypeId() == TYPEID_PLAYER && (missInfo == SPELL_MISS_MISS || missInfo == SPELL_MISS_DODGE || missInfo == SPELL_MISS_PARRY))
m_caster->ToPlayer()->RestoreSpellMods(this, 14177);
}
@@ -3051,7 +3051,7 @@ SpellMissInfo Spell::DoSpellHitOnUnit(Unit* unit, uint32 effectMask, bool scaleA
else if (m_caster->IsFriendlyTo(unit))
{
// for delayed spells ignore negative spells (after duel end) for friendly targets
- // TODO: this cause soul transfer bugged
+ /// @todo: this cause soul transfer bugged
if(!IsTriggered() && m_spellInfo->Speed > 0.0f && unit->GetTypeId() == TYPEID_PLAYER && !m_spellInfo->IsPositive())
return SPELL_MISS_EVADE;
@@ -3238,7 +3238,7 @@ SpellMissInfo Spell::DoSpellHitOnUnit(Unit* unit, uint32 effectMask, bool scaleA
void Spell::DoTriggersOnSpellHit(Unit* unit, uint8 effMask)
{
// Apply additional spell effects to target
- // TODO: move this code to scripts
+ /// @todo: move this code to scripts
if (m_preCastSpell)
{
// Paladin immunity shields
@@ -3297,7 +3297,7 @@ void Spell::DoTriggersOnSpellHit(Unit* unit, uint8 effMask)
}
// trigger linked auras remove/apply
- // TODO: remove/cleanup this, as this table is not documented and people are doing stupid things with it
+ /// @todo: remove/cleanup this, as this table is not documented and people are doing stupid things with it
if (std::vector<int32> const* spellTriggered = sSpellMgr->GetSpellLinked(m_spellInfo->Id + SPELL_LINK_HIT))
{
for (std::vector<int32>::const_iterator i = spellTriggered->begin(); i != spellTriggered->end(); ++i)
@@ -3709,7 +3709,7 @@ void Spell::cancel(bool bySelf)
if (m_caster->ToPlayer()->NeedSendSpectatorData())
ArenaSpectator::SendCommand_Spell(m_caster->FindMap(), m_caster->GetGUID(), "SPE", m_spellInfo->Id, bySelf ? 99998 : 99999);
}
- [[fallthrough]]; // TODO: Not sure whether the fallthrough was a mistake (forgetting a break) or intended. This should be double-checked.
+ [[fallthrough]]; /// @todo: Not sure whether the fallthrough was a mistake (forgetting a break) or intended. This should be double-checked.
case SPELL_STATE_DELAYED:
SendInterrupted(0);
// xinef: fixes bugged gcd reset in some cases
@@ -5992,7 +5992,7 @@ SpellCastResult Spell::CheckCast(bool strict)
}
// Triggered spells also have range check
- // TODO: determine if there is some flag to enable/disable the check
+ /// @todo: determine if there is some flag to enable/disable the check
castResult = CheckRange(strict);
if (castResult != SPELL_CAST_OK)
return castResult;
@@ -7416,7 +7416,7 @@ SpellCastResult Spell::CheckItems()
return SPELL_FAILED_DONT_REPORT;
}
}
- [[fallthrough]]; // TODO: Not sure whether the fallthrough was a mistake (forgetting a break) or intended. This should be double-checked.
+ [[fallthrough]]; /// @todo: Not sure whether the fallthrough was a mistake (forgetting a break) or intended. This should be double-checked.
case SPELL_EFFECT_ENCHANT_ITEM_PRISMATIC:
{
Item* targetItem = m_targets.GetItemTarget();
@@ -7917,7 +7917,7 @@ bool Spell::CheckEffectTarget(Unit const* target, uint32 eff) const
return true;
}
- // todo: below shouldn't be here, but it's temporary
+ /// @todo: below shouldn't be here, but it's temporary
//Check targets for LOS visibility (except spells without range limitations)
switch (m_spellInfo->Effects[eff].Effect)
{
@@ -8709,7 +8709,7 @@ bool Spell::CanExecuteTriggersOnHit(uint8 effMask, SpellInfo const* triggeredByA
void Spell::PrepareTriggersExecutedOnHit()
{
- // todo: move this to scripts
+ /// @todo: move this to scripts
if (m_spellInfo->SpellFamilyName)
{
SpellInfo const* excludeCasterSpellInfo = sSpellMgr->GetSpellInfo(m_spellInfo->ExcludeCasterAuraSpell);
@@ -8720,7 +8720,7 @@ void Spell::PrepareTriggersExecutedOnHit()
m_preCastSpell = m_spellInfo->ExcludeTargetAuraSpell;
}
- // todo: move this to scripts
+ /// @todo: move this to scripts
switch (m_spellInfo->SpellFamilyName)
{
case SPELLFAMILY_PALADIN: