From 553799ada0e5bed119602c84e8e49f68e655cc78 Mon Sep 17 00:00:00 2001 From: FlagFlayer <76889547+FlagFlayer@users.noreply.github.com> Date: Tue, 24 Sep 2024 22:10:58 +0300 Subject: [PATCH 1/2] Correct conditions for Draconic for Dummies books for The Only Prescription (#2778) --- sql/migrations/20240924095236_world.sql | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 sql/migrations/20240924095236_world.sql diff --git a/sql/migrations/20240924095236_world.sql b/sql/migrations/20240924095236_world.sql new file mode 100644 index 00000000000..06e014ccdae --- /dev/null +++ b/sql/migrations/20240924095236_world.sql @@ -0,0 +1,22 @@ +DROP PROCEDURE IF EXISTS add_migration; +DELIMITER ?? +CREATE PROCEDURE `add_migration`() +BEGIN +DECLARE v INT DEFAULT 1; +SET v = (SELECT COUNT(*) FROM `migrations` WHERE `id`='20240924095236'); +IF v = 0 THEN +INSERT INTO `migrations` VALUES ('20240924095236'); +-- Add your query below. + +-- Correct condition for Chapter V gossip menu +UPDATE `gossip_menu_option` SET `condition_id` = 150 WHERE `menu_id` = 6669; + +-- Correct condition for Chapter VII gossip menu +UPDATE `gossip_menu_option` SET `condition_id` = 151 WHERE `menu_id` = 6668; + +-- End of migration. +END IF; +END?? +DELIMITER ; +CALL add_migration(); +DROP PROCEDURE IF EXISTS add_migration; From d4cd0b6517669c9381264b7c8e0cedc2d272181c Mon Sep 17 00:00:00 2001 From: Riley <32427668+R-Y-M-R@users.noreply.github.com> Date: Tue, 24 Sep 2024 20:34:01 -0400 Subject: [PATCH 2/2] Translate various comments from French to English (#2775) --- src/game/AI/GenericSpellAI.cpp | 46 +++++++++++++++++----------------- src/game/Maps/InstanceData.h | 2 +- src/game/Objects/Player.cpp | 8 +++--- src/game/Objects/Unit.cpp | 8 +++--- src/game/ScriptMgr.h | 2 +- src/game/World.cpp | 2 +- 6 files changed, 34 insertions(+), 34 deletions(-) diff --git a/src/game/AI/GenericSpellAI.cpp b/src/game/AI/GenericSpellAI.cpp index 6191e5c66e5..0eb9ebaed44 100644 --- a/src/game/AI/GenericSpellAI.cpp +++ b/src/game/AI/GenericSpellAI.cpp @@ -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; @@ -47,7 +47,7 @@ struct GenericAISpell uint32 timer; - // Variables en interne. + // Internal variables. float minRange; float maxRange; uint32 healValue; @@ -79,7 +79,7 @@ struct GenericSpellMob : public ScriptedAI std::vector 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; @@ -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; @@ -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; @@ -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]) @@ -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); } } @@ -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; @@ -470,7 +470,7 @@ 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; @@ -478,7 +478,7 @@ void LoadSpellCacheData(GenericAISpell* spellToModify, SpellEntry const* spellIn spellToModify->minCD = spellInfos->CategoryRecoveryTime; spellToModify->maxCD = spellInfos->CategoryRecoveryTime; } - // Autres modifs : + // Other changes : for (uint8 i = 0; i < 3; ++i) { switch (spellInfos->Effect[i]) @@ -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 diff --git a/src/game/Maps/InstanceData.h b/src/game/Maps/InstanceData.h index cf74d2b8199..5a2857ba6cd 100644 --- a/src/game/Maps/InstanceData.h +++ b/src/game/Maps/InstanceData.h @@ -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 ""; } diff --git a/src/game/Objects/Player.cpp b/src/game/Objects/Player.cpp index 5124cb3773e..3b365ca9156 100644 --- a/src/game/Objects/Player.cpp +++ b/src/game/Objects/Player.cpp @@ -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; @@ -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); } @@ -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); } diff --git a/src/game/Objects/Unit.cpp b/src/game/Objects/Unit.cpp index c3e2146fcd9..4aca302a7bb 100644 --- a/src/game/Objects/Unit.cpp +++ b/src/game/Objects/Unit.cpp @@ -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); @@ -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)) { diff --git a/src/game/ScriptMgr.h b/src/game/ScriptMgr.h index 1a80eb35d18..007594438d7 100644 --- a/src/game/ScriptMgr.h +++ b/src/game/ScriptMgr.h @@ -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 m_referencedCreatureGuids; std::set m_referencedGameObjectGuids; diff --git a/src/game/World.cpp b/src/game/World.cpp index 0669754f90f..28169c4a2b7 100644 --- a/src/game/World.cpp +++ b/src/game/World.cpp @@ -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();