Jump to content

[fix] demonic circle


Auntie Mangos

Recommended Posts

warlock on my server found bug - when lock dies with summoned teleport, it does not disappear and after ress he can teleport to it even if he is out of range. For example, Lock places circle near his flag in WSG, dies, then captures enemy flag and use teleport. Instant WSG :)

Link to comment
Share on other sites

  • Replies 83
  • Created
  • Last Reply

Top Posters In This Topic

warlock on my server found bug - when lock dies with summoned teleport, it does not disappear and after ress he can teleport to it even if he is out of range.

I have tested this a bit and it seems to me that this happens only if you die in battleground, otherwise if you die, the gameobject is still summoned but you have to re-summon it after ressurection in order to use Demonic Circle : Teleport...

Link to comment
Share on other sites

  • 3 weeks later...

        if (apply)
       {
           GameObject* obj = m_target->GetGameObject(48018);
           if (obj [b]&& m_target->GetDistance(obj) <= 40.0f[/b])
               ((Player*)m_target)->TeleportTo(obj->GetMapId(),obj->GetPositionX(),obj->GetPositionY(),obj->GetPositionZ(),obj->GetOrientation());
       }

works with 90xx mangos?

yep

Link to comment
Share on other sites

        if (apply)
       {
           GameObject* obj = m_target->GetGameObject(48018);
           if (obj [b]&& m_target->GetDistance(obj) <= 40.0f[/b])
               ((Player*)m_target)->TeleportTo(obj->GetMapId(),obj->GetPositionX(),obj->GetPositionY(),obj->GetPositionZ(),obj->GetOrientation());
       }

works with 90xx mangos?

Link to comment
Share on other sites

Im using this patch:

http://github.com/Tasssadar/Valhalla-Project/commit/3d9c4a98d36a5b9eb14beef389ba01b9584f5701 and

http://github.com/Tasssadar/Valhalla-Project/commit/586a09e9a3250fdfe76c32bf41e7e906be8d1542

on server with 400 ppl, no serious problems found.

EDIT:

        if (apply)
       {
           GameObject* obj = m_target->GetGameObject(48018);
           if (obj [b]&& m_target->GetDistance(obj) <= 40.0f[/b])
               ((Player*)m_target)->TeleportTo(obj->GetMapId(),obj->GetPositionX(),obj->GetPositionY(),obj->GetPositionZ(),obj->GetOrientation());
       }

This crash server when obj is NULL, isnt it?

Link to comment
Share on other sites

no

see:

if (obj &&

yeah...but my experience is that whole if is checked, no only first argument, even if theres && operator...so

 if (obj && m_target->GetDistance(obj) <= 40.0f)

check for obj, and then for "m_target->GetDistance(obj) <= 40.0f" in any case - and if obj is null->crash...?

Link to comment
Share on other sites

Wojta, if operator checks the conditions "in order", so if you have && operator in if statement, then first is checked if obj is not null. If obj is not null, then the second part (GetDiatance()) is checked. If both checks passes then command after if statement is executed, but if at least one check in if statement fails, then whole if statement fails and command after if statement is not executed.

There could be a problem with || operator. In english it is called Short-circuit evaluation, in czech it is "zkracene vyhodnocovani vyrazu", where the arguments of if statement is checked until one of them doesnt match the statements (with && operator), or if one of them match the statement (|| operator), then the rest of the statement is not checked and can cause trouble in code.

Link to comment
Share on other sites

  • 5 weeks later...
Some clever people on my server found a nice exploit using this spell to bypass doors in BG/Arena and they even can get behind walls so you can not even attack them, while they hide behind a wall.

you mean teleporting to arena before strart?

Elsewhere, warlock and circle didnt need to be "in line of sight" of each other, demonic circle teleportation should work even through textures, only restriction to teleport is that player must be closer than 40 yards to circle. So this is not bug/exploit.

Link to comment
Share on other sites

you mean teleporting to arena before strart?

Elsewhere, warlock and circle didnt need to be "in line of sight" of each other, demonic circle teleportation should work even through textures, only restriction to teleport is that player must be closer than 40 yards to circle. So this is not bug/exploit.

No they are using demonic circle to bypass the doors in Arena or any battleground doors before it has even started, so they can headjump to the enemy or base and they find a wall and get behind a wall to hide.

Link to comment
Share on other sites

as i understand our problem is in void Spell::EffectSummonObject(uint32 i), we should modify this code

    // Summon in random point all other units if location present
   else
       m_caster->GetClosePoint(x, y, z, DEFAULT_WORLD_OBJECT_SIZE);

it's because of gameobject spawned in one step forward before the caster. should be spawned at caster's real position

something like this

diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp
index f523c46..7a0ace2 100644
--- a/src/game/SpellEffects.cpp
+++ b/src/game/SpellEffects.cpp
@@ -6176,7 +6176,16 @@ void Spell::EffectSummonObject(uint32 i)
    }
    // Summon in random point all other units if location present
    else
