[Client] Add CellController methods for getting and checking Cells

0.6.1
David Cernat 8 years ago
parent 69f820f3a0
commit 15f91e7825

@ -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…
Cancel
Save