Jump to content

[Patch]Avoid change instance difficulties exploit


Auntie Mangos
 Share

Recommended Posts

  • 42 years later...

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

Leader of group can change instance while member is still on it but logged off. After members relog he keep their positions so that permit to bypass all trash.

With this patch, when instance difficulty is changed while player is loggedoff, player who is loggedoff will relog at last instance difficulty.

So to resume :

- Group formed

- Group have finished instance or at least down some boss.

- All group get out of the instance except one player who found safe place.

- That player logoff.

- Leader change difficulty once. (if twice the result is nothing have changed, instance is not reset du to player logged off)

- Logged player can enter to new heroic instance.

- When loggedoff player will relog it will be placed to normal instance at his last position.

- To join other part of the group he must get out, get in to instance.

For which repository revision was the patch created?

latest

Is there a thread in the bug report section or at lighthouse? If yes, please add a link to the thread.

no

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

me

Patch:

http://paste2.org/p/1890656

diff --git a/src/game/Group.cpp b/src/game/Group.cpp
index b8ae120..7f99bb3 100644
--- a/src/game/Group.cpp
+++ b/src/game/Group.cpp
@@ -1742,7 +1742,7 @@ void Group::ResetInstances(InstanceResetMethod method, bool isRaid, Player* Send
        }

        // TODO - Adapt here when clear how difficulty changes must be handled
-        if (isEmpty || method == INSTANCE_RESET_GROUP_DISBAND || method == INSTANCE_RESET_CHANGE_DIFFICULTY)
+        if (isEmpty || method == INSTANCE_RESET_GROUP_DISBAND)
        {
            // do not reset the instance, just unbind if others are permanently bound to it
            if (state->CanReset())
diff --git a/src/game/Player.cpp b/src/game/Player.cpp
index 2c378d8..13edaeb 100644
--- a/src/game/Player.cpp
+++ b/src/game/Player.cpp
@@ -1660,7 +1660,10 @@ bool Player::TeleportTo(uint32 mapid, float x, float y, float z, float orientati
    }

    if (Group* grp = GetGroup())
+    {
        grp->SetPlayerMap(GetObjectGuid(), mapid);
+        SetDungeonDifficulty(grp->GetDungeonDifficulty());  // ensure player have correct difficulty set (after logoff-login)
+    }

    // if we were on a transport, leave
    if (!(options & TELE_TO_NOT_LEAVE_TRANSPORT) && m_transport)
@@ -16843,16 +16846,7 @@ void Player::_LoadGroup(QueryResult *result)
        delete result;

        if (Group* group = sObjectMgr.GetGroupById(groupId))
-        {
-            uint8 subgroup = group->GetMemberGroup(GetObjectGuid());
-            SetGroup(group, subgroup);
-            if (getLevel() >= LEVELREQUIREMENT_HEROIC)
-            {
-                // the group leader may change the instance difficulty while the player is offline
-                SetDungeonDifficulty(group->GetDungeonDifficulty());
-                SetRaidDifficulty(group->GetRaidDifficulty());
-            }
-        }
+            SetGroup(group, group->GetMemberGroup(GetObjectGuid()));
    }
}

This patch need to be reviewed enought due to possible border effect.

Link to comment
Share on other sites

Is there anything you can do about the other bug that's letting players enter heroic instances without attunement?

The bug is as following: player without attunement enter normal mode, logs off, leader changes to heroic and enters, and when the player w.o attunement logs back in he will be in the heroic mode of the instance. Don't know if this bug was submited before, but i just thought about giving a heads up, maybe you have the skills to fix this. :)

Link to comment
Share on other sites

Yes Cupcake this will prevent this situation.

I think this patch doesn't have other effect but setting difficulty everytime we enter to new map is a hack. There is probably a better place to place this check.

At least we can add condition like :

if (map->isDungeon) setdiificulty...

But i don't think it's real improvement. The idea is not touch difficulty of logged player but set it dynamicaly when he try to enter the dungeon while logged in.

Other idea are welcome :)

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

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