diff options
author | megamage <none@none> | 2009-05-09 22:00:18 -0500 |
---|---|---|
committer | megamage <none@none> | 2009-05-09 22:00:18 -0500 |
commit | 67876f9dfe14783e9c81bf5a8bab6843d30b22bc (patch) | |
tree | 7c16c48aa18c93c0662993b922bb384340d8bffc | |
parent | 3b14179f65d3c0cd14604d8698d5af438cca25e3 (diff) |
*Fix a creature spell use bug.
--HG--
branch : trunk
-rw-r--r-- | sql/world_spell_full.sql | 5 | ||||
-rw-r--r-- | src/bindings/scripts/scripts/creature/mob_generic_creature.cpp | 21 | ||||
-rw-r--r-- | src/game/TemporarySummon.cpp | 5 |
3 files changed, 6 insertions, 25 deletions
diff --git a/sql/world_spell_full.sql b/sql/world_spell_full.sql index 915aabeb669..c892b3291fa 100644 --- a/sql/world_spell_full.sql +++ b/sql/world_spell_full.sql @@ -151,13 +151,14 @@ INSERT INTO creature_template (entry, spell1, flags_extra, scriptname) VALUES (23069, 40029, 128, ''), # demon fire (24187, 43218, 128, ''), # pillar of fire (17662, 30914, 128, ''), # Broggok Poison Cloud -(25879, 46262, 128, '') # Void Zone Periodic +(25879, 46262, 128, ''), # Void Zone Periodic +(16363, 28158, 128, ''), # Grobbulus Cloud +(29379, 54362, 128, ''), # Grobbulus Cloud (H) ON DUPLICATE KEY UPDATE spell1 = VALUES(spell1), flags_extra = VALUES(flags_extra), scriptname = VALUES(scriptname); -UPDATE creature_template SET spell1 = 28158, spell2 = 54362, flags_extra = 128 WHERE entry = 16363; UPDATE creature_template SET speed = 1.0 WHERE entry = 23095; # molten_flame diff --git a/src/bindings/scripts/scripts/creature/mob_generic_creature.cpp b/src/bindings/scripts/scripts/creature/mob_generic_creature.cpp index 56155a9ff2f..ec987e31c0e 100644 --- a/src/bindings/scripts/scripts/creature/mob_generic_creature.cpp +++ b/src/bindings/scripts/scripts/creature/mob_generic_creature.cpp @@ -166,25 +166,8 @@ struct TRINITY_DLL_DECL trigger_periodicAI : public NullCreatureAI { trigger_periodicAI(Creature* c) : NullCreatureAI(c) { - if(me->m_spells[0]) - { - if(me->m_spells[1]) - spell = GetSpellStore()->LookupEntry(HEROIC(me->m_spells[0], me->m_spells[1])); - else - spell = GetSpellStore()->LookupEntry(me->m_spells[0]); - } - else - spell = NULL; - - if(me->m_spells[2]) - { - if(me->m_spells[3]) - interval = HEROIC(me->m_spells[2], me->m_spells[3]); - else - interval = me->m_spells[2]; - } - else - interval = 1000; + spell = me->m_spells[0] ? GetSpellStore()->LookupEntry(me->m_spells[0]) : NULL; + interval = me->m_spells[1] ? me->m_spells[1] : 1000; timer = interval; } diff --git a/src/game/TemporarySummon.cpp b/src/game/TemporarySummon.cpp index 14a347ee4bd..afea0e5ed53 100644 --- a/src/game/TemporarySummon.cpp +++ b/src/game/TemporarySummon.cpp @@ -208,10 +208,7 @@ void TempSummon::InitSummon() if(GetCreatureInfo()->flags_extra & CREATURE_FLAG_EXTRA_TRIGGER && m_spells[0]) { setFaction(owner->getFaction()); - if(m_spells[1] && GetMap()->IsHeroic()) - CastSpell(this, m_spells[1], false, 0, 0, m_summonerGUID); - else - CastSpell(this, m_spells[0], false, 0, 0, m_summonerGUID); + CastSpell(this, m_spells[0], false, 0, 0, m_summonerGUID); } } } |