Skip to content

Commit

Permalink
Translate various comments from French to English (#2775)
Browse files Browse the repository at this point in the history
  • Loading branch information
R-Y-M-R authored Sep 25, 2024
1 parent 553799a commit d4cd0b6
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 34 deletions.
46 changes: 23 additions & 23 deletions src/game/AI/GenericSpellAI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ enum
SPELL_FLAG_STOP_ATTACK_TARGET = 0x008,
};

// Generic pour spells simples
// Generic for single spells
struct GenericAISpell
{
uint32 spellId;

uint32 minCD;
uint32 maxCD; /* Ou 0 si pas repetable.*/
uint32 maxCD; /* Or 0 if not repeatable.*/

uint32 initialMinCD;
uint32 initialMaxCD;
Expand All @@ -47,7 +47,7 @@ struct GenericAISpell

uint32 timer;

// Variables en interne.
// Internal variables.
float minRange;
float maxRange;
uint32 healValue;
Expand Down Expand Up @@ -79,7 +79,7 @@ struct GenericSpellMob : public ScriptedAI

std::vector<GenericAISpell> m_uiSpells;

// Si 'true', le mob attaquera a distance tant qu'il aura du mana.
// If 'true', the mob will attack from a distance as long as it has mana.
bool isDistanceCaster;
uint32 casterGCD;

Expand Down Expand Up @@ -167,7 +167,7 @@ struct GenericSpellMob : public ScriptedAI
casterGCD = GLOBAL_CD_MS;
}
}*/
// Vu que le script ne fait que caster des sorts ...
// Since the script only casts spells...
if (m_creature->IsNonMeleeSpellCasted(false))
return;

