aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Spells/Spell.cpp
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2015-02-22 10:29:12 +0100
committerShauren <shauren.trinity@gmail.com>2015-02-22 10:29:12 +0100
commit5c4fd7ac4fc5121f7ac620fc4ffdfae939420ba1 (patch)
treef007d5c099c9eb1501dfebb58672499f075be6fc /src/server/game/Spells/Spell.cpp
parente36fb12359c7dcd7f74b1c9bf8ddfcbad44d273a (diff)
Core/DataStores: Added tables for all loaded DB2 stores
Diffstat (limited to 'src/server/game/Spells/Spell.cpp')
-rw-r--r--src/server/game/Spells/Spell.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp
index ed7ba3b788c..44012185f11 100644
--- a/src/server/game/Spells/Spell.cpp
+++ b/src/server/game/Spells/Spell.cpp
@@ -4525,14 +4525,14 @@ SpellCastResult Spell::CheckRuneCost(uint32 runeCostID)
int32 runeCost[NUM_RUNE_TYPES]; // blood, frost, unholy, death
- for (uint32 i = 0; i < RUNE_DEATH; ++i)
+ for (uint32 i = 0; i < NUM_RUNE_TYPES; ++i)
{
runeCost[i] = src->RuneCost[i];
if (Player* modOwner = m_caster->GetSpellModOwner())
modOwner->ApplySpellMod(m_spellInfo->Id, SPELLMOD_COST, runeCost[i], this);
}
- runeCost[RUNE_DEATH] = MAX_RUNES; // calculated later
+ runeCost[RUNE_DEATH] += MAX_RUNES;
for (uint32 i = 0; i < MAX_RUNES; ++i)
{
@@ -4565,15 +4565,13 @@ void Spell::TakeRunePower(bool didHit)
int32 runeCost[NUM_RUNE_TYPES]; // blood, frost, unholy, death
- for (uint32 i = 0; i < RUNE_DEATH; ++i)
+ for (uint32 i = 0; i < NUM_RUNE_TYPES; ++i)
{
runeCost[i] = runeCostData->RuneCost[i];
if (Player* modOwner = m_caster->GetSpellModOwner())
modOwner->ApplySpellMod(m_spellInfo->Id, SPELLMOD_COST, runeCost[i], this);
}
- runeCost[RUNE_DEATH] = 0; // calculated later
-
for (uint32 i = 0; i < MAX_RUNES; ++i)
{
RuneType rune = player->GetCurrentRune(i);
@@ -4585,7 +4583,7 @@ void Spell::TakeRunePower(bool didHit)
}
}
- runeCost[RUNE_DEATH] = runeCost[RUNE_BLOOD] + runeCost[RUNE_UNHOLY] + runeCost[RUNE_FROST];
+ runeCost[RUNE_DEATH] += runeCost[RUNE_BLOOD] + runeCost[RUNE_UNHOLY] + runeCost[RUNE_FROST];
if (runeCost[RUNE_DEATH] > 0)
{
@@ -4610,7 +4608,7 @@ void Spell::TakeRunePower(bool didHit)
// you can gain some runic power when use runes
if (didHit)
- if (int32 rp = int32(runeCostData->RunePowerGain * sWorld->getRate(RATE_POWER_RUNICPOWER_INCOME)))
+ if (int32 rp = int32(runeCostData->RunicPower * sWorld->getRate(RATE_POWER_RUNICPOWER_INCOME)))
player->ModifyPower(POWER_RUNIC_POWER, int32(rp));
}