1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

Stabilization

This commit is contained in:
Ivan Savenko 2024-01-16 20:47:09 +02:00
parent ffd604c114
commit e50f586d8b
3 changed files with 4 additions and 3 deletions

View File

@ -127,7 +127,7 @@ void CModInfo::loadLocalData(const JsonNode & data)
if (config["modType"].String() == "Translation")
{
if (baseLanguage != VLC->generaltexth->getPreferredLanguage())
if (baseLanguage != CGeneralTextHandler::getPreferredLanguage())
{
if (identifier.find_last_of('.') == std::string::npos)
logGlobal->warn("Translation mod %s was not loaded: language mismatch!", verificationInfo.name);

View File

@ -490,10 +490,10 @@ void TreasurePlacer::addAllPossibleObjects()
int randomAppearance = chooseRandomAppearance(zone.getRand(), Obj::SEER_HUT, zone.getTerrainType());
// FIXME: Remove duplicated code for gold, exp and creaure reward
oi.generateObject = [creature, creaturesAmount, randomAppearance, setRandomArtifact]() -> CGObjectInstance *
oi.generateObject = [cb=map.mapInstance->cb, creature, creaturesAmount, randomAppearance, setRandomArtifact]() -> CGObjectInstance *
{
auto factory = VLC->objtypeh->getHandlerFor(Obj::SEER_HUT, randomAppearance);
auto * obj = dynamic_cast<CGSeerHut *>(factory->create(map.mapInstance->cb, nullptr));
auto * obj = dynamic_cast<CGSeerHut *>(factory->create(cb, nullptr));
Rewardable::VisitInfo reward;
reward.reward.creatures.emplace_back(creature->getId(), creaturesAmount);

View File

@ -1800,6 +1800,7 @@ bool CGameHandler::load(const std::string & filename)
{
{
CLoadFile lf(*CResourceHandler::get()->getResourceName(ResourcePath(stem.to_string(), EResType::SAVEGAME)), MINIMAL_SERIALIZATION_VERSION);
lf.serializer.cb = this;
loadCommonState(lf);
logGlobal->info("Loading server state");
lf >> *this;