From b670979cabdc2f0cfb59a05bf8cba7175b516e67 Mon Sep 17 00:00:00 2001 From: mateuszb Date: Sat, 6 Feb 2010 13:55:39 +0000 Subject: [PATCH] * compilation fix --- server/CGameHandler.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/CGameHandler.cpp b/server/CGameHandler.cpp index e1f6add72..c36a10236 100644 --- a/server/CGameHandler.cpp +++ b/server/CGameHandler.cpp @@ -1930,7 +1930,7 @@ void CGameHandler::useScholarSkill(si32 fromHero, si32 toHero) cs.learn = true; cs.hid = toHero;//giving spells to first hero - for(std::set::iterator it=h1->spells.begin(); it!=h1->spells.end();it++) + for(std::set::const_iterator it=h1->spells.begin(); it!=h1->spells.end();it++) if ( h2Lvl >= VLC->spellh->spells[*it].level && !vstd::contains(h2->spells, *it))//hero can learn it and don't have it yet cs.spells.insert(*it);//spell to learn @@ -1940,7 +1940,7 @@ void CGameHandler::useScholarSkill(si32 fromHero, si32 toHero) cs.hid = fromHero; cs.spells.clear(); - for(std::set::iterator it=h2->spells.begin(); it!=h2->spells.end();it++) + for(std::set::const_iterator it=h2->spells.begin(); it!=h2->spells.end();it++) if ( h1Lvl >= VLC->spellh->spells[*it].level && !vstd::contains(h1->spells, *it)) cs.spells.insert(*it); if (cs.spells.size())