mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-23 22:37:55 +02:00
Remove ConstTransitivePtr from hero and town instances
This commit is contained in:
@@ -183,7 +183,7 @@ void ApplyGhNetPackVisitor::visitUpgradeCreature(UpgradeCreature & pack)
|
||||
void ApplyGhNetPackVisitor::visitGarrisonHeroSwap(GarrisonHeroSwap & pack)
|
||||
{
|
||||
const CGTownInstance * town = gh.getTown(pack.tid);
|
||||
if(!gh.isPlayerOwns(connection, &pack, pack.tid) && !(town->garrisonHero && gh.isPlayerOwns(connection, &pack, town->garrisonHero->id)))
|
||||
if(!gh.isPlayerOwns(connection, &pack, pack.tid) && !(town->getGarrisonHero() && gh.isPlayerOwns(connection, &pack, town->getGarrisonHero()->id)))
|
||||
gh.throwNotAllowedAction(connection); //neither town nor garrisoned hero (if present) is ours
|
||||
gh.throwIfPlayerNotActive(connection, &pack);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user