aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAz@zel <azazel.kon@gmail.com>2011-06-07 16:04:15 +0600
committerAzazel <azazel.kon@gmail.com>2011-06-08 11:59:45 +0600
commit72b73d2cb9c6835635f46eefa9ca39b8468e1542 (patch)
treef2f5e9c97ac01d1364fe12633925c2b0bab4b080 /src
parent8f7be3d48a1d3e6ddc5734e174c3290d94c38bfc (diff)
Scripts/Scarlet Enclave: fix stolen effect for DK quest, which allowed to hang server by spawning unlimited number of mobs
Diffstat (limited to 'src')
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp
index c046b6a3a88..0477b41dacd 100644
--- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp
@@ -633,12 +633,15 @@ public:
{
if (Unit *charmer = caster->GetCharmer())
{
- charmer->RemoveAurasDueToSpell(EFFECT_STOLEN_HORSE);
- caster->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_SPELLCLICK);
- caster->setFaction(35);
- DoCast(caster, CALL_DARK_RIDER, true);
- if (Creature* Dark_Rider = me->FindNearestCreature(28654, 15))
- CAST_AI(npc_dark_rider_of_acherus::npc_dark_rider_of_acherusAI, Dark_Rider->AI())->InitDespawnHorse(caster);
+ if (charmer->HasAura(EFFECT_STOLEN_HORSE))
+ {
+ charmer->RemoveAurasDueToSpell(EFFECT_STOLEN_HORSE);
+ caster->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_SPELLCLICK);
+ caster->setFaction(35);
+ DoCast(caster, CALL_DARK_RIDER, true);
+ if (Creature* Dark_Rider = me->FindNearestCreature(28654, 15))
+ CAST_AI(npc_dark_rider_of_acherus::npc_dark_rider_of_acherusAI, Dark_Rider->AI())->InitDespawnHorse(caster);
+ }
}
}
}