美工GM 版主
文章數 : 646 注冊日期 : 2021-09-23
| 主題: [核心]物理防御突破-128的修改方法 周一 10月 04, 2021 11:11 pm | |
| 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");
改為 int str = rs.getShort("Str"); if (str < 1) {str = 1;} else if (str > 255) { str = 255;}
int dex = rs.getShort("Dex"); if (dex < 1) {dex = 1;} else if (dex > 255) {dex = 255;}
int con = rs.getShort("Con"); if (con < 1) {con = 1;} else if (con > 255) {con = 255;}
int wis = rs.getShort("Wis"); if (wis < 1) {wis = 1;} else if (wis > 255) {wis = 255;}
int cha = rs.getShort("Cha"); if (cha < 1) {cha = 1;} else if (cha > 255) {cha = 255;}
int intel = rs.getShort("Intel"); if (intel < 1) {intel = 1;} else if (intel > 255) {intel = 255;}
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
搜尋
public static short calcStatHp(int charType, int baseMaxHp, byte baseCon
改為
public static short calcStatHp(int charType, int baseMaxHp, short baseCon
搜尋
public static short calcStatMp(int charType, int baseMaxMp, byte baseWis
改為
public static short calcStatMp(int charType, int baseMaxMp, short baseWis | |
|