mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-02-20 20:09:41 +00:00
[Client] Add CellController methods for getting and checking Cells
This commit is contained in:
parent
69f820f3a0
commit
15f91e7825
2 changed files with 17 additions and 3 deletions
|
@ -170,9 +170,14 @@ std::string CellController::generateMapIndex(BaseActor baseActor)
|
|||
return mapIndex;
|
||||
}
|
||||
|
||||
int CellController::getCellSize() const
|
||||
bool CellController::isActiveCell(const ESM::Cell& cell)
|
||||
{
|
||||
return 8192;
|
||||
return (cellsActive.count(cell.getDescription()) > 0);
|
||||
}
|
||||
|
||||
Cell *CellController::getCell(const ESM::Cell& cell)
|
||||
{
|
||||
return cellsActive.at(cell.getDescription());
|
||||
}
|
||||
|
||||
MWWorld::CellStore *CellController::getCellStore(const ESM::Cell& cell)
|
||||
|
@ -240,3 +245,8 @@ void CellController::closeContainer(const MWWorld::Ptr &container)
|
|||
|
||||
Main::get().getLocalPlayer()->updateInventory();
|
||||
}
|
||||
|
||||
int CellController::getCellSize() const
|
||||
{
|
||||
return 8192;
|
||||
}
|
||||
|
|
|
@ -36,12 +36,16 @@ namespace mwmp
|
|||
std::string generateMapIndex(MWWorld::Ptr ptr);
|
||||
std::string generateMapIndex(mwmp::BaseActor baseActor);
|
||||
|
||||
int getCellSize() const;
|
||||
bool isActiveCell(const ESM::Cell& cell);
|
||||
virtual Cell *getCell(const ESM::Cell& cell);
|
||||
|
||||
virtual MWWorld::CellStore *getCellStore(const ESM::Cell& cell);
|
||||
|
||||
void openContainer(const MWWorld::Ptr& container, bool loot);
|
||||
void closeContainer(const MWWorld::Ptr& container);
|
||||
|
||||
int getCellSize() const;
|
||||
|
||||
private:
|
||||
static std::map<std::string, mwmp::Cell *> cellsActive;
|
||||
static std::map<std::string, std::string> localActorsToCells;
|
||||
|
|
Loading…
Reference in a new issue