mirror of
https://github.com/mangosfour/server.git
synced 2025-12-17 07:37:03 +00:00
Fix.
This commit is contained in:
parent
247cf8e9b2
commit
4234c685b8
1 changed files with 9 additions and 15 deletions
|
|
@ -1129,13 +1129,13 @@ void Unit::CastCustomSpell(Unit* Victim,SpellEntry const *spellInfo, int32 const
|
||||||
Spell *spell = new Spell(this, spellInfo, triggered, originalCaster);
|
Spell *spell = new Spell(this, spellInfo, triggered, originalCaster);
|
||||||
|
|
||||||
if(bp0)
|
if(bp0)
|
||||||
spell->m_currentBasePoints[EFFECT_INDEX_0] = *bp0-int32(1);
|
spell->m_currentBasePoints[EFFECT_INDEX_0] = *bp0;
|
||||||
|
|
||||||
if(bp1)
|
if(bp1)
|
||||||
spell->m_currentBasePoints[EFFECT_INDEX_1] = *bp1-int32(1);
|
spell->m_currentBasePoints[EFFECT_INDEX_1] = *bp1;
|
||||||
|
|
||||||
if(bp2)
|
if(bp2)
|
||||||
spell->m_currentBasePoints[EFFECT_INDEX_2] = *bp2-int32(1);
|
spell->m_currentBasePoints[EFFECT_INDEX_2] = *bp2;
|
||||||
|
|
||||||
SpellCastTargets targets;
|
SpellCastTargets targets;
|
||||||
targets.setUnitTarget( Victim );
|
targets.setUnitTarget( Victim );
|
||||||
|
|
@ -11246,17 +11246,11 @@ int32 Unit::CalculateSpellDamage(SpellEntry const* spellProto, SpellEffectIndex
|
||||||
level-= (int32)spellProto->spellLevel;
|
level-= (int32)spellProto->spellLevel;
|
||||||
|
|
||||||
float basePointsPerLevel = spellProto->EffectRealPointsPerLevel[effect_index];
|
float basePointsPerLevel = spellProto->EffectRealPointsPerLevel[effect_index];
|
||||||
float randomPointsPerLevel = 1;
|
|
||||||
int32 basePoints = int32(effBasePoints + level * basePointsPerLevel);
|
int32 basePoints = int32(effBasePoints + level * basePointsPerLevel);
|
||||||
int32 randomPoints = int32(spellProto->EffectDieSides[effect_index] + level * randomPointsPerLevel);
|
int32 randomPoints = int32(spellProto->EffectDieSides[effect_index]);
|
||||||
float comboDamage = spellProto->EffectPointsPerComboPoint[effect_index];
|
float comboDamage = spellProto->EffectPointsPerComboPoint[effect_index];
|
||||||
|
|
||||||
// range can have possitive and negative values, so order its for irand
|
int32 value = basePoints + 1;
|
||||||
int32 randvalue = int32(1) >= randomPoints
|
|
||||||
? irand(randomPoints, int32(1))
|
|
||||||
: irand(int32(1), randomPoints);
|
|
||||||
|
|
||||||
int32 value = basePoints + randvalue;
|
|
||||||
//random damage
|
//random damage
|
||||||
if(comboDamage != 0 && unitPlayer && target && (target->GetGUID() == unitPlayer->GetComboTarget()))
|
if(comboDamage != 0 && unitPlayer && target && (target->GetGUID() == unitPlayer->GetComboTarget()))
|
||||||
value += (int32)(comboDamage * comboPoints);
|
value += (int32)(comboDamage * comboPoints);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue