mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
[7583] Use instead BasePoints+1 hardcoded formula more correct BasePoint+BaseDice hide in special helper function.
This commit is contained in:
parent
ab7491e0e1
commit
f38283eba6
5 changed files with 18 additions and 14 deletions
|
|
@ -122,7 +122,8 @@ int32 CompareAuraRanks(uint32 spellId_1, uint32 effIndex_1, uint32 spellId_2, ui
|
|||
if (spellId_1 == spellId_2) return 0;
|
||||
|
||||
int32 diff = spellInfo_1->EffectBasePoints[effIndex_1] - spellInfo_2->EffectBasePoints[effIndex_2];
|
||||
if (spellInfo_1->EffectBasePoints[effIndex_1]+1 < 0 && spellInfo_2->EffectBasePoints[effIndex_2]+1 < 0) return -diff;
|
||||
if (spellInfo_1->CalculateSimpleValue(effIndex_1) < 0 && spellInfo_2->CalculateSimpleValue(effIndex_2) < 0)
|
||||
return -diff;
|
||||
else return diff;
|
||||
}
|
||||
|
||||
|
|
@ -339,7 +340,7 @@ bool IsPositiveEffect(uint32 spellId, uint32 effIndex)
|
|||
case SPELL_AURA_MOD_DAMAGE_DONE: // dependent from bas point sign (negative -> negative)
|
||||
case SPELL_AURA_MOD_HEALING_DONE:
|
||||
{
|
||||
if(spellproto->EffectBasePoints[effIndex]+int32(spellproto->EffectBaseDice[effIndex]) < 0)
|
||||
if(spellproto->CalculateSimpleValue(effIndex) < 0)
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
|
|
@ -437,7 +438,7 @@ bool IsPositiveEffect(uint32 spellId, uint32 effIndex)
|
|||
switch(spellproto->EffectMiscValue[effIndex])
|
||||
{
|
||||
case SPELLMOD_COST: // dependent from bas point sign (negative -> positive)
|
||||
if(spellproto->EffectBasePoints[effIndex]+int32(spellproto->EffectBaseDice[effIndex]) > 0)
|
||||
if(spellproto->CalculateSimpleValue(effIndex) > 0)
|
||||
return false;
|
||||
break;
|
||||
default:
|
||||
|
|
@ -445,11 +446,11 @@ bool IsPositiveEffect(uint32 spellId, uint32 effIndex)
|
|||
}
|
||||
} break;
|
||||
case SPELL_AURA_MOD_HEALING_PCT:
|
||||
if(spellproto->EffectBasePoints[effIndex]+int32(spellproto->EffectBaseDice[effIndex]) < 0)
|
||||
if(spellproto->CalculateSimpleValue(effIndex) < 0)
|
||||
return false;
|
||||
break;
|
||||
case SPELL_AURA_MOD_SKILL:
|
||||
if(spellproto->EffectBasePoints[effIndex]+int32(spellproto->EffectBaseDice[effIndex]) < 0)
|
||||
if(spellproto->CalculateSimpleValue(effIndex) < 0)
|
||||
return false;
|
||||
break;
|
||||
case SPELL_AURA_FORCE_REACTION:
|
||||
|
|
@ -1774,10 +1775,10 @@ void SpellMgr::LoadSpellLearnSkills()
|
|||
SpellLearnSkillNode dbc_node;
|
||||
dbc_node.skill = entry->EffectMiscValue[i];
|
||||
if ( dbc_node.skill != SKILL_RIDING )
|
||||
dbc_node.value = 1;
|
||||
dbc_node.value = 1;
|
||||
else
|
||||
dbc_node.value = (entry->EffectBasePoints[i]+1)*75;
|
||||
dbc_node.maxvalue = (entry->EffectBasePoints[i]+1)*75;
|
||||
dbc_node.value = entry->CalculateSimpleValue(i)*75;
|
||||
dbc_node.maxvalue = entry->CalculateSimpleValue(i)*75;
|
||||
|
||||
mSpellLearnSkills[spell] = dbc_node;
|
||||
++dbc_count;
|
||||
|
|
@ -2095,7 +2096,7 @@ void SpellMgr::LoadSpellPetAuras()
|
|||
continue;
|
||||
}
|
||||
|
||||
PetAura pa(pet, aura, spellInfo->EffectImplicitTargetA[i] == TARGET_PET, spellInfo->EffectBasePoints[i] + spellInfo->EffectBaseDice[i]);
|
||||
PetAura pa(pet, aura, spellInfo->EffectImplicitTargetA[i] == TARGET_PET, spellInfo->CalculateSimpleValue(i));
|
||||
mSpellPetAuraMap[spell] = pa;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue