mirror of
https://github.com/whoahq/whoa.git
synced 2026-02-01 16:22:45 +03:00
feat(db): add ItemVisualsRec
This commit is contained in:
parent
2837a808a2
commit
ed3b9ac628
@ -13,6 +13,7 @@ WowClientDB<ChrRacesRec> g_chrRacesDB;
|
|||||||
WowClientDB<CreatureDisplayInfoRec> g_creatureDisplayInfoDB;
|
WowClientDB<CreatureDisplayInfoRec> g_creatureDisplayInfoDB;
|
||||||
WowClientDB<CreatureModelDataRec> g_creatureModelDataDB;
|
WowClientDB<CreatureModelDataRec> g_creatureModelDataDB;
|
||||||
WowClientDB<ItemDisplayInfoRec> g_itemDisplayInfoDB;
|
WowClientDB<ItemDisplayInfoRec> g_itemDisplayInfoDB;
|
||||||
|
WowClientDB<ItemVisualsRec> g_itemVisualsDB;
|
||||||
WowClientDB<MapRec> g_mapDB;
|
WowClientDB<MapRec> g_mapDB;
|
||||||
|
|
||||||
void LoadDB(WowClientDB_Base* db, const char* filename, int32_t linenumber) {
|
void LoadDB(WowClientDB_Base* db, const char* filename, int32_t linenumber) {
|
||||||
@ -32,6 +33,7 @@ void StaticDBLoadAll(void (*loadFn)(WowClientDB_Base*, const char*, int32_t)) {
|
|||||||
loadFn(&g_creatureDisplayInfoDB, __FILE__, __LINE__);
|
loadFn(&g_creatureDisplayInfoDB, __FILE__, __LINE__);
|
||||||
loadFn(&g_creatureModelDataDB, __FILE__, __LINE__);
|
loadFn(&g_creatureModelDataDB, __FILE__, __LINE__);
|
||||||
loadFn(&g_itemDisplayInfoDB, __FILE__, __LINE__);
|
loadFn(&g_itemDisplayInfoDB, __FILE__, __LINE__);
|
||||||
|
loadFn(&g_itemVisualsDB, __FILE__, __LINE__);
|
||||||
loadFn(&g_mapDB, __FILE__, __LINE__);
|
loadFn(&g_mapDB, __FILE__, __LINE__);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -6,14 +6,15 @@
|
|||||||
#include "db/rec/AreaTableRec.hpp"
|
#include "db/rec/AreaTableRec.hpp"
|
||||||
#include "db/rec/Cfg_CategoriesRec.hpp"
|
#include "db/rec/Cfg_CategoriesRec.hpp"
|
||||||
#include "db/rec/Cfg_ConfigsRec.hpp"
|
#include "db/rec/Cfg_ConfigsRec.hpp"
|
||||||
#include "db/rec/CharacterFacialHairStylesRec.hpp"
|
|
||||||
#include "db/rec/CharHairGeosetsRec.hpp"
|
#include "db/rec/CharHairGeosetsRec.hpp"
|
||||||
#include "db/rec/CharSectionsRec.hpp"
|
#include "db/rec/CharSectionsRec.hpp"
|
||||||
|
#include "db/rec/CharacterFacialHairStylesRec.hpp"
|
||||||
#include "db/rec/ChrClassesRec.hpp"
|
#include "db/rec/ChrClassesRec.hpp"
|
||||||
#include "db/rec/ChrRacesRec.hpp"
|
#include "db/rec/ChrRacesRec.hpp"
|
||||||
#include "db/rec/CreatureDisplayInfoRec.hpp"
|
#include "db/rec/CreatureDisplayInfoRec.hpp"
|
||||||
#include "db/rec/CreatureModelDataRec.hpp"
|
#include "db/rec/CreatureModelDataRec.hpp"
|
||||||
#include "db/rec/ItemDisplayInfoRec.hpp"
|
#include "db/rec/ItemDisplayInfoRec.hpp"
|
||||||
|
#include "db/rec/ItemVisualsRec.hpp"
|
||||||
#include "db/rec/MapRec.hpp"
|
#include "db/rec/MapRec.hpp"
|
||||||
|
|
||||||
extern WowClientDB<AchievementRec> g_achievementDB;
|
extern WowClientDB<AchievementRec> g_achievementDB;
|
||||||
@ -28,6 +29,7 @@ extern WowClientDB<ChrRacesRec> g_chrRacesDB;
|
|||||||
extern WowClientDB<CreatureDisplayInfoRec> g_creatureDisplayInfoDB;
|
extern WowClientDB<CreatureDisplayInfoRec> g_creatureDisplayInfoDB;
|
||||||
extern WowClientDB<CreatureModelDataRec> g_creatureModelDataDB;
|
extern WowClientDB<CreatureModelDataRec> g_creatureModelDataDB;
|
||||||
extern WowClientDB<ItemDisplayInfoRec> g_itemDisplayInfoDB;
|
extern WowClientDB<ItemDisplayInfoRec> g_itemDisplayInfoDB;
|
||||||
|
extern WowClientDB<ItemVisualsRec> g_itemVisualsDB;
|
||||||
extern WowClientDB<MapRec> g_mapDB;
|
extern WowClientDB<MapRec> g_mapDB;
|
||||||
|
|
||||||
void ClientDBInitialize();
|
void ClientDBInitialize();
|
||||||
|
|||||||
43
src/db/rec/ItemVisualsRec.cpp
Normal file
43
src/db/rec/ItemVisualsRec.cpp
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
// DO NOT EDIT: generated by whoa-autocode
|
||||||
|
#include "db/rec/ItemVisualsRec.hpp"
|
||||||
|
#include "util/Locale.hpp"
|
||||||
|
#include "util/SFile.hpp"
|
||||||
|
|
||||||
|
const char* ItemVisualsRec::GetFilename() {
|
||||||
|
return "DBFilesClient\\ItemVisuals.dbc";
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32_t ItemVisualsRec::GetNumColumns() {
|
||||||
|
return 6;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32_t ItemVisualsRec::GetRowSize() {
|
||||||
|
return 24;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ItemVisualsRec::NeedIDAssigned() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t ItemVisualsRec::GetID() {
|
||||||
|
return this->m_ID;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ItemVisualsRec::SetID(int32_t id) {
|
||||||
|
this->m_ID = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ItemVisualsRec::Read(SFile* f, const char* stringBuffer) {
|
||||||
|
if (
|
||||||
|
!SFile::Read(f, &this->m_ID, sizeof(this->m_ID), nullptr, nullptr, nullptr)
|
||||||
|
|| !SFile::Read(f, &this->m_slot[0], sizeof(m_slot[0]), nullptr, nullptr, nullptr)
|
||||||
|
|| !SFile::Read(f, &this->m_slot[1], sizeof(m_slot[0]), nullptr, nullptr, nullptr)
|
||||||
|
|| !SFile::Read(f, &this->m_slot[2], sizeof(m_slot[0]), nullptr, nullptr, nullptr)
|
||||||
|
|| !SFile::Read(f, &this->m_slot[3], sizeof(m_slot[0]), nullptr, nullptr, nullptr)
|
||||||
|
|| !SFile::Read(f, &this->m_slot[4], sizeof(m_slot[0]), nullptr, nullptr, nullptr)
|
||||||
|
) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
23
src/db/rec/ItemVisualsRec.hpp
Normal file
23
src/db/rec/ItemVisualsRec.hpp
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
// DO NOT EDIT: generated by whoa-autocode
|
||||||
|
#ifndef DB_REC_ITEM_VISUALS_REC_HPP
|
||||||
|
#define DB_REC_ITEM_VISUALS_REC_HPP
|
||||||
|
|
||||||
|
#include <cstdint>
|
||||||
|
|
||||||
|
class SFile;
|
||||||
|
|
||||||
|
class ItemVisualsRec {
|
||||||
|
public:
|
||||||
|
int32_t m_ID;
|
||||||
|
int32_t m_slot[5];
|
||||||
|
|
||||||
|
static const char* GetFilename();
|
||||||
|
static uint32_t GetNumColumns();
|
||||||
|
static uint32_t GetRowSize();
|
||||||
|
static bool NeedIDAssigned();
|
||||||
|
int32_t GetID();
|
||||||
|
void SetID(int32_t id);
|
||||||
|
bool Read(SFile* f, const char* stringBuffer);
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
Loading…
Reference in New Issue
Block a user