int mbTroop::getKillExperience()
{
return (int)(((m_level + 10) * (m_level + 10)) * 0.1f);
}
mbTroop *troop = getTroop();
float experience = (float)troop->getKillExperience();
if (g_mission->isTeamFight())
experience *= 0.1f;
if (experience != 0.0f)
{
mbTroop *damagerTroop = g_game->getTroop(troopNo);
if (!damagerTroop->isHero())
agent->m_experience += (int)(experience * rglConfig::Campaign::fRegularExperienceMultiplier);
else if (troopNo == g_game->m_playerTroopNo)
g_game->addExperienceToTroop(troopNo, (int)(experience * rglConfig::Campaign::fPlayerExperienceMultiplier));
else
g_game->addExperienceToTroop(troopNo, (int)(experience * rglConfig::Campaign::fHeroExperienceMultiplier));
}