1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-25 22:42:04 +02:00

Quests in map now use shared_ptr instead of const ptr

This commit is contained in:
Ivan Savenko
2025-03-09 22:44:36 +00:00
parent 417ea6451a
commit 797646cc05
20 changed files with 64 additions and 39 deletions

View File

@@ -32,6 +32,7 @@
#include "../../CCallback.h"
#include "../../lib/CConfigHandler.h"
#include "../../lib/CPlayerState.h"
#include "../../lib/texts/CGeneralTextHandler.h"
#include "../../lib/mapObjects/CGHeroInstance.h"
#include "../../lib/mapObjects/CGTownInstance.h"
@@ -553,7 +554,7 @@ void AdventureMapShortcuts::moveHeroDirectional(const Point & direction)
bool AdventureMapShortcuts::optionCanViewQuests()
{
return optionInMapView() && !GAME->map().getMap()->quests.empty();
return optionInMapView() && !GAME->interface()->cb->getPlayerState(GAME->interface()->playerID)->quests.empty();
}
bool AdventureMapShortcuts::optionCanToggleLevel()