-        m_caster->GetClosePoint(x, y, z, DEFAULT_WORLD_OBJECT_SIZE);
+    {
+        if(m_spellInfo->Id == 48018)
+        {
+            x = m_caster->GetPositionX();
+            y = m_caster->GetPositionY();
+            z = m_caster->GetPositionZ();
+        }
+        else
+            m_caster->GetClosePoint(x, y, z, DEFAULT_WORLD_OBJECT_SIZE);
+    }

    Map *map = m_caster->GetMap();
    if(!pGameObj->Create(sObjectMgr.GenerateLowGuid(HIGHGUID_GAMEOBJECT), go_id, map,

Link to comment
Share on other sites

  • 3 weeks later...
  • 2 weeks later...
  • 1 month later...

I think it's better check distance to circle/LoS in Spell::CheckCast and not in Aura::HandleModMechanicImmunity. Something like:

// Demonic Circle: Teleport
if (m_spellInfo->Id == 48020)
{
   if (GameObject* obj = m_caster->GetGameObject(48018))
   {
       if (!m_caster->IsWithinDistInMap(obj, GetSpellMaxRange(sSpellRangeStore.LookupEntry(m_spellInfo->rangeIndex))))
           return SPELL_FAILED_OUT_OF_RANGE;

       if (!m_caster->IsWithinLOS(obj->GetPositionX(), obj->GetPositionY(), obj->GetPositionZ()))
           return SPELL_FAILED_LINE_OF_SIGHT;
   }
}

Link to comment
Share on other sites

I think it's better check distance to circle/LoS in Spell::CheckCast and not in Aura::HandleModMechanicImmunity. Something like:

// Demonic Circle: Teleport
if (m_spellInfo->Id == 48020)
{
   if (GameObject* obj = m_caster->GetGameObject(48018))
   {
       if (!m_caster->IsWithinDistInMap(obj, GetSpellMaxRange(sSpellRangeStore.LookupEntry(m_spellInfo->rangeIndex))))
           return SPELL_FAILED_OUT_OF_RANGE;

       if (!m_caster->IsWithinLOS(obj->GetPositionX(), obj->GetPositionY(), obj->GetPositionZ()))
           return SPELL_FAILED_LINE_OF_SIGHT;
   }
}

spell shouldn't check if object is in LOS.

A second powerful use for this ability is in PvP, particularly arenas as the ability removes all snare affects and will move the warlock through walls or obstructions to the demonic circle.
http://www.wowwiki.com/Demonic_Circle
Link to comment
Share on other sites

A second powerful use for this ability is in PvP, particularly arenas as the ability removes all snare affects and will move the warlock through walls or obstructions to the demonic circle.

I think we didn't earlier specify what kind of walls people are abusing. Lets say there a 2 kind of walls, first being walls in a room and second the outer walls of a room. This spell can move you through walls in a room just like it's stated on wowwiki, but this spell can also makes your char teleport through the outer walls of the room. That was the problem being adressed here. When you make your char out of the room no one can attack you because of LoS.

Let's say in an arena BG like the one in Nagrand, you can use this spell to move back to you portal and yes that can also makes your char moves through pillars/walls but when you put this spell into the outer walls voila now he's in a zone no one can attack him. Now tell me how is this not abusive?

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • 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