mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-25 11:21:58 +01:00
*Fix a creature spell use bug.
--HG-- branch : trunk
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user