PDA

Просмотр полной версии : [patch] Glyph of Arcane Shot


Den
24.07.2011, 09:31
DELETE FROM `spell_proc_event` WHERE `entry` IN (56841);
INSERT INTO `spell_proc_event` VALUES (56841, 0x00, 9, 0x00000800, 0x00000800, 0x00000800, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000100, 0x00000000, 0.000000, 0.000000, 0);

diff --git a/src/game/UnitAuraProcHandler.cpp b/src/game/UnitAuraProcHandler.cpp
index c1ff8a7..bb56ecf 100644
--- a/src/game/UnitAuraProcHandler.cpp
+++ b/src/game/UnitAuraProcHandler.cpp
@@ -1821,6 +1821,34 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura
target = this;
break;
}
+ // Glyph of Arcane Shot
+ else if (dummySpell->Id == 56841)
+ {
+ if (!procSpell)
+ return SPELL_AURA_PROC_FAILED;
+
+ // search Serpent Sting, Viper Sting, Scorpid Sting, Wyvern Sting
+ bool found = false;
+ SpellAuraHolderMap& Auras = pVictim->GetSpellAuraHolderMap();
+ for (SpellAuraHolderMap::const_iterator i = Auras.begin(); i != Auras.end(); ++i)
+ {
+ SpellEntry const* spellInfo = (*i).second->GetSpellProto();
+ if (spellInfo->IsFitToFamily(SPELLFAMILY_HUNTER, UI64LIT(0x000010800000C000)))
+ {
+ found = true;
+ break;
+ }
+ }
+ if (!found)
+ return SPELL_AURA_PROC_FAILED;
+
+ int32 mana = procSpell->manaCost + procSpell->ManaCostPercentage * GetCreateMana() / 100;
+ basepoints[0] = mana * triggerAmount / 100;
+
+ target = this;
+ triggered_spell_id = 61389;
+ break;
+ }
break;
}
case SPELLFAMILY_PALADIN: