mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-15 00:05:02 +02:00
Remove ConstTransitivePtr from hero and town instances
This commit is contained in:
@ -703,7 +703,7 @@ void ApplyClientNetPackVisitor::visitCommanderLevelUp(CommanderLevelUp & pack)
|
||||
{
|
||||
const CGHeroInstance * hero = cl.getHero(pack.heroId);
|
||||
assert(hero);
|
||||
const CCommanderInstance * commander = hero->commander;
|
||||
const auto & commander = hero->getCommander();
|
||||
assert(commander);
|
||||
assert(commander->armyObj); //is it possible for Commander to exist beyond armed instance?
|
||||
callOnlyThatInterface(cl, pack.player, &CGameInterface::commanderGotLevel, commander, pack.skills, pack.queryID);
|
||||
|
Reference in New Issue
Block a user