WDB: Difference between revisions

From wowdev
Jump to navigation Jump to search
m (→‎Header: Uhh, headers are 20 bytes again so there must have been some point where it switched back.)
(15 intermediate revisions by one other user not shown)
Line 1: Line 1:
The WDB files are found inside the WDB folder. The client caches data it receives from the server. This is mainly done to reduce network traffic.
The WDB files are found inside the WDB folder. The client caches data it receives from the server. This is mainly done to reduce network traffic.


It appears that the WDB caches aren't always saved to disk with certain caches only being retained in memory.
Not all WDB caches are saved to disk. This is defined in the client by the <tt>DBCache</tt>'s constructor which contains a persistent parameter.


== Header ==
== Header ==
Line 8: Line 8:
*WDB files >=1.6: Header length is 20 bytes (Verified till 1.9.4)
*WDB files >=1.6: Header length is 20 bytes (Verified till 1.9.4)
*WDB files >=3.0.8-9506: Header length is 24 bytes  
*WDB files >=3.0.8-9506: Header length is 24 bytes  
*WDB files ??? (Legion and up at the very least): Header length is 20 bytes


  '''Offset Type Description'''
  '''Offset Type Description'''
Line 21: Line 22:
  1 Signature String 4-byte string identifying the file (reversed!)  
  1 Signature String 4-byte string identifying the file (reversed!)  
  2 Client Version Integer 4-byte integer identifying the client version  
  2 Client Version Integer 4-byte integer identifying the client version  
  3 Language String 4-byte string identifying the language (reversed!)  
  3 Language String 4-byte string identifying the language (reversed!) {{Template:Sandbox/VersionRange|min_expansionlevel=1|min_build=1.6.0}}
  4 Row Length Integer Something to do with row length, there is no consistent way of retrieving it as of yet.  
  4 Record Size Integer Something to do with row length, there is no consistent way of retrieving it as of yet.
  5 Cache Version Integer This appears to be manually updated except for WoWCache which is read from warden
                                        In Alpha this is row length with strings treated as 4 bytes.
  6 Unknown2 Integer 4-bytes
  5 Record Version Integer A manually updated versioning field - except for WoWCache.wdb which is read from <code>WardenCachedModule::Version</code>
                                        As of 'Cache Version' this is only validated by the client for WoWCache.wdb
  6 Cache Version Integer 4-bytes A packet based versioning field set via SMSG_CLIENTCACHE_VERSION {{Template:Sandbox/VersionRange|min_expansionlevel=3|min_build=3.0.8}}


== WDB files ==
== WDB files ==


  '''File Signature'''  
  '''File Signature'''  
  [[CreatureCache.wdb]] WMOB  
[[ArenaTeamCache.wdb]]        WATM      {{Template:Sandbox/VersionRange|min_expansionlevel=3|max_expansionlevel=4}}
  [[GameObjectCache.wdb]] WGOB  
[[BattlePetNameCache.wdb]]    WBPN      {{Template:Unverified|{{Template:Sandbox/VersionRange|min_expansionlevel=5|max_expansionlevel=6}} Not seen > 6.2.4}}
  [[QuestCache.wdb]] WQST
  [[CreatureCache.wdb]]         WMOB  
  [[ItemCache.wdb]] WIDB      {{Template:Sandbox/VersionRange|max_expansionlevel=3}}
[[DanceCache.wdb]]            WDAN      {{Template:Sandbox/VersionRange|min_expansionlevel=3|max_expansionlevel=4}}
  [[ItemNameCache.wdb]] WNDB      {{Template:Sandbox/VersionRange|max_expansionlevel=3}}
  [[GameObjectCache.wdb]]       WGOB  
  [[ItemTextCache.wdb]] WITX  
  [[GuildStatsCache.wdb]]       WGLD
  [[NPCCache.wdb]] WNPC
  [[ItemCache.wdb]]             WIDB      {{Template:Sandbox/VersionRange|max_expansionlevel=3}}
  [[PageTextCache.wdb]] WPTX
  [[ItemNameCache.wdb]]         WNDB      {{Template:Sandbox/VersionRange|max_expansionlevel=3}}
  [[WOWCache.wdb]] WRDN
  [[ItemTextCache.wdb]]         WITX  
  [[ArenaTeamCache.wdb]]                  {{Template:Unverified|{{Template:Sandbox/PrettyVersion|expansionlevel=3}} Not found in 6.0.1}}
  [[NameCache.wdb]]             WNAM
