MCPcopy Create free account
hub / github.com/OpenArkStudio/ARK / AddCustomInt32

Method AddCustomInt32

src/plugin/kernel/src/AFCEntity.cpp:723–738  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

721}
722
723bool AFCEntity::AddCustomInt32(const std::string& name, const int32_t value)
724{
725 ARK_ASSERT_RET_VAL(custom_data_list_.find(name) == custom_data_list_.end(), false);
726
727 AFIData* pData = ARK_NEW AFCData;
728 ARK_ASSERT_RET_VAL(pData != nullptr, false);
729
730 pData->SetInt(value);
731 if (!custom_data_list_.insert(name, pData).second)
732 {
733 ARK_DELETE(pData);
734 return false;
735 }
736
737 return true;
738}
739
740bool AFCEntity::AddCustomUInt32(const std::string& name, const uint32_t value)
741{

Callers 2

CreateAnPlayerAndInitMethod · 0.80
CustomDataTestMethod · 0.80

Calls 4

findMethod · 0.45
endMethod · 0.45
SetIntMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected