diff --git a/src/game/Spells/SpellAuras.cpp b/src/game/Spells/SpellAuras.cpp index 8c529f1ac39..1171f28f609 100644 --- a/src/game/Spells/SpellAuras.cpp +++ b/src/game/Spells/SpellAuras.cpp @@ -262,7 +262,7 @@ Aura::Aura(SpellEntry const* spellproto, SpellEffectIndex eff, int32 *currentBas m_spellmod(nullptr), m_periodicTimer(0), m_periodicTick(0), m_removeMode(AURA_REMOVE_BY_DEFAULT), m_effIndex(eff), m_positive(false), m_isPeriodic(false), m_isAreaAura(false), m_isPersistent(false), m_in_use(0), m_spellAuraHolder(holder), -// NOSTALRIUS: auras exclusifs +// NOSTALRIUS: Exclusive auras m_applied(false) { MANGOS_ASSERT(target); @@ -331,7 +331,7 @@ void Aura::Refresh(Unit* caster, Unit* target, SpellAuraHolder* pRefreshWithHold case SPELL_AURA_MOD_STAT: case SPELL_AURA_MOD_PERCENT_STAT: case SPELL_AURA_MOD_INCREASE_HEALTH: - case SPELL_AURA_MOD_INCREASE_HEALTH_PERCENT: // Exemple : 27038 + case SPELL_AURA_MOD_INCREASE_HEALTH_PERCENT: // Example: 27038 lockStats = true; break; } @@ -378,12 +378,12 @@ bool SpellAuraHolder::CanBeRefreshedBy(SpellAuraHolder* other) const return false; if (other->GetCasterGuid() != GetCasterGuid()) return false; - // Meme ID/Effet de sort + // Must be the same Spell Effect ID if (other->GetId() != GetId()) return false; - if (m_spellProto->StackAmount) // Se stack + if (m_spellProto->StackAmount) // Has stacks return false; - if (m_spellProto->procCharges) // Ou a des charges (fix bug visuel) + if (m_spellProto->procCharges) // Or has charges (fixes a visual bug) return false; return true; } @@ -908,14 +908,14 @@ void PersistentAreaAura::Update(uint32 diff) void Aura::ApplyModifier(bool apply, bool Real, bool skipCheckExclusive) { - // Dans Unit::RemoveAura, ApplyModifier est toujours appelle. + // ApplyModifier is always called from Unit::RemoveAura if (IsApplied() == apply) return; AuraType aura = m_modifier.m_auraname; GetHolder()->SetInUse(true); SetInUse(true); - // NOSTALRIUS: Auras exclusifs. + // NOSTALRIUS: Exclusive auras. if (apply && !skipCheckExclusive && IsExclusive() && !ExclusiveAuraCanApply()) { GetHolder()->SetInUse(false); @@ -952,6 +952,7 @@ bool Aura::CanProcFrom(SpellEntry const* spell, uint32 EventProcEx, uint32 procE uint64 mask = sSpellMgr.GetSpellAffectMask(GetId(), GetEffIndex()); // Nostalrius: c'est la moindre des choses d'utiliser un peu 'spell_proc_event' non ? + // [Google translated] Nostalrius: it's the least we can do to use 'spell_proc_event' a little bit, right? if (!mask) if (SpellProcEventEntry const* entry = sSpellMgr.GetSpellProcEvent(GetId())) mask = entry->spellFamilyMask[GetEffIndex()]; @@ -1461,7 +1462,9 @@ void Aura::TriggerSpell() break; case 8892: // Goblin Rocket Boots case 13141: // Gnomish Rocket Boots - // 20 ticks, et une chance sur 5 d'exploser. + // FIXME: Confirm that the chance for rocket boots to explode in retail is actually meant to be 1% per-tick or 1/5 overall + // Given 20 ticks (the effect lasts for 20 seconds), this formula approximates a 1/5 chance (actually ~18.209%) that the boots will explode at some point + // 20 * 5 - 1 = 99 therefore 1% chance per-tick if (urand(0, 20 * 5 - 1) != 0) return; break; @@ -2075,18 +2078,18 @@ void Aura::HandleAuraDummy(bool apply, bool Real) target->CastSpell(target, 28240, true, nullptr, this); return; } - case 24324: // Ivina < Nostalrius > : Hakkar + case 24324: // Ivina < Nostalrius > : Hakkar's Blood Siphon { - target->RemoveAurasDueToSpell(24321); + target->RemoveAurasDueToSpell(24321); // Poisonous Blood return; } - case 28059: // Thaddius positive charge, removing aplify effect on remove + case 28059: // Thaddius positive charge, removing amplify effect on remove { if (target->HasAura(29659)) target->RemoveAurasDueToSpell(29659); break; } - case 28084: // Thaddius negative charge, removing aplify effect on remove + case 28084: // Thaddius negative charge, removing amplify effect on remove { if (target->HasAura(29660)) target->RemoveAurasDueToSpell(29660); @@ -2988,7 +2991,7 @@ void Aura::HandleChannelDeathItem(bool apply, bool Real) Unit* caster = GetCaster(); if (!caster || caster->GetTypeId() != TYPEID_PLAYER) return; - // Demonistes : un seul fragment d'ame si on caste "Brulure de l'ombre" et "Siphon d'ame" sur une cible. + // Warlocks: Only add one soul fragment if they cast Shadowburn and Drain Soul on a single target if (spellInfo->SpellFamilyName == SPELLFAMILY_WARLOCK) if (victim->HasAuraTypeByCaster(SPELL_AURA_CHANNEL_DEATH_ITEM, caster->GetObjectGuid())) return; @@ -3387,7 +3390,7 @@ void Aura::HandleModCharm(bool apply, bool Real) if (!target) return; - // not charm yourself + // Can't charm yourself if (GetCasterGuid() == target->GetObjectGuid()) return; @@ -4268,7 +4271,7 @@ void Aura::HandleModMechanicImmunityMask(bool apply, bool /*Real*/) // check implemented in Unit::IsImmuneToSpell and Unit::IsImmuneToSpellEffect } -//this method is called whenever we add / remove aura which gives m_target some imunity to some spell effect +// this method is called whenever we add / remove aura which gives m_target some immunity to some spell effect void Aura::HandleAuraModEffectImmunity(bool apply, bool /*Real*/) { Unit* target = GetTarget(); @@ -4384,7 +4387,7 @@ void Aura::HandleAuraModDispelImmunity(bool apply, bool Real) if (!Real) return; - if (GetId() == 20594) // Forme de pierre + if (GetId() == 20594) // Stoneform { GetTarget()->ApplySpellDispelImmunity(GetSpellProto(), DISPEL_DISEASE, apply); GetTarget()->ApplySpellDispelImmunity(GetSpellProto(), DISPEL_POISON, apply); @@ -6427,9 +6430,9 @@ void Aura::PeriodicTick(SpellEntry const* sProto, AuraType auraType, uint32 data } if (target->GetPower(power) == 0) { - if (spellProto->Id == 21056) //Marque de Kazzak + if (spellProto->Id == 21056) // Mark of Kazzak { - // Explose quand y'a plus de mana a drainer + // Explodes when unable to drain mana target->CastSpell(target, 21058, true); GetHolder()->SetAuraDuration(0); } @@ -6591,7 +6594,7 @@ void Aura::PeriodicTick(SpellEntry const* sProto, AuraType auraType, uint32 data } case SPELL_AURA_MOD_REGEN: { - // Eating anim + // Eating animation if (spellProto->HasAuraInterruptFlag(AURA_INTERRUPT_STANDING_CANCELS)) target->HandleEmoteCommand(EMOTE_ONESHOT_EAT); break; @@ -6608,12 +6611,12 @@ void Aura::PeriodicTick(SpellEntry const* sProto, AuraType auraType, uint32 data if (spellProto->HasAuraInterruptFlag(AURA_INTERRUPT_STANDING_CANCELS)) { - // eating anim + // Eating animation target->HandleEmoteCommand(EMOTE_ONESHOT_EAT); } else if (GetId() == 20577) { - // cannibalize anim + // Cannibalize animation target->HandleEmoteCommand(EMOTE_STATE_CANNIBALIZE); } @@ -6911,8 +6914,7 @@ SpellAuraHolder::SpellAuraHolder(SpellEntry const* spellproto, Unit* target, Uni m_isRemovedOnShapeLost = m_casterGuid == m_target->GetObjectGuid() && m_spellProto->IsRemovedOnShapeLostSpell(); // Exceptions - // Attaques circulaires - if (m_spellProto->Id == 12292) + if (m_spellProto->Id == 12292) // Sweeping Strikes m_isRemovedOnShapeLost = false; Unit* unitCaster = caster && caster->isType(TYPEMASK_UNIT) ? (Unit*)caster : nullptr; @@ -6923,8 +6925,8 @@ SpellAuraHolder::SpellAuraHolder(SpellEntry const* spellproto, Unit* target, Uni if (m_maxDuration == -1 || (m_isPassive && (spellproto->DurationIndex == 0 || !spellproto->SpellVisual))) m_permanent = true; - // Fix de l'affichage dans le journal de combat des buffs tres cours. - // Exemple: immunite des trinket PvP. + // Fixes how very short duration buffs are displayed in the combat log + // For example: Crowd-control immunity from PvP Trinket. else if (m_maxDuration < 200) { m_duration = 300; @@ -7377,11 +7379,10 @@ void SpellAuraHolder::HandleSpellSpecificBoosts(bool apply) { case SPELLFAMILY_SHAMAN: { - // Nostalrius : Pas de marche sur l'eau + loup fantome. - if (apply && GetSpellProto()->Id == 2645) + if (apply && GetSpellProto()->Id == 2645) // Check for Ghost Wolf if (Unit* pCaster = GetCaster()) - if (Aura* aura = pCaster->GetAura(546, EFFECT_INDEX_0)) - pCaster->RemoveAura(aura); + if (Aura* aura = pCaster->GetAura(546, EFFECT_INDEX_0)) // If the shaman already has Water Walking + pCaster->RemoveAura(aura); // Remove Water Walking break; } case SPELLFAMILY_MAGE: @@ -7488,7 +7489,7 @@ SpellAuraHolder::~SpellAuraHolder() void SpellAuraHolder::Update(uint32 diff) { - // Battements de coeur : 2 fonctionnements. + // Heartbeats for 2 different cases // PvP if (_heartBeatRandValue) { @@ -8333,7 +8334,7 @@ void Aura::CalculatePeriodic(Player* modOwner, bool create) modOwner->ApplySpellMod(GetId(), SPELLMOD_ACTIVATION_TIME, m_modifier.periodictime); } - // Totem griffes de pierre + // Stoneclaw Totem if (GetSpellProto()->SpellVisual == 0 && GetSpellProto()->SpellIconID == 689) return; @@ -8360,7 +8361,7 @@ void Aura::CalculatePeriodic(Player* modOwner, bool create) } } -// Battements de coeur (chance de briser les CC) +// Heartbeats (chance to break crowd-control effects) void SpellAuraHolder::CalculateHeartBeat(Unit* caster, Unit* target) { if (_pveHeartBeatData) @@ -8371,19 +8372,20 @@ void SpellAuraHolder::CalculateHeartBeat(Unit* caster, Unit* target) _heartBeatRandValue = 0; - // Ni les sorts permanents, ni les sorts positifs ne sont affectes. - // Check si positif fait dans Aura::Aura car ici le dernier Aura ajoute n'est pas encore dans 'm_auras' + // Permanent effects and positive spells don't have resist heartbeats. + // The aura is checked for being positive in Aura::Aura rather than here since the last-added Aura is not yet in m_auras if (!m_permanent && m_maxDuration > 10000) { if (m_spellProto->HasAttribute(SPELL_ATTR_HEARTBEAT_RESIST) - // Exception pour la coiffe de controle gnome/Heaume-fusee gobelin - || m_spellProto->Id == 13181 || m_spellProto->Id == 13327) + // Resist for Gnomish Mind Control Cap/Goblin Rocket Helmet + || m_spellProto->Id == 13181 // Gnomish Mind Control Cap + || m_spellProto->Id == 13327) // Reckless Charge { - // Pour les joueurs + // Only update the random value if a player is involved if (target->GetCharmerOrOwnerPlayerOrPlayerItself()) _heartBeatRandValue = rand_norm_f() * 100.0f; } - // En PvE. Ne concerne pas certains sorts avec DR (fear geres avec dmg par exemple). + // For PvE/effects on NPCs. Doesn't affect certain spells with DR (For example: Fear being dispelled by damage). if (caster && target->GetTypeId() == TYPEID_UNIT && m_spellProto->IsPvEHeartBeat()) { _pveHeartBeatData = new HeartBeatData; @@ -8416,10 +8418,11 @@ void Aura::HandleAuraAuraSpell(bool apply, bool real) } -// Auras exclusifs +// Exclusive Auras /* -Sorts d'exemple: -11364 (+50), 21849 (+15) +Example spells: +Resistance (ID 11364) (+50) +Gift of the Wild (ID 21849) (+15) */ bool _IsExclusiveSpellAura(SpellEntry const* spellproto, SpellEffectIndex eff, AuraType auraname) @@ -8430,70 +8433,69 @@ bool _IsExclusiveSpellAura(SpellEntry const* spellproto, SpellEffectIndex eff, A if (spellproto->Effect[eff] == SPELL_EFFECT_APPLY_AREA_AURA_RAID) return false; - // Exceptions - se stack avec tout. + // Exceptions - These stack with everything. switch (spellproto->Id) { - // Terres foudroyees et Zanza - case 10693: - case 10691: // +25 esprit - case 10668: - case 10671: // +25 endu - case 10667: - case 10670: // +25 force - case 10669: - case 10672: // +25 agi - case 10692: - case 10690: // +25 intel - case 24382: // Buff zanza - // Alcools - case 25804: - case 20875: - case 25722: - case 25037: - case 22789: - case 22790: - case 6114: - case 5020: - case 5021: - case 23179: //le proc de l'�p�e de Razorgore (+300 force) devrait se cumuler avec TOUT : ID 23179 - case 20007: //le proc Crois� devrait se cumuler avec TOUT : ID 20007 - case 20572: //Le racial Orc (ID 20572) - case 17038: //l'Eau des Tombe-Hiver (ID 17038) - case 16329: //le Juju's Might (ID 16329) - case 25891: //le buff du Bijou Choc de Terre (ID : 25891) - case 18264: // Charge du maitre (baton epique scholo) - case 12022: // Chapeau pirate - case 22817: // PA HT Nord - // Aura de precision (hunt) - case 19506: - case 20905: - case 20906: - case 18262: // Pierre � Aiguiser El�mentaire (+2% crit) - case 24932: // chef de la Meute - case 24907: // aura S�l�nien - case 22888: // Buff Onyxia - case 15366: // Buff Felwood - case 22820: // HT +3% crit sorts + // Blasted lands item buffs + case 10693: // Spiritual Domination + case 10691: // Spiritual Domination + case 10668: // Spirit of Boar + case 10671: // Spirit of Boar + case 10667: // Rage of Ages + case 10670: // Rage of Ages + case 10669: // Strike of the Scorpok + case 10672: // Strike of the Scorpok + case 10692: // Infallible Mind + case 10690: // Infallible Mind + case 24382: // Spirit of Zanza + // Alcohols + case 25804: // Rumsey Rum Black Label + case 20875: // Rumsey Rum + case 25722: // Rumsey Rum Dark + case 25037: // Rumsey Rum Light + case 22789: // Gordok Green Grog + case 22790: // Kreeg's Stout Beatdown + case 6114: // Raptor Punch + case 5020: // Stormstout + case 5021: // Trog Ale + case 23179: // Taint of Shadow + case 20007: // Holy Strength + case 20572: // Blood Fury + case 17038: // Winterfall Firewater + case 16329: // Juju Might + case 25891: // Earthstrike + case 18264: // Headmaster's Charge + case 12022: // Admiral's Hat + case 22817: // Fengus' Ferocity + case 19506: // Trueshot Aura + case 20905: // Trueshot Aura + case 20906: // Trueshot Aura + case 18262: // Call Bloodshot + case 24932: // Leader of the Pack + case 24907: // Moonkin Aura + case 22888: // Rallying Cry of the Dragonslayer + case 15366: // Songflower Serenade + case 22820: // Slip'kik's Savvy case 17628: // Supreme Power - case 22730: // Bouffe +10 Intell - case 18141: // Bouffe +10 Esprit - case 18125: // Bouffe +10 Force - case 18192: // Bouffe +10 Agility - case 18191: // Bouffe +10 Endu - case 25661: // Bouffe +25 Endu - case 24427: // Diamond Flask - case 17528: // Mighty Rage Potion + case 22730: // Increased Intellect + case 18141: // Blessed Sunfruit Juice + case 18125: // Blessed Sunfruit + case 18192: // Increased Agility + case 18191: // Increased Stamina + case 25661: // Increased Stamina + case 24427: // Toasty + case 17528: // Mighty Rage case 23697: // Alterac Spring Water // Love is in the Air buffs - case 27664: - case 27665: - case 27666: - case 27669: - case 27670: - case 27671: + case 27664: // Stormwind Gift of Friendship + case 27665: // Ironforge Gift of Friendship + case 27666: // Darnassus Gift of Friendship + case 27669: // Orgrimmar Gift of Friendship + case 27670: // Thunder Bluff Gift of Friendship + case 27671: // Undercity Gift of Friendship return false; - case 17538: // Le +crit du buff de l'Elixir de la Mangouste 17538, devrait se stack avec TOUT. + case 17538: // Elixir of the Mongoose, should stack with EVERYTHING return (eff == EFFECT_INDEX_0); } switch (spellproto->SpellFamilyName) @@ -8533,7 +8535,7 @@ bool _IsExclusiveSpellAura(SpellEntry const* spellproto, SpellEffectIndex eff, A break; } - // La bouffe + // Food if (spellproto->AttributesEx2 & SPELL_ATTR_EX2_RETAIN_ITEM_CAST) return false; @@ -8559,7 +8561,7 @@ bool _IsExclusiveSpellAura(SpellEntry const* spellproto, SpellEffectIndex eff, A if (spellproto->SpellFamilyName == SPELLFAMILY_MAGE) return false; return true; - case SPELL_AURA_MOD_RESISTANCE_EXCLUSIVE: // A gere autrement (exlusif par rapport a la resistance) + case SPELL_AURA_MOD_RESISTANCE_EXCLUSIVE: // Special case for Resistance return false; case SPELL_AURA_MOD_HEALING_PCT: // Mortal Strike / Wound Poison / Aimed Shot / Furious Attacks // Healing taken debuffs @@ -8661,7 +8663,7 @@ void Aura::ExclusiveAuraUnapply() { Unit* target = GetTarget(); ASSERT(target); - // On restaure le precedent plus grand aura. + // Restore the strongest aura that was previously applied if (Aura* mostImportant = target->GetMostImportantAuraAfter(this, this)) { if (mostImportant->IsInUse())