Expand Down Expand Up @@ -226,7 +226,7 @@ struct GenericSpellMob : public ScriptedAI
{
Creature* crea = creaList.front();
creaList.pop_front();
// TODO : Chercher la creature qui correspond au dispell.
// TODO : Find the creature that matches the dispell.
target = crea;
}
break;
Expand Down Expand Up @@ -331,37 +331,37 @@ CreatureAI* GetAI_GenericSpellAI(Creature* pCreature)
ScriptedMob->Finalize();
return ScriptedMob;
}
/* Sinon, ca signifie qu'il n'y a pas de script de ce mob en particulier.
Dans ce cas, on recupere ses sorts (spell[1-4]) et on lui ajoute en fonction de comment sont scriptes ces sorts
chez d'autres mobs.
/* Otherwise, it means that there is no script for this particular mob.
In this case, we collect the mob's spells (spell[1-4]) and add them, depending on how the spells are scripted
in other mobs.
*/
#ifdef DEBUG_ON
sLog.Out(LOG_BASIC, LOG_LVL_MINIMAL, "Impossible de trouver les spells du mob %u. Va essayer de les deduire ...", pCreature->GetEntry());
#endif
bool mobFoundSpells[CREATURE_MAX_SPELLS] = {false};
CreatureInfo const* infos = pCreature->GetCreatureInfo();
// Ne pas chercher les sorts = 0
// Do not search for spells = 0
for (uint8 i = 0; i < CREATURE_MAX_SPELLS; ++i)
{
if (infos->spells[i] == 0)
mobFoundSpells[i] = true;
}
// On ajoute les sorts qu'on connait de creature_spells
// We add the spells we know from creature_spells
for (iter = GenericSpellMobData.begin(); iter != GenericSpellMobData.end(); ++iter)
{
for (uint8 i = 0; i < CREATURE_MAX_SPELLS; ++i)
{
if (!mobFoundSpells[i] // Pas deja ajoute
&& iter->spell.spellId == infos->spells[i] // Et le sort est trouve dans la DB
if (!mobFoundSpells[i] // Not added yet
&& iter->spell.spellId == infos->spells[i] // And the spell is found in the DB
)
{
ScriptedMob->AddSpell(iter->spell);
// Histoire de ne pas ajouter le meme sort 2 fois a la meme creature...
// So as not to add the same spell twice to the same creature...
mobFoundSpells[i] = true;
}
}
}
// Et finalement on essaye d'ajouter les autres
// And finally we try to add the others
for (uint8 i = 0; i < CREATURE_MAX_SPELLS; ++i)
{
if (!mobFoundSpells[i])
Expand All @@ -371,7 +371,7 @@ CreatureAI* GetAI_GenericSpellAI(Creature* pCreature)
DEFAULT_MIN_CD,
DEFAULT_MAX_CD,
DEFAULT_TARGET);
if (mySpell.spellId != 0) // Pas d'erreur
if (mySpell.spellId != 0) // No error
ScriptedMob->AddSpell(mySpell);
}
}
Expand Down Expand Up @@ -434,18 +434,18 @@ void LoadSpellCacheData(GenericAISpell* spellToModify, SpellEntry const* spellIn

if (spellToModify->target == GENERIC_TARGET_AUTO)
{
/* 1 : Sorts amicaux*/
/* 1 : Friendly spells*/
// Heal
if (spellToModify->healValue != 0)
spellToModify->target = GENERIC_TARGET_FRIEND_NEED_HEAL;
// Autres sorts positifs
// Other positive spells
else if (Spells::IsPositiveSpell(spellToModify->spellId))
spellToModify->target = GENERIC_TARGET_SELF;
/* 2 : Sorts negatifs*/
/* 2 : Negative spells*/
// Attaque a distance
else if (spellToModify->minRange >= 2.0f)
spellToModify->target = GENERIC_TARGET_HOSTILE_IN_RANGE;
// Sinon, on prend l'aggro n1
// Otherwise, we take aggro n1
else
spellToModify->target = GENERIC_TARGET_VICTIM;

Expand All @@ -470,15 +470,15 @@ void LoadSpellCacheData(GenericAISpell* spellToModify, SpellEntry const* spellIn
}
}

// Si le sort a un CD
// If the spell has a CD
if (spellInfos->CategoryRecoveryTime > 1500)
{
spellToModify->initialMinCD = 0;
spellToModify->initialMaxCD = 5000;
spellToModify->minCD = spellInfos->CategoryRecoveryTime;
spellToModify->maxCD = spellInfos->CategoryRecoveryTime;
}
// Autres modifs :
// Other changes :
for (uint8 i = 0; i < 3; ++i)
{
switch (spellInfos->Effect[i])
Expand Down Expand Up @@ -513,7 +513,7 @@ void LoadSpellCacheData(GenericAISpell* spellToModify, SpellEntry const* spellIn
// SELECT field0, field6, field7, field8, field122 FROM spells WHERE field8 & 0x200000 AND field6 & 0x50000 AND (field7 & 0x8000 OR field7=0) limit 0,50;
if (spellInfos->Attributes & 0x50000 && (spellInfos->AttributesEx & 0x8000 || spellInfos->AttributesEx == 0) && spellInfos->AttributesEx2 & 0x200000)
{
// Apres 30 a 50 sec de combat
// After 30 to 50 seconds of fighting
spellToModify->initialMinCD = 30000;
spellToModify->initialMaxCD = 50000;
// Toutes les 3 a 4 minutes ensuite
Expand Down
2 changes: 1 addition & 1 deletion src/game/Maps/InstanceData.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class InstanceData : public ZoneScript

//On load
virtual void Load(char const* /*data*/) {}
virtual void Create() {} // A la creation. Pas au chargement.
virtual void Create() {} // At creation. Not at loading.

//When save is needed, this function generates the data
virtual char const* Save() { return ""; }
Expand Down
8 changes: 4 additions & 4 deletions src/game/Objects/Player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1853,7 +1853,7 @@ void Player::SetWorldMask(uint32 newMask)
void Player::UpdateCinematic(uint32 diff)
{
m_cinematicElapsedTime += diff;
// On check une nouvelle position toutes les secondes.
// We check a new position every second.
if ((m_cinematicLastCheck + 1000) > m_cinematicElapsedTime)
return;

Expand All @@ -1867,13 +1867,13 @@ void Player::UpdateCinematic(uint32 diff)

float x_diff = (m_cinematicStartPos.x - tpPosition->x);
float y_diff = (m_cinematicStartPos.y - tpPosition->y);
// Re-tp a la position de fin de la cinematique
// Re-teleport to end of cinematic's position
if ((x_diff * x_diff) <= 20 || (y_diff * y_diff) <= 20)
{
GetCamera().ResetView();
return;
}
// Sinon on place un petit waypoint sur lequel on met notre camera, pour voir les mobs alentour
// Otherwise we place a small waypoint on which we put our camera, to see the surrounding mobs.
if (Creature* viewPoint = SummonCreature(1, tpPosition->x, tpPosition->y, tpPosition->z - 20, 0.0f, TEMPSUMMON_TIMED_DESPAWN, 5000, true))
GetCamera().SetView(viewPoint);
}
Expand All @@ -1889,7 +1889,7 @@ void Player::CinematicStart(uint32 id)
m_cinematicElapsedTime = 0;
m_currentCinematicEntry = id;

// Pour teleporter a la premiere position de la cinematique
// Teleport to the first position of the cinematic
UpdateCinematic(1);
}

Expand Down
8 changes: 4 additions & 4 deletions src/game/Objects/Unit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2019,7 +2019,7 @@ void Unit::CalculateDamageAbsorbAndResist(SpellCaster* pCaster, SpellSchoolMask
// Nostalrius : la reflection (bene de sacrifice par exemple) ne fait pas forcement des degats (si pala sous bouclier divin)
uint32 reflectAbsorb = 0;
int32 reflectResist = 0;
// On evite une boucle infinie
// We avoid an infinite loop
if (!reflectTo->HasAuraType(SPELL_AURA_SPLIT_DAMAGE_FLAT))
reflectTo->CalculateDamageAbsorbAndResist(pCaster, schoolMask, DOT, splitted, &reflectAbsorb, &reflectResist, spellProto);
splitted -= (reflectAbsorb + reflectResist);
Expand Down Expand Up @@ -2296,16 +2296,16 @@ MeleeHitOutcome Unit::RollMeleeOutcomeAgainst(Unit const* pVictim, WeaponAttackT
int32 maxskill = attackerMaxSkillValueForLevel;
skill = (skill > maxskill) ? maxskill : skill;

// (Youfie) Le +skill avant BC ne permet pas de réduire la fréquence des glancing blows une fois qu'il est égal au niveau du joueur*5
// (Youfie) The +skill before BC does not reduce the frequency of glancing blows once it is equal to the player's level*5
if (attackerWeaponSkill > maxskill)
attackerWeaponSkill = maxskill;

// (Youfie) Chance de glance en Vanilla (inchangée par le +skill au delà de maxskill, cf. au dessus) :
// (Youfie) Chance of glance in Vanilla (unchanged by +skill beyond maxskill, see above):
tmp = (10 + ((victimDefenseSkill - attackerWeaponSkill) * 2)) * 100;
tmp = tmp > 4000 ? 4000 : tmp;
if (tmp < 0)
tmp = 0;
// sLog.Out(LOG_BASIC, LOG_LVL_MINIMAL, "tmp = %i, Skill = %i, Max Skill = %i", tmp, attackerWeaponSkill, attackerMaxSkillValueForLevel); //Pour tests & débug via la console
// sLog.Out(LOG_BASIC, LOG_LVL_MINIMAL, "tmp = %i, Skill = %i, Max Skill = %i", tmp, attackerWeaponSkill, attackerMaxSkillValueForLevel); //For testing & debugging via the console

if (roll < (sum += tmp))
{
Expand Down
2 changes: 1 addition & 1 deletion src/game/ScriptMgr.h
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ class ScriptMgr

TextDataMap m_mTextDataMap; //additional data for text strings
PointMoveMap m_mPointMoveMap; //coordinates for waypoints
EscortDataMap m_mEscortDataMap; // Des donnees pour les quetes d'escorte scriptees via la DB
EscortDataMap m_mEscortDataMap; // Data for escort quests scripted via DB
std::set<uint32> m_referencedCreatureGuids;
std::set<uint32> m_referencedGameObjectGuids;

Expand Down
2 changes: 1 addition & 1 deletion src/game/World.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2064,7 +2064,7 @@ void World::Update(uint32 diff)
if (getConfig(CONFIG_UINT32_PERFLOG_SLOW_MAPSYSTEM_UPDATE) && updateMapSystemTime > getConfig(CONFIG_UINT32_PERFLOG_SLOW_MAPSYSTEM_UPDATE))
sLog.Out(LOG_PERFORMANCE, LOG_LVL_MINIMAL, "Update map system: %ums [%ums for async]", updateMapSystemTime, WorldTimer::getMSTimeDiffToNow(asyncWaitBegin));

// Sauvegarde des variables internes (table variables) : MaJ par rapport a la DB
// Save internal variables (table variables) : DB update
if (m_timers[WUPDATE_SAVE_VAR].Passed())
{
m_timers[WUPDATE_SAVE_VAR].Reset();
Expand Down

0 comments on commit d4cd0b6

Please sign in to comment.