KNESS 發表於 2017-11-21 17:15

参考物理防御突破-128修改

1. l1j/server/server/clientpackets/C_CommonClick.java (角色選擇畫面)

搜尋

int str = rs.getByte("Str");
int dex = rs.getByte("Dex");
int con = rs.getByte("Con");
int wis = rs.getByte("Wis");
int cha = rs.getByte("Cha");
int intel = rs.getByte("Intel");

改為
01. int str = rs.getShort("Str");
02. if (str < 1) {
03.       str = 1;
04. }
05. else if (str > 255) {
06.       str = 255;
07. }
08. int dex = rs.getShort("Dex");
09. if (dex < 1) {
10.       dex = 1;
11. }
12. else if (dex > 255) {
13.       dex = 255;
14. }
15. int con = rs.getShort("Con");
16. if (con < 1) {
17.       con = 1;
18. }
19. else if (con > 255) {
20.       con = 255;
21. }
22. int wis = rs.getShort("Wis");
23. if (wis < 1) {
24.       wis = 1;
25. }
26. else if (wis > 255) {
27.       wis = 255;
28. }
29. int cha = rs.getShort("Cha");
30. if (cha < 1) {
31.       cha = 1;
32. }
33. else if (cha > 255) {34.       cha = 255;
35. }
36. int intel = rs.getShort("Intel");
37. if (intel < 1) {
38.       intel = 1;
39. }
40. else if (intel > 255) {
41.       intel = 255;
42. }

2. l1j/server/server/command/executor/L1Status.java (使用GM指令調整屬性值)

搜尋

target.addBaseStr((byte) (value - target.getBaseStr()));
target.addBaseCon((byte) (value - target.getBaseCon()));
target.addBaseDex((byte) (value - target.getBaseDex()));
target.addBaseInt((byte) (value - target.getBaseInt()));
target.addBaseWis((byte) (value - target.getBaseWis()));
target.addBaseCha((byte) (value - target.getBaseCha()));

把其中的 byte 改為 short

3. l1j/server/server/model/Instance/L1PcInstance.java

搜尋

private byte _baseStr = 0;

public byte getBaseStr() {
return _baseStr;
}

public void addBaseStr(byte i) {
i += _baseStr;
if (i >= 127) {
i = 127;
}
else if (i < 1) {
i = 1;
}
addStr((byte) (i - _baseStr));
_baseStr = i;

把其中的 byte 全部改成 short


if (i >= 127) {
i = 127;
}
改為
if (i >= 255) {
i = 255;
}

以上只是力量 其他的屬性值一樣修改即可

4. l1j/server/server/model/L1Character.java

搜尋

private byte _str = 0;

private short _trueStr = 0;

public byte getStr() {
return _str;
}

public void setStr(int i) {
_trueStr = (short) i;
_str = (byte) IntRange.ensure(i, 1, 127);
}

把其中的 byte 改為 short
_str = (byte) IntRange.ensure(i, 1, 127); 改為 _str = (short) IntRange.ensure(i, 1, 255);

以上只是力量 其他的屬性值一樣修改即可

5. l1j/server/server/storage/mysql/MySqlCharacterStorage.java

搜尋

pc.addBaseStr(rs.getByte("Str"));
pc.addBaseCon(rs.getByte("Con"));
pc.addBaseDex(rs.getByte("Dex"));
pc.addBaseCha(rs.getByte("Cha"));
pc.addBaseInt(rs.getByte("Intel"));
pc.addBaseWis(rs.getByte("Wis"));

rs.getByte 改為 rs.getShort

6. l1j/server/server/utils/CalcStat.java

搜尋**** Hidden Message *****

jjen0206 發表於 2017-11-21 19:09

感謝大大分享

邪魔龍 發表於 2017-11-22 13:30

這個好,這個好,,,,謝謝大大

Bogi999 發表於 2017-11-23 08:37

很實用的感覺雖然核心部分還在學習
先收藏以後有用到在改
感謝分享

tbsdbs 發表於 2018-1-14 00:23

感謝大大分享

puenhan 發表於 2018-3-13 12:45

很給力 感謝大大無私分享教學 已成功

toro 發表於 2018-9-29 05:07

大大腦袋真是靈活呀,把首項負值改成正了

chander 發表於 2018-9-29 07:26

先存下來之後研究
謝謝分享

lilang1006 發表於 2018-9-29 09:19

這個好,這個好,,,,謝謝大大

19870922 發表於 2018-9-29 18:54

感謝大大分享

0938596215 發表於 2018-10-19 15:40

感謝大大分享
先存下來之後研究

a1111a 發表於 2018-12-9 19:54

感謝大大分享

YEN 發表於 2018-12-10 00:02

謝謝大大的分享

fdbggeca 發表於 2018-12-10 01:38

感謝分享,來學習改寫程式!!

kuofuan 發表於 2018-12-12 02:31

實用的感覺雖然還在學習
先收藏
感謝分享

sstopman 發表於 2019-1-8 01:06

這個源碼修改有點難懂!

harvey1014 發表於 2019-1-8 09:59

很實用的感覺 :):):)
先收藏以後有用到在改
感謝分享

8863459 發表於 2019-2-17 15:17

这个很实用

野性覺醒 發表於 2019-8-14 19:17

馬上試試
謝謝分享

apple780303 發表於 2019-8-14 21:04

       感謝大大分享
頁: [1] 2 3 4
查看完整版本: 参考物理防御突破-128修改