Jump to content

Question

Posted (edited)

Hello guys,
I am not sure,but I guess that some players in my server are using this method to dupe items: http://www.maxcheaters.com/topic/189012-new-bug-duplicate-freya-hi5/
I've given it a thought and came with few solutions.

1) Change method when you enter the world,the last thing program does is load your inventory.
2) Change the way deleting item method works,load items from databse every time you delete something.Just thought of one downside for this method,wouldn't the said duping method work if instead of deleting item just trade it to someone or using other transfer method.Plus,I believe, it's really hitting on performance.
Any help guys?
EDIT: aCis rev 320

Edited by StealthyS4m

Recommended Posts

  • 0
Posted

 

Index: trunk/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/AuthLogin.java
===================================================================
--- trunk/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/AuthLogin.java    (revision 236)
+++ trunk/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/AuthLogin.java    (revision 323)
@@ -15,8 +15,7 @@
 package net.sf.l2j.gameserver.network.clientpackets;
 
-import net.sf.l2j.Config;
 import net.sf.l2j.gameserver.LoginServerThread;
 import net.sf.l2j.gameserver.LoginServerThread.SessionKey;
-import net.sf.l2j.gameserver.network.L2GameClient;
+import net.sf.l2j.gameserver.network.serverpackets.L2GameServerPacket;
 
 /**
@@ -44,14 +43,13 @@
     protected void runImpl()
     {
-        final SessionKey key = new SessionKey(_loginKey1, _loginKey2, _playKey1, _playKey2);
-        if (Config.DEBUG)
-            _log.info("User:" + _loginName + "key:" + key);
-        
-        final L2GameClient client = getClient();
-        if (client.getAccountName() == null)
+        if (getClient().getAccountName() == null)
         {
-            client.setAccountName(_loginName);
-            LoginServerThread.getInstance().addGameServerLogin(_loginName, client);
-            LoginServerThread.getInstance().addWaitingClientAndSendRequest(_loginName, client, key);
+            if (LoginServerThread.getInstance().addGameServerLogin(_loginName, getClient()))
+            {
+                getClient().setAccountName(_loginName);
+                LoginServerThread.getInstance().addWaitingClientAndSendRequest(_loginName, getClient(), new SessionKey(_loginKey1, _loginKey2, _playKey1, _playKey2));
+            }
+            else
+                getClient().close((L2GameServerPacket) null);
         }
     }
 

 

 

Index: trunk/aCis_gameserver/java/net/sf/l2j/gameserver/LoginServerThread.java
===================================================================
--- trunk/aCis_gameserver/java/net/sf/l2j/gameserver/LoginServerThread.java    (revision 274)
+++ trunk/aCis_gameserver/java/net/sf/l2j/gameserver/LoginServerThread.java    (revision 323)
@@ -419,7 +419,10 @@
     }
     
-    public void addGameServerLogin(String account, L2GameClient client)
-    {
-        _accountsInGameServer.put(account, client);
+    public boolean addGameServerLogin(String account, L2GameClient client)
+    {
+        if (_accountsInGameServer.containsKey(account))
+            return false;
+        
+        return _accountsInGameServer.put(account, client) == null;
     }
  • 0
Posted

Mhmm,I got those lines in my source.
Back to the problem-item duping.
I just know that this player is using phx,using warehouse(standing nearby) and reconnects a few times.In just looks like that he is doing the bug shown in the video,but if double login isn't working then...idk.
If anyone knows how it's done,Thanks!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...