- UID
- 6950
- 閱讀權限
- 10
- 主題
- 3
- 帖子
- 49
- 精華
- 0
- A幣
- 1
- 在線時間
- 45 小時
- 最後登錄
- 2023-6-24
集團新軍
- 主題
- 3
- 帖子
- 49
- 精華
- 0
- 綜合社群主題發文量
- 1
- 電玩社群主題發文量
- 0
- 娛樂社群主題發文量
- 0
- 技術社群主題發文量
- 0
- 閱讀權限
- 10
- 註冊時間
- 2017-1-12
TA的每日心情 | 衰 2019-10-16 19:10 |
---|
簽到天數: 3 天 連續簽到: 0 天 [LV.2]偶爾看看I
|
本帖最後由 ms0553922 於 2017-5-17 23:45 編輯
MaplePacketCreator.JAVA
原本小馬端的
public static MaplePacket spawnPlayerMapobject(MapleCharacter chr) {
已經有座添加 故不多做說明
找到
private static void getGuildInfo(MaplePacketLittleEndianWriter mplew, MapleGuild guild) {
下面新增
private static void getGuildInfo2(MaplePacketLittleEndianWriter mplew, MapleGuild guild,MapleCharacter chr) {
String medal = "";
if (chr.getNPSGFS() == 1) {
medal = "<新手冒險家勳章>";
}
if (chr.getNPSGFS() == 2) {
medal = "<初階冒險家勳章>";
}
if (chr.getNPSGFS() == 3) {
medal = "<老練冒險家勳章>";
}
if (chr.getNPSGFS() == 4) {
medal = "<神之冒險家勳章>";
}
if (chr.getNPSGFS() == 5) {
medal = "<鬥神勳章>";
}
if (chr.getNPSGFS() == 6) {
medal = "<賢者勳章>";
}
if (chr.getNPSGFS() == 7) {
medal = "<狙擊手勳章>";
}
if (chr.getNPSGFS() == 8) {
medal = "<傳奇俠盜>";
}
if (chr.getNPSGFS() == 9) {
medal = "<海賊王勳章>";
}
if (chr.getNPSGFS() == 10) {
medal = "<誠實的冒險家勳章>";
}
if (chr.getNPSGFS() == 11) {
medal = "<人氣王勳章>";
}
if (chr.getNPSGFS() == 12) {
medal = "<楓之谷超級偶像勳章>";
}
if (chr.getNPSGFS() == 13) {
medal = "<闇黑龍王殺手勳章>";
}
if (chr.getNPSGFS() == 14) {
medal = "<皮卡啾殺手勳章>";
}
if (chr.getNPSGFS() == 15) {
medal = "<拒絕使用外掛的勳章>";
}
if (chr.getNPSGFS() == 16) {
medal = "<使用標準國字的勳章>";
}
if (chr.getNPSGFS() == 17) {
medal = "<楓之谷萬事通的勳章>";
}
if (chr.getNPSGFS() == 18) {
medal = "<和我做朋友的勳章>";
}
if (chr.getNPSGFS() == 19) {
medal = "<優秀社會人士勳章>";
}
if (chr.getNPSGFS() == 20) {
medal = "<可愛寵物主人勳章>";
}
if (chr.getNPSGFS() == 21) {
medal = "<永不放棄的挑戰者勳章>";
}
if (chr.getNPSGFS() == 22) {
medal = "<東京救世主>";
}
if (chr.getNPSGFS() == 23) {
medal = "<善良的孩子>";
}
if (chr.getNPSGFS() == 24) {
medal = "<我是幸運兒>";
}
if (chr.getNPSGFS() == 25) {
medal = "<愛國勳章>";
}
if (chr.getNPSGFS() == 26) {
medal = "<精明的獵人勳章>";
}
if (chr.getNPSGFS() == 27) {
medal = "<傳奇的獵人勳章>";
}
if (chr.getGMLevel() >= 1) {
medal = "<最高權威勳章>";
}
mplew.writeInt(guild.getId());
if (guild.getId() != 0) {
mplew.writeMapleAsciiString(guild.getName()+ "" + medal);
} else {
mplew.writeMapleAsciiString(medal);
for (int i = 1; i <= 5; i++) {
mplew.writeMapleAsciiString(guild.getRankTitle(i));
}
Collection<MapleGuildCharacter> members = guild.getMembers();
mplew.write(members.size());
//then it is the size of all the members
for (MapleGuildCharacter mgc : members) { //and each of their character ids o_O
mplew.writeInt(mgc.getId());
}
for (MapleGuildCharacter mgc : members) {
mplew.writeAsciiString(StringUtil.getRightPaddedStr(mgc.getName(), '\0', 13));
mplew.writeInt(mgc.getJobId());
mplew.writeInt(mgc.getLevel());
mplew.writeInt(mgc.getGuildRank());
mplew.writeInt(mgc.isOnline() ? 1 : 0);
mplew.writeInt(guild.getSignature());
mplew.writeInt(mgc.getAllianceRank());
}
mplew.writeInt(guild.getCapacity());
mplew.writeShort(guild.getLogoBG());
mplew.write(guild.getLogoBGColor());
mplew.writeShort(guild.getLogo());
mplew.write(guild.getLogoColor());
mplew.writeMapleAsciiString(guild.getNotice());
mplew.writeInt(guild.getGP());
mplew.writeInt(guild.getAllianceId());
}
找到
public static MaplePacket showGuildInfo(MapleCharacter c) {
下面新增
public static MaplePacket showGuildInfo2(MapleCharacter c) {
MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
mplew.writeShort(SendPacketOpcode.GUILD_OPERATION.getValue());
mplew.write(0x1A);
String medal = "";
if (chr.getNPSGFS() == 1) {
medal = "<新手冒險家勳章>";
}
if (chr.getNPSGFS() == 2) {
medal = "<初階冒險家勳章>";
}
if (chr.getNPSGFS() == 3) {
medal = "<老練冒險家勳章>";
}
if (chr.getNPSGFS() == 4) {
medal = "<神之冒險家勳章>";
}
if (chr.getNPSGFS() == 5) {
medal = "<鬥神勳章>";
}
if (chr.getNPSGFS() == 6) {
medal = "<賢者勳章>";
}
if (chr.getNPSGFS() == 7) {
medal = "<狙擊手勳章>";
}
if (chr.getNPSGFS() == 8) {
medal = "<傳奇俠盜>";
}
if (chr.getNPSGFS() == 9) {
medal = "<海賊王勳章>";
}
if (chr.getNPSGFS() == 10) {
medal = "<誠實的冒險家勳章>";
}
if (chr.getNPSGFS() == 11) {
medal = "<人氣王勳章>";
}
if (chr.getNPSGFS() == 12) {
medal = "<楓之谷超級偶像勳章>";
}
if (chr.getNPSGFS() == 13) {
medal = "<闇黑龍王殺手勳章>";
}
if (chr.getNPSGFS() == 14) {
medal = "<皮卡啾殺手勳章>";
}
if (chr.getNPSGFS() == 15) {
medal = "<拒絕使用外掛的勳章>";
}
if (chr.getNPSGFS() == 16) {
medal = "<使用標準國字的勳章>";
}
if (chr.getNPSGFS() == 17) {
medal = "<楓之谷萬事通的勳章>";
}
if (chr.getNPSGFS() == 18) {
medal = "<和我做朋友的勳章>";
}
if (chr.getNPSGFS() == 19) {
medal = "<優秀社會人士勳章>";
}
if (chr.getNPSGFS() == 20) {
medal = "<可愛寵物主人勳章>";
}
if (chr.getNPSGFS() == 21) {
medal = "<永不放棄的挑戰者勳章>";
}
if (chr.getNPSGFS() == 22) {
medal = "<東京救世主>";
}
if (chr.getNPSGFS() == 23) {
medal = "<善良的孩子>";
}
if (chr.getNPSGFS() == 24) {
medal = "<我是幸運兒>";
}
if (chr.getNPSGFS() == 25) {
medal = "<愛國勳章>";
}
if (chr.getNPSGFS() == 26) {
medal = "<精明的獵人勳章>";
}
if (chr.getNPSGFS() == 27) {
medal = "<傳奇的獵人勳章>";
}
if (chr.getGMLevel() >= 1) {
medal = "<最高權威勳章>";
}
mplew.write(1);
mplew.writeInt(0);
mplew.writeMapleAsciiString(medal);
mplew.write(0);//members.size()
mplew.writeInt(0);//mgc.getId()
mplew.writeInt(0);//mgc.getJobId()
mplew.writeInt(0);//mgc.getLevel()
mplew.writeInt(0);//mgc.getGuildRank()
mplew.writeInt(0);//mgc.isOnline() ? 1 : 0
mplew.writeInt(0);//signature
mplew.writeInt(0);//mgc.getAllianceRank();
mplew.writeInt(0);
mplew.writeShort(0);
mplew.write(0);
mplew.writeShort(0);
mplew.write(0);
mplew.writeInt(0);
mplew.writeInt(0);
return mplew.getPacket();
}
找到
public static MaplePacket showGuildInfo(MapleCharacter c) {
的
getGuildInfo(mplew, g);
改成
getGuildInfo2(mplew, g, c);
找到
PlayerLoggedinHandler.java
找到
if (player.getGuildId() > 0) {
上面新增
if(player.getGuildId() <= 0){
c.getSession().write(MaplePacketCreator.showGuildInfo2(player));
}
|
|