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

- fixes Inferno Castle Gate

This commit is contained in:
Ivan Savenko
2013-10-17 13:54:12 +00:00
parent 40d3290a35
commit f838cceddd
2 changed files with 3 additions and 2 deletions

View File

@@ -1794,9 +1794,9 @@ bool CGameHandler::teleportHero(ObjectInstanceID hid, ObjectInstanceID dstid, ui
const CGTownInstance *from = h->visitedTown;
if(((h->getOwner() != t->getOwner())
&& complain("Cannot teleport hero to another player"))
|| ((!from || from->hasBuilt(BuildingID::CASTLE_GATE, ETownType::INFERNO))
|| ((!from || !from->hasBuilt(BuildingID::CASTLE_GATE, ETownType::INFERNO))
&& complain("Hero must be in town with Castle gate for teleporting"))
|| (t->hasBuilt(BuildingID::CASTLE_GATE, ETownType::INFERNO)
|| (!t->hasBuilt(BuildingID::CASTLE_GATE, ETownType::INFERNO)
&& complain("Cannot teleport hero to town without Castle gate in it")))
return false;
int3 pos = t->visitablePos();