1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-26 22:57:00 +02:00

ETeleportChannelType: is now strongly typed enumeration

This commit is contained in:
ArseniyShestakov 2015-03-09 01:45:39 +03:00
parent 3b057e0408
commit eff4da1d03
3 changed files with 8 additions and 11 deletions

View File

@ -716,7 +716,7 @@ std::vector<ObjectInstanceID> CGameInfoCallback::getTeleportChannelExits(Telepor
return ret; return ret;
} }
ETeleportChannelType::ETeleportChannelType CGameInfoCallback::getTeleportChannelType(TeleportChannelID id, PlayerColor Player) const ETeleportChannelType CGameInfoCallback::getTeleportChannelType(TeleportChannelID id, PlayerColor Player) const
{ {
std::vector<ObjectInstanceID> entrances = getTeleportChannelEntraces(id, ObjectInstanceID(), Player); std::vector<ObjectInstanceID> entrances = getTeleportChannelEntraces(id, ObjectInstanceID(), Player);
std::vector<ObjectInstanceID> exits = getTeleportChannelExits(id, ObjectInstanceID(), Player); std::vector<ObjectInstanceID> exits = getTeleportChannelExits(id, ObjectInstanceID(), Player);

View File

@ -111,7 +111,7 @@ public:
//teleport //teleport
std::vector<ObjectInstanceID> getTeleportChannelEntraces(TeleportChannelID id, ObjectInstanceID excludeId = ObjectInstanceID(), PlayerColor Player = PlayerColor::UNFLAGGABLE) const; std::vector<ObjectInstanceID> getTeleportChannelEntraces(TeleportChannelID id, ObjectInstanceID excludeId = ObjectInstanceID(), PlayerColor Player = PlayerColor::UNFLAGGABLE) const;
std::vector<ObjectInstanceID> getTeleportChannelExits(TeleportChannelID id, ObjectInstanceID excludeId = ObjectInstanceID(), PlayerColor Player = PlayerColor::UNFLAGGABLE) const; std::vector<ObjectInstanceID> getTeleportChannelExits(TeleportChannelID id, ObjectInstanceID excludeId = ObjectInstanceID(), PlayerColor Player = PlayerColor::UNFLAGGABLE) const;
ETeleportChannelType::ETeleportChannelType getTeleportChannelType(TeleportChannelID id, PlayerColor Player = PlayerColor::UNFLAGGABLE) const; ETeleportChannelType getTeleportChannelType(TeleportChannelID id, PlayerColor Player = PlayerColor::UNFLAGGABLE) const;
bool isTeleportEntrancePassable(const CGTeleport * obj, PlayerColor Player) const; bool isTeleportEntrancePassable(const CGTeleport * obj, PlayerColor Player) const;
}; };

View File

@ -474,16 +474,13 @@ namespace ETileType
}; };
} }
namespace ETeleportChannelType enum class ETeleportChannelType
{ {
enum ETeleportChannelType
{
IMPASSABLE, IMPASSABLE,
BIDIRECTIONAL, BIDIRECTIONAL,
UNIDIRECTIONAL, UNIDIRECTIONAL,
MIXED MIXED
}; };
}
class Obj class Obj
{ {