コード例 #1
0
ファイル: IGameCallback.cpp プロジェクト: vilkov/vcmi
const CTown * CGameInfoCallback::getNativeTown(TPlayerColor color) const
{
	const PlayerSettings *ps = getPlayerSettings(color);
	ERROR_RET_VAL_IF(!ps, "There is no such player!", NULL);
	return &VLC->townh->towns[ps->castle];
}
コード例 #2
0
const CTown * CGameInfoCallback::getNativeTown(PlayerColor color) const
{
	const PlayerSettings *ps = getPlayerSettings(color);
	ERROR_RET_VAL_IF(!ps, "There is no such player!", nullptr);
	return VLC->townh->factions[ps->castle]->town;
}