- Barriers, shadow/portal queries, underwater selection, hit testing - Interior water: PolyClipper, ClipGroupGeometry, liquid index fix - Area updates, barrier updates, purge/free chain for areas, chunks, doodad and map object defs, detail doodad update list - Water ripples, terrain pixel shader path, liquid shader toggles - Detail doodads: creation per chunk, pools, batching, vertex/index fill, shader and fixed-function render state, RenderDetailDoodads (trailing occluder/debug draws still to port), CMapChunk::SelectLights - DayNight moved to WoW/Source/WorldClient - MapViewer: fog, WMO water, detail doodads; diagnostics removed Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
63 lines
1.6 KiB
C++
63 lines
1.6 KiB
C++
#include "Player_C.h"
|
|
#include "Engine/Source/Storm/H/storm.h"
|
|
#include "WoW/Source/DB/DBClient/DBClient.h"
|
|
#include "WoW/Source/DB/Rec/ChrRacesRec.h"
|
|
#include "WoW/Source/DB/Rec/CreatureDisplayInfoRec.h"
|
|
#include "WoW/Source/DB/Rec/CreatureModelDataRec.h"
|
|
|
|
// VERIFY: 486d0703 auto
|
|
// OFFSET: 0x006D5C30
|
|
uint32_t GetDisplayIdFromRaceAndGender(uint32_t race, uint32_t gender) {
|
|
if (gender >= 3) {
|
|
SErrDisplayAppFatalMessage("", "", 0);
|
|
}
|
|
|
|
ChrRacesRec* raceRec = g_chrRacesDB.GetRecord(race);
|
|
|
|
if (!raceRec) {
|
|
return 0;
|
|
}
|
|
|
|
switch (gender) {
|
|
case 0: {
|
|
return raceRec->m_maleDisplayID;
|
|
}
|
|
|
|
case 1: {
|
|
return raceRec->m_femaleDisplayID;
|
|
}
|
|
|
|
default: {
|
|
return 0;
|
|
}
|
|
}
|
|
}
|
|
|
|
// VERIFY: 24f1b2a8 manual
|
|
// OFFSET: 0x006DC810
|
|
CreatureModelDataRec* GetModelDataRec(uint32_t race, uint32_t gender) {
|
|
if (gender >= 3) {
|
|
SErrDisplayAppFatalMessage("", "", 0);
|
|
}
|
|
|
|
uint32_t displayID = GetDisplayIdFromRaceAndGender(race, gender);
|
|
|
|
if (!displayID) {
|
|
return nullptr;
|
|
}
|
|
|
|
CreatureDisplayInfoRec* displayRec = g_creatureDisplayInfoDB.GetRecord(displayID);
|
|
|
|
if (!displayRec) {
|
|
DebugLog("Error, unknown displayInfo %d specified for player race %d sex %d!", displayID, race, gender);
|
|
}
|
|
|
|
CreatureModelDataRec* modelRec = g_creatureModelDataDB.GetRecord(displayRec->m_modelID);
|
|
|
|
if (!modelRec) {
|
|
DebugLog("Error, unknown model record %d specified for player race %d sex %d!", displayRec->m_modelID, race, gender);
|
|
}
|
|
|
|
return modelRec;
|
|
}
|