diff --git a/lib/NetPacks.h b/lib/NetPacks.h index 8058e5dce..2ac5e527d 100644 --- a/lib/NetPacks.h +++ b/lib/NetPacks.h @@ -1491,10 +1491,10 @@ struct BattleSpellCast : public CPackForClient//3009 std::vector resisted; //ids of creatures that resisted this spell std::set affectedCres; //ids of creatures affected by this spell, generally used if spell does not set any effect (like dispel or cure) si32 casterStack;// -1 if not cated by creature, >=0 caster stack ID - bool castedByHero; //if true - spell has been casted by hero, otherwise by a creature + bool castByHero; //if true - spell has been casted by hero, otherwise by a creature template void serialize(Handler &h, const int version) { - h & dmgToDisplay & side & id & skill & manaGained & tile & resisted & affectedCres & casterStack & castedByHero; + h & dmgToDisplay & side & id & skill & manaGained & tile & resisted & affectedCres & casterStack & castByHero; } }; diff --git a/lib/spells/CDefaultSpellMechanics.cpp b/lib/spells/CDefaultSpellMechanics.cpp index db5aaf53c..0cefb97e6 100644 --- a/lib/spells/CDefaultSpellMechanics.cpp +++ b/lib/spells/CDefaultSpellMechanics.cpp @@ -122,7 +122,7 @@ namespace SRSLPraserHelpers ///DefaultSpellMechanics void DefaultSpellMechanics::applyBattle(BattleInfo * battle, const BattleSpellCast * packet) const { - if (packet->castedByHero) + if (packet->castByHero) { if (packet->side < 2) { @@ -232,7 +232,7 @@ void DefaultSpellMechanics::battleCast(const SpellCastEnvironment * env, BattleS sc.skill = parameters.spellLvl; sc.tile = parameters.destination; sc.dmgToDisplay = 0; - sc.castedByHero = nullptr != parameters.casterHero; + sc.castByHero = nullptr != parameters.casterHero; sc.casterStack = (parameters.casterStack ? parameters.casterStack->ID : -1); sc.manaGained = 0; diff --git a/lib/spells/CSpellHandler.cpp b/lib/spells/CSpellHandler.cpp index 46b04aaf1..ef17c9d7d 100644 --- a/lib/spells/CSpellHandler.cpp +++ b/lib/spells/CSpellHandler.cpp @@ -538,7 +538,7 @@ void CSpell::prepareBattleLog(const CBattleInfoCallback * cb, const BattleSpell std::string casterName("Something"); //todo: localize - if(packet->castedByHero) + if(packet->castByHero) casterName = cb->battleGetHeroInfo(packet->side).name; { @@ -558,7 +558,7 @@ void CSpell::prepareBattleLog(const CBattleInfoCallback * cb, const BattleSpell const std::string attackedNamePl = attackedStack->getCreature()->namePl; - if(packet->castedByHero) + if(packet->castByHero) { const std::string fmt = VLC->generaltexth->allTexts[195]; logLines.push_back(boost::to_string(boost::format(fmt) % casterName % this->name % attackedNamePl));