mirror of
https://github.com/whoahq/whoa.git
synced 2026-03-18 13:41:06 +03:00
Compare commits
5 Commits
c18c8960dc
...
f4dc79ef39
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f4dc79ef39 | ||
|
|
6860d86369 | ||
|
|
e56bde0dde | ||
|
|
c6a89b5ef8 | ||
|
|
b902b5484e |
@ -14,6 +14,7 @@ WowClientDB<ChrRacesRec> g_chrRacesDB;
|
|||||||
WowClientDB<CreatureDisplayInfoRec> g_creatureDisplayInfoDB;
|
WowClientDB<CreatureDisplayInfoRec> g_creatureDisplayInfoDB;
|
||||||
WowClientDB<CreatureDisplayInfoExtraRec> g_creatureDisplayInfoExtraDB;
|
WowClientDB<CreatureDisplayInfoExtraRec> g_creatureDisplayInfoExtraDB;
|
||||||
WowClientDB<CreatureModelDataRec> g_creatureModelDataDB;
|
WowClientDB<CreatureModelDataRec> g_creatureModelDataDB;
|
||||||
|
WowClientDB<CreatureSoundDataRec> g_creatureSoundDataDB;
|
||||||
WowClientDB<FactionGroupRec> g_factionGroupDB;
|
WowClientDB<FactionGroupRec> g_factionGroupDB;
|
||||||
WowClientDB<FactionTemplateRec> g_factionTemplateDB;
|
WowClientDB<FactionTemplateRec> g_factionTemplateDB;
|
||||||
WowClientDB<ItemDisplayInfoRec> g_itemDisplayInfoDB;
|
WowClientDB<ItemDisplayInfoRec> g_itemDisplayInfoDB;
|
||||||
@ -22,6 +23,7 @@ WowClientDB<MapRec> g_mapDB;
|
|||||||
WowClientDB<PaperDollItemFrameRec> g_paperDollItemFrameDB;
|
WowClientDB<PaperDollItemFrameRec> g_paperDollItemFrameDB;
|
||||||
WowClientDB<SoundEntriesRec> g_soundEntriesDB;
|
WowClientDB<SoundEntriesRec> g_soundEntriesDB;
|
||||||
WowClientDB<SoundEntriesAdvancedRec> g_soundEntriesAdvancedDB;
|
WowClientDB<SoundEntriesAdvancedRec> g_soundEntriesAdvancedDB;
|
||||||
|
WowClientDB<UnitBloodLevelsRec> g_unitBloodLevelsDB;
|
||||||
|
|
||||||
void LoadDB(WowClientDB_Base* db, const char* filename, int32_t linenumber) {
|
void LoadDB(WowClientDB_Base* db, const char* filename, int32_t linenumber) {
|
||||||
db->Load(filename, linenumber);
|
db->Load(filename, linenumber);
|
||||||
@ -41,6 +43,7 @@ void StaticDBLoadAll(void (*loadFn)(WowClientDB_Base*, const char*, int32_t)) {
|
|||||||
loadFn(&g_creatureDisplayInfoDB, __FILE__, __LINE__);
|
loadFn(&g_creatureDisplayInfoDB, __FILE__, __LINE__);
|
||||||
loadFn(&g_creatureDisplayInfoExtraDB, __FILE__, __LINE__);
|
loadFn(&g_creatureDisplayInfoExtraDB, __FILE__, __LINE__);
|
||||||
loadFn(&g_creatureModelDataDB, __FILE__, __LINE__);
|
loadFn(&g_creatureModelDataDB, __FILE__, __LINE__);
|
||||||
|
loadFn(&g_creatureSoundDataDB, __FILE__, __LINE__);
|
||||||
loadFn(&g_factionGroupDB, __FILE__, __LINE__);
|
loadFn(&g_factionGroupDB, __FILE__, __LINE__);
|
||||||
loadFn(&g_factionTemplateDB, __FILE__, __LINE__);
|
loadFn(&g_factionTemplateDB, __FILE__, __LINE__);
|
||||||
loadFn(&g_itemDisplayInfoDB, __FILE__, __LINE__);
|
loadFn(&g_itemDisplayInfoDB, __FILE__, __LINE__);
|
||||||
@ -49,6 +52,7 @@ void StaticDBLoadAll(void (*loadFn)(WowClientDB_Base*, const char*, int32_t)) {
|
|||||||
loadFn(&g_paperDollItemFrameDB, __FILE__, __LINE__);
|
loadFn(&g_paperDollItemFrameDB, __FILE__, __LINE__);
|
||||||
loadFn(&g_soundEntriesDB, __FILE__, __LINE__);
|
loadFn(&g_soundEntriesDB, __FILE__, __LINE__);
|
||||||
loadFn(&g_soundEntriesAdvancedDB, __FILE__, __LINE__);
|
loadFn(&g_soundEntriesAdvancedDB, __FILE__, __LINE__);
|
||||||
|
loadFn(&g_unitBloodLevelsDB, __FILE__, __LINE__);
|
||||||
};
|
};
|
||||||
|
|
||||||
void ClientDBInitialize() {
|
void ClientDBInitialize() {
|
||||||
|
|||||||
@ -15,6 +15,7 @@
|
|||||||
#include "db/rec/CreatureDisplayInfoRec.hpp"
|
#include "db/rec/CreatureDisplayInfoRec.hpp"
|
||||||
#include "db/rec/CreatureDisplayInfoExtraRec.hpp"
|
#include "db/rec/CreatureDisplayInfoExtraRec.hpp"
|
||||||
#include "db/rec/CreatureModelDataRec.hpp"
|
#include "db/rec/CreatureModelDataRec.hpp"
|
||||||
|
#include "db/rec/CreatureSoundDataRec.hpp"
|
||||||
#include "db/rec/FactionGroupRec.hpp"
|
#include "db/rec/FactionGroupRec.hpp"
|
||||||
#include "db/rec/FactionTemplateRec.hpp"
|
#include "db/rec/FactionTemplateRec.hpp"
|
||||||
#include "db/rec/ItemDisplayInfoRec.hpp"
|
#include "db/rec/ItemDisplayInfoRec.hpp"
|
||||||
@ -23,6 +24,7 @@
|
|||||||
#include "db/rec/PaperDollItemFrameRec.hpp"
|
#include "db/rec/PaperDollItemFrameRec.hpp"
|
||||||
#include "db/rec/SoundEntriesRec.hpp"
|
#include "db/rec/SoundEntriesRec.hpp"
|
||||||
#include "db/rec/SoundEntriesAdvancedRec.hpp"
|
#include "db/rec/SoundEntriesAdvancedRec.hpp"
|
||||||
|
#include "db/rec/UnitBloodLevelsRec.hpp"
|
||||||
|
|
||||||
extern WowClientDB<AchievementRec> g_achievementDB;
|
extern WowClientDB<AchievementRec> g_achievementDB;
|
||||||
extern WowClientDB<AreaTableRec> g_areaTableDB;
|
extern WowClientDB<AreaTableRec> g_areaTableDB;
|
||||||
@ -37,6 +39,7 @@ extern WowClientDB<ChrRacesRec> g_chrRacesDB;
|
|||||||
extern WowClientDB<CreatureDisplayInfoRec> g_creatureDisplayInfoDB;
|
extern WowClientDB<CreatureDisplayInfoRec> g_creatureDisplayInfoDB;
|
||||||
extern WowClientDB<CreatureDisplayInfoExtraRec> g_creatureDisplayInfoExtraDB;
|
extern WowClientDB<CreatureDisplayInfoExtraRec> g_creatureDisplayInfoExtraDB;
|
||||||
extern WowClientDB<CreatureModelDataRec> g_creatureModelDataDB;
|
extern WowClientDB<CreatureModelDataRec> g_creatureModelDataDB;
|
||||||
|
extern WowClientDB<CreatureSoundDataRec> g_creatureSoundDataDB;
|
||||||
extern WowClientDB<FactionGroupRec> g_factionGroupDB;
|
extern WowClientDB<FactionGroupRec> g_factionGroupDB;
|
||||||
extern WowClientDB<FactionTemplateRec> g_factionTemplateDB;
|
extern WowClientDB<FactionTemplateRec> g_factionTemplateDB;
|
||||||
extern WowClientDB<ItemDisplayInfoRec> g_itemDisplayInfoDB;
|
extern WowClientDB<ItemDisplayInfoRec> g_itemDisplayInfoDB;
|
||||||
@ -45,6 +48,7 @@ extern WowClientDB<MapRec> g_mapDB;
|
|||||||
extern WowClientDB<PaperDollItemFrameRec> g_paperDollItemFrameDB;
|
extern WowClientDB<PaperDollItemFrameRec> g_paperDollItemFrameDB;
|
||||||
extern WowClientDB<SoundEntriesRec> g_soundEntriesDB;
|
extern WowClientDB<SoundEntriesRec> g_soundEntriesDB;
|
||||||
extern WowClientDB<SoundEntriesAdvancedRec> g_soundEntriesAdvancedDB;
|
extern WowClientDB<SoundEntriesAdvancedRec> g_soundEntriesAdvancedDB;
|
||||||
|
extern WowClientDB<UnitBloodLevelsRec> g_unitBloodLevelsDB;
|
||||||
|
|
||||||
void ClientDBInitialize();
|
void ClientDBInitialize();
|
||||||
|
|
||||||
|
|||||||
75
src/db/rec/CreatureSoundDataRec.cpp
Normal file
75
src/db/rec/CreatureSoundDataRec.cpp
Normal file
@ -0,0 +1,75 @@
|
|||||||
|
// DO NOT EDIT: generated by whoa-autocode
|
||||||
|
#include "db/rec/CreatureSoundDataRec.hpp"
|
||||||
|
#include "util/Locale.hpp"
|
||||||
|
#include "util/SFile.hpp"
|
||||||
|
|
||||||
|
const char* CreatureSoundDataRec::GetFilename() {
|
||||||
|
return "DBFilesClient\\CreatureSoundData.dbc";
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32_t CreatureSoundDataRec::GetNumColumns() {
|
||||||
|
return 38;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32_t CreatureSoundDataRec::GetRowSize() {
|
||||||
|
return 152;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CreatureSoundDataRec::NeedIDAssigned() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CreatureSoundDataRec::GetID() {
|
||||||
|
return this->m_ID;
|
||||||
|
}
|
||||||
|
|
||||||
|
void CreatureSoundDataRec::SetID(int32_t id) {
|
||||||
|
this->m_ID = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CreatureSoundDataRec::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_soundExertionID, sizeof(this->m_soundExertionID), nullptr, nullptr, nullptr)
|
||||||
|
|| !SFile::Read(f, &this->m_soundExertionCriticalID, sizeof(this->m_soundExertionCriticalID), nullptr, nullptr, nullptr)
|
||||||
|
|| !SFile::Read(f, &this->m_soundInjuryID, sizeof(this->m_soundInjuryID), nullptr, nullptr, nullptr)
|
||||||
|
|| !SFile::Read(f, &this->m_soundInjuryCriticalID, sizeof(this->m_soundInjuryCriticalID), nullptr, nullptr, nullptr)
|
||||||
|
|| !SFile::Read(f, &this->m_soundInjuryCrushingBlowID, sizeof(this->m_soundInjuryCrushingBlowID), nullptr, nullptr, nullptr)
|
||||||
|
|| !SFile::Read(f, &this->m_soundDeathID, sizeof(this->m_soundDeathID), nullptr, nullptr, nullptr)
|
||||||
|
|| !SFile::Read(f, &this->m_soundStunID, sizeof(this->m_soundStunID), nullptr, nullptr, nullptr)
|
||||||
|
|| !SFile::Read(f, &this->m_soundStandID, sizeof(this->m_soundStandID), nullptr, nullptr, nullptr)
|
||||||
|
|| !SFile::Read(f, &this->m_soundFootstepID, sizeof(this->m_soundFootstepID), nullptr, nullptr, nullptr)
|
||||||
|
|| !SFile::Read(f, &this->m_soundAggroID, sizeof(this->m_soundAggroID), nullptr, nullptr, nullptr)
|
||||||
|
|| !SFile::Read(f, &this->m_soundWingFlapID, sizeof(this->m_soundWingFlapID), nullptr, nullptr, nullptr)
|
||||||
|
|| !SFile::Read(f, &this->m_soundWingGlideID, sizeof(this->m_soundWingGlideID), nullptr, nullptr, nullptr)
|
||||||
|
|| !SFile::Read(f, &this->m_soundAlertID, sizeof(this->m_soundAlertID), nullptr, nullptr, nullptr)
|
||||||
|
|| !SFile::Read(f, &this->m_soundFidget[0], sizeof(m_soundFidget[0]), nullptr, nullptr, nullptr)
|
||||||
|
|| !SFile::Read(f, &this->m_soundFidget[1], sizeof(m_soundFidget[0]), nullptr, nullptr, nullptr)
|
||||||
|
|| !SFile::Read(f, &this->m_soundFidget[2], sizeof(m_soundFidget[0]), nullptr, nullptr, nullptr)
|
||||||
|
|| !SFile::Read(f, &this->m_soundFidget[3], sizeof(m_soundFidget[0]), nullptr, nullptr, nullptr)
|
||||||
|
|| !SFile::Read(f, &this->m_soundFidget[4], sizeof(m_soundFidget[0]), nullptr, nullptr, nullptr)
|
||||||
|
|| !SFile::Read(f, &this->m_customAttack[0], sizeof(m_customAttack[0]), nullptr, nullptr, nullptr)
|
||||||
|
|| !SFile::Read(f, &this->m_customAttack[1], sizeof(m_customAttack[0]), nullptr, nullptr, nullptr)
|
||||||
|
|| !SFile::Read(f, &this->m_customAttack[2], sizeof(m_customAttack[0]), nullptr, nullptr, nullptr)
|
||||||
|
|| !SFile::Read(f, &this->m_customAttack[3], sizeof(m_customAttack[0]), nullptr, nullptr, nullptr)
|
||||||
|
|| !SFile::Read(f, &this->m_npcsoundID, sizeof(this->m_npcsoundID), nullptr, nullptr, nullptr)
|
||||||
|
|| !SFile::Read(f, &this->m_loopSoundID, sizeof(this->m_loopSoundID), nullptr, nullptr, nullptr)
|
||||||
|
|| !SFile::Read(f, &this->m_creatureImpactType, sizeof(this->m_creatureImpactType), nullptr, nullptr, nullptr)
|
||||||
|
|| !SFile::Read(f, &this->m_soundJumpStartID, sizeof(this->m_soundJumpStartID), nullptr, nullptr, nullptr)
|
||||||
|
|| !SFile::Read(f, &this->m_soundJumpEndID, sizeof(this->m_soundJumpEndID), nullptr, nullptr, nullptr)
|
||||||
|
|| !SFile::Read(f, &this->m_soundPetAttackID, sizeof(this->m_soundPetAttackID), nullptr, nullptr, nullptr)
|
||||||
|
|| !SFile::Read(f, &this->m_soundPetOrderID, sizeof(this->m_soundPetOrderID), nullptr, nullptr, nullptr)
|
||||||
|
|| !SFile::Read(f, &this->m_soundPetDismissID, sizeof(this->m_soundPetDismissID), nullptr, nullptr, nullptr)
|
||||||
|
|| !SFile::Read(f, &this->m_fidgetDelaySecondsMin, sizeof(this->m_fidgetDelaySecondsMin), nullptr, nullptr, nullptr)
|
||||||
|
|| !SFile::Read(f, &this->m_fidgetDelaySecondsMax, sizeof(this->m_fidgetDelaySecondsMax), nullptr, nullptr, nullptr)
|
||||||
|
|| !SFile::Read(f, &this->m_birthSoundID, sizeof(this->m_birthSoundID), nullptr, nullptr, nullptr)
|
||||||
|
|| !SFile::Read(f, &this->m_spellCastDirectedSoundID, sizeof(this->m_spellCastDirectedSoundID), nullptr, nullptr, nullptr)
|
||||||
|
|| !SFile::Read(f, &this->m_submergeSoundID, sizeof(this->m_submergeSoundID), nullptr, nullptr, nullptr)
|
||||||
|
|| !SFile::Read(f, &this->m_submergedSoundID, sizeof(this->m_submergedSoundID), nullptr, nullptr, nullptr)
|
||||||
|
|| !SFile::Read(f, &this->m_creatureSoundDataIdpet, sizeof(this->m_creatureSoundDataIdpet), nullptr, nullptr, nullptr)
|
||||||
|
) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
52
src/db/rec/CreatureSoundDataRec.hpp
Normal file
52
src/db/rec/CreatureSoundDataRec.hpp
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
// DO NOT EDIT: generated by whoa-autocode
|
||||||
|
#ifndef DB_REC_CREATURE_SOUND_DATA_REC_HPP
|
||||||
|
#define DB_REC_CREATURE_SOUND_DATA_REC_HPP
|
||||||
|
|
||||||
|
#include <cstdint>
|
||||||
|
|
||||||
|
class SFile;
|
||||||
|
|
||||||
|
class CreatureSoundDataRec {
|
||||||
|
public:
|
||||||
|
int32_t m_ID;
|
||||||
|
int32_t m_soundExertionID;
|
||||||
|
int32_t m_soundExertionCriticalID;
|
||||||
|
int32_t m_soundInjuryID;
|
||||||
|
int32_t m_soundInjuryCriticalID;
|
||||||
|
int32_t m_soundInjuryCrushingBlowID;
|
||||||
|
int32_t m_soundDeathID;
|
||||||
|
int32_t m_soundStunID;
|
||||||
|
int32_t m_soundStandID;
|
||||||
|
int32_t m_soundFootstepID;
|
||||||
|
int32_t m_soundAggroID;
|
||||||
|
int32_t m_soundWingFlapID;
|
||||||
|
int32_t m_soundWingGlideID;
|
||||||
|
int32_t m_soundAlertID;
|
||||||
|
int32_t m_soundFidget[5];
|
||||||
|
int32_t m_customAttack[4];
|
||||||
|
int32_t m_npcsoundID;
|
||||||
|
int32_t m_loopSoundID;
|
||||||
|
int32_t m_creatureImpactType;
|
||||||
|
int32_t m_soundJumpStartID;
|
||||||
|
int32_t m_soundJumpEndID;
|
||||||
|
int32_t m_soundPetAttackID;
|
||||||
|
int32_t m_soundPetOrderID;
|
||||||
|
int32_t m_soundPetDismissID;
|
||||||
|
float m_fidgetDelaySecondsMin;
|
||||||
|
float m_fidgetDelaySecondsMax;
|
||||||
|
int32_t m_birthSoundID;
|
||||||
|
int32_t m_spellCastDirectedSoundID;
|
||||||
|
int32_t m_submergeSoundID;
|
||||||
|
int32_t m_submergedSoundID;
|
||||||
|
int32_t m_creatureSoundDataIdpet;
|
||||||
|
|
||||||
|
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
|
||||||
41
src/db/rec/UnitBloodLevelsRec.cpp
Normal file
41
src/db/rec/UnitBloodLevelsRec.cpp
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
// DO NOT EDIT: generated by whoa-autocode
|
||||||
|
#include "db/rec/UnitBloodLevelsRec.hpp"
|
||||||
|
#include "util/Locale.hpp"
|
||||||
|
#include "util/SFile.hpp"
|
||||||
|
|
||||||
|
const char* UnitBloodLevelsRec::GetFilename() {
|
||||||
|
return "DBFilesClient\\UnitBloodLevels.dbc";
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32_t UnitBloodLevelsRec::GetNumColumns() {
|
||||||
|
return 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32_t UnitBloodLevelsRec::GetRowSize() {
|
||||||
|
return 16;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool UnitBloodLevelsRec::NeedIDAssigned() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t UnitBloodLevelsRec::GetID() {
|
||||||
|
return this->m_ID;
|
||||||
|
}
|
||||||
|
|
||||||
|
void UnitBloodLevelsRec::SetID(int32_t id) {
|
||||||
|
this->m_ID = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool UnitBloodLevelsRec::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_violencelevel[0], sizeof(m_violencelevel[0]), nullptr, nullptr, nullptr)
|
||||||
|
|| !SFile::Read(f, &this->m_violencelevel[1], sizeof(m_violencelevel[0]), nullptr, nullptr, nullptr)
|
||||||
|
|| !SFile::Read(f, &this->m_violencelevel[2], sizeof(m_violencelevel[0]), nullptr, nullptr, nullptr)
|
||||||
|
) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
23
src/db/rec/UnitBloodLevelsRec.hpp
Normal file
23
src/db/rec/UnitBloodLevelsRec.hpp
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
// DO NOT EDIT: generated by whoa-autocode
|
||||||
|
#ifndef DB_REC_UNIT_BLOOD_LEVELS_REC_HPP
|
||||||
|
#define DB_REC_UNIT_BLOOD_LEVELS_REC_HPP
|
||||||
|
|
||||||
|
#include <cstdint>
|
||||||
|
|
||||||
|
class SFile;
|
||||||
|
|
||||||
|
class UnitBloodLevelsRec {
|
||||||
|
public:
|
||||||
|
int32_t m_ID;
|
||||||
|
int32_t m_violencelevel[3];
|
||||||
|
|
||||||
|
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
|
||||||
@ -39,6 +39,7 @@
|
|||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
|
|
||||||
int32_t CGlueMgr::m_acceptedEULA = 1; // TODO
|
int32_t CGlueMgr::m_acceptedEULA = 1; // TODO
|
||||||
|
int32_t CGlueMgr::m_acceptedScanning = 1; // TODO
|
||||||
int32_t CGlueMgr::m_acceptedTerminationWithoutNotice;
|
int32_t CGlueMgr::m_acceptedTerminationWithoutNotice;
|
||||||
int32_t CGlueMgr::m_acceptedTOS = 1; // TODO
|
int32_t CGlueMgr::m_acceptedTOS = 1; // TODO
|
||||||
int32_t CGlueMgr::m_accountMsgAvailable;
|
int32_t CGlueMgr::m_accountMsgAvailable;
|
||||||
|
|||||||
@ -33,6 +33,7 @@ class CGlueMgr {
|
|||||||
|
|
||||||
// Static variables
|
// Static variables
|
||||||
static int32_t m_acceptedEULA;
|
static int32_t m_acceptedEULA;
|
||||||
|
static int32_t m_acceptedScanning;
|
||||||
static int32_t m_acceptedTerminationWithoutNotice;
|
static int32_t m_acceptedTerminationWithoutNotice;
|
||||||
static int32_t m_acceptedTOS;
|
static int32_t m_acceptedTOS;
|
||||||
static int32_t m_accountMsgAvailable;
|
static int32_t m_accountMsgAvailable;
|
||||||
|
|||||||
@ -216,7 +216,14 @@ int32_t Script_ShowScanningNotice(lua_State* L) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int32_t Script_ScanningAccepted(lua_State* L) {
|
int32_t Script_ScanningAccepted(lua_State* L) {
|
||||||
WHOA_UNIMPLEMENTED(0);
|
if (CGlueMgr::m_acceptedScanning) {
|
||||||
|
lua_pushnumber(L, 1.0);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
lua_pushnil(L);
|
||||||
|
}
|
||||||
|
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t Script_AcceptScanning(lua_State* L) {
|
int32_t Script_AcceptScanning(lua_State* L) {
|
||||||
|
|||||||
@ -2,6 +2,7 @@
|
|||||||
#include "object/client/ObjMgr.hpp"
|
#include "object/client/ObjMgr.hpp"
|
||||||
#include "db/Db.hpp"
|
#include "db/Db.hpp"
|
||||||
#include "ui/Game.hpp"
|
#include "ui/Game.hpp"
|
||||||
|
#include <storm/Error.hpp>
|
||||||
|
|
||||||
WOWGUID CGUnit_C::s_activeMover;
|
WOWGUID CGUnit_C::s_activeMover;
|
||||||
|
|
||||||
@ -95,6 +96,10 @@ const char* CGUnit_C::GetDisplayRaceNameFromRecord(const ChrRacesRec* raceRec, U
|
|||||||
|
|
||||||
CGUnit_C::CGUnit_C(uint32_t time, CClientObjCreate& objCreate) : CGObject_C(time, objCreate) {
|
CGUnit_C::CGUnit_C(uint32_t time, CClientObjCreate& objCreate) : CGObject_C(time, objCreate) {
|
||||||
// TODO
|
// TODO
|
||||||
|
|
||||||
|
this->RefreshDataPointers();
|
||||||
|
|
||||||
|
// TODO
|
||||||
}
|
}
|
||||||
|
|
||||||
CGUnit_C::~CGUnit_C() {
|
CGUnit_C::~CGUnit_C() {
|
||||||
@ -115,16 +120,22 @@ int32_t CGUnit_C::CanBeTargetted() {
|
|||||||
return this->CanHighlight();
|
return this->CanHighlight();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int32_t CGUnit_C::GetDisplayID() const {
|
||||||
|
// Prefer local display ID if set and unit's display ID hasn't been overridden from unit's
|
||||||
|
// native display ID.
|
||||||
|
if (this->GetLocalDisplayID() && this->GetDisplayID() == this->GetNativeDisplayID()) {
|
||||||
|
return this->GetLocalDisplayID();
|
||||||
|
}
|
||||||
|
|
||||||
|
return this->CGUnit::GetDisplayID();
|
||||||
|
}
|
||||||
|
|
||||||
int32_t CGUnit_C::GetLocalDisplayID() const {
|
int32_t CGUnit_C::GetLocalDisplayID() const {
|
||||||
return this->m_localDisplayID;
|
return this->m_localDisplayID;
|
||||||
}
|
}
|
||||||
|
|
||||||
CreatureModelDataRec* CGUnit_C::GetModelData() const {
|
CreatureModelDataRec* CGUnit_C::GetModelData() const {
|
||||||
// Prefer local display ID if set and unit's display ID hasn't been overridden from unit's
|
auto displayID = this->GetDisplayID();
|
||||||
// native display ID; otherwise prefer overridden display ID.
|
|
||||||
auto displayID = this->GetLocalDisplayID() && this->GetDisplayID() == this->GetNativeDisplayID()
|
|
||||||
? this->GetLocalDisplayID()
|
|
||||||
: this->GetDisplayID();
|
|
||||||
|
|
||||||
auto creatureDisplayInfoRec = g_creatureDisplayInfoDB.GetRecord(displayID);
|
auto creatureDisplayInfoRec = g_creatureDisplayInfoDB.GetRecord(displayID);
|
||||||
|
|
||||||
@ -170,6 +181,63 @@ void CGUnit_C::PostMovementUpdate(const CClientMoveUpdate& move, int32_t activeM
|
|||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CGUnit_C::RefreshDataPointers() {
|
||||||
|
auto displayID = this->GetDisplayID();
|
||||||
|
|
||||||
|
// Display info
|
||||||
|
|
||||||
|
this->m_displayInfo = g_creatureDisplayInfoDB.GetRecord(displayID);
|
||||||
|
|
||||||
|
if (!this->m_displayInfo) {
|
||||||
|
// TODO auto name = this->GetUnitName(0, 1);
|
||||||
|
// TODO SysMsgPrintf(2, 2, "NOUNITDISPLAYID|%d|%s", displayID, name);
|
||||||
|
|
||||||
|
this->m_displayInfo = g_creatureDisplayInfoDB.GetRecordByIndex(0);
|
||||||
|
|
||||||
|
if (!this->m_displayInfo) {
|
||||||
|
STORM_APP_FATAL("Error, NO creature display records found");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Display info extra
|
||||||
|
|
||||||
|
this->m_displayInfoExtra = g_creatureDisplayInfoExtraDB.GetRecord(this->m_displayInfo->m_extendedDisplayInfoID);
|
||||||
|
|
||||||
|
// Model data
|
||||||
|
|
||||||
|
this->m_modelData = g_creatureModelDataDB.GetRecord(this->m_displayInfo->m_modelID);
|
||||||
|
|
||||||
|
// Sound data
|
||||||
|
|
||||||
|
this->m_soundData = g_creatureSoundDataDB.GetRecord(this->m_displayInfo->m_soundID);
|
||||||
|
|
||||||
|
if (!this->m_soundData) {
|
||||||
|
this->m_soundData = g_creatureSoundDataDB.GetRecord(this->m_modelData->m_soundID);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Blood levels
|
||||||
|
|
||||||
|
this->m_bloodRec = g_unitBloodLevelsDB.GetRecord(this->m_displayInfo->m_bloodID);
|
||||||
|
|
||||||
|
if (!this->m_bloodRec) {
|
||||||
|
this->m_bloodRec = g_unitBloodLevelsDB.GetRecord(this->m_modelData->m_bloodID);
|
||||||
|
|
||||||
|
if (!this->m_bloodRec) {
|
||||||
|
this->m_bloodRec = g_unitBloodLevelsDB.GetRecordByIndex(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Creature stats
|
||||||
|
|
||||||
|
if (this->GetType() == HIER_TYPE_UNIT) {
|
||||||
|
// TODO load creature stats
|
||||||
|
}
|
||||||
|
|
||||||
|
// Flags
|
||||||
|
|
||||||
|
// TODO set flags
|
||||||
|
}
|
||||||
|
|
||||||
void CGUnit_C::SetStorage(uint32_t* storage, uint32_t* saved) {
|
void CGUnit_C::SetStorage(uint32_t* storage, uint32_t* saved) {
|
||||||
this->CGObject_C::SetStorage(storage, saved);
|
this->CGObject_C::SetStorage(storage, saved);
|
||||||
|
|
||||||
|
|||||||
@ -9,7 +9,11 @@
|
|||||||
|
|
||||||
class ChrClassesRec;
|
class ChrClassesRec;
|
||||||
class ChrRacesRec;
|
class ChrRacesRec;
|
||||||
|
class CreatureDisplayInfoRec;
|
||||||
|
class CreatureDisplayInfoExtraRec;
|
||||||
class CreatureModelDataRec;
|
class CreatureModelDataRec;
|
||||||
|
class CreatureSoundDataRec;
|
||||||
|
class UnitBloodLevelsRec;
|
||||||
|
|
||||||
class CGUnit_C : public CGObject_C, public CGUnit {
|
class CGUnit_C : public CGObject_C, public CGUnit {
|
||||||
public:
|
public:
|
||||||
@ -31,15 +35,27 @@ class CGUnit_C : public CGObject_C, public CGUnit {
|
|||||||
|
|
||||||
// Public member functions
|
// Public member functions
|
||||||
CGUnit_C(uint32_t time, CClientObjCreate& objCreate);
|
CGUnit_C(uint32_t time, CClientObjCreate& objCreate);
|
||||||
int32_t GetLocalDisplayID() const;
|
int32_t GetDisplayID() const;
|
||||||
CreatureModelDataRec* GetModelData() const;
|
CreatureModelDataRec* GetModelData() const;
|
||||||
void PostInit(uint32_t time, const CClientObjCreate& init, bool a4);
|
void PostInit(uint32_t time, const CClientObjCreate& init, bool a4);
|
||||||
void PostMovementUpdate(const CClientMoveUpdate& move, int32_t activeMover);
|
void PostMovementUpdate(const CClientMoveUpdate& move, int32_t activeMover);
|
||||||
void SetStorage(uint32_t* storage, uint32_t* saved);
|
void SetStorage(uint32_t* storage, uint32_t* saved);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
// Protected member functions
|
||||||
|
int32_t GetLocalDisplayID() const;
|
||||||
|
void RefreshDataPointers();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Private member variables
|
// Private member variables
|
||||||
// TODO
|
// TODO
|
||||||
|
CreatureDisplayInfoRec* m_displayInfo;
|
||||||
|
CreatureDisplayInfoExtraRec* m_displayInfoExtra;
|
||||||
|
CreatureModelDataRec* m_modelData;
|
||||||
|
CreatureSoundDataRec* m_soundData;
|
||||||
|
// TODO
|
||||||
|
UnitBloodLevelsRec* m_bloodRec;
|
||||||
|
// TODO
|
||||||
int32_t m_localDisplayID = 0;
|
int32_t m_localDisplayID = 0;
|
||||||
// TODO
|
// TODO
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user