mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-10-02 17:43:41 -04:00
[Client] Add CellController methods for getting and checking Cells
This commit is contained in:
parent
69f820f3a0
commit
15f91e7825
@ -170,9 +170,14 @@ std::string CellController::generateMapIndex(BaseActor baseActor)
|
|||||||
return mapIndex;
|
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)
|
MWWorld::CellStore *CellController::getCellStore(const ESM::Cell& cell)
|
||||||
@ -240,3 +245,8 @@ void CellController::closeContainer(const MWWorld::Ptr &container)
|
|||||||
|
|
||||||
Main::get().getLocalPlayer()->updateInventory();
|
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(MWWorld::Ptr ptr);
|
||||||
std::string generateMapIndex(mwmp::BaseActor baseActor);
|
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);
|
virtual MWWorld::CellStore *getCellStore(const ESM::Cell& cell);
|
||||||
|
|
||||||
void openContainer(const MWWorld::Ptr& container, bool loot);
|
void openContainer(const MWWorld::Ptr& container, bool loot);
|
||||||
void closeContainer(const MWWorld::Ptr& container);
|
void closeContainer(const MWWorld::Ptr& container);
|
||||||
|
|
||||||
|
int getCellSize() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static std::map<std::string, mwmp::Cell *> cellsActive;
|
static std::map<std::string, mwmp::Cell *> cellsActive;
|
||||||
static std::map<std::string, std::string> localActorsToCells;
|
static std::map<std::string, std::string> localActorsToCells;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user