Skip to content

Commit fd7759d

Browse files
committed
[Fix] LFGDungeons.dbc field types and index
LfgDungeonsEntryfmt started with 'i' instead of the index marker 'n', so DBCFileLoader::GetFormatRecordSize never sets index_pos and the store is keyed by row instead of by dungeon ID. Row index equals ID for 0 of 240 records, and 83 IDs are >= 240 and unreachable; every sLfgDungeonsStore.LookupEntry(id) call returns the wrong record or NULL. Separately, mapID was typed float, so DBCFileLoader::getFloat reinterpret-casts the raw int bytes and map 43 reads back as the denormal 6.02558e-44; every consumer's (uint32) cast collapses to 0, sending every LFD teleport to Eastern Kingdoms. Adopt TC's verified format string "nsiiiiiiiiixxixixiiii", change mapID to int32 (name kept to avoid touching the 3 consumer casts), drop the four dead fields (faction, textureFilename, order_index, description_lang -- zero readers anywhere in tree), and name the trailing four columns Random_ID/Count_tank/Count_healer/Count_damage to match server-four's names for the same DBC columns. Entry() preserved verbatim. Verified all 13 LfgDungeonsEntry consumer sites across LFGMgr.cpp, LFGMgrProposal.cpp, LFGMgrQueue.cpp reference only fields retained by this change (ID, minLevel, maxLevel, expansionLevel, difficulty, typeID, flags, mapID, group_id, Entry()). MapID == -1 handling (49 rows) is a separate, later concern -- not addressed here.
1 parent 6220de7 commit fd7759d

2 files changed

Lines changed: 7 additions & 11 deletions

File tree

src/game/Server/DBCStructure.h

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1289,26 +1289,22 @@ struct ItemSetEntry
12891289
struct LfgDungeonsEntry
12901290
{
12911291
uint32 ID;
1292-
DBCString Name;
1292+
DBCString Name;
12931293
uint32 minLevel;
12941294
uint32 maxLevel;
12951295
uint32 target_level;
12961296
uint32 target_level_min;
12971297
uint32 target_level_max;
1298-
float mapID;
1298+
int32 mapID;
12991299
uint32 difficulty;
13001300
uint32 flags;
13011301
uint32 typeID;
1302-
float faction;
1303-
DBCString textureFilename;
13041302
uint32 expansionLevel;
1305-
DBCString order_index;
13061303
uint32 group_id;
1307-
DBCString description_lang;
1308-
uint32 col17;
1309-
uint32 col18;
1310-
uint32 col19;
1311-
uint32 col20;
1304+
uint32 Random_ID;
1305+
uint32 Count_tank;
1306+
uint32 Count_healer;
1307+
uint32 Count_damage;
13121308

13131309
uint32 Entry() const { return ID + ((uint8)typeID << 24); }
13141310
};

src/game/Server/DBCfmt.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ const char ItemRandomPropertiesfmt[]="nxiiiiis";
9393
const char ItemRandomSuffixfmt[]="nsxiiiiiiiiii";
9494
const char ItemReforgefmt[]="nifif";
9595
const char ItemSetEntryfmt[]="dsxxxxxxxxxxxxxxxxxiiiiiiiiiiiiiiiiii";
96-
const char LfgDungeonsEntryfmt[] = "isiiiiifiiifsisisiiii";
96+
const char LfgDungeonsEntryfmt[] = "nsiiiiiiiiixxixixiiii";
9797
const char LiquidTypefmt[] = "nxxixixxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
9898
const char LockEntryfmt[] = "niiiiiiiiiiiiiiiiiiiiiiiixxxxxxxx";
9999
const char MailTemplateEntryfmt[]="nxs";

0 commit comments

Comments
 (0)