mirror of
https://github.com/whoahq/whoa.git
synced 2026-03-18 13:41:06 +03:00
feat(object): add CGUnit_C::GetModelFileName
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
b4751725a6
commit
5a69128f63
@ -95,7 +95,7 @@ void CGObject_C::Disable() {
|
||||
this->m_disableTimeMs = CWorld::GetCurTimeMs();
|
||||
}
|
||||
|
||||
int32_t CGObject_C::GetModelFileName(const char*& name) {
|
||||
int32_t CGObject_C::GetModelFileName(const char*& name) const {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@ -36,7 +36,7 @@ class CGObject_C : public CGObject, public TSHashObject<CGObject_C, CHashKeyGUID
|
||||
virtual void HandleOutOfRange(OUT_OF_RANGE_TYPE type) {};
|
||||
virtual void UpdateWorldObject(int32_t a2);
|
||||
// TODO
|
||||
virtual int32_t GetModelFileName(const char*& name);
|
||||
virtual int32_t GetModelFileName(const char*& name) const;
|
||||
// TODO
|
||||
virtual int32_t CanHighlight();
|
||||
virtual int32_t CanBeTargetted();
|
||||
|
||||
@ -115,6 +115,26 @@ int32_t CGUnit_C::CanBeTargetted() {
|
||||
return this->CanHighlight();
|
||||
}
|
||||
|
||||
CreatureModelDataRec* CGUnit_C::GetModelData() const {
|
||||
// TODO
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
int32_t CGUnit_C::GetModelFileName(const char*& name) const {
|
||||
auto modelDataRec = this->GetModelData();
|
||||
|
||||
// Model data not found
|
||||
if (!modelDataRec) {
|
||||
name = "Spells\\ErrorCube.mdx";
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
name = modelDataRec->m_modelName;
|
||||
|
||||
return modelDataRec->m_modelName ? true : false;
|
||||
}
|
||||
|
||||
void CGUnit_C::PostInit(uint32_t time, const CClientObjCreate& init, bool a4) {
|
||||
// TODO
|
||||
|
||||
|
||||
@ -9,6 +9,7 @@
|
||||
|
||||
class ChrClassesRec;
|
||||
class ChrRacesRec;
|
||||
class CreatureModelDataRec;
|
||||
|
||||
class CGUnit_C : public CGObject_C, public CGUnit {
|
||||
public:
|
||||
@ -22,12 +23,15 @@ class CGUnit_C : public CGObject_C, public CGUnit {
|
||||
// Virtual public member functions
|
||||
virtual ~CGUnit_C();
|
||||
// TODO
|
||||
virtual int32_t GetModelFileName(const char*& name) const;
|
||||
// TODO
|
||||
virtual int32_t CanHighlight();
|
||||
virtual int32_t CanBeTargetted();
|
||||
// TODO
|
||||
|
||||
// Public member functions
|
||||
CGUnit_C(uint32_t time, CClientObjCreate& objCreate);
|
||||
CreatureModelDataRec* GetModelData() const;
|
||||
void PostInit(uint32_t time, const CClientObjCreate& init, bool a4);
|
||||
void PostMovementUpdate(const CClientMoveUpdate& move, int32_t activeMover);
|
||||
void SetStorage(uint32_t* storage, uint32_t* saved);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user