mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 01:37:00 +00:00
[12198] - Remove weapon skillgains, defense skill, thanks @FailzorD for original patch.
- Update dodge, parry, block to cata. - Some mastery fixes and stylefixes. - Remove some no longer used functions. Signed-off-by: Yaki Khadafi <elsoldollo@gmail.com>
This commit is contained in:
parent
7637add86c
commit
8e84b0ff71
20 changed files with 170 additions and 410 deletions
|
|
@ -4750,3 +4750,33 @@ SpellEntry const* GetSpellEntryByDifficulty(uint32 id, Difficulty difficulty, bo
|
|||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
int32 GetMasteryCoefficient(SpellEntry const * spellProto)
|
||||
{
|
||||
if (!spellProto || !spellProto->HasAttribute(SPELL_ATTR_EX8_MASTERY))
|
||||
return 0;
|
||||
|
||||
// Find mastery scaling coef
|
||||
int32 coef = 0;
|
||||
for (uint32 j = 0; j < MAX_EFFECT_INDEX; ++j)
|
||||
{
|
||||
SpellEffectEntry const * effectEntry = spellProto->GetSpellEffect(SpellEffectIndex(j));
|
||||
if (!effectEntry)
|
||||
continue;
|
||||
|
||||
// mastery scaling coef is stored in dummy aura, except 77215 (Potent Afflictions, zero effect)
|
||||
// and 76808 (Executioner, not stored at all)
|
||||
int32 bp = effectEntry->CalculateSimpleValue();
|
||||
if (spellProto->Id == 76808)
|
||||
bp = 250;
|
||||
|
||||
if (!bp)
|
||||
continue;
|
||||
|
||||
coef = bp;
|
||||
break;
|
||||
}
|
||||
|
||||
return coef;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue