*Fix Coyote Spirit Despawn Aura (52172) and Blood Parrot Despawn Aura (60244) - inspired by Disassembler's patch.

--HG--
branch : trunk
This commit is contained in:
QAston
2009-08-05 17:00:01 +02:00
parent 037fa6eae1
commit d7df4cfa09
5 changed files with 20 additions and 5 deletions
+3 -1
View File
@@ -144,10 +144,12 @@ INSERT INTO `spell_linked_spell` (`spell_trigger`, `spell_effect`, `type`, `comm
-- TARGET
-- --------
DELETE FROM `spell_script_target` WHERE `entry` IN (58836, 50524, 50515);
DELETE FROM `spell_script_target` WHERE `entry` IN (58836, 50524, 50515, 52173, 60243);
INSERT INTO `spell_script_target` (`entry`, `type`, `targetEntry`) VALUES
(58836, 3, 31216), -- Mirror Image
(50524, 3, 27829), -- Runic Power Feed
(52173, 3, 28267), -- Coyote Spirit Despawn
(60243, 3, 11236), -- Blood Parrot Despawn
(50515, 3, 27829); -- Dismiss Gargoyle
-- zulaman
+4
View File
@@ -0,0 +1,4 @@
DELETE FROM `spell_script_target` WHERE `entry` IN (52173, 60243);
INSERT INTO `spell_script_target` (`entry`, `type`, `targetEntry`) VALUES
(52173, 3, 28267),
(60243, 3, 11236);
+2 -1
View File
@@ -2342,7 +2342,8 @@ void Spell::SetTargetMap(uint32 i, uint32 cur)
else if (i_spellST->second.type == SPELL_TARGET_TYPE_CONTROLLED)
{
for(Unit::ControlList::iterator itr = m_caster->m_Controlled.begin(); itr != m_caster->m_Controlled.end(); ++itr)
if ((*itr)->GetEntry() == i_spellST->second.targetEntry && (*itr)->IsWithinDistInMap(m_caster, radius))
if ((*itr)->GetEntry() == i_spellST->second.targetEntry &&
/*(*itr)->IsWithinDistInMap(m_caster, radius)*/ (*itr)->IsInMap(m_caster)) // For 60243 and 52173 need skip radius check or use range (no radius entry for effect)
unitList.push_back(*itr);
}
}
+5 -1
View File
@@ -2783,7 +2783,11 @@ void AuraEffect::HandleAuraDummy(bool apply, bool Real, bool changeAmount)
return;
case 46308: // Burning Winds casted only at creatures at spawn
m_target->CastSpell(m_target,47287,true,NULL,this);
return;
return;
case 52173: // Coyote Spirit Despawn Aura
case 60244: // Blood Parrot Despawn Aura
m_target->CastSpell((Unit*)NULL, GetAmount(), true, NULL, this);
return;
}
break;
case SPELLFAMILY_WARLOCK:
+6 -2
View File
@@ -4646,7 +4646,6 @@ void Spell::EffectScriptEffect(uint32 effIndex)
{
if(!unitTarget || unitTarget->GetTypeId() != TYPEID_UNIT)
return;
((Creature*)unitTarget)->ForcedDespawn();
return;
}
@@ -5010,6 +5009,11 @@ void Spell::EffectScriptEffect(uint32 effIndex)
}
break;
}
case 52173: // Coyote Spirit Despawn
case 60243: // Blood Parrot Despawn
if (unitTarget->GetTypeId() == TYPEID_UNIT && ((Creature*)unitTarget)->isSummon())
((TempSummon*)unitTarget)->UnSummon();
return;
// Sky Darkener Assault
case 52124:
if(unitTarget)
@@ -5085,7 +5089,7 @@ void Spell::EffectScriptEffect(uint32 effIndex)
}
}
return;
case 58983:
case 58983: // Big Blizzard Bear
{
if(!unitTarget || unitTarget->GetTypeId() != TYPEID_PLAYER)
return;