Cyrus Mod Loader
Loading...
Searching...
No Matches
CoreObject Class Reference

#include <CoreObject.h>

Inheritance diagram for CoreObject:
PropertyClass ClientObject CraftingSlot Ladder Recipe WizClientObject WizClientObjectItem ClientRecipe WizClientLeashedObject ClientPetSnackItem ClientReagentItem WizClientMount WizClientPet

Public Member Functions

template<class T >
T * findChild (const std::string &name)
 Find a child CoreObject by name and cast it to the specified type.
 
template<class T >
T * findDescendant (const std::string &name)
 Find a descendant CoreObject by name and cast it to the specified type.
 
CoreObjectgetRoot ()
 
std::vector< std::shared_ptr< CoreObject > > getChildren ()
 
- Public Member Functions inherited from PropertyClass
virtual char * getClassName ()=0
 Gets the class name of the derived class in the format class T[*].
 
virtual void * getPropertyList ()=0
 Constructs and caches the PropertyList for the derived class, adding all reflected members and member functions.
 
virtual bool copy (uint32_t a1)=0
 Copies the property class data.
 
virtual void * serialize (void *a2, uint32_t a3)=0
 Serializes the derived class's PropertyList as XML.
 
virtual bool onCreated ()=0
 Called when the PropertyClass is created.
 
template<typename T >
CYRUS T * as ()
 Casts this to a pointer of type T.
 
virtual void onPostLoad ()=0
 Called when the PropertyClass is loaded, i.e., initialize is called and onCreated has finished.
 
virtual void onFinalizeLoad ()=0
 
virtual bool shouldNotSerialize ()=0
 Determines if the PropertyClass should not be serialized.
 

Public Attributes

uint64_t globalID
 
uint64_t permID
 
WizGameObjectTemplatem_template
 
uint64_t templateID
 
std::string debugName
 
std::string displayKey
 
Vector3D location
 
Vector3D orentiation
 
short speedMultiplier
 
unsigned short mobileID
 
float scale
 
void * unk1
 
CoreObjectparent
 
SharedObjectDeleter< CoreObject * > * deleter
 
std::vector< std::shared_ptr< BehaviorInstance > > inactiveBehaviors
 
std::vector< std::shared_ptr< BehaviorInstance > > activeBehaviors
 
void * unk2
 
void * unk3
 
void * unk4
 
void * unk5
 
void * zoneData
 
void * unk6
 
void * unk7
 
void * unk8
 
void * unk9
 
uint32_t zoneTagID
 
uint32_t pad
 
void * unk10
 
void * unk11
 
void * unk12
 
void * unk13
 
std::vector< std::shared_ptr< CoreObject > > children
 

Friends

struct CoreObjectLayout
 

Member Function Documentation

◆ findChild()

template<class T >
T * CoreObject::findChild ( const std::string & name)
inline

Find a child CoreObject by name and cast it to the specified type.

This function searches through the immediate children of the current CoreObject to find a child with the specified name. If a matching child is found, it is cast to the specified type T and returned. If no matching child is found, the function returns nullptr.

Template Parameters
TThe type to which the found child should be cast.
Parameters
nameThe name of the child Window to find.
Returns
A pointer to the child CoreObject cast to type T, or nullptr if no matching child is found.

◆ findDescendant()

template<class T >
T * CoreObject::findDescendant ( const std::string & name)
inline

Find a descendant CoreObject by name and cast it to the specified type.

This function searches through the immediate children and all their descendants of the current CoreObject to find a descendant with the specified name. If a matching descendant is found, it is cast to the specified type T and returned. If no matching descendant is found, the function returns nullptr.

Template Parameters
TThe type to which the found descendant should be cast.
Parameters
nameThe name of the descendant CoreObject to find.
Returns
A pointer to the descendant CoreObject cast to type T, or nullptr if no matching descendant is found.

◆ getChildren()

std::vector< std::shared_ptr< CoreObject > > CoreObject::getChildren ( )
inline

◆ getRoot()

CoreObject * CoreObject::getRoot ( )
inline

Friends And Related Symbol Documentation

◆ CoreObjectLayout

friend struct CoreObjectLayout
friend

Member Data Documentation

◆ activeBehaviors

std::vector<std::shared_ptr<BehaviorInstance> > CoreObject::activeBehaviors

◆ children

std::vector<std::shared_ptr<CoreObject> > CoreObject::children

◆ debugName

std::string CoreObject::debugName

◆ deleter

SharedObjectDeleter<CoreObject *>* CoreObject::deleter

◆ displayKey

std::string CoreObject::displayKey

◆ globalID

uint64_t CoreObject::globalID

◆ inactiveBehaviors

std::vector<std::shared_ptr<BehaviorInstance> > CoreObject::inactiveBehaviors

◆ location

Vector3D CoreObject::location

◆ m_template

WizGameObjectTemplate* CoreObject::m_template

◆ mobileID

unsigned short CoreObject::mobileID

◆ orentiation

Vector3D CoreObject::orentiation

◆ pad

uint32_t CoreObject::pad

◆ parent

CoreObject* CoreObject::parent

◆ permID

uint64_t CoreObject::permID

◆ scale

float CoreObject::scale

◆ speedMultiplier

short CoreObject::speedMultiplier

◆ templateID

uint64_t CoreObject::templateID

◆ unk1

void* CoreObject::unk1

◆ unk10

void* CoreObject::unk10

◆ unk11

void* CoreObject::unk11

◆ unk12

void* CoreObject::unk12

◆ unk13

void* CoreObject::unk13

◆ unk2

void* CoreObject::unk2

◆ unk3

void* CoreObject::unk3

◆ unk4

void* CoreObject::unk4

◆ unk5

void* CoreObject::unk5

◆ unk6

void* CoreObject::unk6

◆ unk7

void* CoreObject::unk7

◆ unk8

void* CoreObject::unk8

◆ unk9

void* CoreObject::unk9

◆ zoneData

void* CoreObject::zoneData

◆ zoneTagID

uint32_t CoreObject::zoneTagID