aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormegamage <none@none>2008-11-09 23:54:02 -0600
committermegamage <none@none>2008-11-09 23:54:02 -0600
commitf2250030cd7ea58eb9de63a96c34656ac1916369 (patch)
treecda2d13b6ab1cebd97363f87f4d754bb7b2a3c86
parenta04ad26b9e5a2192c95ecd100f8a3ed027a1a5b0 (diff)
[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
-rw-r--r--sql/updates/211_world_blacktemple.sql2
-rw-r--r--src/bindings/scripts/scripts/zone/ghostlands/ghostlands.cpp20
-rw-r--r--src/game/Pet.cpp5
3 files changed, 26 insertions, 1 deletions
diff --git a/sql/updates/211_world_blacktemple.sql b/sql/updates/211_world_blacktemple.sql
index b99f6d05764..27aa83b9e4e 100644
--- a/sql/updates/211_world_blacktemple.sql
+++ b/sql/updates/211_world_blacktemple.sql
@@ -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');
diff --git a/src/bindings/scripts/scripts/zone/ghostlands/ghostlands.cpp b/src/bindings/scripts/scripts/zone/ghostlands/ghostlands.cpp
index f2d4b0ce34a..35c7213d033 100644
--- a/src/bindings/scripts/scripts/zone/ghostlands/ghostlands.cpp
+++ b/src/bindings/scripts/scripts/zone/ghostlands/ghostlands.cpp
@@ -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;
}
diff --git a/src/game/Pet.cpp b/src/game/Pet.cpp
index 01329fe5e89..4eaf047f96c 100644
--- a/src/game/Pet.cpp
+++ b/src/game/Pet.cpp
@@ -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;