Entity systemClasses
CAttributeList
Schema class CAttributeList.
Generated from the game's schema. Header: source2mod/schema/entity/classes/CAttributeList.h
Fields
| Field | Type |
|---|---|
m_Attributes | CUtlVector<CEconItemAttribute> |
m_pManager | CAttributeManager* |
Schema fields are accessors: read with entity->m_field(), write with entity->m_field = value (the write marks the field for networking).
Methods
SetOrAddAttribute
void SetOrAddAttribute(const char* pszAttributeName, float flValue, HookChain eChain = HookChain::Run);Sets an attribute by name, adding it to the list when it is not there yet.
| Parameter | Type | Default |
|---|---|---|
pszAttributeName | const char* | |
flValue | float | |
eChain | HookChain | HookChain::Run |
SetOrAddAttributeValueByName
void SetOrAddAttributeValueByName(const char* pszAttributeName, float flValue, HookChain eChain = HookChain::Run);CAttributeList::SetOrAddAttributeValueByName, the engine's name for SetOrAddAttribute.
| Parameter | Type | Default |
|---|---|---|
pszAttributeName | const char* | |
flValue | float | |
eChain | HookChain | HookChain::Run |