mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-27 22:49:25 +02:00
- Fixed serialization of limiters
- Hero can now can have several separate specialty nodes - Fixed typo (speciality->specialty) - Fixed several crashes related to commanders - Improvements to specialty handling, bugfixes and temporary solutions for upcoming hero specialties in mods
This commit is contained in:
@@ -4063,7 +4063,7 @@ void CGameHandler::handleSpellCasting( int spellID, int spellLvl, BattleHex dest
|
||||
const Bonus * bonus = NULL;
|
||||
if (caster)
|
||||
bonus = caster->getBonusLocalFirst(Selector::typeSubtype(Bonus::SPECIAL_PECULIAR_ENCHANT, spellID));
|
||||
//TODO does hero speciality should affects his stack casting spells?
|
||||
//TODO does hero specialty should affects his stack casting spells?
|
||||
|
||||
si32 power = 0;
|
||||
BOOST_FOREACH(const CStack *affected, attackedCres)
|
||||
@@ -4073,7 +4073,7 @@ void CGameHandler::handleSpellCasting( int spellID, int spellLvl, BattleHex dest
|
||||
sse.stacks.push_back(affected->ID);
|
||||
|
||||
//Apply hero specials - peculiar enchants
|
||||
const ui8 tier = affected->getCreature()->level;
|
||||
const ui8 tier = std::max((ui8)1, affected->getCreature()->level); //don't divide by 0 for certain creatures (commanders, war machines)
|
||||
if (bonus)
|
||||
{
|
||||
switch(bonus->additionalInfo)
|
||||
|
||||
Reference in New Issue
Block a user