mirror of
https://github.com/whoahq/whoa.git
synced 2026-03-18 13:41:06 +03:00
feat(object): implement CGUnit_C::GetModelData
Some checks failed
Push / ${{ matrix.build.system_name }} / ${{ matrix.build.build_type }} / ${{ matrix.build.compiler_name }} (map[build_type:Release cc:cl compiler_name:MSVC cxx:cl os:windows-latest system_name:Windows test_path:WhoaTest]) (push) Has been cancelled
Push / ${{ matrix.build.system_name }} / ${{ matrix.build.build_type }} / ${{ matrix.build.compiler_name }} (map[build_type:Release cc:clang compiler_name:Clang cxx:clang++ os:macos-latest system_name:macOS test_path:WhoaTest]) (push) Has been cancelled
Push / ${{ matrix.build.system_name }} / ${{ matrix.build.build_type }} / ${{ matrix.build.compiler_name }} (map[build_type:Release cc:gcc compiler_name:GCC cxx:g++ os:ubuntu-latest system_name:Linux test_path:WhoaTest]) (push) Has been cancelled
Some checks failed
Push / ${{ matrix.build.system_name }} / ${{ matrix.build.build_type }} / ${{ matrix.build.compiler_name }} (map[build_type:Release cc:cl compiler_name:MSVC cxx:cl os:windows-latest system_name:Windows test_path:WhoaTest]) (push) Has been cancelled
Push / ${{ matrix.build.system_name }} / ${{ matrix.build.build_type }} / ${{ matrix.build.compiler_name }} (map[build_type:Release cc:clang compiler_name:Clang cxx:clang++ os:macos-latest system_name:macOS test_path:WhoaTest]) (push) Has been cancelled
Push / ${{ matrix.build.system_name }} / ${{ matrix.build.build_type }} / ${{ matrix.build.compiler_name }} (map[build_type:Release cc:gcc compiler_name:GCC cxx:g++ os:ubuntu-latest system_name:Linux test_path:WhoaTest]) (push) Has been cancelled
This commit is contained in:
parent
afb329c42d
commit
b69a992141
@ -120,8 +120,27 @@ int32_t CGUnit_C::GetLocalDisplayID() const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
CreatureModelDataRec* CGUnit_C::GetModelData() const {
|
CreatureModelDataRec* CGUnit_C::GetModelData() const {
|
||||||
// TODO
|
// Prefer local display ID if set and unit's display ID hasn't been overridden from unit's
|
||||||
|
// 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);
|
||||||
|
|
||||||
|
if (!creatureDisplayInfoRec) {
|
||||||
|
// TODO SysMsgPrintf(1, 2, "NOCREATUREDISPLAYIDFOUND|%d", displayID);
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
auto creatureModelDataRec = g_creatureModelDataDB.GetRecord(creatureDisplayInfoRec->m_modelID);
|
||||||
|
|
||||||
|
if (!creatureModelDataRec) {
|
||||||
|
// TODO SysMsgPrintf(1, 16, "INVALIDDISPLAYMODELRECORD|%d|%d", creatureDisplayInfoRec->m_modelID, creatureDisplayInfoRec->m_ID);
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
return creatureModelDataRec;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t CGUnit_C::GetModelFileName(const char*& name) const {
|
int32_t CGUnit_C::GetModelFileName(const char*& name) const {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user