mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 04:37:00 +00:00
[10923] Cleanup some magic numbers
This commit is contained in:
parent
3c58f25ad9
commit
72b1d30a1c
3 changed files with 7 additions and 6 deletions
|
|
@ -130,7 +130,7 @@ m_creatureInfo(NULL), m_splineFlags(SPLINEFLAG_WALKMODE)
|
||||||
m_regenTimer = 200;
|
m_regenTimer = 200;
|
||||||
m_valuesCount = UNIT_END;
|
m_valuesCount = UNIT_END;
|
||||||
|
|
||||||
for(int i = 0; i < 4; ++i)
|
for(int i = 0; i < CREATURE_MAX_SPELLS; ++i)
|
||||||
m_spells[i] = 0;
|
m_spells[i] = 0;
|
||||||
|
|
||||||
m_CreatureSpellCooldowns.clear();
|
m_CreatureSpellCooldowns.clear();
|
||||||
|
|
|
||||||
|
|
@ -8733,18 +8733,19 @@ int32 Unit::CalculateSpellDamage(Unit const* target, SpellEntry const* spellProt
|
||||||
if (comboDamage != 0 && unitPlayer && target && (target->GetObjectGuid() == unitPlayer->GetComboTargetGuid()))
|
if (comboDamage != 0 && unitPlayer && target && (target->GetObjectGuid() == unitPlayer->GetComboTargetGuid()))
|
||||||
value += (int32)(comboDamage * comboPoints);
|
value += (int32)(comboDamage * comboPoints);
|
||||||
|
|
||||||
if(Player* modOwner = GetSpellModOwner())
|
if (Player* modOwner = GetSpellModOwner())
|
||||||
{
|
{
|
||||||
modOwner->ApplySpellMod(spellProto->Id, SPELLMOD_ALL_EFFECTS, value);
|
modOwner->ApplySpellMod(spellProto->Id, SPELLMOD_ALL_EFFECTS, value);
|
||||||
|
|
||||||
switch(effect_index)
|
switch(effect_index)
|
||||||
{
|
{
|
||||||
case 0:
|
case EFFECT_INDEX_0:
|
||||||
modOwner->ApplySpellMod(spellProto->Id, SPELLMOD_EFFECT1, value);
|
modOwner->ApplySpellMod(spellProto->Id, SPELLMOD_EFFECT1, value);
|
||||||
break;
|
break;
|
||||||
case 1:
|
case EFFECT_INDEX_1:
|
||||||
modOwner->ApplySpellMod(spellProto->Id, SPELLMOD_EFFECT2, value);
|
modOwner->ApplySpellMod(spellProto->Id, SPELLMOD_EFFECT2, value);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case EFFECT_INDEX_2:
|
||||||
modOwner->ApplySpellMod(spellProto->Id, SPELLMOD_EFFECT3, value);
|
modOwner->ApplySpellMod(spellProto->Id, SPELLMOD_EFFECT3, value);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "10922"
|
#define REVISION_NR "10923"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue