Ver código fonte

Fix town visit via Town Portal not generating town visit query

Ivan Savenko 1 ano atrás
pai
commit
40dff8ac17
1 arquivos alterados com 2 adições e 3 exclusões
  1. 2 3
      server/CGameHandler.cpp

+ 2 - 3
server/CGameHandler.cpp

@@ -973,12 +973,11 @@ bool CGameHandler::moveHero(ObjectInstanceID hid, int3 dst, EMovementMode moveme
 		doMove(TryMoveHero::TELEPORTATION, guardsCheck, DONT_VISIT_DEST, LEAVING_TILE);
 
 		// visit town for town portal \ castle gates
-		// do not use generic visitObjectOnTile to avoid double-teleporting
-		// if this moveHero call was triggered by teleporter
+		// do not visit any other objects, e.g. monoliths to avoid double-teleporting
 		if (objectToVisit)
 		{
 			if (CGTownInstance * town = dynamic_cast<CGTownInstance *>(objectToVisit))
-				town->onHeroVisit(h);
+				objectVisited(town, h);
 		}
 
 		return true;