DB/Quest: Restrict both A Druid's Form quests to druids

Offen Anfängerfreundlich
#32,188 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 6 Tagen

@kolyanok arbeitet bereits daran.

Seit 04.12.2026.

  • #32206 von @kolyanok — offen

Bewertung

Schwierigkeit
2/5
Geschätzter Aufwand
1-3 Stunden
Anfängerfreundlichkeit
76/100
Issue-Typ
Bug
Klarheit
Klar beschrieben
Aktivitätsstatus
Aktiv
Tech-Stack
cpp, mysql, sql
Bereich
databases, game-dev

Rechercherichtung

Beginne mit der SQL-Korrektur im Issue und untersuche das Schema von quest_template_addon sowie die vorhandenen Zeilen für die Quest-IDs 59350 und 59951. Führe die Anweisung in einer lokalen Datenbank aus und überprüfe, dass bei beiden Quests AllowableClasses auf 1024 gesetzt ist und die übrigen Add-on-Felder erhalten bleiben. Fertig, wenn für beide Quests nur Druiden die Klassenbeschränkung erfüllen.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

Branch-master

A hunter can see Ralia Dreamchaser's A Druid's Form (59350) at the Exile's Reach camp. The quest has no quest_template_addon row, so AllowableClasses defaults to 0 and the server accepts every class. The Horde counterpart, 59951, has the same missing restriction.

Both quest templates explicitly refer to “your druidic studies” and learning the stag form, and both use reward spell 321047. The installed client DB2 independently confirms that 321047 has effect 36 (SPELL_EFFECT_LEARN_SPELL) with EffectTriggerSpell=783, Travel Form; spell 783 has SpellClassSet=7, which the core defines as SPELLFAMILY_DRUID. This supports restricting both quests to druids without inferring an unobserved prerequisite. The existing Alliance relations are Ralia Dreamchaser 156932 as starter and Ralia Dreamchaser 164907 as ender. No Horde relation or race prerequisite is added by this fix.

fix.sql sets AllowableClasses=1024 for exactly 59350 and 59951. In the core, CLASS_DRUID=11 and Unit::GetClassMask() returns 1 << (GetClass()-1), so 1024 is the druid mask. Player::SatisfyQuestClass() uses that mask in the normal quest visibility and acceptance paths. No C++ change or quest scenario implementation is needed for this restriction.

Only AllowableClasses is updated. Existing addon fields, including prerequisites, remain intact. When an addon row is absent, the other columns receive their existing schema defaults. The fix does not alter AllowableRaces, questgivers, rewards, objectives, phasing, or the quest sequence.

Evidence includes the audited quest templates, missing addon rows, existing giver relations, related camp class restrictions, and the exact core class-gate source references. Ten available Retail captures were checked with a fully consuming quest decoder; none contains a query/details/list record for these two quests. QUERY_QUEST_INFO_RESPONSE does not carry server-side AllowableClasses or PrevQuestID, so no packet-derived prerequisite or exact class mask is claimed.

Validation: repeat SQL application and preservation of existing prerequisites/addon fields are checked in an isolated relational fixture. The actual Player::SatisfyQuestClass() function was extracted from the core and compiled in a harness: both quest masks allow only class 11 across classes 1–13, including rejection of hunters. A fresh pristine TDB 1210.26091 plus 104 master updates in MySQL 8.0.46 confirmed the missing rows and passed independent application, repeat and preservation checks. The two masks are deployed locally; client hunter/druid UI verification after that update has not been observed.

Selected non-player DB2 rows are attached as client-reward-db2.txt; the dump contains no character or account data.

Branch: master; base 2ce3ec2216f642850f1aa6c9a7a93c99f07666e9. Affected quests: 59350, 59951.

Sanitized source evidence · MySQL application/reapplication/preservation results.

SQL fix

-- A Druid's Form (Alliance 59350 / Horde 59951) must be druid-only.
-- CLASS_DRUID=11, so its class mask is 1 << (11-1) = 1024.
-- Update only the class restriction; preserve existing prerequisites and all
-- other addon fields. Missing rows receive the schema defaults for those fields.
INSERT INTO `quest_template_addon` (`ID`, `AllowableClasses`) VALUES
(59350, 1024),
(59951, 1024)
ON DUPLICATE KEY UPDATE `AllowableClasses`=1024;

Validation platform: Linux aarch64, MySQL8.0.46; local gameplay client macOS arm64.

Vorherrschende Sprache
C++
Sterne
10.9k
Forks
6.5k
Ø Merge
9 T. 12 Std.
Gemergte PRs (30 T.)
7

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus TrinityCore/TrinityCore

Alle Issues in TrinityCore/TrinityCore

Ähnliche Issues

Weitere Issues zu C++

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.