mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-11-16 16:55:27 +00:00
refactor(component): the client's component lifecycle
Components get the client's per-component functions: LoadDataFromTemplate, PrepareConfigData, LoadConfigData, LoadFromSaveData, Startup, Run, OnEnterScope, OnLeaveScope, Preshutdown and Shutdown, called by the entity in the client's order. Update is renamed Run, LoadFromXml LoadFromSaveData and UpdateXml WriteSaveData. Nothing sent changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -61,7 +61,7 @@ protected:
|
||||
|
||||
// The "eq" attribute the save wrote for an item
|
||||
bool SavedEquipped(const LWOOBJID id) {
|
||||
inventory->UpdateXml(doc);
|
||||
inventory->WriteSaveData(doc);
|
||||
for (auto* bag = doc.FirstChildElement("obj")->FirstChildElement("inv")->FirstChildElement("items")->FirstChildElement("in"); bag; bag = bag->NextSiblingElement("in")) {
|
||||
for (auto* element = bag->FirstChildElement("i"); element; element = element->NextSiblingElement("i")) {
|
||||
if (element->Int64Attribute("id") == id) return element->BoolAttribute("eq");
|
||||
|
||||
Reference in New Issue
Block a user