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

Correct spelling.

This commit is contained in:
Frank Zago 2009-09-25 04:05:01 +00:00
parent c1b198db74
commit 66541027b5
5 changed files with 18 additions and 18 deletions

View File

@ -4362,18 +4362,18 @@ bool CShopWindow::swapItem (ui16 which, bool choose)
if (chosen.count(which))
{
itemFound = true;
chosen[which] = avaliable[which];
avaliable.erase(which);
chosen[which] = available[which];
available.erase(which);
}
}
else //return item to avaliable list
else //return item to available list
{
if (avaliable.count(which))
if (available.count(which))
{
itemFound = true;
avaliable[which] = chosen[which];
available[which] = chosen[which];
chosen.erase(which);
}
}
return itemFound;
}
}

View File

@ -765,7 +765,7 @@ public:
class CShopWindow : public CIntObject
{
public:
std::map<ui16, Component> avaliable, chosen, bought;
std::map<ui16, Component> available, chosen, bought;
bool swapItem (ui16 which, bool choose);
virtual void Buy() {};

View File

@ -4258,9 +4258,9 @@ void CGPyramid::initObj()
pyramidConfig.easiest; //?!?
}
bc = &pyramidConfig;
std::vector<ui16> avaliable;
cb->getAllowedSpells (avaliable, 5);
spell = (avaliable[rand()%avaliable.size()]);
std::vector<ui16> available;
cb->getAllowedSpells (available, 5);
spell = (available[rand()%available.size()]);
}
void CGPyramid::onHeroVisit (const CGHeroInstance * h) const
{
@ -4702,7 +4702,7 @@ void CShop::setPropertyDer (ui8 what, ui32 val)
switch (what)
{
case 13: //sweep
avaliable.clear();
available.clear();
chosen.clear();
bought.clear();
break;
@ -4741,10 +4741,10 @@ void CGArtMerchant::reset(ui32 val)
{
index = arts.begin() + val % arts.size();
avaliable [avaliable.size()] = new Component (Component::ARTIFACT, (*index)->id, 0, 0);
available [available.size()] = new Component (Component::ARTIFACT, (*index)->id, 0, 0);
arts.erase(index);
val *= (id + n * i); //randomize
}
}
}
}

View File

@ -973,7 +973,7 @@ class DLL_EXPORT CShop : public CGObjectInstance
{
///base class for university, art merchant, slave market etc.
public:
std::map<ui16, Component*> avaliable;
std::map<ui16, Component*> available;
std::map<ui16, Component*> chosen, bought; //redundant?
//keys are unique for all three maps
std::map<ui16, ui32> price;
@ -987,7 +987,7 @@ public:
template <typename Handler> void serialize(Handler &h, const int version)
{
h & avaliable & chosen & bought & price;
h & available & chosen & bought & price;
}
};
class DLL_EXPORT CGArtMerchant : public CShop

View File

@ -690,17 +690,17 @@ struct HeroLevelUp : public Query//2000
struct TradeComponents : public CPackForClient, public CPackForServer
{
///used to handle info about components avaliable in shops
///used to handle info about components available in shops
void applyCl(CClient *cl);
DLL_EXPORT void applyGs(CGameState *gs);
si32 heroid;
ui32 objectid;
std::map<ui16, Component> avaliable, chosen, bought;
std::map<ui16, Component> available, chosen, bought;
template <typename Handler> void serialize(Handler &h, const int version)
{
h & id & heroid & objectid & avaliable & chosen & bought;
h & id & heroid & objectid & available & chosen & bought;
}
};