[[GuildStatsCache.wdb]]
  [[NPCCache.wdb]]               WNPC
  [[PetitionCache.wdb]]
  [[PageTextCache.wdb]]         WPTX
  [[PetNameCache.wdb]]
  [[PetitionCache.wdb]]         WPTN
  [[RealmCache.wdb]]                       {{Template:Unverified|{{Template:Sandbox/VersionRange|min_expansionlevel=6|min_build=6.0.1.18179}} Only checked in 6.0.1}}
  [[PetNameCache.wdb]]           WPNM
  [[QuestCache.wdb]]             WQST
  [[RealmCache.wdb]]             WRLM      {{Template:Unverified|{{Template:Sandbox/VersionRange|min_expansionlevel=5|max_expansionlevel=6|max_build=6.0.1.18179}} Not seen ≥ 6.2.3}}
[[WOWCache.wdb]]              WRDN
[[Category:Format]]
[[Category:Format]]

Revision as of 04:59, 6 August 2018

The WDB files are found inside the WDB folder. The client caches data it receives from the server. This is mainly done to reduce network traffic.

Not all WDB caches are saved to disk. This is defined in the client by the DBCache's constructor which contains a persistent parameter.

Header

  • WDB files < 1.6: Header length is 16 bytes
  • WDB files >=1.6: Header length is 20 bytes (Verified till 1.9.4)
  • WDB files >=3.0.8-9506: Header length is 24 bytes
  • WDB files ??? (Legion and up at the very least): Header length is 20 bytes
Offset 	Type 		Description
0x00 	char[4] 	Identifier, depends on the WDB file, will be explained later
0x04 	uint32 		Client Version - Version of the client (lo -> hi encoding)
0x08 	char[4] 	Client Local - The Locale of the client
0x0C 	 ???? 		4 bytes unknown
0x10 	 ???? 		4 bytes unknown
0x15 	 ???? 		4 bytes unknown (Beginning with version 1.6 and later)
0x18 	 ???? 		4 bytes unknown (Beginning with version 3.0.8-9506 )
Column	Field 		Type 		Notes 
1 	Signature 	String 		4-byte string identifying the file (reversed!) 
2 	Client Version 	Integer 	4-byte integer identifying the client version 
3 	Language 	String 		4-byte string identifying the language (reversed!) ≥ Vanilla (1.6.0)
4 	Record Size 	Integer 	Something to do with row length, there is no consistent way of retrieving it as of yet.
                                        In Alpha this is row length with strings treated as 4 bytes.
5 	Record Version 	Integer 	A manually updated versioning field - except for WoWCache.wdb which is read from WardenCachedModule::Version
                                        As of 'Cache Version' this is only validated by the client for WoWCache.wdb
6 	Cache Version 	Integer 	4-bytes A packet based versioning field set via SMSG_CLIENTCACHE_VERSION ≥ Wrath (3.0.8)

WDB files

File 			Signature 
ArenaTeamCache.wdb         WATM       Wrath … Cata
BattlePetNameCache.wdb     WBPN       Mists … WoD Not seen > 6.2.4
CreatureCache.wdb          WMOB 
DanceCache.wdb             WDAN       Wrath … Cata
GameObjectCache.wdb        WGOB 
GuildStatsCache.wdb        WGLD
ItemCache.wdb              WIDB       ≤ Wrath
ItemNameCache.wdb          WNDB       ≤ Wrath
ItemTextCache.wdb          WITX 
NameCache.wdb              WNAM
NPCCache.wdb               WNPC 
PageTextCache.wdb          WPTX 
PetitionCache.wdb          WPTN
PetNameCache.wdb           WPNM
QuestCache.wdb             WQST 
RealmCache.wdb             WRLM       Mists … WoD (6.0.1.18179) Not seen ≥ 6.2.3
WOWCache.wdb               WRDN