1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-06 09:09:40 +02:00

Moved player-specific heroes & towns information to new class

This commit is contained in:
Ivan Savenko
2023-04-17 02:02:31 +03:00
parent 4a169972f0
commit f6d480cbb2
11 changed files with 285 additions and 244 deletions

View File

@@ -17,6 +17,7 @@
#include "../../CCallback.h"
#include "../CGameInfo.h"
#include "../CPlayerInterface.h"
#include "../PlayerLocalState.h"
#include "../adventureMap/CAdventureMapInterface.h"
#include "../../lib/CPathfinder.h"
@@ -211,10 +212,10 @@ const CGPath * MapRendererAdventureContext::currentPath() const
if(!hero)
return nullptr;
if(!LOCPLINT->paths.hasPath(hero))
if(!LOCPLINT->localState->hasPath(hero))
return nullptr;
return &LOCPLINT->paths.getPath(hero);
return &LOCPLINT->localState->getPath(hero);
}
size_t MapRendererAdventureContext::objectImageIndex(ObjectInstanceID objectID, size_t groupSize) const