Do not restore offline traders that have been kicked from the game.
This commit is contained in:
@@ -18,6 +18,7 @@ package handlers.admincommandhandlers;
|
||||
|
||||
import java.util.StringTokenizer;
|
||||
|
||||
import com.l2jmobius.gameserver.data.sql.impl.OfflineTradersTable;
|
||||
import com.l2jmobius.gameserver.handler.IAdminCommandHandler;
|
||||
import com.l2jmobius.gameserver.model.L2World;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
@@ -43,6 +44,10 @@ public class AdminKick implements IAdminCommandHandler
|
||||
final L2PcInstance plyr = L2World.getInstance().getPlayer(player);
|
||||
if (plyr != null)
|
||||
{
|
||||
if (plyr.getOfflineStartTime() > 0)
|
||||
{
|
||||
OfflineTradersTable.removeTrader(plyr.getObjectId());
|
||||
}
|
||||
plyr.logout();
|
||||
activeChar.sendMessage("You kicked " + plyr.getName() + " from the game.");
|
||||
}
|
||||
@@ -59,7 +64,7 @@ public class AdminKick implements IAdminCommandHandler
|
||||
player.logout();
|
||||
}
|
||||
}
|
||||
activeChar.sendMessage("Kicked " + counter + " players");
|
||||
activeChar.sendMessage("Kicked " + counter + " players.");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@@ -21,6 +21,7 @@ import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.gameserver.data.sql.impl.OfflineTradersTable;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.AdminData;
|
||||
import com.l2jmobius.gameserver.handler.AdminCommandHandler;
|
||||
import com.l2jmobius.gameserver.handler.IAdminCommandHandler;
|
||||
@@ -171,6 +172,10 @@ public class AdminMenu implements IAdminCommandHandler
|
||||
String text;
|
||||
if (plyr != null)
|
||||
{
|
||||
if (plyr.getOfflineStartTime() > 0)
|
||||
{
|
||||
OfflineTradersTable.removeTrader(plyr.getObjectId());
|
||||
}
|
||||
plyr.logout();
|
||||
text = "You kicked " + plyr.getName() + " from the game.";
|
||||
}
|
||||
|
Reference in New Issue
Block a user