Package net.bnubot.util

Examples of net.bnubot.util.StatString


            fos.write("</b> (".getBytes());
            fos.write(Integer.toString(users.size()).getBytes());
            fos.write(")</td></tr>".getBytes());

            for(BNetUser ui : users) {
              StatString ss = ui.getStatString();
              String product = getIcon(ss.getProduct().getDword(), ss.getIcon(), ui.getFlags());
              String lag = getLagIcon(ui.getFlags(), ui.getPing());

              fos.write("<tr>".getBytes());
              fos.write(("<td><img src=\"images/" + product + ".jpg\"></td>").getBytes());
              fos.write(("<td>" + ui.toString(GlobalSettings.bnUserToStringUserList) + "</td>").getBytes());
View Full Code Here


              try (BNetOutputStream bos = new BNetOutputStream(baos)) {
                bos.write(("PX2D[Realm]," + name + ",").getBytes());
                bos.write(data);
                bos.writeByte(0);
              }
              final StatString statstr = new StatString(new BNetInputStream(new ByteArrayInputStream(baos.toByteArray())));

              MCPCharacter c = new MCPCharacter(time, name, statstr);

              if(Out.isDebug(getClass()))
                Out.debugAlways(getClass(), c.toString());
View Full Code Here

        break;
      }

      case SID_ENTERCHAT: {
        String uniqueUserName = is.readNTString();
        StatString myStatString = new StatString(is.readNTString());
        /* String accountName = */is.readNTString();

        myUser = new BNetUser(this, uniqueUserName, cs.myRealm);
        myUser.setStatString(myStatString);
        dispatchEnterChat(myUser);
View Full Code Here

      // is.readDWord(); // IP Address (defunct)
      // is.readDWord(); // Account number (defunct)
      // is.readDWord(); // Registration authority (defunct)
        String username = is.readNTString();
        ByteArray data = null;
        StatString statstr = null;

        switch(eid) {
        case EID_SHOWUSER:
        case EID_JOIN:
          statstr = is.readStatString();
          break;
        case EID_USERFLAGS:
          // Sometimes USERFLAGS contains a statstring; sometimes
          // it doesn't
          statstr = is.readStatString();
          if(statstr.toString().length() == 0)
            statstr = null;
          break;
        default:
          data = new ByteArray(is.readNTBytes());
          break;
View Full Code Here

      user.setFlags(bnflags);
    }

    // StatString
    if(user.getStatString() == null)
      user.setStatString(new StatString("TAHC"));

    return user;
  }
View Full Code Here

TOP

Related Classes of net.bnubot.util.StatString

Copyright © 2018 www.massapicom. 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.