aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Spells/SpellEffects.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/game/Spells/SpellEffects.cpp')
-rw-r--r--src/server/game/Spells/SpellEffects.cpp28
1 files changed, 13 insertions, 15 deletions
diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp
index 1512e39f946..b6f009b971e 100644
--- a/src/server/game/Spells/SpellEffects.cpp
+++ b/src/server/game/Spells/SpellEffects.cpp
@@ -5432,7 +5432,7 @@ void Spell::EffectUnlockGuildVaultTab(SpellEffIndex /*effIndex*/)
// Safety checks done in Spell::CheckCast
Player* caster = m_caster->ToPlayer();
if (Guild* guild = caster->GetGuild())
- guild->HandleBuyBankTab(caster->GetSession(), effectInfo->BasePoints - 1); // Bank tabs start at zero internally
+ guild->HandleBuyBankTab(caster->GetSession(), damage - 1); // Bank tabs start at zero internally
}
void Spell::EffectResurrectWithAura(SpellEffIndex effIndex)
@@ -5497,7 +5497,7 @@ void Spell::EffectRemoveTalent(SpellEffIndex /*effIndex*/)
player->SendTalentsInfoData();
}
-void Spell::EffectDestroyItem(SpellEffIndex effIndex)
+void Spell::EffectDestroyItem(SpellEffIndex /*effIndex*/)
{
if (effectHandleMode != SPELL_EFFECT_HANDLE_HIT_TARGET)
return;
@@ -5506,13 +5506,11 @@ void Spell::EffectDestroyItem(SpellEffIndex effIndex)
return;
Player* player = unitTarget->ToPlayer();
- SpellEffectInfo const* effect = GetEffect(effIndex);
- uint32 itemId = effect->ItemType;
- if (Item* item = player->GetItemByEntry(itemId))
+ if (Item* item = player->GetItemByEntry(effectInfo->ItemType))
player->DestroyItem(item->GetBagSlot(), item->GetSlot(), true);
}
-void Spell::EffectLearnGarrisonBuilding(SpellEffIndex effIndex)
+void Spell::EffectLearnGarrisonBuilding(SpellEffIndex /*effIndex*/)
{
if (effectHandleMode != SPELL_EFFECT_HANDLE_HIT_TARGET)
return;
@@ -5521,10 +5519,10 @@ void Spell::EffectLearnGarrisonBuilding(SpellEffIndex effIndex)
return;
if (Garrison* garrison = unitTarget->ToPlayer()->GetGarrison())
- garrison->LearnBlueprint(GetEffect(effIndex)->MiscValue);
+ garrison->LearnBlueprint(effectInfo->MiscValue);
}
-void Spell::EffectCreateGarrison(SpellEffIndex effIndex)
+void Spell::EffectCreateGarrison(SpellEffIndex /*effIndex*/)
{
if (effectHandleMode != SPELL_EFFECT_HANDLE_HIT_TARGET)
return;
@@ -5532,7 +5530,7 @@ void Spell::EffectCreateGarrison(SpellEffIndex effIndex)
if (!unitTarget || unitTarget->GetTypeId() != TYPEID_PLAYER)
return;
- unitTarget->ToPlayer()->CreateGarrison(GetEffect(effIndex)->MiscValue);
+ unitTarget->ToPlayer()->CreateGarrison(effectInfo->MiscValue);
}
void Spell::EffectCreateConversation(SpellEffIndex /*effIndex*/)
@@ -5546,7 +5544,7 @@ void Spell::EffectCreateConversation(SpellEffIndex /*effIndex*/)
Conversation::CreateConversation(effectInfo->MiscValue, GetCaster(), destTarget->GetPosition(), { GetCaster()->GetGUID() }, GetSpellInfo());
}
-void Spell::EffectAddGarrisonFollower(SpellEffIndex effIndex)
+void Spell::EffectAddGarrisonFollower(SpellEffIndex /*effIndex*/)
{
if (effectHandleMode != SPELL_EFFECT_HANDLE_HIT_TARGET)
return;
@@ -5555,7 +5553,7 @@ void Spell::EffectAddGarrisonFollower(SpellEffIndex effIndex)
return;
if (Garrison* garrison = unitTarget->ToPlayer()->GetGarrison())
- garrison->AddFollower(GetEffect(effIndex)->MiscValue);
+ garrison->AddFollower(effectInfo->MiscValue);
}
void Spell::EffectCreateHeirloomItem(SpellEffIndex effIndex)
@@ -5578,7 +5576,7 @@ void Spell::EffectCreateHeirloomItem(SpellEffIndex effIndex)
ExecuteLogEffectCreateItem(effIndex, m_misc.Raw.Data[0]);
}
-void Spell::EffectActivateGarrisonBuilding(SpellEffIndex effIndex)
+void Spell::EffectActivateGarrisonBuilding(SpellEffIndex /*effIndex*/)
{
if (effectHandleMode != SPELL_EFFECT_HANDLE_HIT_TARGET)
return;
@@ -5587,10 +5585,10 @@ void Spell::EffectActivateGarrisonBuilding(SpellEffIndex effIndex)
return;
if (Garrison* garrison = unitTarget->ToPlayer()->GetGarrison())
- garrison->ActivateBuilding(GetEffect(effIndex)->MiscValue);
+ garrison->ActivateBuilding(effectInfo->MiscValue);
}
-void Spell::EffectHealBattlePetPct(SpellEffIndex effIndex)
+void Spell::EffectHealBattlePetPct(SpellEffIndex /*effIndex*/)
{
if (effectHandleMode != SPELL_EFFECT_HANDLE_HIT_TARGET)
return;
@@ -5599,7 +5597,7 @@ void Spell::EffectHealBattlePetPct(SpellEffIndex effIndex)
return;
if (BattlePetMgr* battlePetMgr = unitTarget->ToPlayer()->GetSession()->GetBattlePetMgr())
- battlePetMgr->HealBattlePetsPct(GetEffect(effIndex)->BasePoints);
+ battlePetMgr->HealBattlePetsPct(damage);
}
void Spell::EffectEnableBattlePets(SpellEffIndex /*effIndex*/)