[svn] Fix pet spells: only AOE and enemy target spells are autocastable.

Script for quest: First Trial. Original patch by Bufu (SD2), adapted by Patro.

--HG--
branch : trunk
This commit is contained in:
megamage
2008-11-09 23:54:02 -06:00
parent a04ad26b9e
commit f2250030cd
3 changed files with 26 additions and 1 deletions

View File

@@ -1,4 +1,4 @@
DELETE FROM spell_linked_spell WHERE `spell_trigger` IN (39992, 39835, 42052, -41914, -41917, 41126, -41376);
DELETE FROM spell_linked_spell WHERE `spell_trigger` IN (39992, 39835, 42052, -41914, -41917, 41126, -41376, 39908);
-- INSERT INTO spell_linked_spell (`spell_trigger`, `spell_effect`, `type`, `comment`) VALUES (39992, 39835, 1, 'Needle Spine');
INSERT INTO spell_linked_spell (`spell_trigger`, `spell_effect`, `type`, `comment`) VALUES (39835, 39968, 1, 'Needle Spine');
INSERT INTO spell_linked_spell (`spell_trigger`, `spell_effect`, `type`, `comment`) VALUES (-41376, 41377, 0, 'Spite');

View File

@@ -110,6 +110,21 @@ bool GossipSelect_npc_rathis_tomber(Player *player, Creature *_Creature, uint32
return true;
}
/*#####
## go_gilded_brazier (Paladin First Trail quest (9678))
#####*/
bool GOHello_gilded_brazier(Player *player, GameObject* _GO)
{
if (player->GetQuestStatus(9678) == QUEST_STATUS_INCOMPLETE)
{
Creature *Stillblade = player->SummonCreature(17716, 8106.11, -7542.06, 151.775, 3.02598, TEMPSUMMON_DEAD_DESPAWN, 60000);
if (Stillblade)
((CreatureAI*)Stillblade->AI())->AttackStart(player);
}
return true;
};
void AddSC_ghostlands()
{
Script *newscript;
@@ -131,4 +146,9 @@ void AddSC_ghostlands()
newscript->pGossipHello = &GossipHello_npc_rathis_tomber;
newscript->pGossipSelect = &GossipSelect_npc_rathis_tomber;
m_scripts[nrscripts++] = newscript;
newscript = new Script;
newscript->Name = "go_gilded_brazier";
newscript->pGOHello = &GOHello_gilded_brazier;
m_scripts[nrscripts++] = newscript;
}

View File

@@ -1657,6 +1657,11 @@ void Pet::ToggleAutocast(uint32 spellid, bool apply)
if(IsPassiveSpell(spellid))
return;
if(const SpellEntry *tempSpell = GetSpellStore()->LookupEntry(spellid))
if(tempSpell->EffectImplicitTargetA[0] != TARGET_ALL_AROUND_CASTER
|| tempSpell->EffectImplicitTargetA[0] != TARGET_CHAIN_DAMAGE)
return;
PetSpellMap::const_iterator itr = m_spells.find((uint16)spellid);
int i;