[9719] Drop very old item amount calculation hack code.

Use pre-calculated normal effect value as amount.
This also must fix recent item amount crafted items.
This commit is contained in:
VladimirMangos 2010-04-10 08:10:18 +04:00
parent 052f02209a
commit 117bc1e836
2 changed files with 2 additions and 23 deletions

View file

@ -3183,28 +3183,7 @@ void Spell::DoCreateItem(SpellEffectIndex eff_idx, uint32 itemtype)
break;
}
uint32 num_to_add;
// TODO: maybe all this can be replaced by using correct calculated `damage` value
if(pProto->Class != ITEM_CLASS_CONSUMABLE || m_spellInfo->SpellFamilyName != SPELLFAMILY_MAGE)
{
int32 basePoints = m_currentBasePoints[eff_idx];
int32 randomPoints = m_spellInfo->EffectDieSides[eff_idx];
if (randomPoints)
num_to_add = basePoints + irand(0, randomPoints);
else
num_to_add = basePoints;
}
else if (pProto->MaxCount == 1)
num_to_add = 1;
else if(player->getLevel() >= m_spellInfo->spellLevel)
{
int32 basePoints = m_currentBasePoints[eff_idx];
float pointPerLevel = m_spellInfo->EffectRealPointsPerLevel[eff_idx];
num_to_add = basePoints + uint32((player->getLevel() - m_spellInfo->spellLevel)*pointPerLevel);
}
else
num_to_add = 2;
uint32 num_to_add = damage;
if (num_to_add < 1)
num_to_add = 1;

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "9718"
#define REVISION_NR "9719"
#endif // __REVISION_NR_H__