Jump to content

[10558][Patch] Unusual Compass


Guest cmaranec

Recommended Posts

What bug does the patch fix? What features does the patch add?

It adds core support for spell Spinning triggered by item Unusual Compass

For which repository revision was the patch created?

Created at 8079

Who has been writing this patch? Please include either forum user names or email addresses.

cmaranec

How does it work: After using item Unusual Compass (cast Spinning), player's orientation will be changed to random between 0 and 6 (0.0000 and 6.2832).

diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp
index 957c205..e49d6f0 100644
--- a/src/game/SpellEffects.cpp
+++ b/src/game/SpellEffects.cpp
@@ -622,6 +622,15 @@ void Spell::EffectDummy(uint32 i)
        {
            switch(m_spellInfo->Id )
            {
+                case 64385:                                    // Unusual Compas
+                {
+                    float part = urand(0,62832);
+                    m_caster->SetOrientation(part / 10000);
+                    WorldPacket data;
+                    m_caster->BuildHeartBeatMsg(&data);
+                    m_caster->SendMessageToSet(&data,true);
+                    return;
+                }
                case 8063:                                  // Deviate Fish
                {
                    if(m_caster->GetTypeId() != TYPEID_PLAYER)

Sorry for my bad english

Link to comment
Share on other sites

  • 1 year later...
  • 3 weeks later...
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use