diff --git a/scripts/vps-paragon-diagnostics.sh b/scripts/vps-paragon-diagnostics.sh index 4a8fe15..a96256d 100755 --- a/scripts/vps-paragon-diagnostics.sh +++ b/scripts/vps-paragon-diagnostics.sh @@ -239,22 +239,48 @@ if [[ -n "${FRACTURED_MYSQL:-}" ]]; then IDS_CSV=$(echo "$SPELL_IDS" | tr ' ' ',') echo "--- spell_dbc table size (world DB overrides; 0 rows = all spells from disk DBC only) ---" $FRACTURED_MYSQL acore_world -e "SELECT COUNT(*) AS spell_dbc_rows FROM spell_dbc;" 2>/dev/null || echo "(spell_dbc missing or no access)" - echo "--- chrclasses_dbc class 12 (DisplayPower: 0=mana, 5=POWER_RUNE in AC) ---" + echo "--- acore_world.version (last core revision written by worldserver) ---" + $FRACTURED_MYSQL acore_world -e "SELECT * FROM version LIMIT 5;" 2>/dev/null || echo "(version table missing?)" + + echo "--- chrclasses_dbc class 6 + 12 (DisplayPower: 0=mana, 5=POWER_RUNE in AC) ---" $FRACTURED_MYSQL acore_world -e " SELECT ID, DisplayPower, Name_Lang_enUS FROM chrclasses_dbc WHERE ID IN (6,12); " 2>/dev/null || echo "(query failed — chrclasses_dbc missing?)" - echo "--- spell_dbc sample (PowerType 5 = rune for server checks) ---" + echo "Note: If only ID=12 appears, class 6 (DK) is not overridden in DB — loaded from disk DBC (normal)." + + echo "--- spell_dbc: are sample DK spells overridden in DB? ---" + spell_sample_n=$($FRACTURED_MYSQL acore_world -N -B -e \ + "SELECT COUNT(*) FROM spell_dbc WHERE ID IN ($IDS_CSV);" 2>/dev/null || echo 0) + echo "Row count in spell_dbc for sample IDs ($SPELL_IDS): ${spell_sample_n:-0}" + if [[ "${spell_sample_n:-0}" == "0" ]]; then + echo "=> 0 means those spells use on-disk Spell.dbc only; the sample block below will be empty (not an error)." + fi + echo "--- spell_dbc sample (PowerType 5 = POWER_RUNE in AC) ---" $FRACTURED_MYSQL acore_world -e " SELECT ID, PowerType, ManaCost, RuneCostID FROM spell_dbc WHERE ID IN ($IDS_CSV); " 2>/dev/null || echo "(query failed — spell_dbc missing or wrong schema)" - echo "--- spellrunecost_dbc for RuneCostIDs from those spells ---" + echo "--- spellrunecost join for sample IDs (empty if no spell_dbc rows above) ---" $FRACTURED_MYSQL acore_world -e " -SELECT s.ID AS spell_id, s.RuneCostID, r.Blood, r.Unholy, r.Frost, r.RunicPower +SELECT s.ID AS spell_id, s.PowerType, s.RuneCostID, r.Blood, r.Unholy, r.Frost, r.RunicPower FROM spell_dbc s LEFT JOIN spellrunecost_dbc r ON r.ID = s.RuneCostID WHERE s.ID IN ($IDS_CSV); " 2>/dev/null || echo "(join failed — check spellrunecost_dbc)" - echo "Compare this block to a known-good dev DB: mismatched PowerType/RuneCostID on the same spell_id = data drift." + + echo "--- spell_dbc suspicious overrides: RuneCostID>0 but PowerType!=5 (can break rune checks) ---" + $FRACTURED_MYSQL acore_world -e " +SELECT ID, PowerType, ManaCost, RuneCostID FROM spell_dbc + WHERE RuneCostID > 0 AND PowerType <> 5 + ORDER BY ID LIMIT 40; +" 2>/dev/null || echo "(query failed)" + echo "Compare counts/IDs to dev: unexpected rows here warrant a DB diff." + + echo "--- spell_dbc POWER_RUNE (5) spells with RuneCostID (sample) ---" + $FRACTURED_MYSQL acore_world -e " +SELECT ID, PowerType, RuneCostID FROM spell_dbc + WHERE PowerType = 5 AND RuneCostID > 0 + ORDER BY ID LIMIT 15; +" 2>/dev/null || echo "(query failed)" else echo "FRACTURED_MYSQL not set — run manually (example: export FRACTURED_MYSQL='mysql -uUSER -hHOST')" echo "acore_world:"