forked from mirror/openmw-tes3mp
[Server] Add storedData table for Player to increase clarity
This way, customData is meant to hold module-specific and temporary data while storedData is meant to hold persistent core data.
This commit is contained in:
parent
077a3d06b3
commit
f2eca2566f
2 changed files with 3 additions and 0 deletions
|
@ -92,6 +92,7 @@ void Player::Init(LuaState &lua)
|
||||||
"cellStateSize", &Player::cellStateSize,
|
"cellStateSize", &Player::cellStateSize,
|
||||||
"addCellExplored", &Player::addCellExplored,
|
"addCellExplored", &Player::addCellExplored,
|
||||||
"setAuthority", &Player::setAuthority,
|
"setAuthority", &Player::setAuthority,
|
||||||
|
"storedData", &Player::storedData,
|
||||||
"customData", &Player::customData,
|
"customData", &Player::customData,
|
||||||
"markedForDeletion", sol::property(&Player::isMarkedForDeleteion)
|
"markedForDeletion", sol::property(&Player::isMarkedForDeleteion)
|
||||||
);
|
);
|
||||||
|
@ -119,6 +120,7 @@ Player::Player(RakNet::RakNetGUID guid) : BasePlayer(guid), NetActor(), changedM
|
||||||
creatureStats.blank();
|
creatureStats.blank();
|
||||||
charClass.blank();
|
charClass.blank();
|
||||||
markedForDeletion = false;
|
markedForDeletion = false;
|
||||||
|
storedData = mwmp::Networking::get().getState().getState()->create_table();
|
||||||
customData = mwmp::Networking::get().getState().getState()->create_table();
|
customData = mwmp::Networking::get().getState().getState()->create_table();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -204,6 +204,7 @@ private:
|
||||||
Quests quests;
|
Quests quests;
|
||||||
Spells spells;
|
Spells spells;
|
||||||
WeatherMgr weatherMgr;
|
WeatherMgr weatherMgr;
|
||||||
|
sol::table storedData;
|
||||||
sol::table customData;
|
sol::table customData;
|
||||||
bool markedForDeletion;
|
bool markedForDeletion;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue