aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent-Michael <Vincent_Michael@gmx.de>2013-07-21 00:57:15 +0200
committerVincent-Michael <Vincent_Michael@gmx.de>2013-07-21 00:57:15 +0200
commit40b87aca8f81ce9511478c31c0fe7fb31f56ea3c (patch)
treefc6244a2b6c9bbeff9b18f8ffc86643b5fea7197
parentb3e9ca7a6a4ea97e1b06fda70ef759f822bd4fde (diff)
Core/Spells: Small cleanup in b3e9ca7a6a4ea97e1b06fda70ef759f822bd4fde
-rw-r--r--sql/updates/world/2013_07_20_08_world_spell_script_misc_434.sql2
-rw-r--r--src/server/scripts/Spells/spell_generic.cpp22
2 files changed, 8 insertions, 16 deletions
diff --git a/sql/updates/world/2013_07_20_08_world_spell_script_misc_434.sql b/sql/updates/world/2013_07_20_08_world_spell_script_misc_434.sql
index f662b7a1b57..a1ea020baa1 100644
--- a/sql/updates/world/2013_07_20_08_world_spell_script_misc_434.sql
+++ b/sql/updates/world/2013_07_20_08_world_spell_script_misc_434.sql
@@ -1,6 +1,6 @@
DELETE FROM `spell_proc_event` WHERE `entry`=17619;
INSERT INTO `spell_proc_event` (`entry`, `SchoolMask`, `SpellFamilyName`, `SpellFamilyMask0`, `SpellFamilyMask1`, `SpellFamilyMask2`, `procFlags`, `procEx`, `ppmRate`, `CustomChance`, `Cooldown`) VALUES
-(17619, 0, 13, 0, 0, 0, 32768, 0, 0, 100, 0);
+(17619, 0, 13, 0, 0, 0, 0x4800, 0, 0, 100, 0);
DELETE FROM `spell_script_names` WHERE `spell_id`=17619;
INSERT INTO `spell_script_names`(`spell_id`, `ScriptName`) VALUES
diff --git a/src/server/scripts/Spells/spell_generic.cpp b/src/server/scripts/Spells/spell_generic.cpp
index a9c28159345..3dabd772ed3 100644
--- a/src/server/scripts/Spells/spell_generic.cpp
+++ b/src/server/scripts/Spells/spell_generic.cpp
@@ -197,25 +197,17 @@ class spell_gen_alchemist_stone : public SpellScriptLoader
PreventDefaultAction();
uint32 spellId = 0;
- int32 basepoints0 = 0;
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "procSpell: %u", eventInfo.GetDamageInfo()->GetSpellInfo()->Id);
- for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
- {
- if (eventInfo.GetDamageInfo()->GetSpellInfo()->Effects[i].Effect == SPELL_EFFECT_HEAL)
- spellId = ALECHEMIST_STONE_HEAL;
- else if (eventInfo.GetDamageInfo()->GetSpellInfo()->Effects[i].Effect == SPELL_EFFECT_ENERGIZE)
- spellId = ALECHEMIST_STONE_MANA;
- else
- continue;
-
- basepoints0 = int32(GetTarget()->CalculateSpellDamage(GetTarget(), eventInfo.GetDamageInfo()->GetSpellInfo(), i) * 0.4f);
- }
+ int32 bp = int32(eventInfo.GetDamageInfo()->GetDamage() * 0.4f);
+ if (eventInfo.GetDamageInfo()->GetSpellInfo()->HasEffect(SPELL_EFFECT_HEAL))
+ spellId = ALECHEMIST_STONE_HEAL;
+ else if (eventInfo.GetDamageInfo()->GetSpellInfo()->HasEffect(SPELL_EFFECT_ENERGIZE))
+ spellId = ALECHEMIST_STONE_MANA;
+ TC_LOG_ERROR(LOG_FILTER_GENERAL, "spellId: %u, procSpell: %u", spellId, eventInfo.GetDamageInfo()->GetSpellInfo()->Id);
if (!spellId)
return;
-
- GetTarget()->CastCustomSpell(GetTarget(), spellId, &basepoints0, NULL, NULL, true, NULL, aurEff);
+ GetTarget()->CastCustomSpell(spellId, SPELLVALUE_BASE_POINT0, bp, GetTarget(), true, NULL, aurEff);
}