國際服117[1.2]支援簡體! 也可以簡體广播對話!!
這是我完整版的編碼 絕對可用!繁體字體都可以 打出來沒問題的!!
文件也絕對找得到 不會找不到! 有問題再給個私訊
找到
StringUtil.java
收尋
getRightPaddedStr
之後換掉整段
public static int getlength(String str){
int i,t=0;
byte[] bt = str.getBytes();
for(i=1;i<=bt.length;i++){
if (bt<0) {t=t+2;i++;}
else t=t+1;
}
return t;
}
public static String getRightPaddedStr(String in, char padchar, int length) {
StringBuilder builder = new StringBuilder(in);
for (int x = getlength(in); x < length; x++) {
builder.append(padchar);
}
return builder.toString();
}
--------------------------------------------------
找到
package tools.data;
MaplePacketLittleEndianWriter.java
收尋
private static final Charset ASCII = Charset.forName("US-ASCII");
改成
private static Charset ASCII = Charset.forName("GBK");
public int getlength(String str){
int i,t=0;
byte[] bt = str.getBytes();
for (i=1;i<=bt.length;i++){
if (bt<0) {t=t+2;i++;}
else t=t+1;
}
return t;
}
在找到
writeShort((short) s.length());
改成
writeShort((short)getlength(s));
--------------------------------------------------
找到
GenericLittleEndianAccessor.java
收尋
public final String readAsciiString(final int n) {
final char ret[] = new char;
for (int x = 0; x < n; x++) {
ret = (char) readByte();
}
return new String(ret);
}
改成
public final String readAsciiString(int n) {
//char ret[] = new char;
byte ret[] = new byte;
for (int x = 0; x < n; x++) {
ret = (byte) readByte();
}
try {
String str= new String(ret,"GBK");
return str;
} catch (Exception e) {
System.err.println(e);
}
return null;
}
-------------------------------------------------
找到
GenericLittleEndianWriter.java
收尋
private static final Charset ASCII = Charset.forName("US-ASCII"); // ISO-8859-1, UTF-8
private ByteOutputStream bos;
改成
private static final Charset ASCII = Charset.forName("GBK");
private ByteOutputStream bos;
public int getlength(String str){
int i,t=0;
byte[] bt = str.getBytes();
for (i=1;i<=bt.length;i++){
if (bt<0) {t=t+2;i++;}
else t=t+1;
}
return t;
}
在找到
writeShort((short) s.length());
改成
writeShort((short)getlength(s));
-------------------------------------------------
找到
PacketHelper.java
收尋
public static final void addCharStats(MaplePacketLittleEndianWriter mplew, MapleCharacter chr)
在上面增加
public int getlength(String str){
int i,t=0;
byte[] bt = str.getBytes();
for (i=1;i<=bt.length;i++){
if (bt<0) {t=t+2;i++;}
else t=t+1;
}
return t;
}
----------------------------------------------
littleendianaccessor.java也要改在tools.data
public final String readAsciiString(final int n) {
final char ret[] = new char;
for (int x = 0; x < n; x++) {
ret = (char) readByte();
}
return new String(ret);
}
替換成
public final String readAsciiString(int n) {
//char ret[] = new char;
byte ret[] = new byte;
for (int x = 0; x < n; x++) {
ret = (byte) readByte();
}
try {
String str= new String(ret,"GBK");//勿改
return str;
} catch (Exception e) {
System.err.println(e);
}
return null;
}
--------------------------------------------------
打開SQL數據庫
找到
characters數據庫
右鍵 設計資料表
找到name 字元集GBK
完成~~
{:soso_e102:}多谢分享~~~~~~~~~~ 谢谢啦。 為怎麼婐照你改的 MaplePacketLittleEndianWriter.java 就會38?
其他的都不會38
只有改到 MaplePacketLittleEndianWriter.java 就會
页:
[1]