From 738a96f9e25e171dd474f12c8649d50e416d4a7a Mon Sep 17 00:00:00 2001 From: Blaymoira Date: Sat, 14 Feb 2009 17:17:03 +0100 Subject: [PATCH 1/5] *Implement spell 47977 --HG-- branch : trunk --- src/game/SpellEffects.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index 7a275a143c..da2471886e 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -4994,6 +4994,22 @@ void Spell::EffectScriptEffect(uint32 effIndex) } break; } + case 47977: // Magic Broom + { + if(!unitTarget) + return; + + if(unitTarget) + { + switch(((Player*)unitTarget)->GetBaseSkillValue(762)) + { + case 75: unitTarget->CastSpell(unitTarget, 42680, true); break;; + case 150: case 225: case 300: unitTarget->CastSpell(unitTarget, 42683, true); break; + default: break; + } + } + break; + } } if(!unitTarget || !unitTarget->isAlive()) // can we remove this check? From 3e0c846d2be09614afebf16f318273c2aeba44ba Mon Sep 17 00:00:00 2001 From: Blaymoira Date: Sat, 14 Feb 2009 18:56:39 +0100 Subject: [PATCH 2/5] *Small fix in dirty larry --HG-- branch : trunk --- src/bindings/scripts/scripts/npc/npc_escortAI.cpp | 1 - .../scripts/scripts/zone/shattrath/shattrath_city.cpp | 7 +++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/bindings/scripts/scripts/npc/npc_escortAI.cpp b/src/bindings/scripts/scripts/npc/npc_escortAI.cpp index c858442441..fefe927832 100644 --- a/src/bindings/scripts/scripts/npc/npc_escortAI.cpp +++ b/src/bindings/scripts/scripts/npc/npc_escortAI.cpp @@ -299,5 +299,4 @@ void npc_escortAI::Start(bool bAttack, bool bDefend, bool bRun, uint64 pGUID) //Disable questgiver flag m_creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE + UNIT_FLAG_NOT_ATTACKABLE_2); } diff --git a/src/bindings/scripts/scripts/zone/shattrath/shattrath_city.cpp b/src/bindings/scripts/scripts/zone/shattrath/shattrath_city.cpp index ce86aa21b1..3865a13672 100644 --- a/src/bindings/scripts/scripts/zone/shattrath/shattrath_city.cpp +++ b/src/bindings/scripts/scripts/zone/shattrath/shattrath_city.cpp @@ -452,18 +452,21 @@ struct TRINITY_DLL_DECL npc_dirty_larryAI : public ScriptedAI SayTimer = 0; Step = 0; + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); m_creature->setFaction(1194); Unit* Creepjack = FindCreature(NPC_CREEPJACK, 20, m_creature); if(Creepjack) { ((Creature*)Creepjack)->AI()->EnterEvadeMode(); Creepjack->setFaction(1194); + Creepjack->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); } Unit* Malone = FindCreature(NPC_MALONE, 20, m_creature); if(Malone) { ((Creature*)Malone)->AI()->EnterEvadeMode(); Malone->setFaction(1194); + Malone->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); } } @@ -514,6 +517,7 @@ struct TRINITY_DLL_DECL npc_dirty_larryAI : public ScriptedAI Creepjack->Attack(player, true); Creepjack->setFaction(14); Creepjack->GetMotionMaster()->MoveChase(player); + Creepjack->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); } Unit* Malone = FindCreature(NPC_MALONE, 20, m_creature); if(Malone) @@ -521,6 +525,7 @@ struct TRINITY_DLL_DECL npc_dirty_larryAI : public ScriptedAI Malone->Attack(player, true); Malone->setFaction(14); Malone->GetMotionMaster()->MoveChase(player); + Malone->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); } DoStartMovement(player); AttackStart(player); @@ -535,12 +540,14 @@ struct TRINITY_DLL_DECL npc_dirty_larryAI : public ScriptedAI { ((Creature*)Creepjack)->AI()->EnterEvadeMode(); Creepjack->setFaction(1194); + Creepjack->GetMotionMaster()->MoveTargetedHome(); } Unit* Malone = FindCreature(NPC_MALONE, 20, m_creature); if(Malone) { ((Creature*)Malone)->AI()->EnterEvadeMode(); Malone->setFaction(1194); + Malone->GetMotionMaster()->MoveTargetedHome(); } m_creature->setFaction(1194); Done = true; From 7b19c8ac8eb0f4639c05ad0b3f26ae702fe01201 Mon Sep 17 00:00:00 2001 From: Blaymoira Date: Sat, 14 Feb 2009 20:30:51 +0100 Subject: [PATCH 3/5] *Set Non attackable flag on quest complete in Dirty larry - by Sorken --HG-- branch : trunk --- src/bindings/scripts/scripts/zone/shattrath/shattrath_city.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/bindings/scripts/scripts/zone/shattrath/shattrath_city.cpp b/src/bindings/scripts/scripts/zone/shattrath/shattrath_city.cpp index 3865a13672..1993ffb8d3 100644 --- a/src/bindings/scripts/scripts/zone/shattrath/shattrath_city.cpp +++ b/src/bindings/scripts/scripts/zone/shattrath/shattrath_city.cpp @@ -541,6 +541,7 @@ struct TRINITY_DLL_DECL npc_dirty_larryAI : public ScriptedAI ((Creature*)Creepjack)->AI()->EnterEvadeMode(); Creepjack->setFaction(1194); Creepjack->GetMotionMaster()->MoveTargetedHome(); + Creepjack->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); } Unit* Malone = FindCreature(NPC_MALONE, 20, m_creature); if(Malone) @@ -548,7 +549,9 @@ struct TRINITY_DLL_DECL npc_dirty_larryAI : public ScriptedAI ((Creature*)Malone)->AI()->EnterEvadeMode(); Malone->setFaction(1194); Malone->GetMotionMaster()->MoveTargetedHome(); + Malone->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); } + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); m_creature->setFaction(1194); Done = true; DoScriptText(SAY_GIVEUP, m_creature, NULL); From 32f0fac014bdd373e70968651755f97fe3018ac8 Mon Sep 17 00:00:00 2001 From: Blaymoira Date: Sun, 15 Feb 2009 16:55:00 +0100 Subject: [PATCH 4/5] *Small fix in Kalecgos - by darktabbit --HG-- branch : trunk --- src/bindings/scripts/include/sc_creature.cpp | 2 +- .../scripts/zone/sunwell_plateau/boss_kalecgos.cpp | 12 +++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/bindings/scripts/include/sc_creature.cpp b/src/bindings/scripts/include/sc_creature.cpp index 6c9a0059b1..44148d4d79 100644 --- a/src/bindings/scripts/include/sc_creature.cpp +++ b/src/bindings/scripts/include/sc_creature.cpp @@ -837,7 +837,7 @@ void LoadOverridenSQLData() // Sunwell Plateau : Kalecgos : Spectral Rift goInfo = const_cast(GetGameObjectInfo(187055)); if(goInfo && goInfo->type == GAMEOBJECT_TYPE_GOOBER) - goInfo->goober.lockId = 1714; // need LOCKTYPE_QUICK_OPEN + goInfo->type = GAMEOBJECT_TYPE_SPELLCASTER; } void LoadOverridenDBCData() diff --git a/src/bindings/scripts/scripts/zone/sunwell_plateau/boss_kalecgos.cpp b/src/bindings/scripts/scripts/zone/sunwell_plateau/boss_kalecgos.cpp index 1de80161d3..f5c1368812 100644 --- a/src/bindings/scripts/scripts/zone/sunwell_plateau/boss_kalecgos.cpp +++ b/src/bindings/scripts/scripts/zone/sunwell_plateau/boss_kalecgos.cpp @@ -69,7 +69,7 @@ EndScriptData */ #define SPELL_BANISH 44836 #define SPELL_TRANSFORM_KALEC 44670 -#define SPELL_ENRAGE 44806 +#define SPELL_ENRAGE 44807 #define SPELL_CORRUPTION_STRIKE 45029 #define SPELL_AGONY_CURSE 45032 @@ -351,8 +351,11 @@ struct TRINITY_DLL_DECL boss_sathrovarrAI : public ScriptedAI if (((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 10) && !isEnraged) { Unit* Kalecgos = Unit::GetUnit(*m_creature, KalecgosGUID); - if (Kalecgos) + if(Kalecgos) + { Kalecgos->CastSpell(Kalecgos, SPELL_ENRAGE, true); + ((boss_kalecgosAI*)((Creature*)Kalecgos)->AI())->isEnraged = true; + } DoCast(m_creature, SPELL_ENRAGE, true); isEnraged = true; } @@ -548,8 +551,11 @@ void boss_kalecgosAI::UpdateAI(const uint32 diff) if (((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 10) && !isEnraged) { Unit* Sath = Unit::GetUnit(*m_creature, SathGUID); - if (Sath) + if(Sath) + { Sath->CastSpell(Sath, SPELL_ENRAGE, true); + ((boss_sathrovarrAI*)((Creature*)Sath)->AI())->isEnraged = true; + } DoCast(m_creature, SPELL_ENRAGE, true); isEnraged = true; } From b66d68ceaeecc01b6a72b8480abe61f6c3e92f7e Mon Sep 17 00:00:00 2001 From: Blaymoira Date: Sun, 15 Feb 2009 16:55:51 +0100 Subject: [PATCH 5/5] *Target limitation for spell 39365 - by Iskander --HG-- branch : trunk --- src/game/SpellMgr.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp index f9afe8a08a..af49e687bb 100644 --- a/src/game/SpellMgr.cpp +++ b/src/game/SpellMgr.cpp @@ -2191,6 +2191,7 @@ void SpellMgr::LoadSpellCustomAttr() case 44869: // Spectral Blast case 45027: // Revitalize case 45976: // Muru Portal Channel + case 39365: // Thundering Storm spellInfo->MaxAffectedTargets = 1; break; case 41376: // Spite