1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-29 00:41:38 +02:00

Remove 2 unused methods

This commit is contained in:
AlexVinS
2014-11-25 19:44:43 +03:00
parent fa9c1e8637
commit 2a75c432e0
2 changed files with 1 additions and 25 deletions

View File

@ -118,24 +118,6 @@ void BattleInfo::calculateCasualties( std::map<ui32,si32> *casualties ) const
}
}
int BattleInfo::calculateSpellDuration( const CSpell * spell, const CGHeroInstance * caster, int usedSpellPower)
{
if(!caster)
{
if (!usedSpellPower)
return 3; //default duration of all creature spells
else
return usedSpellPower; //use creature spell power
}
switch(spell->id)
{
case SpellID::FRENZY:
return 1;
default: //other spells
return caster->getPrimSkillLevel(PrimarySkill::SPELL_POWER) + caster->valOfBonuses(Bonus::SPELL_DURATION);
}
}
CStack * BattleInfo::generateNewStack(const CStackInstance &base, bool attackerOwned, SlotID slot, BattleHex position) const
{
int stackID = getIdForNewStack();
@ -159,11 +141,6 @@ CStack * BattleInfo::generateNewStack(const CStackBasicDescriptor &base, bool at
return ret;
}
bool BattleInfo::resurrects(SpellID spellid) const
{
return spellid.toSpell()->isRisingSpell();
}
const CStack * BattleInfo::battleGetStack(BattleHex pos, bool onlyAlive)
{
CStack * stack = nullptr;