aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjoschiwald <joschiwald.trinity@gmail.com>2017-02-26 16:38:22 +0100
committerjoschiwald <joschiwald.trinity@gmail.com>2017-02-26 16:38:22 +0100
commit7ee191578eb13bd79f68347ea062c8ae4a254a8f (patch)
tree47a36d73c6a940ffe90f586556c009482dc484d0
parentf29dd0794be2165a2115ebce9eef54a8d81884ff (diff)
Scripts/Spells: Updated two Anraphet SpellScripts
-rw-r--r--sql/updates/world/master/2017_02_26_09_world.sql1
-rw-r--r--src/server/game/Server/Packets/MiscPackets.h2
-rw-r--r--src/server/scripts/Kalimdor/HallsOfOrigination/boss_anraphet.cpp32
3 files changed, 18 insertions, 17 deletions
diff --git a/sql/updates/world/master/2017_02_26_09_world.sql b/sql/updates/world/master/2017_02_26_09_world.sql
new file mode 100644
index 00000000000..cac65626ead
--- /dev/null
+++ b/sql/updates/world/master/2017_02_26_09_world.sql
@@ -0,0 +1 @@
+UPDATE `spell_script_names` SET `ScriptName`='spell_anraphet_omega_stance_spider_effect' WHERE `ScriptName`='spell_omega_stance_spider_effect';
diff --git a/src/server/game/Server/Packets/MiscPackets.h b/src/server/game/Server/Packets/MiscPackets.h
index b9ee1dd0480..dc6040cb005 100644
--- a/src/server/game/Server/Packets/MiscPackets.h
+++ b/src/server/game/Server/Packets/MiscPackets.h
@@ -582,7 +582,7 @@ namespace WorldPackets
class PlayObjectSound final : public ServerPacket
{
public:
- PlayObjectSound() : ServerPacket(SMSG_PLAY_OBJECT_SOUND, 16 + 16 + 4 + 4 * 4) { }
+ PlayObjectSound() : ServerPacket(SMSG_PLAY_OBJECT_SOUND, 16 + 16 + 4 + 4 * 3) { }
WorldPacket const* Write() override;
diff --git a/src/server/scripts/Kalimdor/HallsOfOrigination/boss_anraphet.cpp b/src/server/scripts/Kalimdor/HallsOfOrigination/boss_anraphet.cpp
index b01e0bbe13c..bbf9fc067d7 100644
--- a/src/server/scripts/Kalimdor/HallsOfOrigination/boss_anraphet.cpp
+++ b/src/server/scripts/Kalimdor/HallsOfOrigination/boss_anraphet.cpp
@@ -494,6 +494,7 @@ public:
}
};
+// 77106 - Omega Stance (Summon)
class spell_anraphet_omega_stance_summon : public SpellScriptLoader
{
public:
@@ -503,16 +504,14 @@ public:
{
PrepareSpellScript(spell_anraphet_omega_stance_summon_SpellScript);
- void ModDestHeight(SpellEffIndex /*effIndex*/)
+ void SetDest(SpellDestination& dest)
{
- Position offset = {0.0f, 0.0f, 30.0f, 0.0f};
- const_cast<WorldLocation*>(GetExplTargetDest())->RelocateOffset(offset);
- GetHitDest()->RelocateOffset(offset);
+ dest.RelocateOffset({ 0.0f, 0.0f, 30.0f, 0.0f });
}
void Register() override
{
- OnEffectLaunch += SpellEffectFn(spell_anraphet_omega_stance_summon_SpellScript::ModDestHeight, EFFECT_0, SPELL_EFFECT_SUMMON);
+ OnDestinationTargetSelect += SpellDestinationTargetSelectFn(spell_anraphet_omega_stance_summon_SpellScript::SetDest, EFFECT_0, TARGET_DEST_DEST);
}
};
@@ -522,40 +521,41 @@ public:
}
};
-class spell_omega_stance_spider_effect : public SpellScriptLoader
+// 77127 Omega Stance Spider Effect
+class spell_anraphet_omega_stance_spider_effect : public SpellScriptLoader
{
public:
- spell_omega_stance_spider_effect() : SpellScriptLoader("spell_omega_stance_spider_effect") { }
+ spell_anraphet_omega_stance_spider_effect() : SpellScriptLoader("spell_anraphet_omega_stance_spider_effect") { }
- class spell_omega_stance_spider_effect_SpellScript : public SpellScript
+ class spell_anraphet_omega_stance_spider_effect_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_omega_stance_spider_effect_SpellScript);
+ PrepareSpellScript(spell_anraphet_omega_stance_spider_effect_SpellScript);
- void SetDestPosition(SpellEffIndex effIndex)
+ void SetDest(SpellDestination& dest)
{
// Do our own calculations for the destination position.
/// TODO: Remove this once we find a general rule for WorldObject::MovePosition (this spell shouldn't take the Z change into consideration)
Unit* caster = GetCaster();
float angle = float(rand_norm()) * static_cast<float>(2 * M_PI);
- uint32 dist = caster->GetObjectSize() + GetSpellInfo()->GetEffect(effIndex)->CalcRadius(GetCaster()) * (float)rand_norm();
+ uint32 dist = caster->GetObjectSize() + GetSpellInfo()->GetEffect(EFFECT_0)->CalcRadius(caster) * (float)rand_norm();
float x = caster->GetPositionX() + dist * std::cos(angle);
float y = caster->GetPositionY() + dist * std::sin(angle);
float z = caster->GetMap()->GetHeight(x, y, caster->GetPositionZ());
+ float o = dest._position.GetOrientation();
- const_cast<WorldLocation*>(GetExplTargetDest())->Relocate(x, y, z);
- GetHitDest()->Relocate(x, y, z);
+ dest.Relocate({ x, y, z, o });
}
void Register() override
{
- OnEffectLaunch += SpellEffectFn(spell_omega_stance_spider_effect_SpellScript::SetDestPosition, EFFECT_0, SPELL_EFFECT_DUMMY);
+ OnDestinationTargetSelect += SpellDestinationTargetSelectFn(spell_anraphet_omega_stance_spider_effect_SpellScript::SetDest, EFFECT_0, TARGET_DEST_CASTER_RANDOM);
}
};
SpellScript* GetSpellScript() const override
{
- return new spell_omega_stance_spider_effect_SpellScript();
+ return new spell_anraphet_omega_stance_spider_effect_SpellScript();
}
};
@@ -566,6 +566,6 @@ void AddSC_boss_anraphet()
new npc_brann_bronzebeard_anraphet();
new npc_alpha_beam();
new spell_anraphet_omega_stance_summon();
- new spell_omega_stance_spider_effect();
+ new spell_anraphet_omega_stance_spider_effect();
new npc_omega_stance();
}