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

Method CreateEntityTest

samples/sample3/Sample3Module.cpp:87–105  ·  view source on GitHub ↗

create object test

Source from the content-addressed store, hash-verified

85
86// create object test
87void Sample3Module::CreateEntityTest()
88{
89 std::cout << GET_CLASS_NAME(Sample3Module) << ", CreateEntityTest" << std::endl;
90
91 // create player
92 auto pEntity = CreateAnPlayerAndInit();
93 ARK_ASSERT_RET_NONE(pEntity != nullptr);
94
95 std::cout << "Player Name = " << pEntity->GetString(AFEntityMetaPlayer::name()).c_str() << std::endl;
96
97 const AFGUID& id = pEntity->GetID();
98
99 // create an item for player
100 //auto pItem = m_pKernelModule->CreateContainerEntity(id, BAG, AFConfigMetaItem::self_name(), ITEM_CONFIG_ID);
101 //ARK_ASSERT_RET_NONE(pItem != nullptr);
102
103 //pItem->SetInt32(AFConfigMetaItem::level(), 22);
104 //std::cout << "Item Config = " << pItem->GetConfigID() << std::endl;
105}
106
107void Sample3Module::DataTest()
108{

Callers

nothing calls this directly

Calls 2

c_strMethod · 0.45
GetStringMethod · 0.45

Tested by

no test coverage detected