|
|
|
@ -2,8 +2,6 @@
|
|
|
|
|
|
|
|
|
|
#include <stdexcept>
|
|
|
|
|
|
|
|
|
|
#include <boost/format.hpp>
|
|
|
|
|
|
|
|
|
|
#include <MyGUI_LanguageManager.h>
|
|
|
|
|
|
|
|
|
|
#include <components/debug/debuglog.hpp>
|
|
|
|
@ -85,13 +83,13 @@ namespace MWScript
|
|
|
|
|
if (count == 1)
|
|
|
|
|
{
|
|
|
|
|
msgBox = MyGUI::LanguageManager::getInstance().replaceTags("#{sNotifyMessage60}");
|
|
|
|
|
msgBox = boost::str(boost::format(msgBox) % itemName);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
msgBox = MyGUI::LanguageManager::getInstance().replaceTags("#{sNotifyMessage61}");
|
|
|
|
|
msgBox = boost::str(boost::format(msgBox) % count % itemName);
|
|
|
|
|
Misc::StringUtils::replace(msgBox, "%d", std::to_string(count).c_str(), 2);
|
|
|
|
|
}
|
|
|
|
|
Misc::StringUtils::replace(msgBox, "%s", itemName.c_str(), 2);
|
|
|
|
|
MWBase::Environment::get().getWindowManager()->messageBox(msgBox, MWGui::ShowInDialogueMode_Only);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -170,16 +168,16 @@ namespace MWScript
|
|
|
|
|
// The two GMST entries below expand to strings informing the player of what, and how many of it has been removed from their inventory
|
|
|
|
|
std::string msgBox;
|
|
|
|
|
|
|
|
|
|
if(numRemoved > 1)
|
|
|
|
|
if (numRemoved > 1)
|
|
|
|
|
{
|
|
|
|
|
msgBox = MyGUI::LanguageManager::getInstance().replaceTags("#{sNotifyMessage63}");
|
|
|
|
|
msgBox = boost::str (boost::format(msgBox) % numRemoved % itemName);
|
|
|
|
|
Misc::StringUtils::replace(msgBox, "%d", std::to_string(numRemoved).c_str(), 2);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
msgBox = MyGUI::LanguageManager::getInstance().replaceTags("#{sNotifyMessage62}");
|
|
|
|
|
msgBox = boost::str (boost::format(msgBox) % itemName);
|
|
|
|
|
}
|
|
|
|
|
Misc::StringUtils::replace(msgBox, "%s", itemName.c_str(), 2);
|
|
|
|
|
MWBase::Environment::get().getWindowManager()->messageBox(msgBox, MWGui::ShowInDialogueMode_Only);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|