All GMST logic is done in itemmodel.cpp now with usage of a static cache std::map

deque
Ragora 10 years ago
parent 83868bca23
commit ea43a23505

@ -220,9 +220,6 @@ namespace MWBase
virtual int getMonth() const = 0;
virtual int getYear() const = 0;
virtual bool isBoundItemID(const std::string &id) = 0;
/// \return Returns whether or not the id refers to a bound item.
virtual std::string getMonthName (int month = -1) const = 0;
///< Return name of month (-1: current month)

@ -191,29 +191,6 @@ namespace MWWorld
mGlobalVariables.fill (mStore);
mWorldScene = new Scene(*mRendering, mPhysics);
// Build a list of known bound item ID's
const MWWorld::Store<ESM::GameSetting> &gameSettings = mStore.get<ESM::GameSetting>();
for (MWWorld::Store<ESM::GameSetting>::iterator currentIteration = gameSettings.begin(); currentIteration != gameSettings.end(); ++currentIteration)
{
const ESM::GameSetting &currentSetting = *currentIteration;
try
{
std::string currentGMSTID = currentSetting.mId;
std::transform(currentGMSTID.begin(), currentGMSTID.end(), currentGMSTID.begin(), ::tolower);
// Don't bother checking this GMST if it's not a sMagicBound* one.
if (currentGMSTID.find("smagicbound") != 0)
continue;
std::string currentGMSTValue = currentSetting.getString();
std::transform(currentGMSTValue.begin(), currentGMSTValue.end(), currentGMSTValue.begin(), ::tolower);
mBoundID[currentGMSTValue] = true;
}
catch(...){}
}
}
void World::startNewGame (bool bypass)
@ -902,16 +879,6 @@ namespace MWWorld
return mGlobalVariables["timescale"].getFloat();
}
bool World::isBoundItemID(const std::string &id)
{
std::string id_temp = id;
std::transform(id_temp.begin(), id_temp.end(), id_temp.begin(), ::tolower);
if (mBoundID.count(id_temp) != 0)
return true;
return false;
}
void World::changeToInteriorCell (const std::string& cellName, const ESM::Position& position)
{
mPhysics->clearQueuedMovement();

@ -310,9 +310,6 @@ namespace MWWorld
virtual float getTimeScaleFactor() const;
virtual bool isBoundItemID(const std::string &id);
///< \return Whether or not the specified id refers to a bound item.
virtual void changeToInteriorCell (const std::string& cellName,
const ESM::Position& position);
///< Move to interior cell.

Loading…
Cancel
Save