Jump to content

[fixed][BUG] Sentry Totem


Guest eternalord

Recommended Posts

Spell: 6495

Mangos Rev: 10009, 10051

UDB: 391

Description: Summons an immobile Sentry Totem with 100 health at your feet for 5 min that allows vision of nearby area and warns of enemies that attack it. Right-Click on buff to switch back and forth between totem sight and shaman sight.

Bug: Spell only summon a inmmobile Sentry totem with 100 health at your feet for 5 min. Nothing more.

Link to comment
Share on other sites

  • 4 weeks later...

rev 10051+

diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
index b69fbb5..18744f4 100644
--- a/src/game/SpellAuras.cpp
+++ b/src/game/SpellAuras.cpp
@@ -3174,7 +3174,33 @@ void Aura::HandleAuraDummy(bool apply, bool Real)
            }
            break;
        case SPELLFAMILY_SHAMAN:
-            break;
+        {
+            if (!Real)
+                break;
+            Unit * caster = GetCaster();
+            if (!caster)
+                return;
+                       // Sentry Totem
+            if (GetId() == 6495 && caster->GetTypeId() == TYPEID_PLAYER)
+            {
+                if (apply)
+                {
+                    uint64 guid = caster->GetTotemGUID(TOTEM_SLOT_AIR);
+                    if (guid)
+                    {
+                        Creature *totem = caster->GetMap()->GetCreature(guid);
+                        if (totem && totem->isTotem())
+                            ((Player*)caster)->CastSpell(totem, 6277, true);
+                    }
+                }
+                else
+                {
+                    // Remove Bind Sight
+                    caster->RemoveAurasDueToSpell(6277);              
+                }
+                return;
+                       }
+               }
        case SPELLFAMILY_ROGUE:
            {
                // Honor Among Thieves

Но есть проблема: при переключении камеры на плеера и его подальшем движении ефект http://ru.wowhead.com/spell=6277 слетает, как зделать чтоб не слетало безпонятия...

Link to comment
Share on other sites

  • 1 month 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