Jump to content

[Mangos-One][Patch] Totem summoning


Guest mns

Recommended Posts

Bug : totem can summoning in unhandy position .

corrected : totem must be at same caster position if default totem position is unhandy .

Fix :

diff --git a/src/game/Totem.cpp b/src/game/Totem.cpp
index 6ba8b9a..5d802f4 100644
--- a/src/game/Totem.cpp
+++ b/src/game/Totem.cpp
@@ -55,6 +55,14 @@ bool Totem::Create(uint32 guidlow, CreatureCreatePos& cPos, uint32 Entry, Unit*
    if (fabs(cPos.m_pos.z - owner->GetPositionZ() ) > 5.0f)
        cPos.m_pos.z = owner->GetPositionZ();

+    // totem must be at same caster position in case default totem position is unhandy.
+    if (!owner->IsWithinLOS(cPos.m_pos.x, cPos.m_pos.y, cPos.m_pos.z))
+    {
+        cPos.m_pos.x = owner->GetPositionX();
+        cPos.m_pos.y = owner->GetPositionY();
+        cPos.m_pos.z = owner->GetPositionZ();
+    }
+
    if (!cPos.Relocate(this))
        return false;


Link to comment
Share on other sites

  • 7 months 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