1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-26 03:52:01 +02:00

Remove no longer used code

This commit is contained in:
Ivan Savenko 2023-01-24 23:34:02 +02:00
parent 44bdd2cbf3
commit af5ff0c9df

View File

@ -542,50 +542,4 @@ CRewardableObject::CRewardableObject():
canRefuse(false)
{}
///////////////////////////////////////////////////////////////////////////////////////////////////
/*
std::vector<int3> CGMagicSpring::getVisitableOffsets() const
{
std::vector <int3> visitableTiles;
for(int y = 0; y < 6; y++)
for (int x = 0; x < 8; x++) //starting from left
if (appearance->isVisitableAt(x, y))
visitableTiles.push_back (int3(x, y , 0));
return visitableTiles;
}
int3 CGMagicSpring::getVisitableOffset() const
{
auto visitableTiles = getVisitableOffsets();
if (visitableTiles.size() != info.size())
{
logGlobal->warn("Unexpected number of visitable tiles of Magic Spring at %s", pos.toString());
return int3(-1,-1,-1);
}
for (size_t i=0; i<visitableTiles.size(); i++)
{
if (info[i].numOfGrants == 0)
return visitableTiles[i];
}
return visitableTiles[0]; // return *something*. This is valid visitable tile but already used
}
std::vector<ui32> CGMagicSpring::getAvailableRewards(const CGHeroInstance * hero) const
{
auto tiles = getVisitableOffsets();
for (size_t i=0; i<tiles.size(); i++)
{
if (pos - tiles[i] == hero->visitablePos() && info[i].numOfGrants == 0)
{
return std::vector<ui32>(1, (ui32)i);
}
}
// hero is either not on visitable tile (should not happen) or tile is already used
return std::vector<ui32>();
}
*/
VCMI_LIB_NAMESPACE_END