chore(Core/Misc): Change all TODO to doxygen comment (#14966)

This commit is contained in:
Kitzunu
2023-02-12 14:05:34 +01:00
committed by GitHub
parent e37e6327f0
commit f039836a2f
84 changed files with 185 additions and 185 deletions

View File

@@ -39,7 +39,7 @@
#include "Vehicle.h"
#include "WorldPacket.h"
// TODO: this import is not necessary for compilation and marked as unused by the IDE
/// @todo: this import is not necessary for compilation and marked as unused by the IDE
// however, for some reasons removing it would cause a damn linking issue
// there is probably some underlying problem with imports which should properly addressed
// see: https://github.com/azerothcore/azerothcore-wotlk/issues/9766
@@ -595,7 +595,7 @@ void AuraEffect::CalculatePeriodic(Unit* caster, bool create, bool load)
// 3 spells have no amplitude set
if (!m_amplitude)
m_amplitude = 1 * IN_MILLISECONDS;
[[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_AURA_PERIODIC_DAMAGE:
case SPELL_AURA_PERIODIC_HEAL:
case SPELL_AURA_OBS_MOD_HEALTH:
@@ -1190,7 +1190,7 @@ void AuraEffect::CleanupTriggeredSpells(Unit* target)
return;
// needed for spell 43680, maybe others
// TODO: is there a spell flag, which can solve this in a more sophisticated way?
/// @todo: is there a spell flag, which can solve this in a more sophisticated way?
if (m_spellInfo->Effects[GetEffIndex()].ApplyAuraName == SPELL_AURA_PERIODIC_TRIGGER_SPELL &&
uint32(m_spellInfo->GetDuration()) == m_spellInfo->Effects[GetEffIndex()].Amplitude)
return;
@@ -3128,7 +3128,7 @@ void AuraEffect::HandlePreventFleeing(AuraApplication const* aurApp, uint8 mode,
// Since patch 3.0.2 this mechanic no longer affects fear effects. It will ONLY prevent humanoids from fleeing due to low health.
if (target->GetTypeId() == TYPEID_PLAYER || !apply || target->HasAuraType(SPELL_AURA_MOD_FEAR))
return;
/// TODO: find a way to cancel fleeing for assistance.
/// @todo: find a way to cancel fleeing for assistance.
/// Currently this will only stop creatures fleeing due to low health that could not find nearby allies to flee towards.
target->SetControlled(false, UNIT_STATE_FLEEING);
}
@@ -3864,7 +3864,7 @@ void AuraEffect::HandleAuraModSchoolImmunity(AuraApplication const* aurApp, uint
&& GetSpellInfo()->HasAttribute(SPELL_ATTR2_FAIL_ON_ALL_TARGETS_IMMUNE))
target->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_IMMUNE_OR_LOST_SELECTION);
// TODO: optimalize this cycle - use RemoveAurasWithInterruptFlags call or something else
/// @todo: optimalize this cycle - use RemoveAurasWithInterruptFlags call or something else
if ((apply)
&& GetSpellInfo()->HasAttribute(SPELL_ATTR1_IMMUNITY_PURGES_EFFECT)
&& GetSpellInfo()->IsPositive()) //Only positive immunity removes auras
@@ -6024,7 +6024,7 @@ void AuraEffect::HandlePeriodicTriggerSpellAuraTick(Unit* target, Unit* caster)
triggerSpellId = 30571;
break;
// Doom
// TODO: effect trigger spell may be independant on spell targets, and executed in spell finish phase
/// @todo: effect trigger spell may be independant on spell targets, and executed in spell finish phase
// so instakill will be naturally done before trigger spell
case 31347:
{

View File

@@ -35,7 +35,7 @@
#include "Vehicle.h"
#include "WorldPacket.h"
// TODO: this import is not necessary for compilation and marked as unused by the IDE
/// @todo: this import is not necessary for compilation and marked as unused by the IDE
// however, for some reasons removing it would cause a damn linking issue
// there is probably some underlying problem with imports which should properly addressed
// see: https://github.com/azerothcore/azerothcore-wotlk/issues/9766
@@ -520,7 +520,7 @@ void Aura::_UnapplyForTarget(Unit* target, Unit* caster, AuraApplication* auraAp
ApplicationMap::iterator itr = m_applications.find(target->GetGUID());
// TODO: Figure out why this happens
/// @todo: Figure out why this happens
if (itr == m_applications.end())
{
LOG_ERROR("spells.aura", "Aura::_UnapplyForTarget, target:{}, caster:{}, spell:{} was not found in owners application map!",
@@ -1396,7 +1396,7 @@ void Aura::HandleAuraSpecificMods(AuraApplication const* aurApp, Unit* caster, b
if (caster->HasAura(56370))
SetDuration(0);
}
// Todo: This should be moved to similar function in spell::hit
/// @todo: This should be moved to similar function in spell::hit
else if (GetSpellInfo()->SpellFamilyFlags[0] & 0x01000000)
{
// Polymorph Sound - Sheep && Penguin
@@ -1695,7 +1695,7 @@ void Aura::HandleAuraSpecificMods(AuraApplication const* aurApp, Unit* caster, b
case SPELLFAMILY_WARRIOR:
if (!caster)
break;
[[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 SPELLFAMILY_WARLOCK:
if (!caster)
break;
@@ -2243,7 +2243,7 @@ bool Aura::IsProcTriggeredOnEvent(AuraApplication* aurApp, ProcEventInfo& eventI
if (IsProcOnCooldown())
return false;
// TODO:
/// @todo:
// something about triggered spells triggering, and add extra attack effect
// do checks against db data
@@ -2261,14 +2261,14 @@ bool Aura::IsProcTriggeredOnEvent(AuraApplication* aurApp, ProcEventInfo& eventI
if (!check)
return false;
// TODO:
/// @todo:
// do allow additional requirements for procs
// this is needed because this is the last moment in which you can prevent aura charge drop on proc
// and possibly a way to prevent default checks (if there're going to be any)
// Check if current equipment meets aura requirements
// do that only for passive spells
// TODO: this needs to be unified for all kinds of auras
/// @todo: this needs to be unified for all kinds of auras
Unit* target = aurApp->GetTarget();
if (IsPassive() && target->GetTypeId() == TYPEID_PLAYER && GetSpellInfo()->EquippedItemClass != -1)
{
@@ -2847,7 +2847,7 @@ void UnitAura::FillTargetMap(std::map<Unit*, uint8>& targets, Unit* caster)
}
case SPELL_EFFECT_APPLY_AREA_AURA_PET:
targetList.push_back(GetUnitOwner());
[[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_APPLY_AREA_AURA_OWNER:
{
if (Unit* owner = GetUnitOwner()->GetCharmerOrOwner())

View File

@@ -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:

View File

@@ -63,7 +63,7 @@
#include "World.h"
#include "WorldPacket.h"
// TODO: this import is not necessary for compilation and marked as unused by the IDE
/// @todo: this import is not necessary for compilation and marked as unused by the IDE
// however, for some reasons removing it would cause a damn linking issue
// there is probably some underlying problem with imports which should properly addressed
// see: https://github.com/azerothcore/azerothcore-wotlk/issues/9766
@@ -586,7 +586,7 @@ void Spell::EffectSchoolDMG(SpellEffIndex effIndex)
}
}
// TODO: should this be put on taken but not done?
/// @todo: should this be put on taken but not done?
if (found)
damage += m_spellInfo->Effects[EFFECT_1].CalcValue();
@@ -797,7 +797,7 @@ void Spell::EffectTriggerSpell(SpellEffIndex effIndex)
uint32 triggered_spell_id = m_spellInfo->Effects[effIndex].TriggerSpell;
// todo: move those to spell scripts
/// @todo: move those to spell scripts
if (m_spellInfo->Effects[effIndex].Effect == SPELL_EFFECT_TRIGGER_SPELL
&& effectHandleMode == SPELL_EFFECT_HANDLE_LAUNCH_TARGET)
{
@@ -1422,7 +1422,7 @@ void Spell::EffectSendEvent(SpellEffIndex effIndex)
// some spells have no target entries in dbc and they use focus target
if (focusObject)
target = focusObject;
// TODO: there should be a possibility to pass dest target to event script
/// @todo: there should be a possibility to pass dest target to event script
}
LOG_DEBUG("spells.aura", "Spell ScriptStart {} for spellid {} in EffectSendEvent ", m_spellInfo->Effects[effIndex].MiscValue, m_spellInfo->Id);
@@ -1827,7 +1827,7 @@ void Spell::EffectCreateItem2(SpellEffIndex effIndex)
else
player->AutoStoreLoot(m_spellInfo->Id, LootTemplates_Spell); // create some random items
}
// TODO: ExecuteLogEffectCreateItem(i, m_spellInfo->Effects[i].ItemType);
/// @todo: ExecuteLogEffectCreateItem(i, m_spellInfo->Effects[i].ItemType);
}
void Spell::EffectCreateRandomItem(SpellEffIndex /*effIndex*/)
@@ -1846,7 +1846,7 @@ void Spell::EffectCreateRandomItem(SpellEffIndex /*effIndex*/)
// create some random items
player->AutoStoreLoot(m_spellInfo->Id, LootTemplates_Spell);
// TODO: ExecuteLogEffectCreateItem(i, m_spellInfo->Effects[i].ItemType);
/// @todo: ExecuteLogEffectCreateItem(i, m_spellInfo->Effects[i].ItemType);
}
void Spell::EffectPersistentAA(SpellEffIndex effIndex)
@@ -2107,7 +2107,7 @@ void Spell::EffectOpenLock(SpellEffIndex effIndex)
if (gameObjTarget)
{
GameObjectTemplate const* goInfo = gameObjTarget->GetGOInfo();
// Arathi Basin banner opening. // TODO: Verify correctness of this check
// Arathi Basin banner opening. /// @todo: Verify correctness of this check
if ((goInfo->type == GAMEOBJECT_TYPE_BUTTON && goInfo->button.noDamageImmune) ||
(goInfo->type == GAMEOBJECT_TYPE_GOOBER && goInfo->goober.losOK))
{
@@ -2139,7 +2139,7 @@ void Spell::EffectOpenLock(SpellEffIndex effIndex)
}
return;
}
// TODO: Add script for spell 41920 - Filling, becouse server it freze when use this spell
/// @todo: Add script for spell 41920 - Filling, becouse server it freze when use this spell
// handle outdoor pvp object opening, return true if go was registered for handling
// these objects must have been spawned by outdoorpvp!
else if (gameObjTarget->GetGOInfo()->type == GAMEOBJECT_TYPE_GOOBER && sOutdoorPvPMgr->HandleOpenGo(player, gameObjTarget))
@@ -2687,7 +2687,7 @@ void Spell::EffectDualWield(SpellEffIndex /*effIndex*/)
void Spell::EffectPull(SpellEffIndex effIndex)
{
// TODO: create a proper pull towards distract spell center for distract
/// @todo: create a proper pull towards distract spell center for distract
EffectNULL(effIndex);
}
@@ -3712,7 +3712,7 @@ void Spell::EffectInterruptCast(SpellEffIndex effIndex)
if (!unitTarget || !unitTarget->IsAlive())
return;
// TODO: not all spells that used this effect apply cooldown at school spells
/// @todo: not all spells that used this effect apply cooldown at school spells
// also exist case: apply cooldown to interrupted cast only and to all spells
// there is no CURRENT_AUTOREPEAT_SPELL spells that can be interrupted
for (uint32 i = CURRENT_FIRST_NON_MELEE_SPELL; i < CURRENT_AUTOREPEAT_SPELL; ++i)
@@ -3794,7 +3794,7 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex)
if (effectHandleMode != SPELL_EFFECT_HANDLE_HIT_TARGET)
return;
// TODO: we must implement hunter pet summon at login there (spell 6962)
/// @todo: we must implement hunter pet summon at login there (spell 6962)
switch (m_spellInfo->SpellFamilyName)
{
@@ -4554,7 +4554,7 @@ void Spell::EffectFeedPet(SpellEffIndex effIndex)
uint32 count = 1;
player->DestroyItemCount(foodItem, count, true);
// TODO: fix crash when a spell has two effects, both pointed at the same item target
/// @todo: fix crash when a spell has two effects, both pointed at the same item target
m_caster->CastCustomSpell(pet, m_spellInfo->Effects[effIndex].TriggerSpell, &benefit, nullptr, nullptr, true);
}
@@ -5248,7 +5248,7 @@ void Spell::EffectResurrectPet(SpellEffIndex /*effIndex*/)
return;
}
// TODO: Better to fail Hunter's "Revive Pet" at cast instead of here when casting ends
/// @todo: Better to fail Hunter's "Revive Pet" at cast instead of here when casting ends
if (pet->IsAlive())
{
return;

View File

@@ -1460,7 +1460,7 @@ SpellCastResult SpellInfo::CheckShapeshift(uint32 form) const
// Check if stance disables cast of not-stance spells
// Example: cannot cast any other spells in zombie or ghoul form
// TODO: Find a way to disable use of these spells clientside
/// @todo: Find a way to disable use of these spells clientside
if (shapeInfo && shapeInfo->flags1 & 0x400)
{
if (!(stanceMask & Stances))
@@ -2283,7 +2283,7 @@ SpellSpecificType SpellInfo::LoadSpellSpecific() const
/// @workaround For non-stacking tracking spells (We need generic solution)
if (Id == 30645) // Gas Cloud Tracking
return SPELL_SPECIFIC_NORMAL;
[[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_AURA_TRACK_RESOURCES:
case SPELL_AURA_TRACK_STEALTHED:
return SPELL_SPECIFIC_TRACKER;

View File

@@ -2179,7 +2179,7 @@ void SpellMgr::LoadEnchantCustomAttr()
if (!spellInfo)
continue;
// TODO: find a better check
/// @todo: find a better check
// Xinef: commented second part, fixes warlock enchants like firestone, spellstone
if (!spellInfo->HasAttribute(SPELL_ATTR2_ENCHANT_OWN_ITEM_ONLY)/* || !spellInfo->HasAttribute(SPELL_ATTR0_NOT_SHAPESHIFTED)*/)
continue;
@@ -3029,7 +3029,7 @@ void SpellMgr::LoadSpellInfoCustomAttributes()
spellInfo->Effects[j].ApplyAuraName == SPELL_AURA_PERIODIC_HEALTH_FUNNEL ||
spellInfo->Effects[j].ApplyAuraName == SPELL_AURA_PERIODIC_DUMMY)
continue;
[[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.
default:
if (spellInfo->Effects[j].CalcValue() || ((spellInfo->Effects[j].Effect == SPELL_EFFECT_INTERRUPT_CAST || spellInfo->HasAttribute(SPELL_ATTR0_CU_DONT_BREAK_STEALTH)) && !spellInfo->HasAttribute(SPELL_ATTR0_NO_IMMUNITIES)))
if (spellInfo->Id != 69649 && spellInfo->Id != 71056 && spellInfo->Id != 71057 && spellInfo->Id != 71058 && spellInfo->Id != 73061 && spellInfo->Id != 73062 && spellInfo->Id != 73063 && spellInfo->Id != 73064) // Sindragosa Frost Breath

View File

@@ -85,7 +85,7 @@ enum SpellFamilyFlag
SPELLFAMILYFLAG_DK_DEATH_STRIKE = 0x00000010,
SPELLFAMILYFLAG_DK_DEATH_COIL = 0x00002000,
// TODO: Figure out a more accurate name for the following familyflag(s)
/// @todo: Figure out a more accurate name for the following familyflag(s)
SPELLFAMILYFLAG_SHAMAN_TOTEM_EFFECTS = 0x04000000, // Seems to be linked to most totems and some totem effects
};