AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
WDT_file Class Reference

#include "wdt.h"

Inheritance diagram for WDT_file:
FileLoader

Public Member Functions

bool prepareLoadedData () override
 
 WDT_file ()
 
 ~WDT_file ()
 
void free () override
 
- Public Member Functions inherited from FileLoader
virtual bool prepareLoadedData ()
 
uint8GetData ()
 
uint32 GetDataSize ()
 
 FileLoader ()
 
 ~FileLoader ()
 
bool loadFile (std::string const &filename, bool log=true)
 
virtual void free ()
 
virtual bool prepareLoadedData ()
 
uint8GetData ()
 
uint32 GetDataSize ()
 
 FileLoader ()
 
 ~FileLoader ()
 
bool loadFile (std::string const &filename, bool log=true)
 
virtual void free ()
 

Public Attributes

wdt_MPHDmphd
 
wdt_MAINmain
 
- Public Attributes inherited from FileLoader
file_MVERversion
 

Detailed Description

Constructor & Destructor Documentation

◆ WDT_file()

WDT_file::WDT_file ( )
40{
41 mphd = nullptr;
42 main = nullptr;
43}
wdt_MPHD * mphd
Definition: wdt.h:76
wdt_MAIN * main
Definition: wdt.h:77

References main, and mphd.

◆ ~WDT_file()

WDT_file::~WDT_file ( )
46{
47 free();
48}
void free() override
Definition: wdt.cpp:50

References free().

Member Function Documentation

◆ free()

void WDT_file::free ( )
overridevirtual

Reimplemented from FileLoader.

51{
52 mphd = nullptr;
53 main = nullptr;
55}
virtual void free()
Definition: loadlib.cpp:76

References FileLoader::free(), main, and mphd.

Referenced by ~WDT_file().

◆ prepareLoadedData()

bool WDT_file::prepareLoadedData ( )
overridevirtual

Reimplemented from FileLoader.

58{
59 // Check parent
61 return false;
62
63 mphd = (wdt_MPHD*)((uint8*)version + version->size + 8);
64 if (!mphd->prepareLoadedData())
65 return false;
66 main = (wdt_MAIN*)((uint8*)mphd + mphd->size + 8);
67 if (!main->prepareLoadedData())
68 return false;
69 return true;
70}
std::uint8_t uint8
Definition: Define.h:110
uint32 size
Definition: loadlib.h:43
file_MVER * version
Definition: loadlib.h:56
virtual bool prepareLoadedData()
Definition: loadlib.cpp:65
Definition: wdt.h:28
uint32 size
Definition: wdt.h:35
bool prepareLoadedData()
Definition: wdt.cpp:25
Definition: wdt.h:49
bool prepareLoadedData()
Definition: wdt.cpp:32

References main, mphd, FileLoader::prepareLoadedData(), wdt_MPHD::prepareLoadedData(), wdt_MAIN::prepareLoadedData(), file_MVER::size, wdt_MPHD::size, and FileLoader::version.

Member Data Documentation

◆ main

wdt_MAIN* WDT_file::main

◆ mphd

wdt_MPHD* WDT_file::mphd

Referenced by free(), prepareLoadedData(), and WDT_file().