From 66541027b5e0bf99e7687e7229c5a2167bfa5d7a Mon Sep 17 00:00:00 2001 From: Frank Zago Date: Fri, 25 Sep 2009 04:05:01 +0000 Subject: [PATCH] Correct spelling. --- client/GUIClasses.cpp | 12 ++++++------ client/GUIClasses.h | 2 +- hch/CObjectHandler.cpp | 12 ++++++------ hch/CObjectHandler.h | 4 ++-- lib/NetPacks.h | 6 +++--- 5 files changed, 18 insertions(+), 18 deletions(-) diff --git a/client/GUIClasses.cpp b/client/GUIClasses.cpp index c06ff74c4..b4d10c05b 100644 --- a/client/GUIClasses.cpp +++ b/client/GUIClasses.cpp @@ -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; -} \ No newline at end of file +} diff --git a/client/GUIClasses.h b/client/GUIClasses.h index d4dad2b8e..079f7cfba 100644 --- a/client/GUIClasses.h +++ b/client/GUIClasses.h @@ -765,7 +765,7 @@ public: class CShopWindow : public CIntObject { public: - std::map avaliable, chosen, bought; + std::map available, chosen, bought; bool swapItem (ui16 which, bool choose); virtual void Buy() {}; diff --git a/hch/CObjectHandler.cpp b/hch/CObjectHandler.cpp index 756caba0c..48cbc427e 100644 --- a/hch/CObjectHandler.cpp +++ b/hch/CObjectHandler.cpp @@ -4258,9 +4258,9 @@ void CGPyramid::initObj() pyramidConfig.easiest; //?!? } bc = &pyramidConfig; - std::vector avaliable; - cb->getAllowedSpells (avaliable, 5); - spell = (avaliable[rand()%avaliable.size()]); + std::vector 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 } } -} \ No newline at end of file +} diff --git a/hch/CObjectHandler.h b/hch/CObjectHandler.h index 024174502..c384ee322 100644 --- a/hch/CObjectHandler.h +++ b/hch/CObjectHandler.h @@ -973,7 +973,7 @@ class DLL_EXPORT CShop : public CGObjectInstance { ///base class for university, art merchant, slave market etc. public: - std::map avaliable; + std::map available; std::map chosen, bought; //redundant? //keys are unique for all three maps std::map price; @@ -987,7 +987,7 @@ public: template void serialize(Handler &h, const int version) { - h & avaliable & chosen & bought & price; + h & available & chosen & bought & price; } }; class DLL_EXPORT CGArtMerchant : public CShop diff --git a/lib/NetPacks.h b/lib/NetPacks.h index fa11b932f..e44b5cc0c 100644 --- a/lib/NetPacks.h +++ b/lib/NetPacks.h @@ -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 avaliable, chosen, bought; + std::map available, chosen, bought; template void serialize(Handler &h, const int version) { - h & id & heroid & objectid & avaliable & chosen & bought; + h & id & heroid & objectid & available & chosen & bought; } };