Examples of MoveCharToAccResponse


Examples of l2p.gameserver.loginservercon.lspackets.MoveCharToAccResponse

        break;
      case 7:
        packet = new IpAction(data, loginserver);
        break;
      case 0x08:
        packet = new MoveCharToAccResponse(data, loginserver);
        break;
      case 0x09:
        packet = new TestConnection(data, loginserver);
        break;
      default:
View Full Code Here

Examples of l2p.loginserver.gameservercon.lspackets.MoveCharToAccResponse

        statement = con.prepareStatement("SELECT * FROM accounts WHERE login = ?");
        statement.setString(1, newacc);
        rs = statement.executeQuery();
        if(!rs.next())
        {
          sendPacket(new MoveCharToAccResponse(player, 1));
          return;
        }
      }
      catch(Exception e)
      {
        log.warning("Can't recive password for account " + oldacc + ", exciption :" + e);
      }
      finally
      {
        DatabaseUtils.closeDatabaseSR(statement, rs);
      }
      //Encode old password and compare it to sended one, send packet to determine changed or not.
      try
      {
        if(!LoginController.DEFAULT_CRYPT.compare(pass, dbPassword))
        {
          sendPacket(new MoveCharToAccResponse(player, 0));
        }
        else
        {
          statement = con.prepareStatement("UPDATE accounts SET login = ? WHERE login = ?");
          statement.setString(1, newacc);
          statement.setString(2, oldacc);
          int result = statement.executeUpdate();
          L2LoginClient client = LoginController.getInstance().getAuthedClient(oldacc);
          if(result != 0)
          {
            Log.add("<old=\"" + oldacc + "\" new=\"" + newacc + "\" ip=\"" + (client != null ? client.getIpAddress() : "0.0.0.0") + "\" />", "accounts");
          }
          sendPacket(new MoveCharToAccResponse(player, 2));
        }
      }
      catch(Exception e1)
      {
        e1.printStackTrace();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.