Compare commits
42 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
37e5b11173 | |
|
|
696ec96a5f | |
|
|
bc5df5e27b | |
|
|
bcbfd2d9a7 | |
|
|
153d0fe5fa | |
|
|
1d93fa53cd | |
|
|
1a792cf446 | |
|
|
bba9675add | |
|
|
435dec6dca | |
|
|
5a7ec1ae6b | |
|
|
aea672d5d7 | |
|
|
bdc4925951 | |
|
|
aca8a396d8 | |
|
|
a05a719557 | |
|
|
179fd3a745 | |
|
|
4692014148 | |
|
|
754276dbc2 | |
|
|
42c88d5044 | |
|
|
26e6493fd6 | |
|
|
86bd4525af | |
|
|
44f242651a | |
|
|
4c0af5f318 | |
|
|
285da62cfd | |
|
|
f78fed284c | |
|
|
2992e3fcea | |
|
|
8263aed9d8 | |
|
|
036b83cc2c | |
|
|
fef0f8e973 | |
|
|
1504fae066 | |
|
|
1f47588672 | |
|
|
1f5977bcc4 | |
|
|
d80e69fc91 | |
|
|
684085da44 | |
|
|
51ce562ba2 | |
|
|
3da8d6e324 | |
|
|
6451e23396 | |
|
|
9fd47e9e82 | |
|
|
dd580178c2 | |
|
|
f23371f563 | |
|
|
e491d2a2d6 | |
|
|
246c4bb2c8 | |
|
|
908226e401 |
|
|
@ -1,2 +1,9 @@
|
|||
.idea/
|
||||
out/
|
||||
MXD-Server.iml
|
||||
配置文件/事件载入.ini
|
||||
配置文件/经验倍数.ini
|
||||
配置文件/捉鬼任务.ini
|
||||
配置文件/坐骑椅子.ini
|
||||
src.zip
|
||||
src/META-INF/MANIFEST.MF
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -0,0 +1,3 @@
|
|||
Manifest-Version: 1.0
|
||||
Main-Class: gui.ppms
|
||||
|
||||
|
|
@ -1,6 +1,15 @@
|
|||
package client;
|
||||
|
||||
import cn.hutool.core.util.RandomUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import gui.tw.diaoyu.BL;
|
||||
import gui.tw.diaoyu.DiaoyuItem;
|
||||
import gui.tw.rw.XuanShangRenWu;
|
||||
import gui.tw.rw.rwConfig;
|
||||
import handling.channel.handler.DamageParse;
|
||||
import provider.MapleData;
|
||||
import provider.MapleDataTool;
|
||||
import server.life.MapleLifeFactory;
|
||||
import server.shops.MaplePlayerShopItem;
|
||||
import client.inventory.Equip;
|
||||
import gui.jyhss.jyhwpss;
|
||||
|
|
@ -18,12 +27,11 @@ import handling.login.LoginServer;
|
|||
import handling.world.PlayerBuffStorage;
|
||||
import handling.world.MapleMessengerCharacter;
|
||||
import io.netty.channel.Channel;
|
||||
import tools.MockIOSession;
|
||||
import tools.*;
|
||||
import client.inventory.MapleInventoryIdentifier;
|
||||
import server.maps.MapleFoothold;
|
||||
|
||||
import java.math.BigInteger;
|
||||
import java.util.Comparator;
|
||||
|
||||
import client.inventory.MapleRing.RingComparator;
|
||||
import client.inventory.Item;
|
||||
|
|
@ -67,8 +75,6 @@ import tools.packet.PetPacket;
|
|||
|
||||
import java.util.EnumMap;
|
||||
|
||||
import tools.HexTool;
|
||||
|
||||
import java.util.concurrent.RejectedExecutionException;
|
||||
|
||||
import server.FishingRewardFactory.FishingReward;
|
||||
|
|
@ -81,13 +87,10 @@ import server.Timer.MapTimer;
|
|||
import server.Timer.BuffTimer;
|
||||
import server.MapleStatEffect;
|
||||
import server.MapleItemInformationProvider;
|
||||
import tools.MaplePacketCreator;
|
||||
import tools.data.MaplePacketLittleEndianWriter;
|
||||
import server.life.PlayerNPC;
|
||||
import database.DatabaseException;
|
||||
import tools.FilePrinter;
|
||||
import client.inventory.IItem;
|
||||
import tools.Pair;
|
||||
import client.inventory.ItemLoader;
|
||||
|
||||
import java.util.Iterator;
|
||||
|
|
@ -108,7 +111,6 @@ import java.sql.PreparedStatement;
|
|||
import java.sql.Connection;
|
||||
import java.sql.SQLException;
|
||||
|
||||
import tools.FileoutputUtil;
|
||||
import database.DBConPool;
|
||||
import server.maps.SavedLocationType;
|
||||
|
||||
|
|
@ -124,8 +126,6 @@ import constants.ServerConfig;
|
|||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import tools.ConcurrentEnumMap;
|
||||
|
||||
import java.util.LinkedHashMap;
|
||||
|
||||
import server.maps.Event_PyramidSubway;
|
||||
|
|
@ -370,6 +370,8 @@ public class MapleCharacter extends AbstractAnimatedMapleMapObject implements Se
|
|||
private boolean 吸怪状态;
|
||||
private List<LifeMovementFragment> lastres;
|
||||
|
||||
|
||||
|
||||
private MapleCharacter(final boolean ChannelServer) {
|
||||
this.teleportname = "";
|
||||
this.nowmacs = "";
|
||||
|
|
@ -1983,6 +1985,104 @@ public class MapleCharacter extends AbstractAnimatedMapleMapObject implements Se
|
|||
}
|
||||
}
|
||||
|
||||
int i = 0;
|
||||
public void startFishingTask2(final boolean VIP) {
|
||||
try {
|
||||
final int time = Start.diaoyuConfig.getDyjg();
|
||||
this.cancelFishingTask();
|
||||
i = 0;
|
||||
this.fishing = EtcTimer.getInstance().register((Runnable) new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
//是否用的高级鱼饵
|
||||
final boolean expMulti = MapleCharacter.this.haveItem(Start.diaoyuConfig.getGjye(), 1, false, true);
|
||||
if (!expMulti && !MapleCharacter.this.haveItem(Start.diaoyuConfig.getPtye(), 1, false, true)) {
|
||||
MapleCharacter.this.cancelFishingTask();
|
||||
if (i >0){
|
||||
MapleCharacter.this.getClient().sendPacket(MaplePacketCreator.cancelChair(-1));
|
||||
}
|
||||
return;
|
||||
}
|
||||
i++;
|
||||
MapleInventoryManipulator.removeById(MapleCharacter.this.client, MapleInventoryType.USE, expMulti ? Start.diaoyuConfig.getGjye() : Start.diaoyuConfig.getPtye(), 1, false, false);
|
||||
DiaoyuItem item1 = Start.diaoyuConfig.getItem(expMulti);
|
||||
int num = item1.getnum();
|
||||
List<BL> bls = Start.diaoyuConfig.getBls();
|
||||
int bl = 0;
|
||||
|
||||
for (BL blobj : bls) {
|
||||
boolean b = MapleCharacter.this.haveItem(blobj.getItemId());
|
||||
if (b) {
|
||||
if (Start.diaoyuConfig.getBldj() == 1) {
|
||||
// int itemNum = MapleCharacter.this.getItemNum(blobj.getItemId());
|
||||
bl += (blobj.getBl());
|
||||
} else {
|
||||
bl = Math.max(bl, (blobj.getBl()));
|
||||
}
|
||||
}
|
||||
}
|
||||
long aa = (long)num *bl;
|
||||
num = (int) (num + (aa/100));
|
||||
|
||||
switch (item1.getItemId()) {
|
||||
case 0:
|
||||
MapleCharacter.this.gainMeso(num, true);
|
||||
MapleCharacter.this.client.sendPacket(UIPacket.fishingUpdate((byte) 1, num));
|
||||
break;
|
||||
case -1:
|
||||
MapleCharacter.this.gainExp(num, true, false, true);
|
||||
MapleCharacter.this.client.sendPacket(UIPacket.fishingUpdate((byte) 2, num));
|
||||
break;
|
||||
case -2:
|
||||
MapleCharacter.this.modifyCSPoints(2, num, true);
|
||||
break;
|
||||
case -3:
|
||||
MapleCharacter.this.modifyCSPoints(1, num, true);
|
||||
break;
|
||||
default:
|
||||
if (!MapleInventoryManipulator.checkSpace(MapleCharacter.this.client, item1.getItemId(), num, MapleCharacter.this.getName())) {
|
||||
if (Start.diaoyuConfig.getKjbzdc()==1){
|
||||
final IItem idrop = new Item(item1.getItemId(), (short) 0, (short)num , (byte) 0);
|
||||
Point dropPos = new Point(MapleCharacter.this.getPosition());
|
||||
MapleCharacter.this.getMap().spawnItemDrop((MapleMapObject) MapleCharacter.this, MapleCharacter.this, idrop, dropPos, true, true);
|
||||
}else {
|
||||
MapleCharacter.this.client.sendPacket(MaplePacketCreator.serverNotice(5, "你的背包已满"));
|
||||
MapleCharacter.this.cancelFishingTask();
|
||||
c.sendPacket(MaplePacketCreator.cancelChair(-1));
|
||||
return;
|
||||
}
|
||||
}else {
|
||||
MapleInventoryManipulator.addById(MapleCharacter.this.client, item1.getItemId(), (short) num, GameConstants.isChair(item1.getItemId()) ? MapleCharacter.this.getName() : null, null, 0l);
|
||||
MapleCharacter.this.client.sendPacket(UIPacket.fishingUpdate((byte) 0, item1.getItemId()));
|
||||
}
|
||||
break;
|
||||
}
|
||||
if (Start.diaoyuConfig.getDytx()==1) {
|
||||
MapleCharacter.this.map.broadcastMessage(UIPacket.fishingCaught(MapleCharacter.this.id));
|
||||
}
|
||||
if (item1.getNotice() == 1){
|
||||
String s = MapleCharacter.this.getName();
|
||||
String d="";
|
||||
if (item1.getItemId() > 1) {
|
||||
d = " x " + num;
|
||||
String replace = Start.diaoyuConfig.getNotice().replace("%s", s).replace("%d", d);
|
||||
final IItem idrop = new Item(item1.getItemId(), (short) 0, (short)num , (byte) 0);
|
||||
Broadcast.broadcastMessage(MaplePacketCreator.getGachaponMega2("【钓鱼场】", " : "+replace, idrop, (byte) 14));
|
||||
}else {
|
||||
d = num + item1.getItemName();
|
||||
String replace = Start.diaoyuConfig.getNotice().replace("%s", s).replace("%d", "")+d;
|
||||
replace = "【钓鱼场】 : "+replace;
|
||||
Broadcast.broadcastMessage(MaplePacketCreator.serverNotice(9, MapleCharacter.this.client.getChannel(),replace));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}, (long) time, (long) time);
|
||||
} catch (RejectedExecutionException ex) {
|
||||
}
|
||||
}
|
||||
|
||||
public void cancelMapTimeLimitTask() {
|
||||
if (this.mapTimeLimitTask != null) {
|
||||
this.mapTimeLimitTask.cancel(false);
|
||||
|
|
@ -5229,20 +5329,35 @@ public class MapleCharacter extends AbstractAnimatedMapleMapObject implements Se
|
|||
return this.guildrank;
|
||||
}
|
||||
|
||||
public int getCombat() {
|
||||
public String getCombat() {
|
||||
final short[] TemporaryGroup = {-1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -11, -12, -13, -15, -16, -17, -18, -19, -26, -27, -28, -29, -101, -102, -103, -104, -105, -106, -107, -108, -109, -110, -111, -112, -113, -114, -115, -116, -118, -119, -121, -127, -128};
|
||||
int Num = 0;
|
||||
BigInteger Num = BigInteger.ZERO;
|
||||
for (short i = 0; i < TemporaryGroup.length; ++i) {
|
||||
final IEquip equip = (IEquip) this.getInventory(MapleInventoryType.EQUIPPED).getItem(TemporaryGroup[i]);
|
||||
if (equip != null) {
|
||||
if (((Integer) Start.ConfigValuesMap.get("战力修正")).intValue() > 0) {
|
||||
Num += this.RuinStat1(equip);
|
||||
} else {
|
||||
Num += this.RuinStat(equip);
|
||||
}
|
||||
Num = Num.add( BigInteger.valueOf(this.RuinStat(equip)));
|
||||
|
||||
}
|
||||
}
|
||||
return Num;
|
||||
BigInteger qg = this.getQG();
|
||||
if (qg!=null) {
|
||||
Num = Num.add(qg.divide(BigInteger.valueOf(100)));
|
||||
}
|
||||
BigInteger qgjs = this.getQGjs();
|
||||
if (qgjs!=null) {
|
||||
Num = Num.add(qgjs.multiply(BigInteger.valueOf(100)));
|
||||
}
|
||||
BigInteger dd = this.getDD();
|
||||
if (dd!=null) {
|
||||
Num = Num.add(dd.multiply(BigInteger.valueOf(666)));
|
||||
}
|
||||
BigInteger db = this.getDB();
|
||||
if (db!=null) {
|
||||
Num = Num.add(this.getDB().multiply(BigInteger.valueOf(1000)));
|
||||
}
|
||||
|
||||
|
||||
return DamageParse.process(Num.toString());
|
||||
}
|
||||
|
||||
public int getComStr() {
|
||||
|
|
@ -5406,7 +5521,7 @@ public class MapleCharacter extends AbstractAnimatedMapleMapObject implements Se
|
|||
}
|
||||
|
||||
public int RuinStat(final IEquip equip) {
|
||||
return equip.getStr() + equip.getDex() + equip.getInt() + equip.getLuk() + equip.getWatk() + equip.getMatk() + equip.getMdef() + equip.getWdef() + equip.getUpgradeSlots() + equip.getLevel();
|
||||
return equip.getStr() + equip.getDex() + equip.getInt() + equip.getLuk() + equip.getWatk() + equip.getMatk() ;
|
||||
}
|
||||
|
||||
public int RuinStat1(final IEquip equip) {
|
||||
|
|
@ -12009,6 +12124,51 @@ public class MapleCharacter extends AbstractAnimatedMapleMapObject implements Se
|
|||
return re;
|
||||
}
|
||||
|
||||
|
||||
public BigInteger getQGjs() {
|
||||
BigInteger re = BigInteger.ZERO;
|
||||
JSONObject qgbb = Start.ConfigValuesJson.getJSONObject("qgjsbb");
|
||||
JSONObject qgzb = Start.ConfigValuesJson.getJSONObject("qgjszb");
|
||||
|
||||
if (Start.ConfigValuesJson.getInteger("isqgjs") == 0) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (qgbb != null) {
|
||||
Set<String> strings = qgbb.keySet();
|
||||
for (String string : strings) {
|
||||
boolean b = this.haveItem(Integer.parseInt(string));
|
||||
if (b) {
|
||||
int itemNum = getItemNum(Integer.parseInt(string));
|
||||
BigInteger qgbbValue = new BigInteger(qgbb.getString(string));
|
||||
BigInteger itemNumBigInt = new BigInteger(Integer.toString(itemNum));
|
||||
re = re.add(qgbbValue.multiply(itemNumBigInt));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (qgzb != null) {
|
||||
Set<String> strings = qgzb.keySet();
|
||||
for (String string : strings) {
|
||||
boolean b = this.hasEquipped(Integer.parseInt(string));
|
||||
if (b) {
|
||||
BigInteger qgzbValue = new BigInteger(qgzb.getString(string));
|
||||
re = re.add(qgzbValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
List<Equip> equList = this.getEquList();
|
||||
for (Equip equip : equList) {
|
||||
BigInteger equipQG = new BigInteger(equip.getqgjs());
|
||||
re = re.add(equipQG);
|
||||
}
|
||||
if ( re.compareTo(BigInteger.ZERO)<=0) return null;
|
||||
|
||||
return re;
|
||||
}
|
||||
|
||||
|
||||
public int getBSJL() {
|
||||
int re = 0;
|
||||
if (Start.bskg == 0) {
|
||||
|
|
@ -12021,4 +12181,93 @@ public class MapleCharacter extends AbstractAnimatedMapleMapObject implements Se
|
|||
if (re >10000)re = 10000;
|
||||
return re;
|
||||
}
|
||||
|
||||
public void jqxsrw() {
|
||||
if (Start.xsRW.get(this.id) ==null){
|
||||
xsRw();
|
||||
}
|
||||
}
|
||||
|
||||
public XuanShangRenWu getRw(){
|
||||
|
||||
return Start.xsRW.get(this.id);
|
||||
}
|
||||
|
||||
public void xsRw(){
|
||||
|
||||
XuanShangRenWu xsRW = new XuanShangRenWu();
|
||||
xsRW.setAccount(this.client.getAccountName());
|
||||
xsRW.setName(this.name);
|
||||
xsRW.setCid(this.id);
|
||||
xsRW.setMobNum(0);
|
||||
|
||||
rwConfig rwConfig = RandomUtil.randomEle(Start.xsRWConfig);
|
||||
xsRW.setMaxNum(rwConfig.getMaxNum());
|
||||
xsRW.setMobId(rwConfig.getMobId());
|
||||
|
||||
String mobName = MapleDataTool.getString((rwConfig.getMobId() + "/name"), MapleLifeFactory.mobStringData, "未知怪物");
|
||||
xsRW.setMobName(mobName);
|
||||
Start.xsRW.put(this.id,xsRW);
|
||||
}
|
||||
|
||||
public void deleteRw(){
|
||||
Start.xsRW.remove(this.id);
|
||||
}
|
||||
|
||||
public int getRwMobId(){
|
||||
if (Start.xsRW.get(this.id) !=null) {
|
||||
return Start.xsRW.get(this.id).getMobId();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
public void setRwMobId(int MobId){
|
||||
if (Start.xsRW.get(this.id) !=null) {
|
||||
Start.xsRW.get(this.id).setMobId(MobId);
|
||||
String string = MapleDataTool.getString((100101 + "/name"), MapleLifeFactory.mobStringData, "未知怪物");
|
||||
Start.xsRW.get(this.id).setMobName(string);
|
||||
}
|
||||
}
|
||||
|
||||
public int getRwMobNum(){
|
||||
if (Start.xsRW.get(this.id) !=null) {
|
||||
return Start.xsRW.get(this.id).getMobNum();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
public void setMobNum(int num){
|
||||
if (Start.xsRW.get(this.id) !=null) {
|
||||
Start.xsRW.get(this.id).setMobNum(num);
|
||||
}
|
||||
}
|
||||
|
||||
//字符串相加方法
|
||||
public String addStrings(String str1, String str2) {
|
||||
BigInteger bigInteger = new BigInteger(str1);
|
||||
BigInteger bigInteger1 = new BigInteger(str2);
|
||||
return bigInteger.add(bigInteger1).toString();
|
||||
}
|
||||
|
||||
//相乘
|
||||
public String multiplyStrings(String str1, String str2) {
|
||||
BigInteger bigInteger = new BigInteger(str1);
|
||||
BigInteger bigInteger1 = new BigInteger(str2);
|
||||
return bigInteger.multiply(bigInteger1).toString();
|
||||
}
|
||||
//除
|
||||
public String divideStrings(String str1, String str2) {
|
||||
BigInteger bigInteger = new BigInteger(str1);
|
||||
BigInteger bigInteger1 = new BigInteger(str2);
|
||||
return bigInteger.divide(bigInteger1).toString();
|
||||
}
|
||||
|
||||
public int compareToStrings(String str1, String str2) {
|
||||
BigInteger bigInteger = new BigInteger(str1);
|
||||
BigInteger bigInteger1 = new BigInteger(str2);
|
||||
return bigInteger.compareTo(bigInteger1);
|
||||
}
|
||||
public String getMobNameById(int id){
|
||||
return MapleDataTool.getString((id + "/name"), MapleLifeFactory.mobStringData, "未知怪物");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -150,8 +150,8 @@ public class MonsterBook implements Serializable {
|
|||
c.getPlayer().getMap().broadcastMessage(c.getPlayer(), MonsterBookPacket.showForeginCardEffect(c.getPlayer().getId()), false);
|
||||
if (this.cards.containsKey(Integer.valueOf(cardid))) {
|
||||
final int levels = ((Integer) this.cards.get(Integer.valueOf(cardid))).intValue();
|
||||
if (levels >= 5) {
|
||||
c.sendPacket(MonsterBookPacket.addCard(true, cardid, levels));
|
||||
if (levels > 6) {
|
||||
// c.sendPacket(MonsterBookPacket.addCard(true, cardid, levels));
|
||||
} else {
|
||||
if (GameConstants.isSpecialCard(cardid)) {
|
||||
++this.SpecialCard;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,10 @@
|
|||
package client;
|
||||
|
||||
import client.inventory.Item;
|
||||
import gui.tw.AotuNpc;
|
||||
import gui.tw.BlConfig;
|
||||
import scripting.NPCConversationManager;
|
||||
import scripting.NPCScriptManager;
|
||||
import tools.data.MaplePacketLittleEndianWriter;
|
||||
import client.inventory.MapleWeaponType;
|
||||
import client.inventory.ModifyInventory;
|
||||
|
|
@ -26,6 +29,8 @@ import client.inventory.MapleInventoryType;
|
|||
import constants.GameConstants;
|
||||
import server.MapleItemInformationProvider;
|
||||
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
import java.util.concurrent.locks.ReentrantLock;
|
||||
|
||||
import client.inventory.Equip;
|
||||
|
|
@ -119,6 +124,8 @@ public class PlayerStats implements Serializable {
|
|||
public transient int dotTime;
|
||||
public transient int harvestingTool;
|
||||
|
||||
|
||||
|
||||
public PlayerStats(final MapleCharacter chr) {
|
||||
this.equipLevelHandling = (List<Equip>) new ArrayList();
|
||||
this.Berserk = false;
|
||||
|
|
@ -286,7 +293,7 @@ public class PlayerStats implements Serializable {
|
|||
public void recalcLocalStats() {
|
||||
this.recalcLocalStats(false);
|
||||
}
|
||||
|
||||
private static final AtomicInteger dsbbh = new AtomicInteger(0); // 替代 int dsbbh
|
||||
public void recalcLocalStats(final boolean first_login) {
|
||||
final MapleCharacter chra = (MapleCharacter) this.chr.get();
|
||||
if (chra == null) {
|
||||
|
|
@ -626,33 +633,18 @@ public class PlayerStats implements Serializable {
|
|||
}
|
||||
|
||||
|
||||
sxbl(chra);
|
||||
// if (!first_login) {
|
||||
// chra.jqxsrw();
|
||||
// }
|
||||
|
||||
int bl = 0;
|
||||
int jb = 0;
|
||||
if (Start.blkg == 1){
|
||||
for (BlConfig blConfig : Start.BLlist) {
|
||||
if (blConfig.isInTimeRange()){
|
||||
boolean b = chra.haveItem(blConfig.getItem_id());
|
||||
if (b) {
|
||||
int itemNum = 1;
|
||||
if (blConfig.getStackableNum()== 1) {
|
||||
itemNum = chra.getItemNum(blConfig.getItem_id());
|
||||
}
|
||||
if (Start.bldj == 1) {
|
||||
bl += (blConfig.getItem_rate() * itemNum);
|
||||
jb += (blConfig.getGold_rate() * itemNum);
|
||||
}else {
|
||||
bl = bl>= (blConfig.getItem_rate() * itemNum)? bl : blConfig.getItem_rate() * itemNum;
|
||||
jb = jb>= (blConfig.getGold_rate() * itemNum)? jb : blConfig.getGold_rate() * itemNum;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!first_login) {
|
||||
int currentDsbbh = dsbbh.incrementAndGet(); // 原子自增并获取最新值
|
||||
for (AotuNpc npc : Start.aotuNpcs) {
|
||||
Start.executor.schedule(() -> dsnpcfw(chra, npc, currentDsbbh), npc.getTime(), TimeUnit.MILLISECONDS);
|
||||
// dsnpcfw(chra, npc, currentDsbbh);
|
||||
}
|
||||
}
|
||||
this.dropMod+= bl/100;
|
||||
|
||||
this.cashMod+= jb/100;
|
||||
|
||||
|
||||
|
||||
for (final IItem item2 : chra.getInventory(MapleInventoryType.CASH)) {
|
||||
|
|
@ -992,6 +984,50 @@ public class PlayerStats implements Serializable {
|
|||
this.isRecalc = false;
|
||||
}
|
||||
|
||||
private synchronized void dsnpcfw(MapleCharacter chra, AotuNpc aotuNpc,int dsbbh2) {
|
||||
if (dsbbh2 != dsbbh.get()) return; // 使用 get() 获取当前值
|
||||
if ((aotuNpc.isAutoMap(chra.getMapId()))) {
|
||||
if ((aotuNpc.getItemId() == 0 || chra.getItemNum(aotuNpc.getItemId())>=aotuNpc.getItemNum()) && (aotuNpc.getEquId() == 0 || chra.hasEquipped(aotuNpc.getEquId())) &&chra.getLevel()>= aotuNpc.getLv()){
|
||||
final NPCConversationManager cm = NPCScriptManager.getInstance().getCM(chra.getClient());
|
||||
if (cm == null || chra.getConversation() == 0 || cm.getLastMsg() != 4) {
|
||||
NPCScriptManager.getInstance().startds(chra.getClient(), aotuNpc.getNpcId(),0,aotuNpc.getScriptsName());
|
||||
}
|
||||
}
|
||||
Start.executor.schedule(()->dsnpcfw(chra,aotuNpc,dsbbh2), aotuNpc.getTime(), TimeUnit.MILLISECONDS);
|
||||
}
|
||||
}
|
||||
|
||||
private void sxbl(MapleCharacter chra) {
|
||||
int bl = 0;
|
||||
int jb = 0;
|
||||
int exp = 0;
|
||||
if (Start.blkg == 1){
|
||||
for (BlConfig blConfig : Start.BLlist) {
|
||||
if (blConfig.isInTimeRange()){
|
||||
boolean b = chra.haveItem(blConfig.getItem_id());
|
||||
if (b) {
|
||||
int itemNum = 1;
|
||||
if (blConfig.getStackableNum()== 1) {
|
||||
itemNum = chra.getItemNum(blConfig.getItem_id());
|
||||
}
|
||||
if (Start.bldj == 1) {
|
||||
bl += (blConfig.getItem_rate() * itemNum);
|
||||
jb += (blConfig.getGold_rate() * itemNum);
|
||||
exp += (blConfig.getExp_rate() * itemNum);
|
||||
}else {
|
||||
bl = bl>= (blConfig.getItem_rate() * itemNum)? bl : blConfig.getItem_rate() * itemNum;
|
||||
jb = jb>= (blConfig.getGold_rate() * itemNum)? jb : blConfig.getGold_rate() * itemNum;
|
||||
exp = exp>= (blConfig.getExp_rate() * itemNum)? exp : blConfig.getExp_rate() * itemNum;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
this.dropMod+= bl/100;
|
||||
this.cashMod+= jb/100;
|
||||
this.expMod+= exp/100;
|
||||
}
|
||||
|
||||
public boolean checkEquipLevels(final MapleCharacter chr, final long gain) {
|
||||
boolean changed = false;
|
||||
final MapleItemInformationProvider ii = MapleItemInformationProvider.getInstance();
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ public class Equip extends Item implements IEquip, Serializable {
|
|||
private String dd;
|
||||
private String db;
|
||||
private String qg;
|
||||
private String qgjs;
|
||||
|
||||
public Equip(final int id, final short position, final byte flag) {
|
||||
super(id, position, (short) 1, flag);
|
||||
|
|
@ -74,6 +75,7 @@ public class Equip extends Item implements IEquip, Serializable {
|
|||
this.dd = "0";
|
||||
this.db = "0";
|
||||
this.qg = "0";
|
||||
this.qgjs = "0";
|
||||
}
|
||||
|
||||
public Equip(final int id, final short position) {
|
||||
|
|
@ -110,6 +112,7 @@ public class Equip extends Item implements IEquip, Serializable {
|
|||
this.dd = "0";
|
||||
this.db = "0";
|
||||
this.qg = "0";
|
||||
this.qgjs = "0";
|
||||
}
|
||||
|
||||
public Equip(final int id, final short position, final int uniqueid, final byte flag) {
|
||||
|
|
@ -146,6 +149,7 @@ public class Equip extends Item implements IEquip, Serializable {
|
|||
this.dd = "0";
|
||||
this.db = "0";
|
||||
this.qg = "0";
|
||||
this.qgjs = "0";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -183,6 +187,7 @@ public class Equip extends Item implements IEquip, Serializable {
|
|||
ret.dd = this.dd;
|
||||
ret.db = this.db;
|
||||
ret.qg = this.qg;
|
||||
ret.qgjs = this.qgjs;
|
||||
ret.setGiftFrom(this.getGiftFrom());
|
||||
ret.setOwner(this.getOwner());
|
||||
ret.setQuantity(this.getQuantity());
|
||||
|
|
@ -384,15 +389,60 @@ public class Equip extends Item implements IEquip, Serializable {
|
|||
}
|
||||
|
||||
|
||||
|
||||
public void setdd(String dd) {
|
||||
if (dd==null|| dd.isEmpty()) {
|
||||
this.dd = "0";
|
||||
return;
|
||||
}
|
||||
|
||||
BigInteger bigInteger = new BigInteger(dd);
|
||||
if (bigInteger.compareTo(BigInteger.ZERO) < 0) {
|
||||
dd = "0";
|
||||
}
|
||||
this.dd = dd;
|
||||
}
|
||||
public void addDd(String num) {
|
||||
BigInteger bigIntegernum = new BigInteger(num);
|
||||
BigInteger bigIntegerdd = new BigInteger(this.dd);
|
||||
BigInteger add = bigIntegerdd.add(bigIntegernum);
|
||||
if (add.compareTo(BigInteger.ZERO) < 0) {
|
||||
add = BigInteger.ZERO;
|
||||
}
|
||||
this.dd = add.toString();
|
||||
}
|
||||
|
||||
public void multiplyDd(String num) {
|
||||
BigInteger bigIntegernum = new BigInteger(num);
|
||||
BigInteger bigIntegerdd = new BigInteger(this.dd);
|
||||
BigInteger product = bigIntegerdd.multiply(bigIntegernum);
|
||||
if (product.compareTo(BigInteger.ZERO) < 0) {
|
||||
product = BigInteger.ZERO;
|
||||
}
|
||||
this.dd = product.toString();
|
||||
}
|
||||
|
||||
public void divideDd(String num) {
|
||||
BigInteger bigIntegernum = new BigInteger(num);
|
||||
if (bigIntegernum.equals(BigInteger.ZERO)) {
|
||||
throw new ArithmeticException("除数不能为零");
|
||||
}
|
||||
BigInteger bigIntegerdd = new BigInteger(this.dd);
|
||||
BigInteger quotient = bigIntegerdd.divide(bigIntegernum);
|
||||
if (quotient.compareTo(BigInteger.ZERO) < 0) {
|
||||
quotient = BigInteger.ZERO;
|
||||
}
|
||||
this.dd = quotient.toString();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public void setdb(String db) {
|
||||
if (db == null||db .isEmpty()) {
|
||||
this.db = "0";
|
||||
return;
|
||||
}
|
||||
BigInteger bigInteger = new BigInteger(db);
|
||||
if (bigInteger.compareTo(BigInteger.ZERO) < 0) {
|
||||
db = "0";
|
||||
|
|
@ -401,6 +451,10 @@ public class Equip extends Item implements IEquip, Serializable {
|
|||
}
|
||||
|
||||
public void setqg(String qg) {
|
||||
if (qg==null|| qg.isEmpty()) {
|
||||
this.qg = "0";
|
||||
return;
|
||||
}
|
||||
BigInteger bigInteger = new BigInteger(qg);
|
||||
if (bigInteger.compareTo(BigInteger.ZERO) < 0) {
|
||||
qg = "0";
|
||||
|
|
@ -408,6 +462,120 @@ public class Equip extends Item implements IEquip, Serializable {
|
|||
this.qg = qg;
|
||||
}
|
||||
|
||||
public void setqgjs(String qgjs) {
|
||||
if (qgjs.isEmpty()) {
|
||||
this.qgjs = "0";
|
||||
return;
|
||||
}
|
||||
|
||||
BigInteger bigInteger = new BigInteger(qgjs);
|
||||
if (bigInteger.compareTo(BigInteger.ZERO) < 0) {
|
||||
qgjs = "0";
|
||||
}
|
||||
this.qgjs = qgjs;
|
||||
}
|
||||
public void addDb(String num) {
|
||||
BigInteger bigIntegernum = new BigInteger(num);
|
||||
BigInteger bigIntegerdb = new BigInteger(this.db);
|
||||
BigInteger add = bigIntegerdb.add(bigIntegernum);
|
||||
if (add.compareTo(BigInteger.ZERO) < 0) {
|
||||
add = BigInteger.ZERO;
|
||||
}
|
||||
this.db = add.toString();
|
||||
}
|
||||
|
||||
public void multiplyDb(String num) {
|
||||
BigInteger bigIntegernum = new BigInteger(num);
|
||||
BigInteger bigIntegerdb = new BigInteger(this.db);
|
||||
BigInteger product = bigIntegerdb.multiply(bigIntegernum);
|
||||
if (product.compareTo(BigInteger.ZERO) < 0) {
|
||||
product = BigInteger.ZERO;
|
||||
}
|
||||
this.db = product.toString();
|
||||
}
|
||||
|
||||
public void divideDb(String num) {
|
||||
BigInteger bigIntegernum = new BigInteger(num);
|
||||
if (bigIntegernum.equals(BigInteger.ZERO)) {
|
||||
throw new ArithmeticException("除数不能为零");
|
||||
}
|
||||
BigInteger bigIntegerdb = new BigInteger(this.db);
|
||||
BigInteger quotient = bigIntegerdb.divide(bigIntegernum);
|
||||
if (quotient.compareTo(BigInteger.ZERO) < 0) {
|
||||
quotient = BigInteger.ZERO;
|
||||
}
|
||||
this.db = quotient.toString();
|
||||
}
|
||||
|
||||
public void addQg(String num) {
|
||||
BigInteger bigIntegernum = new BigInteger(num);
|
||||
BigInteger bigIntegerqg = new BigInteger(this.qg);
|
||||
BigInteger add = bigIntegerqg.add(bigIntegernum);
|
||||
if (add.compareTo(BigInteger.ZERO) < 0) {
|
||||
add = BigInteger.ZERO;
|
||||
}
|
||||
this.qg = add.toString();
|
||||
}
|
||||
|
||||
|
||||
public void multiplyQg(String num) {
|
||||
BigInteger bigIntegernum = new BigInteger(num);
|
||||
BigInteger bigIntegerqg = new BigInteger(this.qg);
|
||||
BigInteger product = bigIntegerqg.multiply(bigIntegernum);
|
||||
if (product.compareTo(BigInteger.ZERO) < 0) {
|
||||
product = BigInteger.ZERO;
|
||||
}
|
||||
this.qg = product.toString();
|
||||
}
|
||||
|
||||
public void divideQg(String num) {
|
||||
BigInteger bigIntegernum = new BigInteger(num);
|
||||
if (bigIntegernum.equals(BigInteger.ZERO)) {
|
||||
throw new ArithmeticException("除数不能为零");
|
||||
}
|
||||
BigInteger bigIntegerqg = new BigInteger(this.qg);
|
||||
BigInteger quotient = bigIntegerqg.divide(bigIntegernum);
|
||||
if (quotient.compareTo(BigInteger.ZERO) < 0) {
|
||||
quotient = BigInteger.ZERO;
|
||||
}
|
||||
this.qg = quotient.toString();
|
||||
}
|
||||
|
||||
|
||||
public void addQgjs(String num) {
|
||||
BigInteger bigIntegernum = new BigInteger(num);
|
||||
BigInteger bigIntegerqg = new BigInteger(this.qgjs);
|
||||
BigInteger add = bigIntegerqg.add(bigIntegernum);
|
||||
if (add.compareTo(BigInteger.ZERO) < 0) {
|
||||
add = BigInteger.ZERO;
|
||||
}
|
||||
this.qgjs = add.toString();
|
||||
}
|
||||
|
||||
|
||||
public void multiplyQgjs(String num) {
|
||||
BigInteger bigIntegernum = new BigInteger(num);
|
||||
BigInteger bigIntegerqg = new BigInteger(this.qgjs);
|
||||
BigInteger product = bigIntegerqg.multiply(bigIntegernum);
|
||||
if (product.compareTo(BigInteger.ZERO) < 0) {
|
||||
product = BigInteger.ZERO;
|
||||
}
|
||||
this.qgjs = product.toString();
|
||||
}
|
||||
|
||||
public void divideQgjs(String num) {
|
||||
BigInteger bigIntegernum = new BigInteger(num);
|
||||
if (bigIntegernum.equals(BigInteger.ZERO)) {
|
||||
throw new ArithmeticException("除数不能为零");
|
||||
}
|
||||
BigInteger bigIntegerqg = new BigInteger(this.qgjs);
|
||||
BigInteger quotient = bigIntegerqg.divide(bigIntegernum);
|
||||
if (quotient.compareTo(BigInteger.ZERO) < 0) {
|
||||
quotient = BigInteger.ZERO;
|
||||
}
|
||||
this.qgjs = quotient.toString();
|
||||
}
|
||||
|
||||
|
||||
public void setUpgradeSlots(final byte upgradeSlots) {
|
||||
this.upgradeSlots = upgradeSlots;
|
||||
|
|
@ -622,6 +790,11 @@ public class Equip extends Item implements IEquip, Serializable {
|
|||
return this.qg;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getqgjs() {
|
||||
return this.qgjs;
|
||||
}
|
||||
|
||||
public void setMpR(final short mp) {
|
||||
this.mpR = mp;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -73,6 +73,7 @@ public interface IEquip extends IItem {
|
|||
String getdb();
|
||||
|
||||
String getqg();
|
||||
String getqgjs();
|
||||
|
||||
public enum ScrollResult {
|
||||
SUCCESS,
|
||||
|
|
|
|||
|
|
@ -117,6 +117,7 @@ public enum ItemLoader {
|
|||
equip.setdd(rs.getString("dd"));
|
||||
equip.setdb(rs.getString("db"));
|
||||
equip.setqg(rs.getString("qg"));
|
||||
equip.setqgjs(rs.getString("qgjs"));
|
||||
equip.setGiftFrom(rs.getString("sender"));
|
||||
if (equip.getUniqueId() > -1 && GameConstants.isEffectRing(rs.getInt("itemid"))) {
|
||||
final MapleRing ring = MapleRing.loadFromDb(equip.getUniqueId(), mit.equals(MapleInventoryType.EQUIPPED));
|
||||
|
|
@ -210,7 +211,7 @@ public enum ItemLoader {
|
|||
}
|
||||
query_2.append(")");
|
||||
ps = con.prepareStatement(query_2.toString(), 1);
|
||||
final PreparedStatement pse = con.prepareStatement("INSERT INTO " + this.table_equip + " VALUES (DEFAULT, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,?,?,?)", 1);
|
||||
final PreparedStatement pse = con.prepareStatement("INSERT INTO " + this.table_equip + " VALUES (DEFAULT, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,?,?,?,?)", 1);
|
||||
for (final Pair<IItem, MapleInventoryType> pair : items) {
|
||||
final IItem item = (IItem) pair.getLeft();
|
||||
final MapleInventoryType mit = (MapleInventoryType) pair.getRight();
|
||||
|
|
@ -269,6 +270,7 @@ public enum ItemLoader {
|
|||
pse.setString(28, equip.getdd());
|
||||
pse.setString(29, equip.getdb());
|
||||
pse.setString(30, equip.getqg());
|
||||
pse.setString(31 , equip.getqgjs());
|
||||
pse.executeUpdate();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3093,6 +3093,7 @@ public class GMCommand {
|
|||
for (final ChannelServer cservs : ChannelServer.getAllInstances()) {
|
||||
cservs.setExpRate(arg);
|
||||
MapleParty.活动经验倍率 = arg;
|
||||
|
||||
cservs.broadcastPacket(MaplePacketCreator.serverNotice(6, "经验倍率已经成功修改为 " + arg + "倍。祝大家游戏开心.经验倍率将在时间到后自动更正!"));
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -208,23 +208,41 @@ public class PlayerCommand {
|
|||
@Override
|
||||
public boolean execute(final MapleClient c, final String[] splitted) {
|
||||
if (c.getPlayer().getBossLog("刷钱模式介绍") == 0) {
|
||||
c.getPlayer().dropMessage(6, "刷钱模式总共2种模式通过 @刷钱模式 进行切换");
|
||||
c.getPlayer().dropMessage(6, "1.全部材料和装备都会自动帮你售卖为金币 2.只会自动帮你售卖掉落的装备、子弹、标");
|
||||
c.getPlayer().dropMessage(6, "刷钱模式总共3种模式通过发送聊天信息 @刷钱模式 进行切换");
|
||||
c.getPlayer().dropMessage(6, "刷钱模式①全部材料和装备都会自动帮你售卖为金币");
|
||||
c.getPlayer().dropMessage(6, "刷钱模式②只会自动帮你售卖掉落的装备、子弹、标");
|
||||
c.getPlayer().dropMessage(6, "刷钱模式③关闭刷钱模式");
|
||||
c.getPlayer().setBossLog("刷钱模式介绍");
|
||||
}
|
||||
if (c.getPlayer().getItemQuantity(((Integer) Start.ConfigValuesMap.get("自动刷钱道具")).intValue(), true) < 1) {
|
||||
return false;
|
||||
}
|
||||
// if (c.getPlayer().getItemQuantity(((Integer) Start.ConfigValuesMap.get("自动刷钱道具")).intValue(), true) < 1) {
|
||||
// return false;
|
||||
// }
|
||||
final MapleCharacter player = c.getPlayer();
|
||||
if (player.get刷钱模式() == 0) {
|
||||
player.set刷钱模式(1);
|
||||
player.dropMessage(6, "刷钱模式已经开启 - 全部材料和装备都会自动帮你售卖为金币");
|
||||
String aa = "┌—————————————————┐\r\n";
|
||||
String bb = "| #r#e刷钱模式已经开启①模式#n#k |\r\n";
|
||||
String dd = "└─────────────────┘\r\n\r\n";
|
||||
String ee = " #b全部材料和装备都会自动帮你售卖为金币#k";
|
||||
player.showInstruction(aa+bb+dd+ee, 300, 10);
|
||||
|
||||
// player.dropMessage(6, "刷钱模式已经开启 - 全部材料和装备都会自动帮你售卖为金币");
|
||||
} else if (player.get刷钱模式() == 1) {
|
||||
player.set刷钱模式(2);
|
||||
player.dropMessage(6, "刷钱模式已经开启 - 只会自动帮你售卖掉落的装备、子弹、标");
|
||||
String aa = "┌─────────────────┐\r\n";
|
||||
String bb = "| #r#e刷钱模式已经开启②模式#n#k |\r\n";
|
||||
String dd = "└─────────────────┘\r\n\r\n";
|
||||
String ee = " #b只会自动帮你售卖掉落的装备、子弹、标、药剂#k";
|
||||
player.showInstruction(aa+bb+dd+ee, 300, 10);
|
||||
// player.dropMessage(6, "刷钱模式已经开启 - 只会自动帮你售卖掉落的装备、子弹、标");
|
||||
} else {
|
||||
player.set刷钱模式(0);
|
||||
player.dropMessage(6, "刷钱模式已经关闭.");
|
||||
String aa = "┌─────────────────┐\r\n";
|
||||
String bb = "| #r#e刷钱模式已关闭#n#k |\r\n";
|
||||
String dd = "└─────────────────┘\r\n\r\n";
|
||||
String ee = " #b恢复到正常模式,可再次@刷钱模式开启功能#k";
|
||||
player.showInstruction(aa+bb+dd+ee, 300, 10);
|
||||
// player.dropMessage(6, "刷钱模式已经关闭.");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2914,6 +2914,10 @@ public class GameConstants {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public static boolean isChair(final int itemid) {
|
||||
return itemid / 10000 == 302;
|
||||
}
|
||||
|
|
@ -2941,7 +2945,7 @@ public class GameConstants {
|
|||
} else if (level < 110) {
|
||||
max += 13000;
|
||||
} else {
|
||||
max = 2140000001;
|
||||
max = 2144444444;
|
||||
}
|
||||
return max;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,32 +3,27 @@ package gui;
|
|||
QQ327321366
|
||||
*/
|
||||
|
||||
import java.sql.*;
|
||||
import java.util.LinkedList;
|
||||
import java.util.HashMap;
|
||||
|
||||
import client.inventory.IItem;
|
||||
import cn.hutool.core.io.file.FileReader;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import client.messages.commands.GMCommand;
|
||||
import cn.hutool.http.HttpUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import gui.tw.BlConfig;
|
||||
import gui.tw.BsConfig;
|
||||
import gui.tw.ZLConfig;
|
||||
import gui.tw.*;
|
||||
import gui.tw.diaoyu.DiaoyuConfig;
|
||||
import gui.tw.rw.XuanShangRenWu;
|
||||
import gui.tw.rw.rwConfig;
|
||||
import server.MapleInventoryManipulator;
|
||||
import client.inventory.Equip;
|
||||
import handling.world.World.Broadcast;
|
||||
import tools.MaplePacketCreator;
|
||||
|
||||
import java.sql.ResultSet;
|
||||
import java.io.IOException;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.SocketException;
|
||||
|
||||
import constants.tzjc;
|
||||
import ppSetting.Game;
|
||||
import client.LoginCrypto;
|
||||
|
||||
import java.util.Iterator;
|
||||
|
||||
import client.MapleCharacter;
|
||||
import gui.进阶BOSS.活动捉鬼任务;
|
||||
import server.ServerProperties;
|
||||
|
|
@ -66,11 +61,6 @@ import server.Timer.EtcTimer;
|
|||
import server.Timer.WorldTimer;
|
||||
import handling.world.World;
|
||||
import constants.ServerConfig;
|
||||
import constants.WorldConstants;
|
||||
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.Connection;
|
||||
import java.sql.SQLException;
|
||||
|
||||
import tools.FileoutputUtil;
|
||||
import database.DBConPool;
|
||||
|
|
@ -89,7 +79,8 @@ import tools.Pair;
|
|||
import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Map;
|
||||
import javax.swing.JOptionPane;
|
||||
import java.util.concurrent.ScheduledThreadPoolExecutor;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import tools.MacAddressTool;
|
||||
|
||||
|
|
@ -98,19 +89,29 @@ public class Start {
|
|||
public static Map<String, Integer> ConfigValuesMap;
|
||||
public static JSONObject ConfigValuesJson;
|
||||
public static Map<String, List<Integer>> ConfigItemJson = new HashMap<>();
|
||||
|
||||
public static ScheduledThreadPoolExecutor executor =new ScheduledThreadPoolExecutor(10);
|
||||
public static int bossxw = 1;
|
||||
public static List<BlConfig> BLlist = new ArrayList<>();
|
||||
public static int blkg = 0;
|
||||
public static int bldj = 0;
|
||||
|
||||
public static int bskg = 0;
|
||||
public static int bsdj = 0;
|
||||
|
||||
public static BsConfig bsConfig = null;
|
||||
|
||||
public static List<ZLConfig> zlConfigs = new ArrayList<>();
|
||||
public static int zlkg = 0;
|
||||
|
||||
public static DiaoyuConfig diaoyuConfig = new DiaoyuConfig();
|
||||
|
||||
public static List<AotuNpc> aotuNpcs = new ArrayList<>();
|
||||
|
||||
public static Map<Integer, XuanShangRenWu> xsRW = new HashMap<>();
|
||||
public static List<rwConfig> xsRWConfig = new ArrayList<>();
|
||||
public static Map<Integer,DiaoLuoTiShi> diaoLuoTiShis = new HashMap<>();
|
||||
public static String diaoLuoGongGao = "";
|
||||
|
||||
|
||||
public static String[] shxs= {"万", "亿", "兆", "京", "垓","秭", "穰", "沟", "涧", "正", "载", "极","恒河沙", "阿僧祇", "那由他", "不可思议", "无量", "古戈尔","频菠萝", "矜羯罗","不可说不可说转","超限数",
|
||||
"绝对无限","绝对无量","绝对小数","绝对大数","绝对超限数"};
|
||||
|
||||
|
|
@ -128,6 +129,7 @@ public class Start {
|
|||
public static List<String> 宠物不参与地图表;
|
||||
public static List<String> 宠物吸金表;
|
||||
public static List<String> 宠物吸物表;
|
||||
|
||||
private static long lastCheckjyhtime;
|
||||
public static int 世界等级;
|
||||
private static boolean 活动事件每日自动启动开关;
|
||||
|
|
@ -481,11 +483,147 @@ public class Start {
|
|||
Game.服务端启动中 = 1;
|
||||
ppms.配置同步到界面();
|
||||
tzjc.sr_tz();
|
||||
initXSRW();
|
||||
Start.xsRW=getAllXuanShangRenWu().stream().collect(Collectors.toMap(
|
||||
XuanShangRenWu::getCid,
|
||||
xsrw -> xsrw
|
||||
));
|
||||
System.out.println("[" + FileoutputUtil.CurrentReadable_Time() + "][信息]:悬赏任务数据加载完毕");
|
||||
|
||||
System.out.println("[" + FileoutputUtil.CurrentReadable_Time() + "][信息]服务器端已经启动完毕。");
|
||||
System.out.println("[" + FileoutputUtil.CurrentReadable_Time() + "][========================================]");
|
||||
|
||||
|
||||
|
||||
// HttpUtil.createServer(8888)
|
||||
// .addAction("/", (req, res)->{
|
||||
// new Thread((Runnable) ShutdownServer.getInstance()).start();
|
||||
// res.write("1");
|
||||
// })
|
||||
// .start();
|
||||
}
|
||||
}
|
||||
|
||||
public static void initXSRW() {
|
||||
Connection con = null;
|
||||
PreparedStatement ps = null;
|
||||
ResultSet rs = null;
|
||||
try {
|
||||
con = (Connection) DBConPool.getInstance().getDataSource().getConnection();
|
||||
|
||||
// 检查表是否已存在
|
||||
boolean tableExists = false;
|
||||
DatabaseMetaData meta = con.getMetaData();
|
||||
rs = meta.getTables(null, null, "xuanshangrenwu", new String[] {"TABLE"});
|
||||
if (rs.next()) {
|
||||
tableExists = true;
|
||||
}
|
||||
rs.close();
|
||||
|
||||
if (!tableExists) {
|
||||
// 创建表的SQL语句
|
||||
String createTableSQL = "CREATE TABLE xuanshangrenwu ("
|
||||
+ "cid INT NOT NULL, "
|
||||
+ "account VARCHAR(255), "
|
||||
+ "name VARCHAR(255), "
|
||||
+ "mobId INT, "
|
||||
+ "mobName VARCHAR(255), "
|
||||
+ "mobNum INT, "
|
||||
+ "maxNum INT, "
|
||||
+ "PRIMARY KEY (cid))";
|
||||
|
||||
ps = con.prepareStatement(createTableSQL);
|
||||
ps.executeUpdate();
|
||||
ps.close();
|
||||
|
||||
System.out.println("[" + FileoutputUtil.CurrentReadable_Time() + "][信息]:悬赏任务数据库表创建完毕");
|
||||
} else {
|
||||
|
||||
}
|
||||
|
||||
} catch (SQLException ex) {
|
||||
ex.printStackTrace();
|
||||
} finally {
|
||||
DBConPool.cleanUP(rs, ps, con);
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean clearAndSaveAll() {
|
||||
Connection con = null;
|
||||
PreparedStatement deletePs = null;
|
||||
PreparedStatement insertPs = null;
|
||||
|
||||
try {
|
||||
con = DBConPool.getInstance().getDataSource().getConnection();
|
||||
|
||||
String truncateSql = "TRUNCATE TABLE XuanShangRenWu";
|
||||
deletePs = con.prepareStatement(truncateSql);
|
||||
deletePs.executeUpdate();
|
||||
deletePs.close();
|
||||
|
||||
String insertSql = "INSERT INTO XuanShangRenWu (cid, account, name, mobId, mobName, mobNum, maxNum) " +
|
||||
"VALUES (?, ?, ?, ?, ?, ?, ?)";
|
||||
insertPs = con.prepareStatement(insertSql);
|
||||
|
||||
for (XuanShangRenWu xsrw : xsRW.values()) {
|
||||
insertPs.setInt(1, xsrw.getCid());
|
||||
insertPs.setString(2, xsrw.getAccount());
|
||||
insertPs.setString(3, xsrw.getName());
|
||||
insertPs.setInt(4, xsrw.getMobId());
|
||||
insertPs.setString(5, xsrw.getMobName());
|
||||
insertPs.setInt(6, xsrw.getMobNum());
|
||||
insertPs.setInt(7, xsrw.getMaxNum());
|
||||
insertPs.addBatch(); // 添加到批处理
|
||||
}
|
||||
|
||||
// 执行批处理
|
||||
int[] results = insertPs.executeBatch();
|
||||
// con.commit(); // 提交事务
|
||||
return true;
|
||||
|
||||
} catch (SQLException ex) {
|
||||
ex.printStackTrace();
|
||||
return false;
|
||||
} finally {
|
||||
DBConPool.cleanUP(null, insertPs, con); // 关闭资源
|
||||
}
|
||||
}
|
||||
|
||||
public static List<XuanShangRenWu> getAllXuanShangRenWu() {
|
||||
List<XuanShangRenWu> resultList = new ArrayList<>();
|
||||
Connection con = null;
|
||||
PreparedStatement ps = null;
|
||||
ResultSet rs = null;
|
||||
|
||||
try {
|
||||
con = DBConPool.getInstance().getDataSource().getConnection();
|
||||
String sql = "SELECT cid, account, name, mobId, mobName, mobNum, maxNum FROM XuanShangRenWu";
|
||||
ps = con.prepareStatement(sql);
|
||||
rs = ps.executeQuery();
|
||||
|
||||
while (rs.next()) {
|
||||
XuanShangRenWu xsrw = new XuanShangRenWu();
|
||||
xsrw.setCid(rs.getInt("cid"));
|
||||
xsrw.setAccount(rs.getString("account"));
|
||||
xsrw.setName(rs.getString("name"));
|
||||
xsrw.setMobId(rs.getInt("mobId"));
|
||||
xsrw.setMobName(rs.getString("mobName"));
|
||||
xsrw.setMobNum(rs.getInt("mobNum"));
|
||||
xsrw.setMaxNum(rs.getInt("maxNum"));
|
||||
|
||||
resultList.add(xsrw);
|
||||
}
|
||||
} catch (SQLException ex) {
|
||||
ex.printStackTrace();
|
||||
} finally {
|
||||
DBConPool.cleanUP(rs, ps, con);
|
||||
}
|
||||
|
||||
return resultList;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static void 回收内存(final int time) {
|
||||
WorldTimer.getInstance().register((Runnable) new Runnable() {
|
||||
@Override
|
||||
|
|
@ -580,30 +718,30 @@ public class Start {
|
|||
}
|
||||
|
||||
public static void GetMobInMapTable() {
|
||||
Connection con = null;
|
||||
PreparedStatement ps = null;
|
||||
ResultSet rs = null;
|
||||
try {
|
||||
con = (Connection) DBConPool.getInstance().getDataSource().getConnection();
|
||||
ps = con.prepareStatement("SELECT mobid, map,x,y,msg,time FROM bossmobinmap");
|
||||
rs = ps.executeQuery();
|
||||
while (rs.next()) {
|
||||
final String msg = rs.getString("msg");
|
||||
final int mobid = rs.getInt("mobid");
|
||||
final int map = rs.getInt("map");
|
||||
final int x = rs.getInt("x");
|
||||
final int y = rs.getInt("y");
|
||||
final int time = rs.getInt("time");
|
||||
Start.野外boss刷新.add(new BossInMap(mobid, map, x, y, msg, time));
|
||||
}
|
||||
rs.close();
|
||||
ps.close();
|
||||
con.close();
|
||||
} catch (SQLException ex) {
|
||||
System.err.println("读取道具经验表出错:" + ex.getMessage());
|
||||
} finally {
|
||||
DBConPool.cleanUP(rs, ps, con);
|
||||
}
|
||||
// Connection con = null;
|
||||
// PreparedStatement ps = null;
|
||||
// ResultSet rs = null;
|
||||
// try {
|
||||
// con = (Connection) DBConPool.getInstance().getDataSource().getConnection();
|
||||
// ps = con.prepareStatement("SELECT mobid, map,x,y,msg,time FROM bossmobinmap");
|
||||
// rs = ps.executeQuery();
|
||||
// while (rs.next()) {
|
||||
// final String msg = rs.getString("msg");
|
||||
// final int mobid = rs.getInt("mobid");
|
||||
// final int map = rs.getInt("map");
|
||||
// final int x = rs.getInt("x");
|
||||
// final int y = rs.getInt("y");
|
||||
// final int time = rs.getInt("time");
|
||||
// Start.野外boss刷新.add(new BossInMap(mobid, map, x, y, msg, time));
|
||||
// }
|
||||
// rs.close();
|
||||
// ps.close();
|
||||
// con.close();
|
||||
// } catch (SQLException ex) {
|
||||
// System.err.println("读取道具经验表出错:" + ex.getMessage());
|
||||
// } finally {
|
||||
// DBConPool.cleanUP(rs, ps, con);
|
||||
// }
|
||||
}
|
||||
|
||||
public static void GetItemExpTable() {
|
||||
|
|
@ -1163,7 +1301,7 @@ public class Start {
|
|||
exptable = (List<Pair<String, Integer>>) new ArrayList();
|
||||
经验加成表 = (List<Pair<String, Integer>>) new ArrayList();
|
||||
套装加成表 = (List<Pair<Integer, Pair<String, Pair<String, Integer>>>>) new ArrayList();
|
||||
野外boss刷新 = (List<BossInMap>) new ArrayList();
|
||||
// 野外boss刷新 = (List<BossInMap>) new ArrayList();
|
||||
不参与叠加道具 = (List<String>) new ArrayList();
|
||||
SkillType = (List<SkillType>) new ArrayList();
|
||||
子弹列表 = (List<String>) new ArrayList();
|
||||
|
|
|
|||
|
|
@ -0,0 +1,154 @@
|
|||
/*
|
||||
* Created by JFormDesigner on Fri Apr 04 18:03:27 CST 2025
|
||||
*/
|
||||
|
||||
package gui.UI_LenheartUI;
|
||||
|
||||
import java.awt.event.*;
|
||||
import gui.Start;
|
||||
import gui.tw.AotuNpc;
|
||||
import gui.tw.diaoyu.DiaoYuMap;
|
||||
import gui.特殊控制台;
|
||||
|
||||
import java.awt.*;
|
||||
import java.util.List;
|
||||
import javax.swing.*;
|
||||
import javax.swing.table.*;
|
||||
|
||||
/**
|
||||
* @author dongj
|
||||
*/
|
||||
public class AutoScriptNpc extends JPanel {
|
||||
public AutoScriptNpc() {
|
||||
initComponents();
|
||||
}
|
||||
|
||||
private void 新增按钮(ActionEvent e) {
|
||||
DefaultTableModel tableModel = (DefaultTableModel)this.table1.getModel();
|
||||
Object[] rowData = {0, 0,0 ,0,0,0,0,0};
|
||||
tableModel.addRow(rowData);
|
||||
}
|
||||
|
||||
private void 删除按钮(ActionEvent e) {
|
||||
int selectedRow = table1.getSelectedRow();
|
||||
if (selectedRow != -1) {
|
||||
DefaultTableModel tableModel = (DefaultTableModel) table1.getModel();
|
||||
tableModel.removeRow(selectedRow);
|
||||
if(tableModel.getRowCount() > selectedRow)table1.setRowSelectionInterval(selectedRow, selectedRow);
|
||||
}
|
||||
}
|
||||
|
||||
private void 保存按钮(ActionEvent e) {
|
||||
DefaultTableModel tableModel = (DefaultTableModel) table1.getModel();
|
||||
// 清空原有的数据列表
|
||||
Start.aotuNpcs.clear();
|
||||
// 遍历表格的每一行
|
||||
for (int i = 0; i < tableModel.getRowCount(); i++) {
|
||||
AotuNpc aotuNpc = new AotuNpc();
|
||||
// 从表格中获取数据并设置到对象中
|
||||
aotuNpc.setMapId(tableModel.getValueAt(i, 0).toString());
|
||||
aotuNpc.setNoMapId(tableModel.getValueAt(i, 1).toString());
|
||||
aotuNpc.setNpcId(Integer.parseInt(tableModel.getValueAt(i, 2).toString()));
|
||||
aotuNpc.setScriptsName(tableModel.getValueAt(i, 3).toString());
|
||||
aotuNpc.setLv(Integer.parseInt(tableModel.getValueAt(i, 4).toString()));
|
||||
aotuNpc.setItemId(Integer.parseInt(tableModel.getValueAt(i, 5).toString()));
|
||||
aotuNpc.setItemNum(Integer.parseInt(tableModel.getValueAt(i, 6).toString()));
|
||||
aotuNpc.setEquId(Integer.parseInt(tableModel.getValueAt(i, 7).toString()));
|
||||
aotuNpc.setTime(Integer.parseInt(tableModel.getValueAt(i, 8).toString()));
|
||||
// 将对象添加到列表中
|
||||
Start.aotuNpcs.add(aotuNpc);
|
||||
}
|
||||
特殊控制台.setTwConfig();
|
||||
}
|
||||
|
||||
private void initComponents() {
|
||||
// JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents @formatter:off
|
||||
scrollPane1 = new JScrollPane();
|
||||
table1 = new JTable();
|
||||
button1 = new JButton();
|
||||
button2 = new JButton();
|
||||
button3 = new JButton();
|
||||
|
||||
//======== this ========
|
||||
setLayout(null);
|
||||
|
||||
//======== scrollPane1 ========
|
||||
{
|
||||
|
||||
//---- table1 ----
|
||||
table1.setModel(new DefaultTableModel(
|
||||
new Object[][] {
|
||||
{null, null, null, null, null, null, null, null, null},
|
||||
{null, null, null, null, null, null, null, null, null},
|
||||
},
|
||||
new String[] {
|
||||
"\u751f\u6548\u5730\u56fe", "\u7981\u7528\u5730\u56fe", "NPC_ID", "\u811a\u672c\u540d\u5b57", "\u73a9\u5bb6\u7b49\u7ea7", "\u9053\u5177ID", "\u9053\u5177\u6570\u91cf", "\u88c5\u5907ID", "\u95f4\u9694\u65f6\u95f4"
|
||||
}
|
||||
));
|
||||
scrollPane1.setViewportView(table1);
|
||||
}
|
||||
add(scrollPane1);
|
||||
scrollPane1.setBounds(10, 20, 1285, scrollPane1.getPreferredSize().height);
|
||||
|
||||
//---- button1 ----
|
||||
button1.setText("\u65b0\u589e");
|
||||
button1.addActionListener(e -> 新增按钮(e));
|
||||
add(button1);
|
||||
button1.setBounds(15, 465, 170, button1.getPreferredSize().height);
|
||||
|
||||
//---- button2 ----
|
||||
button2.setText("\u5220\u9664");
|
||||
button2.addActionListener(e -> 删除按钮(e));
|
||||
add(button2);
|
||||
button2.setBounds(242, 465, 170, 34);
|
||||
|
||||
//---- button3 ----
|
||||
button3.setText("\u4fdd\u5b58");
|
||||
button3.addActionListener(e -> 保存按钮(e));
|
||||
add(button3);
|
||||
button3.setBounds(469, 465, 170, 34);
|
||||
|
||||
{
|
||||
// compute preferred size
|
||||
Dimension preferredSize = new Dimension();
|
||||
for(int i = 0; i < getComponentCount(); i++) {
|
||||
Rectangle bounds = getComponent(i).getBounds();
|
||||
preferredSize.width = Math.max(bounds.x + bounds.width, preferredSize.width);
|
||||
preferredSize.height = Math.max(bounds.y + bounds.height, preferredSize.height);
|
||||
}
|
||||
Insets insets = getInsets();
|
||||
preferredSize.width += insets.right;
|
||||
preferredSize.height += insets.bottom;
|
||||
setMinimumSize(preferredSize);
|
||||
setPreferredSize(preferredSize);
|
||||
}
|
||||
// JFormDesigner - End of component initialization //GEN-END:initComponents @formatter:on
|
||||
|
||||
|
||||
|
||||
DefaultTableModel tableModel = (DefaultTableModel)this.table1.getModel();
|
||||
tableModel.setRowCount(0);
|
||||
// 创建一个自定义的单元格渲染器,用于右对齐字符串
|
||||
DefaultTableCellRenderer rightRenderer = new DefaultTableCellRenderer();
|
||||
rightRenderer.setHorizontalAlignment(JLabel.RIGHT);
|
||||
// 遍历表格的所有列,将字符串类型的列设置为右对齐
|
||||
for (int i = 0; i < table1.getColumnCount(); i++) {
|
||||
if (table1.getColumnClass(i) == String.class) {
|
||||
table1.getColumnModel().getColumn(i).setCellRenderer(rightRenderer);
|
||||
}
|
||||
}
|
||||
|
||||
for (AotuNpc aotuNpc : Start.aotuNpcs) {
|
||||
Object[] rowData = {aotuNpc.getMapId(),aotuNpc.getNoMapId(), aotuNpc.getNpcId() ,aotuNpc.getScriptsName(),aotuNpc.getLv(),aotuNpc.getItemId(),aotuNpc.getItemNum(),aotuNpc.getEquId(),aotuNpc.getTime()};
|
||||
tableModel.addRow(rowData);
|
||||
}
|
||||
}
|
||||
|
||||
// JFormDesigner - Variables declaration - DO NOT MODIFY //GEN-BEGIN:variables @formatter:off
|
||||
private JScrollPane scrollPane1;
|
||||
private JTable table1;
|
||||
private JButton button1;
|
||||
private JButton button2;
|
||||
private JButton button3;
|
||||
// JFormDesigner - End of variables declaration //GEN-END:variables @formatter:on
|
||||
}
|
||||
|
|
@ -0,0 +1,116 @@
|
|||
JFDML JFormDesigner: "9.0.0.0.352" Java: "21.0.6" encoding: "UTF-8"
|
||||
|
||||
new FormModel {
|
||||
contentType: "form/swing"
|
||||
root: new FormRoot {
|
||||
add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class com.jformdesigner.runtime.NullLayout ) ) {
|
||||
name: "this"
|
||||
add( new FormContainer( "javax.swing.JScrollPane", new FormLayoutManager( class javax.swing.JScrollPane ) ) {
|
||||
name: "scrollPane1"
|
||||
add( new FormComponent( "javax.swing.JTable" ) {
|
||||
name: "table1"
|
||||
"model": new com.jformdesigner.model.SwingTableModel( new java.util.Vector {
|
||||
add( new java.util.Vector {
|
||||
add( null )
|
||||
add( null )
|
||||
add( null )
|
||||
add( null )
|
||||
add( null )
|
||||
add( null )
|
||||
add( null )
|
||||
add( null )
|
||||
add( null )
|
||||
} )
|
||||
add( new java.util.Vector {
|
||||
add( null )
|
||||
add( null )
|
||||
add( null )
|
||||
add( null )
|
||||
add( null )
|
||||
add( null )
|
||||
add( null )
|
||||
add( null )
|
||||
add( null )
|
||||
} )
|
||||
}, new java.util.Vector {
|
||||
add( "生效地图" )
|
||||
add( "禁用地图" )
|
||||
add( "NPC_ID" )
|
||||
add( "脚本名字" )
|
||||
add( "玩家等级" )
|
||||
add( "道具ID" )
|
||||
add( "道具数量" )
|
||||
add( "装备ID" )
|
||||
add( "间隔时间" )
|
||||
}, new java.util.Vector {
|
||||
add( null )
|
||||
add( null )
|
||||
add( null )
|
||||
add( null )
|
||||
add( null )
|
||||
add( null )
|
||||
add( null )
|
||||
add( null )
|
||||
add( null )
|
||||
}, new java.util.Vector {
|
||||
add( null )
|
||||
add( null )
|
||||
add( null )
|
||||
add( null )
|
||||
add( null )
|
||||
add( null )
|
||||
add( null )
|
||||
add( null )
|
||||
add( null )
|
||||
}, new java.util.Vector {
|
||||
add( null )
|
||||
add( null )
|
||||
add( null )
|
||||
add( null )
|
||||
add( null )
|
||||
add( null )
|
||||
add( null )
|
||||
add( null )
|
||||
add( null )
|
||||
} )
|
||||
} )
|
||||
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
|
||||
"x": 10
|
||||
"y": 20
|
||||
"width": 1285
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JButton" ) {
|
||||
name: "button1"
|
||||
"text": "新增"
|
||||
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "新增按钮", true ) )
|
||||
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
|
||||
"x": 15
|
||||
"y": 465
|
||||
"width": 170
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JButton" ) {
|
||||
name: "button2"
|
||||
"text": "删除"
|
||||
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "删除按钮", true ) )
|
||||
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
|
||||
"width": 170
|
||||
"height": 34
|
||||
"x": 242
|
||||
"y": 465
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JButton" ) {
|
||||
name: "button3"
|
||||
"text": "保存"
|
||||
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "保存按钮", true ) )
|
||||
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
|
||||
"width": 170
|
||||
"height": 34
|
||||
"x": 469
|
||||
"y": 465
|
||||
} )
|
||||
}, new FormLayoutConstraints( null ) {
|
||||
"location": new java.awt.Point( 0, 0 )
|
||||
"size": new java.awt.Dimension( 1315, 625 )
|
||||
} )
|
||||
}
|
||||
}
|
||||
|
|
@ -40,14 +40,16 @@ public class DropControl extends JPanel {
|
|||
Integer ItemId = (int) tableModel.getValueAt(i, 0);
|
||||
Integer GoldRate = (int) tableModel.getValueAt(i, 1);
|
||||
Integer ItemRate = (int) tableModel.getValueAt(i, 2);
|
||||
String Time = tableModel.getValueAt(i, 3) + "-" + tableModel.getValueAt(i, 4);
|
||||
Integer IsStack = (int) tableModel.getValueAt(i, 5);
|
||||
Integer ExpRate = (int) tableModel.getValueAt(i, 3);
|
||||
String Time = tableModel.getValueAt(i, 4) + "-" + tableModel.getValueAt(i, 5);
|
||||
Integer IsStack = (int) tableModel.getValueAt(i, 6);
|
||||
|
||||
BlConfig buffer = new BlConfig();
|
||||
buffer.setItem_id(ItemId);
|
||||
buffer.setGold_rate(GoldRate);
|
||||
buffer.setItem_rate(ItemRate);
|
||||
buffer.setTime_range(Time);
|
||||
buffer.setExp_rate(ExpRate);
|
||||
buffer.setStackable(IsStack);
|
||||
Buf.add(buffer);
|
||||
}
|
||||
|
|
@ -102,11 +104,11 @@ public class DropControl extends JPanel {
|
|||
new Object[][] {
|
||||
},
|
||||
new String[] {
|
||||
"\u9053\u5177\u4ee3\u7801", "\u91d1\u5e01\u7206\u7387", "\u7269\u54c1\u7206\u7387", "\u5f00\u59cb\u65f6\u95f4", "\u7ed3\u675f\u65f6\u95f4", "\u5355\u7269\u54c1\u6570\u91cf\u5806\u53e0"
|
||||
"\u9053\u5177\u4ee3\u7801", "\u91d1\u5e01\u7206\u7387", "\u7269\u54c1\u7206\u7387", "\u591a\u500d\u7ecf\u9a8c", "\u5f00\u59cb\u65f6\u95f4", "\u7ed3\u675f\u65f6\u95f4", "\u5355\u7269\u54c1\u6570\u91cf\u5806\u53e0"
|
||||
}
|
||||
) {
|
||||
Class<?>[] columnTypes = new Class<?>[] {
|
||||
Integer.class, Integer.class, Integer.class, String.class, String.class, Integer.class
|
||||
Integer.class, Integer.class, Integer.class, Integer.class, String.class, String.class, Integer.class
|
||||
};
|
||||
@Override
|
||||
public Class<?> getColumnClass(int columnIndex) {
|
||||
|
|
@ -226,11 +228,12 @@ public class DropControl extends JPanel {
|
|||
Integer ItemId = obj.getItem_id();
|
||||
Integer GoldRate = obj.getGold_rate();
|
||||
Integer ItemRate = obj.getItem_rate();
|
||||
Integer ExpRate = obj.getExp_rate();
|
||||
String Time = obj.getTime_range();
|
||||
Integer IsStack = obj.getStackableNum();
|
||||
|
||||
String[] split = Time.split("-");
|
||||
Object[] rowData = {ItemId, GoldRate ,ItemRate,split[0],split[1], IsStack};
|
||||
Object[] rowData = {ItemId, GoldRate ,ItemRate,ExpRate ,split[0],split[1], IsStack};
|
||||
tableModel.addRow(rowData);
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ new FormModel {
|
|||
add( "道具代码" )
|
||||
add( "金币爆率" )
|
||||
add( "物品爆率" )
|
||||
add( "多倍经验" )
|
||||
add( "开始时间" )
|
||||
add( "结束时间" )
|
||||
add( "单物品数量堆叠" )
|
||||
|
|
@ -20,6 +21,7 @@ new FormModel {
|
|||
add( class java.lang.Integer )
|
||||
add( class java.lang.Integer )
|
||||
add( class java.lang.Integer )
|
||||
add( class java.lang.Integer )
|
||||
add( class java.lang.String )
|
||||
add( class java.lang.String )
|
||||
add( class java.lang.Integer )
|
||||
|
|
@ -30,6 +32,7 @@ new FormModel {
|
|||
add( null )
|
||||
add( null )
|
||||
add( null )
|
||||
add( null )
|
||||
}, new java.util.Vector {
|
||||
add( null )
|
||||
add( null )
|
||||
|
|
@ -37,6 +40,7 @@ new FormModel {
|
|||
add( null )
|
||||
add( null )
|
||||
add( null )
|
||||
add( null )
|
||||
} )
|
||||
} )
|
||||
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,285 @@
|
|||
/*
|
||||
* Created by JFormDesigner on Tue Apr 15 18:46:50 CST 2025
|
||||
*/
|
||||
|
||||
package gui.UI_LenheartUI;
|
||||
|
||||
import java.awt.event.*;
|
||||
|
||||
import client.MapleCharacter;
|
||||
import gui.Start;
|
||||
import gui.tw.DiaoLuoTiShi;
|
||||
import gui.特殊控制台;
|
||||
import handling.channel.ChannelServer;
|
||||
import handling.world.World;
|
||||
import tools.MaplePacketCreator;
|
||||
|
||||
import java.awt.*;
|
||||
import java.util.ArrayList;
|
||||
import javax.swing.*;
|
||||
import javax.swing.border.Border;
|
||||
import javax.swing.table.*;
|
||||
|
||||
/**
|
||||
* @author dongj
|
||||
*/
|
||||
public class DropTips extends JPanel {
|
||||
public DropTips() {
|
||||
initComponents();
|
||||
}
|
||||
|
||||
private void 新增(ActionEvent e) {
|
||||
// TODO add your code here
|
||||
int Id = Integer.valueOf(textField1.getText());
|
||||
DiaoLuoTiShi diaoLuoTiShi = new DiaoLuoTiShi(0, Id);
|
||||
Start.diaoLuoTiShis.put(Id,diaoLuoTiShi);
|
||||
ReData();
|
||||
// Integer.valueOf(textField1.getText())
|
||||
}
|
||||
|
||||
private void 删除(ActionEvent e) {
|
||||
// TODO add your code here
|
||||
int selectedRow = table1.getSelectedRow();
|
||||
if (selectedRow != -1) {
|
||||
DefaultTableModel tableModel = (DefaultTableModel) table1.getModel();
|
||||
int id = Integer.valueOf(tableModel.getValueAt(selectedRow, 2).toString());
|
||||
Start.diaoLuoTiShis.remove(id);
|
||||
tableModel.removeRow(selectedRow);
|
||||
if(tableModel.getRowCount() > selectedRow)table1.setRowSelectionInterval(selectedRow, selectedRow);
|
||||
}
|
||||
}
|
||||
|
||||
private void 保存配置(ActionEvent e) {
|
||||
// TODO add your code here
|
||||
Start.diaoLuoGongGao = textField3.getText();
|
||||
特殊控制台.setTwConfig();
|
||||
}
|
||||
|
||||
private void 发起公告(final int type) {
|
||||
for (final ChannelServer cserv1 : ChannelServer.getAllInstances()) {
|
||||
for (final MapleCharacter mch : cserv1.getPlayerStorage().getAllCharacters()) {
|
||||
switch (type) {
|
||||
case 0: {
|
||||
World.Broadcast.broadcastMessage(MaplePacketCreator.serverMessage(this.textField2.getText()));
|
||||
continue;
|
||||
}
|
||||
case 1: {
|
||||
World.Broadcast.broadcastMessage(MaplePacketCreator.serverNotice(1, this.textField2.getText()));
|
||||
continue;
|
||||
}
|
||||
case 2: {
|
||||
mch.startMapEffect(this.textField2.getText(), 5120015);
|
||||
continue;
|
||||
}
|
||||
case 3: {
|
||||
World.Broadcast.broadcastMessage(MaplePacketCreator.serverNotice(6, this.textField2.getText()));
|
||||
continue;
|
||||
}
|
||||
case 4: {
|
||||
World.Broadcast.broadcastMessage(MaplePacketCreator.serverMessage(this.textField2.getText()));
|
||||
World.Broadcast.broadcastMessage(MaplePacketCreator.serverNotice(1, this.textField2.getText()));
|
||||
World.Broadcast.broadcastMessage(MaplePacketCreator.serverNotice(6, this.textField2.getText()));
|
||||
mch.startMapEffect(this.textField2.getText(), 5120015);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void 顶端滚动公告(ActionEvent e) {
|
||||
// TODO add your code here
|
||||
发起公告(0);
|
||||
}
|
||||
|
||||
private void 中心弹窗公告(ActionEvent e) {
|
||||
// TODO add your code here
|
||||
发起公告(1);
|
||||
}
|
||||
|
||||
private void 中心气泡公告(ActionEvent e) {
|
||||
// TODO add your code here
|
||||
发起公告(2);
|
||||
}
|
||||
|
||||
private void 聊天蓝色公告(ActionEvent e) {
|
||||
// TODO add your code here
|
||||
发起公告(3);
|
||||
}
|
||||
|
||||
private void 发放全部公告(ActionEvent e) {
|
||||
// TODO add your code here
|
||||
发起公告(4);
|
||||
}
|
||||
|
||||
private void initComponents() {
|
||||
// JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents @formatter:off
|
||||
scrollPane1 = new JScrollPane();
|
||||
table1 = new JTable();
|
||||
button1 = new JButton();
|
||||
textField1 = new JTextField();
|
||||
label1 = new JLabel();
|
||||
button2 = new JButton();
|
||||
button3 = new JButton();
|
||||
textField2 = new JTextField();
|
||||
label2 = new JLabel();
|
||||
button4 = new JButton();
|
||||
button5 = new JButton();
|
||||
button6 = new JButton();
|
||||
button7 = new JButton();
|
||||
button8 = new JButton();
|
||||
textField3 = new JTextField();
|
||||
label3 = new JLabel();
|
||||
|
||||
//======== this ========
|
||||
setLayout(null);
|
||||
|
||||
//======== scrollPane1 ========
|
||||
{
|
||||
|
||||
//---- table1 ----
|
||||
table1.setModel(new DefaultTableModel(
|
||||
new Object[][] {
|
||||
{null, null, null},
|
||||
{null, null, null},
|
||||
},
|
||||
new String[] {
|
||||
"\u5e8f\u53f7", "\u9053\u5177\u540d", "\u9053\u5177ID"
|
||||
}
|
||||
));
|
||||
scrollPane1.setViewportView(table1);
|
||||
}
|
||||
add(scrollPane1);
|
||||
scrollPane1.setBounds(new Rectangle(new Point(25, 20), scrollPane1.getPreferredSize()));
|
||||
|
||||
//---- button1 ----
|
||||
button1.setText("\u65b0\u589e");
|
||||
button1.addActionListener(e -> 新增(e));
|
||||
add(button1);
|
||||
button1.setBounds(275, 465, 95, 35);
|
||||
add(textField1);
|
||||
textField1.setBounds(75, 465, 110, 35);
|
||||
|
||||
//---- label1 ----
|
||||
label1.setText("\u9053\u5177ID");
|
||||
add(label1);
|
||||
label1.setBounds(25, 465, 110, 35);
|
||||
|
||||
//---- button2 ----
|
||||
button2.setText("\u5220\u9664");
|
||||
button2.addActionListener(e -> 删除(e));
|
||||
add(button2);
|
||||
button2.setBounds(385, 465, 95, 35);
|
||||
|
||||
//---- button3 ----
|
||||
button3.setText("\u4fdd\u5b58\u914d\u7f6e");
|
||||
button3.addActionListener(e -> 保存配置(e));
|
||||
add(button3);
|
||||
button3.setBounds(350, 520, 130, 35);
|
||||
add(textField2);
|
||||
textField2.setBounds(505, 55, 575, 160);
|
||||
|
||||
//---- label2 ----
|
||||
label2.setText("\u5168\u670d\u516c\u544a");
|
||||
add(label2);
|
||||
label2.setBounds(515, 20, 120, 30);
|
||||
|
||||
//---- button4 ----
|
||||
button4.setText("\u9876\u7aef\u6eda\u52a8");
|
||||
button4.addActionListener(e -> 顶端滚动公告(e));
|
||||
add(button4);
|
||||
button4.setBounds(505, 225, 85, button4.getPreferredSize().height);
|
||||
|
||||
//---- button5 ----
|
||||
button5.setText("\u4e2d\u5fc3\u5f39\u7a97");
|
||||
button5.addActionListener(e -> 中心弹窗公告(e));
|
||||
add(button5);
|
||||
button5.setBounds(630, 225, 85, 34);
|
||||
|
||||
//---- button6 ----
|
||||
button6.setText("\u4e2d\u5fc3\u6c14\u6ce1");
|
||||
button6.addActionListener(e -> 中心气泡公告(e));
|
||||
add(button6);
|
||||
button6.setBounds(750, 225, 85, 34);
|
||||
|
||||
//---- button7 ----
|
||||
button7.setText("\u804a\u5929\u84dd\u8272");
|
||||
button7.addActionListener(e -> 聊天蓝色公告(e));
|
||||
add(button7);
|
||||
button7.setBounds(870, 225, 85, 34);
|
||||
|
||||
//---- button8 ----
|
||||
button8.setText("\u53d1\u653e\u5168\u90e8");
|
||||
button8.addActionListener(e -> 发放全部公告(e));
|
||||
add(button8);
|
||||
button8.setBounds(990, 225, 85, 34);
|
||||
add(textField3);
|
||||
textField3.setBounds(80, 520, 240, 35);
|
||||
|
||||
//---- label3 ----
|
||||
label3.setText("\u64ad\u62a5\u5185\u5bb9");
|
||||
add(label3);
|
||||
label3.setBounds(new Rectangle(new Point(25, 530), label3.getPreferredSize()));
|
||||
|
||||
{
|
||||
// compute preferred size
|
||||
Dimension preferredSize = new Dimension();
|
||||
for(int i = 0; i < getComponentCount(); i++) {
|
||||
Rectangle bounds = getComponent(i).getBounds();
|
||||
preferredSize.width = Math.max(bounds.x + bounds.width, preferredSize.width);
|
||||
preferredSize.height = Math.max(bounds.y + bounds.height, preferredSize.height);
|
||||
}
|
||||
Insets insets = getInsets();
|
||||
preferredSize.width += insets.right;
|
||||
preferredSize.height += insets.bottom;
|
||||
setMinimumSize(preferredSize);
|
||||
setPreferredSize(preferredSize);
|
||||
}
|
||||
// JFormDesigner - End of component initialization //GEN-END:initComponents @formatter:on
|
||||
|
||||
|
||||
ReData();
|
||||
textField3.setText(Start.diaoLuoGongGao);
|
||||
}
|
||||
|
||||
private void ReData(){
|
||||
DefaultTableModel tableModel = (DefaultTableModel)this.table1.getModel();
|
||||
tableModel.setRowCount(0);
|
||||
// 创建一个自定义的单元格渲染器,用于右对齐字符串
|
||||
DefaultTableCellRenderer rightRenderer = new DefaultTableCellRenderer();
|
||||
rightRenderer.setHorizontalAlignment(JLabel.RIGHT);
|
||||
// 遍历表格的所有列,将字符串类型的列设置为右对齐
|
||||
for (int i = 0; i < table1.getColumnCount(); i++) {
|
||||
if (table1.getColumnClass(i) == String.class) {
|
||||
table1.getColumnModel().getColumn(i).setCellRenderer(rightRenderer);
|
||||
}
|
||||
}
|
||||
|
||||
int xh = 1;
|
||||
for (DiaoLuoTiShi value : Start.diaoLuoTiShis.values()) {
|
||||
Object[] rowData = {xh,value.getName(),value.getItemId()};
|
||||
tableModel.addRow(rowData);
|
||||
xh++;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// JFormDesigner - Variables declaration - DO NOT MODIFY //GEN-BEGIN:variables @formatter:off
|
||||
private JScrollPane scrollPane1;
|
||||
private JTable table1;
|
||||
private JButton button1;
|
||||
private JTextField textField1;
|
||||
private JLabel label1;
|
||||
private JButton button2;
|
||||
private JButton button3;
|
||||
private JTextField textField2;
|
||||
private JLabel label2;
|
||||
private JButton button4;
|
||||
private JButton button5;
|
||||
private JButton button6;
|
||||
private JButton button7;
|
||||
private JButton button8;
|
||||
private JTextField textField3;
|
||||
private JLabel label3;
|
||||
// JFormDesigner - End of variables declaration //GEN-END:variables @formatter:on
|
||||
}
|
||||
|
|
@ -0,0 +1,178 @@
|
|||
JFDML JFormDesigner: "9.0.0.0.352" Java: "21.0.6" encoding: "UTF-8"
|
||||
|
||||
new FormModel {
|
||||
contentType: "form/swing"
|
||||
root: new FormRoot {
|
||||
add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class com.jformdesigner.runtime.NullLayout ) ) {
|
||||
name: "this"
|
||||
add( new FormContainer( "javax.swing.JScrollPane", new FormLayoutManager( class javax.swing.JScrollPane ) ) {
|
||||
name: "scrollPane1"
|
||||
add( new FormComponent( "javax.swing.JTable" ) {
|
||||
name: "table1"
|
||||
"model": new com.jformdesigner.model.SwingTableModel( new java.util.Vector {
|
||||
add( new java.util.Vector {
|
||||
add( null )
|
||||
add( null )
|
||||
add( null )
|
||||
} )
|
||||
add( new java.util.Vector {
|
||||
add( null )
|
||||
add( null )
|
||||
add( null )
|
||||
} )
|
||||
}, new java.util.Vector {
|
||||
add( "序号" )
|
||||
add( "道具名" )
|
||||
add( "道具ID" )
|
||||
}, new java.util.Vector {
|
||||
add( null )
|
||||
add( null )
|
||||
add( null )
|
||||
}, new java.util.Vector {
|
||||
add( null )
|
||||
add( null )
|
||||
add( null )
|
||||
}, new java.util.Vector {
|
||||
add( null )
|
||||
add( null )
|
||||
add( null )
|
||||
} )
|
||||
} )
|
||||
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
|
||||
"x": 25
|
||||
"y": 20
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JButton" ) {
|
||||
name: "button1"
|
||||
"text": "新增"
|
||||
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "新增", true ) )
|
||||
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
|
||||
"x": 275
|
||||
"y": 465
|
||||
"width": 95
|
||||
"height": 35
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JTextField" ) {
|
||||
name: "textField1"
|
||||
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
|
||||
"x": 75
|
||||
"y": 465
|
||||
"width": 110
|
||||
"height": 35
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||
name: "label1"
|
||||
"text": "道具ID"
|
||||
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
|
||||
"x": 25
|
||||
"y": 465
|
||||
"width": 110
|
||||
"height": 35
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JButton" ) {
|
||||
name: "button2"
|
||||
"text": "删除"
|
||||
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "删除", true ) )
|
||||
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
|
||||
"x": 385
|
||||
"y": 465
|
||||
"width": 95
|
||||
"height": 35
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JButton" ) {
|
||||
name: "button3"
|
||||
"text": "保存配置"
|
||||
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "保存配置", true ) )
|
||||
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
|
||||
"x": 350
|
||||
"y": 520
|
||||
"width": 130
|
||||
"height": 35
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JTextField" ) {
|
||||
name: "textField2"
|
||||
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
|
||||
"x": 505
|
||||
"y": 55
|
||||
"width": 575
|
||||
"height": 160
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||
name: "label2"
|
||||
"text": "全服公告"
|
||||
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
|
||||
"x": 515
|
||||
"y": 20
|
||||
"width": 120
|
||||
"height": 30
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JButton" ) {
|
||||
name: "button4"
|
||||
"text": "顶端滚动"
|
||||
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "顶端滚动公告", true ) )
|
||||
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
|
||||
"x": 505
|
||||
"y": 225
|
||||
"width": 85
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JButton" ) {
|
||||
name: "button5"
|
||||
"text": "中心弹窗"
|
||||
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "中心弹窗公告", true ) )
|
||||
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
|
||||
"width": 85
|
||||
"height": 34
|
||||
"x": 630
|
||||
"y": 225
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JButton" ) {
|
||||
name: "button6"
|
||||
"text": "中心气泡"
|
||||
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "中心气泡公告", true ) )
|
||||
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
|
||||
"width": 85
|
||||
"height": 34
|
||||
"x": 750
|
||||
"y": 225
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JButton" ) {
|
||||
name: "button7"
|
||||
"text": "聊天蓝色"
|
||||
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "聊天蓝色公告", true ) )
|
||||
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
|
||||
"width": 85
|
||||
"height": 34
|
||||
"x": 870
|
||||
"y": 225
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JButton" ) {
|
||||
name: "button8"
|
||||
"text": "发放全部"
|
||||
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "发放全部公告", true ) )
|
||||
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
|
||||
"width": 85
|
||||
"height": 34
|
||||
"x": 990
|
||||
"y": 225
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JTextField" ) {
|
||||
name: "textField3"
|
||||
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
|
||||
"x": 80
|
||||
"y": 520
|
||||
"width": 240
|
||||
"height": 35
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||
name: "label3"
|
||||
"text": "播报内容"
|
||||
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
|
||||
"x": 25
|
||||
"y": 530
|
||||
} )
|
||||
}, new FormLayoutConstraints( null ) {
|
||||
"location": new java.awt.Point( 0, 0 )
|
||||
"size": new java.awt.Dimension( 1145, 590 )
|
||||
} )
|
||||
}
|
||||
}
|
||||
|
|
@ -450,7 +450,7 @@ public class ExplosiveControl extends JPanel {
|
|||
button9.setText("\u4e00\u952e\u6e05\u7a7a\u72ec\u7acb\u7206\u7387\u8868");
|
||||
button9.addActionListener(e -> 一键清空独立爆率表(e));
|
||||
panel1.add(button9);
|
||||
button9.setBounds(5, 30, 190, button9.getPreferredSize().height);
|
||||
button9.setBounds(5, 20, 190, button9.getPreferredSize().height);
|
||||
|
||||
|
||||
button10.setText("\u4e00\u952e\u6e05\u7a7a\u5168\u5c40\u7206\u7387\u8868");
|
||||
|
|
|
|||
|
|
@ -0,0 +1,588 @@
|
|||
/*
|
||||
* Created by JFormDesigner on Fri Apr 04 16:38:34 CST 2025
|
||||
*/
|
||||
|
||||
package gui.UI_LenheartUI;
|
||||
|
||||
import java.awt.event.*;
|
||||
import java.beans.*;
|
||||
import gui.Start;
|
||||
import gui.tw.diaoyu.BL;
|
||||
import gui.tw.diaoyu.DiaoYuMap;
|
||||
import gui.tw.diaoyu.DiaoyuItem;
|
||||
import gui.特殊控制台;
|
||||
|
||||
import java.awt.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import javax.swing.*;
|
||||
import javax.swing.table.*;
|
||||
|
||||
/**
|
||||
* @author dongj
|
||||
*/
|
||||
public class Fishing extends JPanel {
|
||||
public Fishing() {
|
||||
initComponents();
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void 新增按钮1(ActionEvent e) {
|
||||
// TODO add your code here
|
||||
DefaultTableModel tableModel = (DefaultTableModel)this.table1.getModel();
|
||||
Object[] rowData = {tableModel.getRowCount()+1, 0 ,0};
|
||||
tableModel.addRow(rowData);
|
||||
}
|
||||
|
||||
private void 删除按钮1(ActionEvent e) {
|
||||
// TODO add your code here
|
||||
int selectedRow = table1.getSelectedRow();
|
||||
if (selectedRow != -1) {
|
||||
DefaultTableModel tableModel = (DefaultTableModel) table1.getModel();
|
||||
tableModel.removeRow(selectedRow);
|
||||
if(tableModel.getRowCount() > selectedRow)table1.setRowSelectionInterval(selectedRow, selectedRow);
|
||||
}
|
||||
}
|
||||
|
||||
private void 新增按钮2(ActionEvent e) {
|
||||
DefaultTableModel tableModel = (DefaultTableModel)this.table2.getModel();
|
||||
Object[] rowData = {tableModel.getRowCount()+1, 0 ,0,0,0,0,0,0};
|
||||
tableModel.addRow(rowData);
|
||||
}
|
||||
|
||||
private void 删除按钮2(ActionEvent e) {
|
||||
// TODO add your code here
|
||||
int selectedRow = table2.getSelectedRow();
|
||||
if (selectedRow != -1) {
|
||||
DefaultTableModel tableModel = (DefaultTableModel) table2.getModel();
|
||||
tableModel.removeRow(selectedRow);
|
||||
if(tableModel.getRowCount() > selectedRow)table2.setRowSelectionInterval(selectedRow, selectedRow);
|
||||
}
|
||||
}
|
||||
|
||||
private void 新增按钮3(ActionEvent e) {
|
||||
DefaultTableModel tableModel = (DefaultTableModel)this.table3.getModel();
|
||||
Object[] rowData = {tableModel.getRowCount()+1, 0 ,0,0};
|
||||
tableModel.addRow(rowData);
|
||||
}
|
||||
|
||||
private void 删除按钮3(ActionEvent e) {
|
||||
// TODO add your code here
|
||||
int selectedRow = table3.getSelectedRow();
|
||||
if (selectedRow != -1) {
|
||||
DefaultTableModel tableModel = (DefaultTableModel) table3.getModel();
|
||||
tableModel.removeRow(selectedRow);
|
||||
if(tableModel.getRowCount() > selectedRow)table3.setRowSelectionInterval(selectedRow, selectedRow);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void 重载配置操作(){
|
||||
List<DiaoYuMap> mapIds = Start.diaoyuConfig.getMapIds();
|
||||
DefaultTableModel tableModel = (DefaultTableModel)this.table1.getModel();
|
||||
tableModel.setRowCount(0);
|
||||
// 创建一个自定义的单元格渲染器,用于右对齐字符串
|
||||
DefaultTableCellRenderer rightRenderer = new DefaultTableCellRenderer();
|
||||
rightRenderer.setHorizontalAlignment(JLabel.RIGHT);
|
||||
// 遍历表格的所有列,将字符串类型的列设置为右对齐
|
||||
for (int i = 0; i < table1.getColumnCount(); i++) {
|
||||
if (table1.getColumnClass(i) == String.class) {
|
||||
table1.getColumnModel().getColumn(i).setCellRenderer(rightRenderer);
|
||||
}
|
||||
}
|
||||
|
||||
mapIds.forEach((obj) -> {
|
||||
Integer Id = obj.getId();
|
||||
String NameFront = obj.getName();
|
||||
Integer mapid = obj.getMapId();
|
||||
|
||||
Object[] rowData = {Id, NameFront ,mapid};
|
||||
tableModel.addRow(rowData);
|
||||
});
|
||||
|
||||
|
||||
List<DiaoyuItem> reward = Start.diaoyuConfig.getAll();
|
||||
DefaultTableModel tableMode2 = (DefaultTableModel)this.table2.getModel();
|
||||
tableMode2.setRowCount(0);
|
||||
// 遍历表格的所有列,将字符串类型的列设置为右对齐
|
||||
for (int i = 0; i < table2.getColumnCount(); i++) {
|
||||
if (table2.getColumnClass(i) == String.class) {
|
||||
table2.getColumnModel().getColumn(i).setCellRenderer(rightRenderer);
|
||||
}
|
||||
}
|
||||
reward.forEach((obj) -> {
|
||||
Integer Id = obj.getId();
|
||||
String ItemName = obj.getItemName();
|
||||
Integer ItemId = obj.getItemId();
|
||||
Integer min = obj.getMinNum();
|
||||
Integer max = obj.getMaxNum();
|
||||
Integer rate = obj.getChance();
|
||||
Integer noti = obj.getNotice();
|
||||
Integer iskd = obj.getIsAdvanced();
|
||||
|
||||
|
||||
Object[] rowData = {Id, ItemName ,ItemId ,min,max,rate,noti,iskd};
|
||||
tableMode2.addRow(rowData);
|
||||
});
|
||||
|
||||
|
||||
List<BL> bls = Start.diaoyuConfig.getBls();
|
||||
DefaultTableModel tableMode3 = (DefaultTableModel)this.table3.getModel();
|
||||
tableMode3.setRowCount(0);
|
||||
// 遍历表格的所有列,将字符串类型的列设置为右对齐
|
||||
for (int i = 0; i < table3.getColumnCount(); i++) {
|
||||
if (table3.getColumnClass(i) == String.class) {
|
||||
table3.getColumnModel().getColumn(i).setCellRenderer(rightRenderer);
|
||||
}
|
||||
}
|
||||
bls.forEach((obj) -> {
|
||||
Integer Id = obj.getId();
|
||||
String Name = obj.getName();
|
||||
Integer ItemId = obj.getItemId();
|
||||
Integer Rate = obj.getBl();
|
||||
|
||||
Object[] rowData = {Id, Name ,ItemId ,Rate};
|
||||
tableMode3.addRow(rowData);
|
||||
});
|
||||
|
||||
String notice = Start.diaoyuConfig.getNotice();
|
||||
textField1.setText(notice);
|
||||
|
||||
textField2.setText(String.valueOf(Start.diaoyuConfig.getDyyg()));
|
||||
textField3.setText(String.valueOf(Start.diaoyuConfig.getDyyz()));
|
||||
textField4.setText(String.valueOf(Start.diaoyuConfig.getDyjg()));
|
||||
textField5.setText(String.valueOf(Start.diaoyuConfig.getPtye()));
|
||||
textField6.setText(String.valueOf(Start.diaoyuConfig.getGjye()));
|
||||
|
||||
toggleButton1.setSelected(Start.diaoyuConfig.getDykg() == 1);
|
||||
toggleButton2.setSelected(Start.diaoyuConfig.getRyyz() == 1);
|
||||
toggleButton3.setSelected(Start.diaoyuConfig.getDytx() == 1);
|
||||
toggleButton4.setSelected(Start.diaoyuConfig.getKjbzdc() == 1);
|
||||
toggleButton5.setSelected(Start.diaoyuConfig.getBldj() == 1);
|
||||
}
|
||||
|
||||
private void 重载配置(ActionEvent e) {
|
||||
重载配置操作();
|
||||
}
|
||||
|
||||
private void button7PropertyChange(ActionEvent e) {
|
||||
// TODO add your code here
|
||||
// 保存 table1 的数据
|
||||
DefaultTableModel tableModel = (DefaultTableModel) this.table1.getModel();
|
||||
List<DiaoYuMap> mapIds = new ArrayList<>();
|
||||
for (int i = 0; i < tableModel.getRowCount(); i++) {
|
||||
Integer id = (Integer) tableModel.getValueAt(i, 0);
|
||||
String nameFront = "";
|
||||
Integer mapid = (Integer) tableModel.getValueAt(i, 2);
|
||||
DiaoYuMap diaoYuMap = new DiaoYuMap();
|
||||
diaoYuMap.setId(id);
|
||||
diaoYuMap.setName(nameFront);
|
||||
diaoYuMap.setMapId(mapid);
|
||||
mapIds.add(diaoYuMap);
|
||||
}
|
||||
Start.diaoyuConfig.setMapIds(mapIds);
|
||||
|
||||
|
||||
// 保存 table2 的数据
|
||||
DefaultTableModel tableMode2 = (DefaultTableModel) this.table2.getModel();
|
||||
List<DiaoyuItem> reward = new ArrayList<>();
|
||||
reward.clear();
|
||||
for (int i = 0; i < tableMode2.getRowCount(); i++) {
|
||||
Integer id = (Integer) tableMode2.getValueAt(i, 0);
|
||||
String itemName = tableMode2.getValueAt(i, 1).toString();
|
||||
Integer itemId = (Integer) tableMode2.getValueAt(i, 2);
|
||||
Integer min = (Integer) tableMode2.getValueAt(i, 3);
|
||||
Integer max = (Integer) tableMode2.getValueAt(i, 4);
|
||||
Integer rate = (Integer) tableMode2.getValueAt(i, 5);
|
||||
Integer noti = (Integer) tableMode2.getValueAt(i, 6);
|
||||
Integer iskd = (Integer) tableMode2.getValueAt(i, 7);
|
||||
DiaoyuItem diaoyuItem = new DiaoyuItem();
|
||||
diaoyuItem.setId(id);
|
||||
diaoyuItem.setItemName(itemName);
|
||||
diaoyuItem.setItemId(itemId);
|
||||
diaoyuItem.setMinNum(min);
|
||||
diaoyuItem.setMaxNum(max);
|
||||
diaoyuItem.setChance(rate);
|
||||
diaoyuItem.setNotice(noti);
|
||||
diaoyuItem.setIsAdvanced(iskd);
|
||||
reward.add(diaoyuItem);
|
||||
}
|
||||
Start.diaoyuConfig.setAll(reward);
|
||||
|
||||
// 保存 table3 的数据
|
||||
DefaultTableModel tableMode3 = (DefaultTableModel) this.table3.getModel();
|
||||
List<BL> bls = new ArrayList<>();
|
||||
bls.clear();
|
||||
for (int i = 0; i < tableMode3.getRowCount(); i++) {
|
||||
Integer id = (Integer) tableMode3.getValueAt(i, 0);
|
||||
String name = (String) tableMode3.getValueAt(i, 1);
|
||||
Integer itemId = (Integer) tableMode3.getValueAt(i, 2);
|
||||
Integer rate = (Integer) tableMode3.getValueAt(i, 3);
|
||||
BL bl = new BL();
|
||||
bl.setId(id);
|
||||
bl.setName(name);
|
||||
bl.setItemId(itemId);
|
||||
bl.setBl(rate);
|
||||
bls.add(bl);
|
||||
}
|
||||
Start.diaoyuConfig.setBls(bls);
|
||||
|
||||
// 保存文本框的数据
|
||||
Start.diaoyuConfig.setNotice(textField1.getText());
|
||||
Start.diaoyuConfig.setDyyg(Integer.parseInt(textField2.getText()));
|
||||
Start.diaoyuConfig.setDyyz(Integer.parseInt(textField3.getText()));
|
||||
Start.diaoyuConfig.setDyjg(Integer.parseInt(textField4.getText()));
|
||||
Start.diaoyuConfig.setPtye(Integer.parseInt(textField5.getText()));
|
||||
Start.diaoyuConfig.setGjye(Integer.parseInt(textField6.getText()));
|
||||
|
||||
// 保存开关按钮的数据
|
||||
Start.diaoyuConfig.setDykg(toggleButton1.isSelected() ? 1 : 0);
|
||||
Start.diaoyuConfig.setRyyz(toggleButton2.isSelected() ? 1 : 0);
|
||||
Start.diaoyuConfig.setDytx(toggleButton3.isSelected() ? 1 : 0);
|
||||
Start.diaoyuConfig.setKjbzdc(toggleButton4.isSelected() ? 1 : 0);
|
||||
Start.diaoyuConfig.setBldj(toggleButton5.isSelected() ? 1 : 0);
|
||||
|
||||
特殊控制台.setTwConfig();
|
||||
}
|
||||
|
||||
|
||||
private void initComponents() {
|
||||
// JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents @formatter:off
|
||||
scrollPane1 = new JScrollPane();
|
||||
table1 = new JTable();
|
||||
scrollPane2 = new JScrollPane();
|
||||
table2 = new JTable();
|
||||
scrollPane3 = new JScrollPane();
|
||||
table3 = new JTable();
|
||||
button2 = new JButton();
|
||||
button1 = new JButton();
|
||||
button3 = new JButton();
|
||||
button4 = new JButton();
|
||||
textField1 = new JTextField();
|
||||
label1 = new JLabel();
|
||||
button5 = new JButton();
|
||||
button6 = new JButton();
|
||||
label2 = new JLabel();
|
||||
label3 = new JLabel();
|
||||
label4 = new JLabel();
|
||||
label5 = new JLabel();
|
||||
label6 = new JLabel();
|
||||
textField2 = new JTextField();
|
||||
textField3 = new JTextField();
|
||||
textField4 = new JTextField();
|
||||
textField5 = new JTextField();
|
||||
textField6 = new JTextField();
|
||||
toggleButton1 = new JToggleButton();
|
||||
label7 = new JLabel();
|
||||
label8 = new JLabel();
|
||||
label9 = new JLabel();
|
||||
label10 = new JLabel();
|
||||
label11 = new JLabel();
|
||||
toggleButton2 = new JToggleButton();
|
||||
toggleButton3 = new JToggleButton();
|
||||
toggleButton4 = new JToggleButton();
|
||||
toggleButton5 = new JToggleButton();
|
||||
button7 = new JButton();
|
||||
button8 = new JButton();
|
||||
|
||||
//======== this ========
|
||||
setLayout(null);
|
||||
|
||||
//======== scrollPane1 ========
|
||||
{
|
||||
|
||||
//---- table1 ----
|
||||
table1.setModel(new DefaultTableModel(
|
||||
new Object[][] {
|
||||
},
|
||||
new String[] {
|
||||
"\u5e8f\u53f7", "\u5730\u56fe\u540d", "\u5730\u56feID"
|
||||
}
|
||||
) {
|
||||
Class<?>[] columnTypes = new Class<?>[] {
|
||||
Integer.class, String.class, Integer.class
|
||||
};
|
||||
@Override
|
||||
public Class<?> getColumnClass(int columnIndex) {
|
||||
return columnTypes[columnIndex];
|
||||
}
|
||||
});
|
||||
{
|
||||
TableColumnModel cm = table1.getColumnModel();
|
||||
cm.getColumn(0).setMinWidth(10);
|
||||
cm.getColumn(0).setMaxWidth(35);
|
||||
}
|
||||
scrollPane1.setViewportView(table1);
|
||||
}
|
||||
add(scrollPane1);
|
||||
scrollPane1.setBounds(20, 10, 350, 625);
|
||||
|
||||
//======== scrollPane2 ========
|
||||
{
|
||||
|
||||
//---- table2 ----
|
||||
table2.setModel(new DefaultTableModel(
|
||||
new Object[][] {
|
||||
},
|
||||
new String[] {
|
||||
"\u5e8f\u53f7", "\u9053\u5177\u540d", "\u9053\u5177ID", "\u6700\u5c0f\u6570\u91cf", "\u6700\u5927\u6570\u91cf", "\u51e0\u7387", "\u64ad\u62a5", "\u4ec5\u9ad8\u7ea7\u9c7c\u9975\u53ef\u9493"
|
||||
}
|
||||
) {
|
||||
Class<?>[] columnTypes = new Class<?>[] {
|
||||
Integer.class, Integer.class, Integer.class, Integer.class, Integer.class, Integer.class, Integer.class, Integer.class
|
||||
};
|
||||
@Override
|
||||
public Class<?> getColumnClass(int columnIndex) {
|
||||
return columnTypes[columnIndex];
|
||||
}
|
||||
});
|
||||
{
|
||||
TableColumnModel cm = table2.getColumnModel();
|
||||
cm.getColumn(0).setMaxWidth(35);
|
||||
cm.getColumn(6).setMaxWidth(35);
|
||||
}
|
||||
scrollPane2.setViewportView(table2);
|
||||
}
|
||||
add(scrollPane2);
|
||||
scrollPane2.setBounds(380, 10, 685, 555);
|
||||
|
||||
//======== scrollPane3 ========
|
||||
{
|
||||
|
||||
//---- table3 ----
|
||||
table3.setModel(new DefaultTableModel(
|
||||
new Object[][] {
|
||||
},
|
||||
new String[] {
|
||||
"\u5e8f\u53f7", "\u9053\u5177\u540d", "\u9053\u5177ID", "\u500d\u7387"
|
||||
}
|
||||
) {
|
||||
Class<?>[] columnTypes = new Class<?>[] {
|
||||
Integer.class, String.class, Integer.class, Integer.class
|
||||
};
|
||||
@Override
|
||||
public Class<?> getColumnClass(int columnIndex) {
|
||||
return columnTypes[columnIndex];
|
||||
}
|
||||
});
|
||||
scrollPane3.setViewportView(table3);
|
||||
}
|
||||
add(scrollPane3);
|
||||
scrollPane3.setBounds(1075, 10, 425, 250);
|
||||
|
||||
//---- button2 ----
|
||||
button2.setText("\u5220\u9664");
|
||||
button2.addActionListener(e -> 删除按钮1(e));
|
||||
add(button2);
|
||||
button2.setBounds(215, 645, 155, button2.getPreferredSize().height);
|
||||
|
||||
//---- button1 ----
|
||||
button1.setText("\u65b0\u589e");
|
||||
button1.setActionCommand("\u65b0\u589e");
|
||||
button1.addActionListener(e -> 新增按钮1(e));
|
||||
add(button1);
|
||||
button1.setBounds(20, 645, 155, button1.getPreferredSize().height);
|
||||
|
||||
//---- button3 ----
|
||||
button3.setText("\u65b0\u589e");
|
||||
button3.addActionListener(e -> 新增按钮2(e));
|
||||
add(button3);
|
||||
button3.setBounds(385, 645, 155, button3.getPreferredSize().height);
|
||||
|
||||
//---- button4 ----
|
||||
button4.setText("\u5220\u9664");
|
||||
button4.addActionListener(e -> 删除按钮2(e));
|
||||
add(button4);
|
||||
button4.setBounds(615, 645, 155, button4.getPreferredSize().height);
|
||||
add(textField1);
|
||||
textField1.setBounds(385, 590, 385, 50);
|
||||
|
||||
//---- label1 ----
|
||||
label1.setText("\u64ad\u62a5\u5185\u5bb9:");
|
||||
add(label1);
|
||||
label1.setBounds(new Rectangle(new Point(390, 570), label1.getPreferredSize()));
|
||||
|
||||
//---- button5 ----
|
||||
button5.setText("\u65b0\u589e");
|
||||
button5.addActionListener(e -> 新增按钮3(e));
|
||||
add(button5);
|
||||
button5.setBounds(1115, 270, 155, button5.getPreferredSize().height);
|
||||
|
||||
//---- button6 ----
|
||||
button6.setText("\u5220\u9664");
|
||||
button6.addActionListener(e -> 删除按钮3(e));
|
||||
add(button6);
|
||||
button6.setBounds(1295, 270, 155, button6.getPreferredSize().height);
|
||||
|
||||
//---- label2 ----
|
||||
label2.setText("\u9493\u9c7c\u9c7c\u7aff");
|
||||
add(label2);
|
||||
label2.setBounds(1150, 310, 60, 25);
|
||||
|
||||
//---- label3 ----
|
||||
label3.setText("\u9493\u9c7c\u6905\u5b50");
|
||||
add(label3);
|
||||
label3.setBounds(1150, 350, 60, 25);
|
||||
|
||||
//---- label4 ----
|
||||
label4.setText("\u9493\u9c7c\u95f4\u9694");
|
||||
add(label4);
|
||||
label4.setBounds(1150, 390, 60, 25);
|
||||
|
||||
//---- label5 ----
|
||||
label5.setText("\u666e\u901a\u9c7c\u9975");
|
||||
add(label5);
|
||||
label5.setBounds(1150, 430, 60, 25);
|
||||
|
||||
//---- label6 ----
|
||||
label6.setText("\u9ad8\u7ea7\u9c7c\u9975");
|
||||
add(label6);
|
||||
label6.setBounds(1150, 470, 60, 25);
|
||||
add(textField2);
|
||||
textField2.setBounds(1210, 310, 205, textField2.getPreferredSize().height);
|
||||
add(textField3);
|
||||
textField3.setBounds(1210, 350, 205, textField3.getPreferredSize().height);
|
||||
add(textField4);
|
||||
textField4.setBounds(1210, 390, 205, textField4.getPreferredSize().height);
|
||||
add(textField5);
|
||||
textField5.setBounds(1210, 430, 205, textField5.getPreferredSize().height);
|
||||
add(textField6);
|
||||
textField6.setBounds(1210, 470, 205, textField6.getPreferredSize().height);
|
||||
|
||||
//---- toggleButton1 ----
|
||||
toggleButton1.setIcon(new ImageIcon(getClass().getResource("/image/OFF3.png")));
|
||||
toggleButton1.setSelectedIcon(new ImageIcon(getClass().getResource("/image/ON3.png")));
|
||||
toggleButton1.setFocusPainted(false);
|
||||
toggleButton1.setContentAreaFilled(false);
|
||||
add(toggleButton1);
|
||||
toggleButton1.setBounds(1280, 495, 100, 35);
|
||||
|
||||
//---- label7 ----
|
||||
label7.setText("\u5f00\u653e\u9493\u9c7c\u7cfb\u7edf\u5f00\u5173");
|
||||
add(label7);
|
||||
label7.setBounds(1160, 500, 110, 25);
|
||||
|
||||
//---- label8 ----
|
||||
label8.setText("\u542f\u7528\u4efb\u610f\u6905\u5b50\u9493\u9c7c");
|
||||
add(label8);
|
||||
label8.setBounds(1160, 540, 110, 25);
|
||||
|
||||
//---- label9 ----
|
||||
label9.setText("\u663e\u793a\u9493\u9c7c\u6210\u529f\u7279\u6548");
|
||||
add(label9);
|
||||
label9.setBounds(1160, 575, 110, 25);
|
||||
|
||||
//---- label10 ----
|
||||
label10.setText("\u7a7a\u95f4\u4e0d\u8db3\u81ea\u52a8\u4e22\u51fa");
|
||||
add(label10);
|
||||
label10.setBounds(1160, 610, 110, 25);
|
||||
|
||||
//---- label11 ----
|
||||
label11.setText("\u500d\u7387\u9053\u5177\u662f\u5426\u53e0\u52a0");
|
||||
add(label11);
|
||||
label11.setBounds(1160, 650, 110, 25);
|
||||
|
||||
//---- toggleButton2 ----
|
||||
toggleButton2.setIcon(new ImageIcon(getClass().getResource("/image/OFF3.png")));
|
||||
toggleButton2.setSelectedIcon(new ImageIcon(getClass().getResource("/image/ON3.png")));
|
||||
toggleButton2.setFocusPainted(false);
|
||||
toggleButton2.setContentAreaFilled(false);
|
||||
add(toggleButton2);
|
||||
toggleButton2.setBounds(1280, 535, 100, 35);
|
||||
|
||||
//---- toggleButton3 ----
|
||||
toggleButton3.setIcon(new ImageIcon(getClass().getResource("/image/OFF3.png")));
|
||||
toggleButton3.setSelectedIcon(new ImageIcon(getClass().getResource("/image/ON3.png")));
|
||||
toggleButton3.setFocusPainted(false);
|
||||
toggleButton3.setContentAreaFilled(false);
|
||||
add(toggleButton3);
|
||||
toggleButton3.setBounds(1280, 570, 100, 35);
|
||||
|
||||
//---- toggleButton4 ----
|
||||
toggleButton4.setIcon(new ImageIcon(getClass().getResource("/image/OFF3.png")));
|
||||
toggleButton4.setSelectedIcon(new ImageIcon(getClass().getResource("/image/ON3.png")));
|
||||
toggleButton4.setFocusPainted(false);
|
||||
toggleButton4.setContentAreaFilled(false);
|
||||
add(toggleButton4);
|
||||
toggleButton4.setBounds(1280, 605, 100, 35);
|
||||
|
||||
//---- toggleButton5 ----
|
||||
toggleButton5.setIcon(new ImageIcon(getClass().getResource("/image/OFF3.png")));
|
||||
toggleButton5.setSelectedIcon(new ImageIcon(getClass().getResource("/image/ON3.png")));
|
||||
toggleButton5.setFocusPainted(false);
|
||||
toggleButton5.setContentAreaFilled(false);
|
||||
add(toggleButton5);
|
||||
toggleButton5.setBounds(1280, 645, 100, 35);
|
||||
|
||||
//---- button7 ----
|
||||
button7.setText("\u4fdd\u5b58\u914d\u7f6e");
|
||||
button7.addActionListener(e -> button7PropertyChange(e));
|
||||
add(button7);
|
||||
button7.setBounds(775, 585, 290, 45);
|
||||
|
||||
//---- button8 ----
|
||||
button8.setText("\u91cd\u8f7d\u914d\u7f6e");
|
||||
button8.addActionListener(e -> 重载配置(e));
|
||||
add(button8);
|
||||
button8.setBounds(775, 635, 290, 45);
|
||||
|
||||
{
|
||||
// compute preferred size
|
||||
Dimension preferredSize = new Dimension();
|
||||
for(int i = 0; i < getComponentCount(); i++) {
|
||||
Rectangle bounds = getComponent(i).getBounds();
|
||||
preferredSize.width = Math.max(bounds.x + bounds.width, preferredSize.width);
|
||||
preferredSize.height = Math.max(bounds.y + bounds.height, preferredSize.height);
|
||||
}
|
||||
Insets insets = getInsets();
|
||||
preferredSize.width += insets.right;
|
||||
preferredSize.height += insets.bottom;
|
||||
setMinimumSize(preferredSize);
|
||||
setPreferredSize(preferredSize);
|
||||
}
|
||||
// JFormDesigner - End of component initialization //GEN-END:initComponents @formatter:on
|
||||
|
||||
重载配置操作();
|
||||
}
|
||||
|
||||
// JFormDesigner - Variables declaration - DO NOT MODIFY //GEN-BEGIN:variables @formatter:off
|
||||
private JScrollPane scrollPane1;
|
||||
private JTable table1;
|
||||
private JScrollPane scrollPane2;
|
||||
private JTable table2;
|
||||
private JScrollPane scrollPane3;
|
||||
private JTable table3;
|
||||
private JButton button2;
|
||||
private JButton button1;
|
||||
private JButton button3;
|
||||
private JButton button4;
|
||||
private JTextField textField1;
|
||||
private JLabel label1;
|
||||
private JButton button5;
|
||||
private JButton button6;
|
||||
private JLabel label2;
|
||||
private JLabel label3;
|
||||
private JLabel label4;
|
||||
private JLabel label5;
|
||||
private JLabel label6;
|
||||
private JTextField textField2;
|
||||
private JTextField textField3;
|
||||
private JTextField textField4;
|
||||
private JTextField textField5;
|
||||
private JTextField textField6;
|
||||
private JToggleButton toggleButton1;
|
||||
private JLabel label7;
|
||||
private JLabel label8;
|
||||
private JLabel label9;
|
||||
private JLabel label10;
|
||||
private JLabel label11;
|
||||
private JToggleButton toggleButton2;
|
||||
private JToggleButton toggleButton3;
|
||||
private JToggleButton toggleButton4;
|
||||
private JToggleButton toggleButton5;
|
||||
private JButton button7;
|
||||
private JButton button8;
|
||||
// JFormDesigner - End of variables declaration //GEN-END:variables @formatter:on
|
||||
}
|
||||
|
|
@ -0,0 +1,396 @@
|
|||
JFDML JFormDesigner: "9.0.0.0.352" Java: "21.0.6" encoding: "UTF-8"
|
||||
|
||||
new FormModel {
|
||||
contentType: "form/swing"
|
||||
root: new FormRoot {
|
||||
add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class com.jformdesigner.runtime.NullLayout ) ) {
|
||||
name: "this"
|
||||
add( new FormContainer( "javax.swing.JScrollPane", new FormLayoutManager( class javax.swing.JScrollPane ) ) {
|
||||
name: "scrollPane1"
|
||||
add( new FormComponent( "javax.swing.JTable" ) {
|
||||
name: "table1"
|
||||
"model": new com.jformdesigner.model.SwingTableModel( new java.util.Vector, new java.util.Vector {
|
||||
add( "序号" )
|
||||
add( "地图名" )
|
||||
add( "地图ID" )
|
||||
}, new java.util.Vector {
|
||||
add( class java.lang.Integer )
|
||||
add( class java.lang.String )
|
||||
add( class java.lang.Integer )
|
||||
}, new java.util.Vector {
|
||||
add( null )
|
||||
add( null )
|
||||
add( null )
|
||||
}, new java.util.Vector {
|
||||
add( new com.jformdesigner.model.SwingTableColumn( null, 0, 10, 35, true ) )
|
||||
add( null )
|
||||
add( null )
|
||||
} )
|
||||
} )
|
||||
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
|
||||
"x": 20
|
||||
"y": 10
|
||||
"width": 350
|
||||
"height": 625
|
||||
} )
|
||||
add( new FormContainer( "javax.swing.JScrollPane", new FormLayoutManager( class javax.swing.JScrollPane ) ) {
|
||||
name: "scrollPane2"
|
||||
add( new FormComponent( "javax.swing.JTable" ) {
|
||||
name: "table2"
|
||||
"model": new com.jformdesigner.model.SwingTableModel( new java.util.Vector, new java.util.Vector {
|
||||
add( "序号" )
|
||||
add( "道具名" )
|
||||
add( "道具ID" )
|
||||
add( "最小数量" )
|
||||
add( "最大数量" )
|
||||
add( "几率" )
|
||||
add( "播报" )
|
||||
add( "仅高级鱼饵可钓" )
|
||||
}, new java.util.Vector {
|
||||
add( class java.lang.Integer )
|
||||
add( class java.lang.Integer )
|
||||
add( class java.lang.Integer )
|
||||
add( class java.lang.Integer )
|
||||
add( class java.lang.Integer )
|
||||
add( class java.lang.Integer )
|
||||
add( class java.lang.Integer )
|
||||
add( class java.lang.Integer )
|
||||
}, new java.util.Vector {
|
||||
add( null )
|
||||
add( null )
|
||||
add( null )
|
||||
add( null )
|
||||
add( null )
|
||||
add( null )
|
||||
add( null )
|
||||
add( null )
|
||||
}, new java.util.Vector {
|
||||
add( new com.jformdesigner.model.SwingTableColumn( null, 0, 0, 35, true ) )
|
||||
add( null )
|
||||
add( null )
|
||||
add( null )
|
||||
add( null )
|
||||
add( null )
|
||||
add( new com.jformdesigner.model.SwingTableColumn( null, 0, 0, 35, true ) )
|
||||
add( null )
|
||||
} )
|
||||
} )
|
||||
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
|
||||
"x": 380
|
||||
"y": 10
|
||||
"width": 685
|
||||
"height": 555
|
||||
} )
|
||||
add( new FormContainer( "javax.swing.JScrollPane", new FormLayoutManager( class javax.swing.JScrollPane ) ) {
|
||||
name: "scrollPane3"
|
||||
add( new FormComponent( "javax.swing.JTable" ) {
|
||||
name: "table3"
|
||||
"model": new com.jformdesigner.model.SwingTableModel( new java.util.Vector, new java.util.Vector {
|
||||
add( "序号" )
|
||||
add( "道具名" )
|
||||
add( "道具ID" )
|
||||
add( "倍率" )
|
||||
}, new java.util.Vector {
|
||||
add( class java.lang.Integer )
|
||||
add( class java.lang.String )
|
||||
add( class java.lang.Integer )
|
||||
add( class java.lang.Integer )
|
||||
}, new java.util.Vector {
|
||||
add( null )
|
||||
add( null )
|
||||
add( null )
|
||||
add( null )
|
||||
}, new java.util.Vector {
|
||||
add( null )
|
||||
add( null )
|
||||
add( null )
|
||||
add( null )
|
||||
} )
|
||||
} )
|
||||
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
|
||||
"x": 1075
|
||||
"y": 10
|
||||
"width": 425
|
||||
"height": 250
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JButton" ) {
|
||||
name: "button2"
|
||||
"text": "删除"
|
||||
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "删除按钮1", true ) )
|
||||
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
|
||||
"x": 215
|
||||
"y": 645
|
||||
"width": 155
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JButton" ) {
|
||||
name: "button1"
|
||||
"text": "新增"
|
||||
"actionCommand": "新增"
|
||||
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "新增按钮1", true ) )
|
||||
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
|
||||
"x": 20
|
||||
"y": 645
|
||||
"width": 155
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JButton" ) {
|
||||
name: "button3"
|
||||
"text": "新增"
|
||||
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "新增按钮2", true ) )
|
||||
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
|
||||
"x": 385
|
||||
"y": 645
|
||||
"width": 155
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JButton" ) {
|
||||
name: "button4"
|
||||
"text": "删除"
|
||||
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "删除按钮2", true ) )
|
||||
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
|
||||
"x": 615
|
||||
"y": 645
|
||||
"width": 155
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JTextField" ) {
|
||||
name: "textField1"
|
||||
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
|
||||
"x": 385
|
||||
"y": 590
|
||||
"width": 385
|
||||
"height": 50
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||
name: "label1"
|
||||
"text": "播报内容:"
|
||||
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
|
||||
"x": 390
|
||||
"y": 570
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JButton" ) {
|
||||
name: "button5"
|
||||
"text": "新增"
|
||||
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "新增按钮3", true ) )
|
||||
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
|
||||
"x": 1115
|
||||
"y": 270
|
||||
"width": 155
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JButton" ) {
|
||||
name: "button6"
|
||||
"text": "删除"
|
||||
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "删除按钮3", true ) )
|
||||
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
|
||||
"x": 1295
|
||||
"y": 270
|
||||
"width": 155
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||
name: "label2"
|
||||
"text": "钓鱼鱼竿"
|
||||
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
|
||||
"x": 1150
|
||||
"y": 310
|
||||
"width": 60
|
||||
"height": 25
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||
name: "label3"
|
||||
"text": "钓鱼椅子"
|
||||
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
|
||||
"width": 60
|
||||
"height": 25
|
||||
"x": 1150
|
||||
"y": 350
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||
name: "label4"
|
||||
"text": "钓鱼间隔"
|
||||
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
|
||||
"width": 60
|
||||
"height": 25
|
||||
"x": 1150
|
||||
"y": 390
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||
name: "label5"
|
||||
"text": "普通鱼饵"
|
||||
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
|
||||
"width": 60
|
||||
"height": 25
|
||||
"x": 1150
|
||||
"y": 430
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||
name: "label6"
|
||||
"text": "高级鱼饵"
|
||||
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
|
||||
"width": 60
|
||||
"height": 25
|
||||
"x": 1150
|
||||
"y": 470
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JTextField" ) {
|
||||
name: "textField2"
|
||||
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
|
||||
"x": 1210
|
||||
"y": 310
|
||||
"width": 205
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JTextField" ) {
|
||||
name: "textField3"
|
||||
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
|
||||
"x": 1210
|
||||
"y": 350
|
||||
"width": 205
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JTextField" ) {
|
||||
name: "textField4"
|
||||
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
|
||||
"x": 1210
|
||||
"y": 390
|
||||
"width": 205
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JTextField" ) {
|
||||
name: "textField5"
|
||||
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
|
||||
"x": 1210
|
||||
"y": 430
|
||||
"width": 205
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JTextField" ) {
|
||||
name: "textField6"
|
||||
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
|
||||
"x": 1210
|
||||
"y": 470
|
||||
"width": 205
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JToggleButton" ) {
|
||||
name: "toggleButton1"
|
||||
"icon": &SwingIcon0 new com.jformdesigner.model.SwingIcon( 0, "/image/OFF3.png" )
|
||||
"selectedIcon": &SwingIcon1 new com.jformdesigner.model.SwingIcon( 0, "/image/ON3.png" )
|
||||
"focusPainted": false
|
||||
"contentAreaFilled": false
|
||||
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
|
||||
"width": 100
|
||||
"height": 35
|
||||
"x": 1280
|
||||
"y": 495
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||
name: "label7"
|
||||
"text": "开放钓鱼系统开关"
|
||||
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
|
||||
"x": 1160
|
||||
"y": 500
|
||||
"width": 110
|
||||
"height": 25
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||
name: "label8"
|
||||
"text": "启用任意椅子钓鱼"
|
||||
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
|
||||
"width": 110
|
||||
"height": 25
|
||||
"x": 1160
|
||||
"y": 540
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||
name: "label9"
|
||||
"text": "显示钓鱼成功特效"
|
||||
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
|
||||
"width": 110
|
||||
"height": 25
|
||||
"x": 1160
|
||||
"y": 575
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||
name: "label10"
|
||||
"text": "空间不足自动丢出"
|
||||
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
|
||||
"width": 110
|
||||
"height": 25
|
||||
"x": 1160
|
||||
"y": 610
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||
name: "label11"
|
||||
"text": "倍率道具是否叠加"
|
||||
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
|
||||
"width": 110
|
||||
"height": 25
|
||||
"x": 1160
|
||||
"y": 650
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JToggleButton" ) {
|
||||
name: "toggleButton2"
|
||||
"icon": #SwingIcon0
|
||||
"selectedIcon": #SwingIcon1
|
||||
"focusPainted": false
|
||||
"contentAreaFilled": false
|
||||
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
|
||||
"width": 100
|
||||
"height": 35
|
||||
"x": 1280
|
||||
"y": 535
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JToggleButton" ) {
|
||||
name: "toggleButton3"
|
||||
"icon": #SwingIcon0
|
||||
"selectedIcon": #SwingIcon1
|
||||
"focusPainted": false
|
||||
"contentAreaFilled": false
|
||||
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
|
||||
"width": 100
|
||||
"height": 35
|
||||
"x": 1280
|
||||
"y": 570
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JToggleButton" ) {
|
||||
name: "toggleButton4"
|
||||
"icon": #SwingIcon0
|
||||
"selectedIcon": #SwingIcon1
|
||||
"focusPainted": false
|
||||
"contentAreaFilled": false
|
||||
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
|
||||
"width": 100
|
||||
"height": 35
|
||||
"x": 1280
|
||||
"y": 605
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JToggleButton" ) {
|
||||
name: "toggleButton5"
|
||||
"icon": #SwingIcon0
|
||||
"selectedIcon": #SwingIcon1
|
||||
"focusPainted": false
|
||||
"contentAreaFilled": false
|
||||
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
|
||||
"width": 100
|
||||
"height": 35
|
||||
"x": 1280
|
||||
"y": 645
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JButton" ) {
|
||||
name: "button7"
|
||||
"text": "保存配置"
|
||||
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "button7PropertyChange", true ) )
|
||||
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
|
||||
"x": 775
|
||||
"y": 585
|
||||
"width": 290
|
||||
"height": 45
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JButton" ) {
|
||||
name: "button8"
|
||||
"text": "重载配置"
|
||||
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "重载配置", true ) )
|
||||
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
|
||||
"width": 290
|
||||
"height": 45
|
||||
"x": 775
|
||||
"y": 635
|
||||
} )
|
||||
}, new FormLayoutConstraints( null ) {
|
||||
"location": new java.awt.Point( 0, 0 )
|
||||
"size": new java.awt.Dimension( 1510, 740 )
|
||||
} )
|
||||
}
|
||||
}
|
||||
|
|
@ -105,21 +105,21 @@ public class ItemRecovery extends JPanel {
|
|||
删除按钮.setText("\u5220\u9664");
|
||||
删除按钮.addActionListener(e -> 删除按钮(e));
|
||||
add(删除按钮);
|
||||
删除按钮.setBounds(485, 35, 115, 删除按钮.getPreferredSize().height);
|
||||
删除按钮.setBounds(485, 55, 115, 删除按钮.getPreferredSize().height);
|
||||
|
||||
//---- 保存配置 ----
|
||||
保存配置.setText("\u4fdd\u5b58\u914d\u7f6e");
|
||||
保存配置.setActionCommand("\u4fdd\u5b58\u914d\u7f6e");
|
||||
保存配置.addActionListener(e -> 保存配置(e));
|
||||
add(保存配置);
|
||||
保存配置.setBounds(485, 125, 115, 34);
|
||||
保存配置.setBounds(485, 100, 115, 34);
|
||||
|
||||
//---- 新增按钮 ----
|
||||
新增按钮.setText("\u65b0\u589e");
|
||||
新增按钮.setActionCommand("\u65b0\u589e\u6309\u94ae");
|
||||
新增按钮.addActionListener(e -> 新增按钮(e));
|
||||
add(新增按钮);
|
||||
新增按钮.setBounds(485, 80, 115, 34);
|
||||
新增按钮.setBounds(485, 10, 115, 34);
|
||||
|
||||
setPreferredSize(new Dimension(1640, 695));
|
||||
// JFormDesigner - End of component initialization //GEN-END:initComponents @formatter:on
|
||||
|
|
|
|||
|
|
@ -0,0 +1,136 @@
|
|||
/*
|
||||
* Created by JFormDesigner on Fri Apr 04 18:19:47 CST 2025
|
||||
*/
|
||||
|
||||
package gui.UI_LenheartUI;
|
||||
|
||||
import java.awt.event.*;
|
||||
import gui.Start;
|
||||
import gui.tw.AotuNpc;
|
||||
import gui.tw.rw.XuanShangRenWu;
|
||||
|
||||
import java.awt.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import javax.swing.*;
|
||||
import javax.swing.table.*;
|
||||
|
||||
/**
|
||||
* @author dongj
|
||||
*/
|
||||
public class KillMonsterStatistics extends JPanel {
|
||||
public KillMonsterStatistics() {
|
||||
initComponents();
|
||||
}
|
||||
|
||||
private void 载入杀怪统计(ActionEvent e) {
|
||||
// TODO add your code here
|
||||
DefaultTableModel tableModel = (DefaultTableModel)this.table1.getModel();
|
||||
tableModel.setRowCount(0);
|
||||
// 创建一个自定义的单元格渲染器,用于右对齐字符串
|
||||
DefaultTableCellRenderer rightRenderer = new DefaultTableCellRenderer();
|
||||
rightRenderer.setHorizontalAlignment(JLabel.RIGHT);
|
||||
// 遍历表格的所有列,将字符串类型的列设置为右对齐
|
||||
for (int i = 0; i < table1.getColumnCount(); i++) {
|
||||
if (table1.getColumnClass(i) == String.class) {
|
||||
table1.getColumnModel().getColumn(i).setCellRenderer(rightRenderer);
|
||||
}
|
||||
}
|
||||
|
||||
settable(new ArrayList<>(Start.xsRW.values()));
|
||||
}
|
||||
|
||||
private void settable(List<XuanShangRenWu> tttt) {
|
||||
DefaultTableModel tableModel = (DefaultTableModel) this.table1.getModel();
|
||||
tableModel.setRowCount(0);
|
||||
for (XuanShangRenWu obj : tttt) {
|
||||
Object[] rowData = {obj.getAccount(), obj.getCid(), obj.getName(), obj.getMobId(), obj.getMobName(), obj.getMobNum()};
|
||||
tableModel.addRow(rowData);
|
||||
}
|
||||
}
|
||||
|
||||
private void 搜索(ActionEvent e) {
|
||||
// TODO add your code here
|
||||
String BUF = textField1.getText();
|
||||
List<XuanShangRenWu> xuanShangRenWus = XuanShangRenWu.fuzzySearch(BUF);
|
||||
settable(xuanShangRenWus);
|
||||
}
|
||||
|
||||
|
||||
private void initComponents() {
|
||||
// JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents @formatter:off
|
||||
scrollPane1 = new JScrollPane();
|
||||
table1 = new JTable();
|
||||
button1 = new JButton();
|
||||
textField1 = new JTextField();
|
||||
button2 = new JButton();
|
||||
|
||||
//======== this ========
|
||||
setLayout(null);
|
||||
|
||||
//======== scrollPane1 ========
|
||||
{
|
||||
|
||||
//---- table1 ----
|
||||
table1.setModel(new DefaultTableModel(
|
||||
new Object[][] {
|
||||
{null, null, "", null, null, null, null},
|
||||
{null, null, null, null, null, null, null},
|
||||
},
|
||||
new String[] {
|
||||
"\u8d26\u53f7\u4fe1\u606f", "\u89d2\u8272ID", "\u89d2\u8272\u540d", "\u602a\u7269ID", "\u602a\u7269\u540d", "\u51fb\u6740\u6570\u91cf", "\u6700\u5927\u6740\u602a\u6570\u91cf"
|
||||
}
|
||||
) {
|
||||
boolean[] columnEditable = new boolean[] {
|
||||
false, false, false, true, false, true, true
|
||||
};
|
||||
@Override
|
||||
public boolean isCellEditable(int rowIndex, int columnIndex) {
|
||||
return columnEditable[columnIndex];
|
||||
}
|
||||
});
|
||||
scrollPane1.setViewportView(table1);
|
||||
}
|
||||
add(scrollPane1);
|
||||
scrollPane1.setBounds(10, 10, 1285, scrollPane1.getPreferredSize().height);
|
||||
|
||||
//---- button1 ----
|
||||
button1.setText("\u8f7d\u5165\u6740\u602a\u7edf\u8ba1");
|
||||
button1.addActionListener(e -> 载入杀怪统计(e));
|
||||
add(button1);
|
||||
button1.setBounds(10, 455, 260, 50);
|
||||
add(textField1);
|
||||
textField1.setBounds(295, 455, 245, 50);
|
||||
|
||||
//---- button2 ----
|
||||
button2.setText("\u641c\u7d22");
|
||||
button2.addActionListener(e -> 搜索(e));
|
||||
add(button2);
|
||||
button2.setBounds(565, 455, 260, 50);
|
||||
|
||||
{
|
||||
// compute preferred size
|
||||
Dimension preferredSize = new Dimension();
|
||||
for(int i = 0; i < getComponentCount(); i++) {
|
||||
Rectangle bounds = getComponent(i).getBounds();
|
||||
preferredSize.width = Math.max(bounds.x + bounds.width, preferredSize.width);
|
||||
preferredSize.height = Math.max(bounds.y + bounds.height, preferredSize.height);
|
||||
}
|
||||
Insets insets = getInsets();
|
||||
preferredSize.width += insets.right;
|
||||
preferredSize.height += insets.bottom;
|
||||
setMinimumSize(preferredSize);
|
||||
setPreferredSize(preferredSize);
|
||||
}
|
||||
// JFormDesigner - End of component initialization //GEN-END:initComponents @formatter:on
|
||||
|
||||
}
|
||||
|
||||
// JFormDesigner - Variables declaration - DO NOT MODIFY //GEN-BEGIN:variables @formatter:off
|
||||
private JScrollPane scrollPane1;
|
||||
private JTable table1;
|
||||
private JButton button1;
|
||||
private JTextField textField1;
|
||||
private JButton button2;
|
||||
// JFormDesigner - End of variables declaration //GEN-END:variables @formatter:on
|
||||
}
|
||||
|
|
@ -0,0 +1,103 @@
|
|||
JFDML JFormDesigner: "9.0.0.0.352" Java: "21.0.6" encoding: "UTF-8"
|
||||
|
||||
new FormModel {
|
||||
contentType: "form/swing"
|
||||
root: new FormRoot {
|
||||
add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class com.jformdesigner.runtime.NullLayout ) ) {
|
||||
name: "this"
|
||||
add( new FormContainer( "javax.swing.JScrollPane", new FormLayoutManager( class javax.swing.JScrollPane ) ) {
|
||||
name: "scrollPane1"
|
||||
add( new FormComponent( "javax.swing.JTable" ) {
|
||||
name: "table1"
|
||||
"model": new com.jformdesigner.model.SwingTableModel( new java.util.Vector {
|
||||
add( new java.util.Vector {
|
||||
add( null )
|
||||
add( null )
|
||||
add( "" )
|
||||
add( null )
|
||||
add( null )
|
||||
add( null )
|
||||
add( null )
|
||||
} )
|
||||
add( new java.util.Vector {
|
||||
add( null )
|
||||
add( null )
|
||||
add( null )
|
||||
add( null )
|
||||
add( null )
|
||||
add( null )
|
||||
add( null )
|
||||
} )
|
||||
}, new java.util.Vector {
|
||||
add( "账号信息" )
|
||||
add( "角色ID" )
|
||||
add( "角色名" )
|
||||
add( "怪物ID" )
|
||||
add( "怪物名" )
|
||||
add( "击杀数量" )
|
||||
add( "最大杀怪数量" )
|
||||
}, new java.util.Vector {
|
||||
add( null )
|
||||
add( null )
|
||||
add( null )
|
||||
add( null )
|
||||
add( null )
|
||||
add( null )
|
||||
add( null )
|
||||
}, new java.util.Vector {
|
||||
add( false )
|
||||
add( false )
|
||||
add( false )
|
||||
add( null )
|
||||
add( false )
|
||||
add( null )
|
||||
add( null )
|
||||
}, new java.util.Vector {
|
||||
add( null )
|
||||
add( null )
|
||||
add( null )
|
||||
add( null )
|
||||
add( null )
|
||||
add( null )
|
||||
add( null )
|
||||
} )
|
||||
} )
|
||||
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
|
||||
"x": 10
|
||||
"y": 10
|
||||
"width": 1285
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JButton" ) {
|
||||
name: "button1"
|
||||
"text": "载入杀怪统计"
|
||||
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "载入杀怪统计", true ) )
|
||||
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
|
||||
"x": 10
|
||||
"y": 455
|
||||
"width": 260
|
||||
"height": 50
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JTextField" ) {
|
||||
name: "textField1"
|
||||
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
|
||||
"x": 295
|
||||
"y": 455
|
||||
"width": 245
|
||||
"height": 50
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JButton" ) {
|
||||
name: "button2"
|
||||
"text": "搜索"
|
||||
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "搜索", true ) )
|
||||
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
|
||||
"x": 565
|
||||
"y": 455
|
||||
"width": 260
|
||||
"height": 50
|
||||
} )
|
||||
}, new FormLayoutConstraints( null ) {
|
||||
"location": new java.awt.Point( 0, 0 )
|
||||
"size": new java.awt.Dimension( 1525, 700 )
|
||||
} )
|
||||
}
|
||||
}
|
||||
|
|
@ -9,6 +9,14 @@ public class UI_LenheartUI {
|
|||
private JPanel 爆率控制页面;
|
||||
private JPanel 战力控制页面;
|
||||
private JPanel 爆物管理页面;
|
||||
private JPanel 钓鱼管理页面;
|
||||
private JPanel 自动访问NPC页面;
|
||||
private JPanel 杀怪统计页面;
|
||||
private JPanel 掉落捡取提示;
|
||||
private JPanel 野外BOSS页面;
|
||||
private JPanel 专用功能页面;
|
||||
|
||||
|
||||
|
||||
public UI_LenheartUI(JTabbedPane mainComponent) {
|
||||
物品回收页面 = new ItemRecovery();
|
||||
|
|
@ -16,11 +24,23 @@ public class UI_LenheartUI {
|
|||
爆率控制页面 = new DropControl();
|
||||
战力控制页面 = new FightControl();
|
||||
爆物管理页面 = new ExplosiveControl();
|
||||
钓鱼管理页面 = new Fishing();
|
||||
自动访问NPC页面 = new AutoScriptNpc();
|
||||
杀怪统计页面 = new KillMonsterStatistics();
|
||||
掉落捡取提示 = new DropTips();
|
||||
野外BOSS页面 = new WorldBoss();
|
||||
专用功能页面 = new zygn();
|
||||
|
||||
mainComponent.addTab("物品回收设置", 物品回收页面);
|
||||
mainComponent.addTab("伤害控制设置", 伤害控制页面);
|
||||
mainComponent.addTab("爆率 & 鞭尸控制设置", 爆率控制页面);
|
||||
mainComponent.addTab("战力控制设置", 战力控制页面);
|
||||
mainComponent.addTab("爆物管理设置", 爆物管理页面);
|
||||
// mainComponent.addTab("专用功能", 专用功能页面);
|
||||
mainComponent.addTab("多倍爆率经验 & 鞭尸设置", 爆率控制页面);
|
||||
mainComponent.addTab("掉落捡取提示 & 公告通知", 掉落捡取提示);
|
||||
mainComponent.addTab("转生战力 & 伤害显示设置", 战力控制页面);
|
||||
mainComponent.addTab("物品自动回收设置", 物品回收页面);
|
||||
mainComponent.addTab("自动访问NPC设置", 自动访问NPC页面);
|
||||
mainComponent.addTab("特殊属性伤害设置", 伤害控制页面);
|
||||
mainComponent.addTab("钓鱼管理设置", 钓鱼管理页面);
|
||||
mainComponent.addTab("怪物爆率设置", 爆物管理页面);
|
||||
mainComponent.addTab("野外BOSS刷新设置", 野外BOSS页面);
|
||||
mainComponent.addTab("杀怪统计查看", 杀怪统计页面);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,150 @@
|
|||
/*
|
||||
* Created by JFormDesigner on Tue Apr 15 19:19:53 CST 2025
|
||||
*/
|
||||
|
||||
package gui.UI_LenheartUI;
|
||||
|
||||
import java.awt.event.*;
|
||||
import gui.Start;
|
||||
import gui.特殊控制台;
|
||||
import server.BossInMap;
|
||||
|
||||
import java.awt.*;
|
||||
import javax.swing.*;
|
||||
import javax.swing.table.*;
|
||||
|
||||
/**
|
||||
* @author dongj
|
||||
*/
|
||||
public class WorldBoss extends JPanel {
|
||||
public WorldBoss() {
|
||||
initComponents();
|
||||
}
|
||||
|
||||
private void 新增(ActionEvent e) {
|
||||
// TODO add your code here
|
||||
DefaultTableModel tableModel = (DefaultTableModel)this.table1.getModel();
|
||||
Object[] rowData = {0,0,0,0,0,0,0};
|
||||
tableModel.addRow(rowData);
|
||||
}
|
||||
|
||||
private void 删除(ActionEvent e) {
|
||||
// TODO add your code here
|
||||
int selectedRow = table1.getSelectedRow();
|
||||
if (selectedRow != -1) {
|
||||
DefaultTableModel tableModel = (DefaultTableModel) table1.getModel();
|
||||
int id = Integer.valueOf(tableModel.getValueAt(selectedRow, 2).toString());
|
||||
Start.diaoLuoTiShis.remove(id);
|
||||
tableModel.removeRow(selectedRow);
|
||||
if(tableModel.getRowCount() > selectedRow)table1.setRowSelectionInterval(selectedRow, selectedRow);
|
||||
}
|
||||
}
|
||||
|
||||
private void 保存配置(ActionEvent e) {
|
||||
// TODO add your code here
|
||||
DefaultTableModel tableModel = (DefaultTableModel) table1.getModel();
|
||||
int rowCount = tableModel.getRowCount();
|
||||
Start.野外boss刷新.clear();
|
||||
for (int i = 0; i < rowCount; i++) {
|
||||
BossInMap bossInMap = new BossInMap(Integer.parseInt(tableModel.getValueAt(i, 0).toString()),
|
||||
Integer.parseInt(tableModel.getValueAt(i, 2).toString()),
|
||||
Integer.parseInt(tableModel.getValueAt(i, 3).toString()),
|
||||
Integer.parseInt(tableModel.getValueAt(i, 4).toString()),
|
||||
tableModel.getValueAt(i, 5).toString(),
|
||||
Integer.parseInt(tableModel.getValueAt(i, 6).toString()));
|
||||
bossInMap.setBosshp(tableModel.getValueAt(i, 1).toString());
|
||||
Start.野外boss刷新.add(bossInMap);
|
||||
}
|
||||
特殊控制台.setTwConfig();
|
||||
}
|
||||
|
||||
private void initComponents() {
|
||||
// JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents @formatter:off
|
||||
scrollPane1 = new JScrollPane();
|
||||
table1 = new JTable();
|
||||
button1 = new JButton();
|
||||
button2 = new JButton();
|
||||
button3 = new JButton();
|
||||
|
||||
//======== this ========
|
||||
setLayout(null);
|
||||
|
||||
//======== scrollPane1 ========
|
||||
{
|
||||
|
||||
//---- table1 ----
|
||||
table1.setModel(new DefaultTableModel(
|
||||
new Object[][] {
|
||||
{null, null, null, null, null, null, null},
|
||||
{null, null, null, null, null, null, null},
|
||||
},
|
||||
new String[] {
|
||||
"\u91ce\u5916BOSS", "\u8840\u91cf(\u4ebf)", "\u5730\u56fe\u4ee3\u7801", "X\u5750\u6807", "Y\u5750\u6807", "\u8bf4\u660e", "\u5237\u65b0\u95f4\u9694/\u5206"
|
||||
}
|
||||
));
|
||||
scrollPane1.setViewportView(table1);
|
||||
}
|
||||
add(scrollPane1);
|
||||
scrollPane1.setBounds(15, 10, 1245, 575);
|
||||
|
||||
//---- button1 ----
|
||||
button1.setText("\u65b0\u589e");
|
||||
button1.addActionListener(e -> 新增(e));
|
||||
add(button1);
|
||||
button1.setBounds(145, 615, 175, 50);
|
||||
|
||||
//---- button2 ----
|
||||
button2.setText("\u5220\u9664");
|
||||
button2.addActionListener(e -> 删除(e));
|
||||
add(button2);
|
||||
button2.setBounds(487, 615, 175, 50);
|
||||
|
||||
//---- button3 ----
|
||||
button3.setText("\u4fdd\u5b58\u914d\u7f6e");
|
||||
button3.addActionListener(e -> 保存配置(e));
|
||||
add(button3);
|
||||
button3.setBounds(829, 615, 175, 50);
|
||||
|
||||
{
|
||||
// compute preferred size
|
||||
Dimension preferredSize = new Dimension();
|
||||
for(int i = 0; i < getComponentCount(); i++) {
|
||||
Rectangle bounds = getComponent(i).getBounds();
|
||||
preferredSize.width = Math.max(bounds.x + bounds.width, preferredSize.width);
|
||||
preferredSize.height = Math.max(bounds.y + bounds.height, preferredSize.height);
|
||||
}
|
||||
Insets insets = getInsets();
|
||||
preferredSize.width += insets.right;
|
||||
preferredSize.height += insets.bottom;
|
||||
setMinimumSize(preferredSize);
|
||||
setPreferredSize(preferredSize);
|
||||
}
|
||||
// JFormDesigner - End of component initialization //GEN-END:initComponents @formatter:on
|
||||
|
||||
|
||||
DefaultTableModel tableModel = (DefaultTableModel)this.table1.getModel();
|
||||
tableModel.setRowCount(0);
|
||||
// 创建一个自定义的单元格渲染器,用于右对齐字符串
|
||||
DefaultTableCellRenderer rightRenderer = new DefaultTableCellRenderer();
|
||||
rightRenderer.setHorizontalAlignment(JLabel.RIGHT);
|
||||
// 遍历表格的所有列,将字符串类型的列设置为右对齐
|
||||
for (int i = 0; i < table1.getColumnCount(); i++) {
|
||||
if (table1.getColumnClass(i) == String.class) {
|
||||
table1.getColumnModel().getColumn(i).setCellRenderer(rightRenderer);
|
||||
}
|
||||
}
|
||||
|
||||
for (BossInMap bossInMap : Start.野外boss刷新) {
|
||||
Object[] rowData = {bossInMap.getMobid(),bossInMap.getBosshp(),bossInMap.getMap(),bossInMap.getX(),bossInMap.getY(),bossInMap.getMsg(),bossInMap.getTime()};
|
||||
tableModel.addRow(rowData);
|
||||
}
|
||||
}
|
||||
|
||||
// JFormDesigner - Variables declaration - DO NOT MODIFY //GEN-BEGIN:variables @formatter:off
|
||||
private JScrollPane scrollPane1;
|
||||
private JTable table1;
|
||||
private JButton button1;
|
||||
private JButton button2;
|
||||
private JButton button3;
|
||||
// JFormDesigner - End of variables declaration //GEN-END:variables @formatter:on
|
||||
}
|
||||
|
|
@ -0,0 +1,106 @@
|
|||
JFDML JFormDesigner: "9.0.0.0.352" Java: "21.0.6" encoding: "UTF-8"
|
||||
|
||||
new FormModel {
|
||||
contentType: "form/swing"
|
||||
root: new FormRoot {
|
||||
add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class com.jformdesigner.runtime.NullLayout ) ) {
|
||||
name: "this"
|
||||
add( new FormContainer( "javax.swing.JScrollPane", new FormLayoutManager( class javax.swing.JScrollPane ) ) {
|
||||
name: "scrollPane1"
|
||||
add( new FormComponent( "javax.swing.JTable" ) {
|
||||
name: "table1"
|
||||
"model": new com.jformdesigner.model.SwingTableModel( new java.util.Vector {
|
||||
add( new java.util.Vector {
|
||||
add( null )
|
||||
add( null )
|
||||
add( null )
|
||||
add( null )
|
||||
add( null )
|
||||
add( null )
|
||||
add( null )
|
||||
} )
|
||||
add( new java.util.Vector {
|
||||
add( null )
|
||||
add( null )
|
||||
add( null )
|
||||
add( null )
|
||||
add( null )
|
||||
add( null )
|
||||
add( null )
|
||||
} )
|
||||
}, new java.util.Vector {
|
||||
add( "野外BOSS" )
|
||||
add( "血量(亿)" )
|
||||
add( "地图代码" )
|
||||
add( "X坐标" )
|
||||
add( "Y坐标" )
|
||||
add( "说明" )
|
||||
add( "刷新间隔/分" )
|
||||
}, new java.util.Vector {
|
||||
add( null )
|
||||
add( null )
|
||||
add( null )
|
||||
add( null )
|
||||
add( null )
|
||||
add( null )
|
||||
add( null )
|
||||
}, new java.util.Vector {
|
||||
add( null )
|
||||
add( null )
|
||||
add( null )
|
||||
add( null )
|
||||
add( null )
|
||||
add( null )
|
||||
add( null )
|
||||
}, new java.util.Vector {
|
||||
add( null )
|
||||
add( null )
|
||||
add( null )
|
||||
add( null )
|
||||
add( null )
|
||||
add( null )
|
||||
add( null )
|
||||
} )
|
||||
} )
|
||||
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
|
||||
"x": 15
|
||||
"y": 10
|
||||
"width": 1245
|
||||
"height": 575
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JButton" ) {
|
||||
name: "button1"
|
||||
"text": "新增"
|
||||
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "新增", true ) )
|
||||
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
|
||||
"x": 145
|
||||
"y": 615
|
||||
"width": 175
|
||||
"height": 50
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JButton" ) {
|
||||
name: "button2"
|
||||
"text": "删除"
|
||||
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "删除", true ) )
|
||||
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
|
||||
"width": 175
|
||||
"height": 50
|
||||
"x": 487
|
||||
"y": 615
|
||||
} )
|
||||
add( new FormComponent( "javax.swing.JButton" ) {
|
||||
name: "button3"
|
||||
"text": "保存配置"
|
||||
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "保存配置", true ) )
|
||||
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
|
||||
"width": 175
|
||||
"height": 50
|
||||
"x": 829
|
||||
"y": 615
|
||||
} )
|
||||
}, new FormLayoutConstraints( null ) {
|
||||
"location": new java.awt.Point( 0, 0 )
|
||||
"size": new java.awt.Dimension( 1310, 730 )
|
||||
} )
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,45 @@
|
|||
/*
|
||||
* Created by JFormDesigner on Tue Apr 15 20:20:15 CST 2025
|
||||
*/
|
||||
|
||||
package gui.UI_LenheartUI;
|
||||
|
||||
import java.awt.*;
|
||||
import javax.swing.*;
|
||||
import javax.swing.border.Border;
|
||||
|
||||
/**
|
||||
* @author dongj
|
||||
*/
|
||||
public class zygn extends JPanel {
|
||||
public zygn() {
|
||||
initComponents();
|
||||
}
|
||||
|
||||
private void initComponents() {
|
||||
// JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents @formatter:off
|
||||
|
||||
//======== this ========
|
||||
setLayout(null);
|
||||
|
||||
{
|
||||
// compute preferred size
|
||||
Dimension preferredSize = new Dimension();
|
||||
for(int i = 0; i < getComponentCount(); i++) {
|
||||
Rectangle bounds = getComponent(i).getBounds();
|
||||
preferredSize.width = Math.max(bounds.x + bounds.width, preferredSize.width);
|
||||
preferredSize.height = Math.max(bounds.y + bounds.height, preferredSize.height);
|
||||
}
|
||||
Insets insets = getInsets();
|
||||
preferredSize.width += insets.right;
|
||||
preferredSize.height += insets.bottom;
|
||||
setMinimumSize(preferredSize);
|
||||
setPreferredSize(preferredSize);
|
||||
}
|
||||
// JFormDesigner - End of component initialization //GEN-END:initComponents @formatter:on
|
||||
|
||||
}
|
||||
|
||||
// JFormDesigner - Variables declaration - DO NOT MODIFY //GEN-BEGIN:variables @formatter:off
|
||||
// JFormDesigner - End of variables declaration //GEN-END:variables @formatter:on
|
||||
}
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
JFDML JFormDesigner: "9.0.0.0.352" Java: "21.0.6" encoding: "UTF-8"
|
||||
|
||||
new FormModel {
|
||||
contentType: "form/swing"
|
||||
root: new FormRoot {
|
||||
add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class com.jformdesigner.runtime.NullLayout ) ) {
|
||||
name: "this"
|
||||
}, new FormLayoutConstraints( null ) {
|
||||
"location": new java.awt.Point( 0, 0 )
|
||||
"size": new java.awt.Dimension( 400, 300 )
|
||||
} )
|
||||
}
|
||||
}
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
package gui;
|
||||
/*
|
||||
QQ116711496
|
||||
QQ634322220
|
||||
*/
|
||||
|
||||
import java.lang.management.ManagementFactory;
|
||||
|
|
@ -879,7 +879,7 @@ public class ppms extends JFrame {
|
|||
@Override
|
||||
public void run() {
|
||||
new ppms().setVisible(true);
|
||||
System.out.println("[正在启动贪玩冒险岛服务端]");
|
||||
System.out.println("[准备启动服务端]");
|
||||
}
|
||||
});
|
||||
|
||||
|
|
@ -895,7 +895,9 @@ public class ppms extends JFrame {
|
|||
this.商店物品序号 = -1;
|
||||
this.读取装备 = null;
|
||||
this.minutesLeft = 0;
|
||||
this.setTitle("【" + Game.服务端名称 + "控制台】 -2024完事大吉!");
|
||||
//this.setTitle( Game.服务端名称 + " - 贪玩");
|
||||
this.setTitle("贪玩专属服务端 - QQ634322220");
|
||||
//this.setTitle("Max44服务端");
|
||||
this.initComponents();
|
||||
final ppStream mps = new ppStream((OutputStream) System.out, ppms.outSee);
|
||||
System.setOut((PrintStream) mps);
|
||||
|
|
@ -1627,10 +1629,10 @@ public class ppms extends JFrame {
|
|||
ppms.outSee.setEditable(false);
|
||||
ppms.outSee.setBackground(new Color(25, 25, 25));
|
||||
ppms.outSee.setColumns(20);
|
||||
ppms.outSee.setForeground(new Color(10, 255, 221));
|
||||
ppms.outSee.setForeground(new Color(50, 205, 50));
|
||||
ppms.outSee.setRows(5);
|
||||
this.jScrollPane1.setViewportView((Component) ppms.outSee);
|
||||
ppms.主界面菜单.addTab("日志记录", (Icon) new ImageIcon(this.getClass().getResource("/image/日志.png")), (Component) this.jScrollPane1);
|
||||
ppms.主界面菜单.addTab("日志输出", (Icon) new ImageIcon(this.getClass().getResource("/image/成长日志.png")), (Component) this.jScrollPane1);
|
||||
ppms.jPanel44.setBorder((Border) BorderFactory.createTitledBorder("数据库设置[一般无需调整]"));
|
||||
this.jLabel16.setText("数据库名称");
|
||||
this.jLabel17.setText("IP地址");
|
||||
|
|
@ -4704,8 +4706,8 @@ public class ppms extends JFrame {
|
|||
jPanel24Layout.setVerticalGroup((Group) jPanel24Layout.createParallelGroup(Alignment.LEADING).addGroup((Group) jPanel24Layout.createSequentialGroup().addContainerGap().addGroup((Group) jPanel24Layout.createParallelGroup(Alignment.LEADING, false).addComponent((Component) this.jPanel31, -1, -1, 32767).addComponent((Component) this.jPanel29, -1, -1, 32767)).addContainerGap(51, 32767)));
|
||||
this.宠吸功能面板.addTab("多倍怪物", (Component) this.jPanel24);
|
||||
this.jPanel34.setBorder((Border) BorderFactory.createTitledBorder("野外BOSS刷新"));
|
||||
ppms.野外BOSS刷新时间.setModel((TableModel) new DefaultTableModel(new Object[0][], new String[]{"野外BOSS", "地图代码", "横坐标", "纵坐标", "说明", "刷新间隔/分"}) {
|
||||
boolean[] canEdit = {false, false, false, false, false, false};
|
||||
ppms.野外BOSS刷新时间.setModel((TableModel) new DefaultTableModel(new Object[0][], new String[]{"野外BOSS", "血量(百万)", "地图代码", "横坐标", "纵坐标", "说明", "刷新间隔/分"}) {
|
||||
boolean[] canEdit = {false,false, false, false, false, false, false};
|
||||
|
||||
@Override
|
||||
public boolean isCellEditable(final int rowIndex, final int columnIndex) {
|
||||
|
|
@ -4769,7 +4771,7 @@ public class ppms extends JFrame {
|
|||
this.jPanel33.setLayout((LayoutManager) jPanel33Layout);
|
||||
jPanel33Layout.setHorizontalGroup((Group) jPanel33Layout.createParallelGroup(Alignment.LEADING).addGroup((Group) jPanel33Layout.createSequentialGroup().addContainerGap().addComponent((Component) this.jPanel34, -2, -1, -2).addContainerGap(448, 32767)));
|
||||
jPanel33Layout.setVerticalGroup((Group) jPanel33Layout.createParallelGroup(Alignment.LEADING).addGroup((Group) jPanel33Layout.createSequentialGroup().addContainerGap().addComponent((Component) this.jPanel34, -2, -1, -2).addContainerGap(106, 32767)));
|
||||
this.宠吸功能面板.addTab("boss刷新", (Component) this.jPanel33);
|
||||
// this.宠吸功能面板.addTab("boss刷新", (Component) this.jPanel33);
|
||||
this.jPanel82.setBorder((Border) BorderFactory.createTitledBorder("自建NPC清理"));
|
||||
ppms.自建NPC列表.setModel((TableModel) new DefaultTableModel(new Object[0][], new String[]{"NPC ID", "所在地图"}) {
|
||||
boolean[] canEdit = {false, false};
|
||||
|
|
@ -5080,6 +5082,7 @@ public class ppms extends JFrame {
|
|||
}
|
||||
});
|
||||
this.jLabel1188.setText("BOSS支持吸金吸物开关");
|
||||
ppms.BOSS支持吸金吸物开关.setSelected(Start.bossxw == 1 ? true : false);
|
||||
ppms.BOSS支持吸金吸物开关.setIcon((Icon) new ImageIcon(this.getClass().getResource("/image/OFF2.png")));
|
||||
ppms.BOSS支持吸金吸物开关.setBorderPainted(false);
|
||||
ppms.BOSS支持吸金吸物开关.setContentAreaFilled(false);
|
||||
|
|
@ -5477,7 +5480,7 @@ public class ppms extends JFrame {
|
|||
this.jPanel90.setLayout((LayoutManager) jPanel90Layout);
|
||||
jPanel90Layout.setHorizontalGroup((Group) jPanel90Layout.createParallelGroup(Alignment.LEADING).addGroup((Group) jPanel90Layout.createSequentialGroup().addContainerGap().addComponent((Component) this.jPanel91, -2, -1, -2).addPreferredGap(ComponentPlacement.UNRELATED).addComponent((Component) this.jPanel92, -2, -1, -2).addContainerGap(296, 32767)));
|
||||
jPanel90Layout.setVerticalGroup((Group) jPanel90Layout.createParallelGroup(Alignment.LEADING).addGroup((Group) jPanel90Layout.createSequentialGroup().addContainerGap().addGroup((Group) jPanel90Layout.createParallelGroup(Alignment.LEADING, false).addComponent((Component) this.jPanel91, -1, -1, 32767).addComponent((Component) this.jPanel92, -1, -1, 32767)).addContainerGap(88, 32767)));
|
||||
this.宠吸功能面板.addTab("套装属性", (Component) this.jPanel90);
|
||||
//this.宠吸功能面板.addTab("套装属性", (Component) this.jPanel90);
|
||||
this.jPanel59.setBorder((Border) BorderFactory.createTitledBorder("重载功能"));
|
||||
this.重载副本.setText("重载副本");
|
||||
this.重载副本.addActionListener((ActionListener) new ActionListener() {
|
||||
|
|
@ -5588,19 +5591,19 @@ public class ppms extends JFrame {
|
|||
this.jPanel2.setLayout((LayoutManager) jPanel2Layout);
|
||||
jPanel2Layout.setHorizontalGroup((Group) jPanel2Layout.createParallelGroup(Alignment.LEADING).addGroup((Group) jPanel2Layout.createSequentialGroup().addComponent((Component) this.宠吸功能面板, -2, 1495, 32767).addContainerGap()));
|
||||
jPanel2Layout.setVerticalGroup((Group) jPanel2Layout.createParallelGroup(Alignment.LEADING).addGroup((Group) jPanel2Layout.createSequentialGroup().addComponent((Component) this.宠吸功能面板, -2, 723, -2).addGap(0, 19, 32767)));
|
||||
ppms.主界面菜单.addTab("游戏设置", (Icon) new ImageIcon(this.getClass().getResource("/image/设置.png")), (Component) this.jPanel2);
|
||||
ppms.主界面菜单.addTab("游戏设置", (Icon) new ImageIcon(this.getClass().getResource("/image/管理.png")), (Component) this.jPanel2);
|
||||
|
||||
this.jPanel38.setBorder((Border) BorderFactory.createTitledBorder("经验金币爆率活动"));
|
||||
this.jPanel40.setBorder((Border) BorderFactory.createTitledBorder(""));
|
||||
this.jLabel87.setText("倍率设置");
|
||||
this.倍率设置.setText("输入数字");
|
||||
this.倍率设置.setText("");
|
||||
this.倍率设置.addActionListener((ActionListener) new ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(final ActionEvent evt) {
|
||||
ppms.this.倍率设置ActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
this.持续时间时.setText("输入数字");
|
||||
this.持续时间时.setText("");
|
||||
this.持续时间时.addActionListener((ActionListener) new ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(final ActionEvent evt) {
|
||||
|
|
@ -5609,8 +5612,8 @@ public class ppms extends JFrame {
|
|||
});
|
||||
this.jLabel95.setText("持续时间:/时");
|
||||
this.jLabel144.setText("持续时间:/分");
|
||||
this.持续时间分.setText("输入数字");
|
||||
this.jLabel98.setText("启动按钮");
|
||||
this.持续时间分.setText("");
|
||||
this.jLabel98.setText("");
|
||||
this.开启倍率活动.setText("开启倍率活动");
|
||||
this.开启倍率活动.addActionListener((ActionListener) new ActionListener() {
|
||||
@Override
|
||||
|
|
@ -5638,14 +5641,14 @@ public class ppms extends JFrame {
|
|||
ppms.this.发放道具代码ActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
this.jLabel150.setText("输入数量");
|
||||
this.发放道具数量.setText("输入数字");
|
||||
this.jLabel150.setText("道具数量");
|
||||
this.发放道具数量.setText("输入数量");
|
||||
this.jLabel151.setText("发放范围");
|
||||
this.发放道具发放范围.setModel(new DefaultComboBoxModel(new String[]{"发放全服", "发放个人"}));
|
||||
this.jLabel152.setText("玩家名字");
|
||||
this.发放个人玩家名字.setText("输入玩家名字");
|
||||
this.发放个人玩家名字.setText("请输入玩家名字");
|
||||
this.发放个人玩家名字.setEnabled(false);
|
||||
this.jLabel153.setText("点击发放");
|
||||
this.jLabel153.setText("");
|
||||
this.发放道具.setText("发放道具");
|
||||
this.发放道具.addActionListener((ActionListener) new ActionListener() {
|
||||
@Override
|
||||
|
|
@ -5664,15 +5667,15 @@ public class ppms extends JFrame {
|
|||
this.jPanel43.setBorder((Border) BorderFactory.createTitledBorder("发放点券抵用金币"));
|
||||
this.jPanel45.setBorder((Border) BorderFactory.createTitledBorder(""));
|
||||
this.jLabel154.setText("发放数量");
|
||||
this.发放其他数量.setText("输入数字");
|
||||
this.发放其他数量.setText("输入数量");
|
||||
this.jLabel155.setText("发放范围");
|
||||
this.发放其他范围.setModel(new DefaultComboBoxModel(new String[]{"发放全服", "发放个人"}));
|
||||
this.jLabel156.setText("玩家名字");
|
||||
this.jLabel158.setText("选择类型");
|
||||
this.发放其他类型.setModel(new DefaultComboBoxModel(new String[]{"发放点券", "发放抵用", "发放金币"}));
|
||||
this.发放其他玩家.setText("输入玩家名字");
|
||||
this.发放其他玩家.setText("请输入玩家名字");
|
||||
this.发放其他玩家.setEnabled(false);
|
||||
this.jLabel159.setText("点击发放");
|
||||
this.jLabel159.setText("");
|
||||
this.发放其他内容.setText("发放内容");
|
||||
this.发放其他内容.addActionListener((ActionListener) new ActionListener() {
|
||||
@Override
|
||||
|
|
@ -5692,9 +5695,9 @@ public class ppms extends JFrame {
|
|||
this.jPanel5.setLayout((LayoutManager) jPanel5Layout);
|
||||
jPanel5Layout.setHorizontalGroup((Group) jPanel5Layout.createParallelGroup(Alignment.LEADING).addGroup((Group) jPanel5Layout.createSequentialGroup().addContainerGap().addComponent((Component) this.jPanel38, -2, -1, -2).addGap(10, 10, 10).addComponent((Component) this.jPanel41, -2, -1, -2).addPreferredGap(ComponentPlacement.UNRELATED).addComponent((Component) this.jPanel43, -2, -1, -2).addContainerGap(-1, 32767)));
|
||||
jPanel5Layout.setVerticalGroup((Group) jPanel5Layout.createParallelGroup(Alignment.LEADING).addGroup((Group) jPanel5Layout.createSequentialGroup().addContainerGap().addGroup((Group) jPanel5Layout.createParallelGroup(Alignment.LEADING).addComponent((Component) this.jPanel43, -2, -1, -2).addGroup((Group) jPanel5Layout.createParallelGroup(Alignment.LEADING, false).addComponent((Component) this.jPanel41, -1, -1, 32767).addComponent((Component) this.jPanel38, -1, -1, 32767))).addContainerGap(579, 32767)));
|
||||
ppms.主界面菜单.addTab("专用功能", (Icon) new ImageIcon(this.getClass().getResource("/image/问题.png")), (Component) this.jPanel5);
|
||||
// ppms.主界面菜单.addTab("专用功能", (Icon) new ImageIcon(this.getClass().getResource("/image/问题.png")), (Component) this.jPanel5);
|
||||
this.jPanel78.setBorder((Border) BorderFactory.createTitledBorder("充值赞助"));
|
||||
this.充值赞助列表.setModel((TableModel) new DefaultTableModel(new Object[0][], new String[]{"角色ID", "玩家名字", "每日充值", "累计充值", "剩余积分", "可用点券"}) {
|
||||
this.充值赞助列表.setModel((TableModel) new DefaultTableModel(new Object[0][], new String[]{"角色ID", "玩家名字", "每日充值", "累计充值", "元宝", "积分"}) {
|
||||
boolean[] canEdit = {false, false, false, false, false, false};
|
||||
|
||||
@Override
|
||||
|
|
@ -5716,7 +5719,7 @@ public class ppms extends JFrame {
|
|||
this.jLabel176.setText("角色ID:");
|
||||
this.jLabel177.setText("每日充值:");
|
||||
this.jLabel178.setText("累计充值:");
|
||||
this.jLabel179.setText("剩余积分:");
|
||||
this.jLabel179.setText("元宝:");
|
||||
this.充值角色ID.setText(" ");
|
||||
this.充值角色ID.setEnabled(false);
|
||||
this.充值角色ID.addActionListener((ActionListener) new ActionListener() {
|
||||
|
|
@ -5733,7 +5736,7 @@ public class ppms extends JFrame {
|
|||
this.现有累计充值.setEnabled(false);
|
||||
this.现有剩余积分.setText(" ");
|
||||
this.现有剩余积分.setEnabled(false);
|
||||
this.jLabel183.setText("可用点券:");
|
||||
this.jLabel183.setText("积分:");
|
||||
this.现有可用点券.setText(" ");
|
||||
this.现有可用点券.setEnabled(false);
|
||||
this.现有可用点券.addActionListener((ActionListener) new ActionListener() {
|
||||
|
|
@ -5744,9 +5747,9 @@ public class ppms extends JFrame {
|
|||
});
|
||||
this.jLabel166.setText("每日充值");
|
||||
this.jLabel168.setText("累计充值");
|
||||
this.jLabel170.setText("剩余积分");
|
||||
this.jLabel171.setText("可用点券");
|
||||
this.jLabel105.setText("点券比例");
|
||||
this.jLabel170.setText("元宝");
|
||||
this.jLabel171.setText("积分");
|
||||
this.jLabel105.setText("积分比例");
|
||||
ppms.点券比例.addFocusListener((FocusListener) new FocusAdapter() {
|
||||
@Override
|
||||
public void focusLost(final FocusEvent evt) {
|
||||
|
|
@ -5759,15 +5762,15 @@ public class ppms extends JFrame {
|
|||
ppms.this.点券比例ActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
this.jLabel115.setText("发放金额:");
|
||||
this.发放充值数量.setText("输入数字");
|
||||
this.jLabel115.setText("充值金额:");
|
||||
this.发放充值数量.setText("");
|
||||
this.发放充值数量.addActionListener((ActionListener) new ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(final ActionEvent evt) {
|
||||
ppms.this.发放充值数量ActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
this.发放氪金充值.setText("发放内容");
|
||||
this.发放氪金充值.setText("进行充值");
|
||||
this.发放氪金充值.addActionListener((ActionListener) new ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(final ActionEvent evt) {
|
||||
|
|
@ -5784,7 +5787,7 @@ public class ppms extends JFrame {
|
|||
jPanel86Layout.setVerticalGroup((Group) jPanel86Layout.createParallelGroup(Alignment.LEADING).addGroup((Group) jPanel86Layout.createSequentialGroup().addContainerGap().addComponent((Component) this.jButton1).addPreferredGap(ComponentPlacement.UNRELATED).addComponent((Component) this.jPanel87, -1, -1, 32767).addContainerGap()));
|
||||
this.jPanel96.setBorder((Border) BorderFactory.createTitledBorder("搜索功能"));
|
||||
this.jLabel213.setText("通过ID查询");
|
||||
this.氪金ID输入.setText("输入数字");
|
||||
this.氪金ID输入.setText("");
|
||||
this.氪金ID输入.addActionListener((ActionListener) new ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(final ActionEvent evt) {
|
||||
|
|
@ -5799,7 +5802,7 @@ public class ppms extends JFrame {
|
|||
}
|
||||
});
|
||||
this.jLabel214.setText("通过名字查询");
|
||||
this.氪金名字输入.setText("输入名字");
|
||||
this.氪金名字输入.setText("");
|
||||
this.氪金名字输入.addActionListener((ActionListener) new ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(final ActionEvent evt) {
|
||||
|
|
@ -5820,7 +5823,7 @@ public class ppms extends JFrame {
|
|||
ppms.this.氪金机器码查询ActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
this.氪金机器码输入.setText("输入机器码");
|
||||
this.氪金机器码输入.setText("");
|
||||
this.氪金机器码输入.addActionListener((ActionListener) new ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(final ActionEvent evt) {
|
||||
|
|
@ -5833,7 +5836,7 @@ public class ppms extends JFrame {
|
|||
jPanel96Layout.setHorizontalGroup((Group) jPanel96Layout.createParallelGroup(Alignment.LEADING).addGroup((Group) jPanel96Layout.createSequentialGroup().addContainerGap().addGroup((Group) jPanel96Layout.createParallelGroup(Alignment.LEADING).addGroup((Group) jPanel96Layout.createSequentialGroup().addGroup((Group) jPanel96Layout.createParallelGroup(Alignment.LEADING).addComponent((Component) this.jLabel213).addComponent((Component) this.jLabel214).addComponent((Component) this.jLabel215)).addContainerGap(-1, 32767)).addGroup(Alignment.TRAILING, (Group) jPanel96Layout.createSequentialGroup().addGroup((Group) jPanel96Layout.createParallelGroup(Alignment.TRAILING).addGroup((Group) jPanel96Layout.createSequentialGroup().addComponent((Component) this.氪金机器码输入, -2, 118, -2).addPreferredGap(ComponentPlacement.RELATED, -1, 32767).addComponent((Component) this.氪金机器码查询, -2, 178, -2)).addGroup(Alignment.LEADING, (Group) jPanel96Layout.createSequentialGroup().addComponent((Component) this.氪金ID输入, -2, 118, -2).addPreferredGap(ComponentPlacement.RELATED, -1, 32767).addComponent((Component) this.氪金ID查询, -2, 178, -2)).addGroup(Alignment.LEADING, (Group) jPanel96Layout.createSequentialGroup().addComponent((Component) this.氪金名字输入, -2, 118, -2).addPreferredGap(ComponentPlacement.RELATED, -1, 32767).addComponent((Component) this.氪金名字查询, -2, 178, -2))).addGap(28, 28, 28)))));
|
||||
jPanel96Layout.setVerticalGroup((Group) jPanel96Layout.createParallelGroup(Alignment.LEADING).addGroup((Group) jPanel96Layout.createSequentialGroup().addContainerGap().addComponent((Component) this.jLabel213).addGap(10, 10, 10).addGroup((Group) jPanel96Layout.createParallelGroup(Alignment.BASELINE).addComponent((Component) this.氪金ID输入, -2, -1, -2).addComponent((Component) this.氪金ID查询)).addGap(10, 10, 10).addComponent((Component) this.jLabel214).addGap(10, 10, 10).addGroup((Group) jPanel96Layout.createParallelGroup(Alignment.BASELINE).addComponent((Component) this.氪金名字输入, -2, -1, -2).addComponent((Component) this.氪金名字查询)).addGap(10, 10, 10).addComponent((Component) this.jLabel215).addGap(10, 10, 10).addGroup((Group) jPanel96Layout.createParallelGroup(Alignment.BASELINE).addComponent((Component) this.氪金机器码输入, -2, -1, -2).addComponent((Component) this.氪金机器码查询)).addContainerGap(-1, 32767)));
|
||||
this.jPanel97.setBorder((Border) BorderFactory.createTitledBorder("同账号下其他角色信息"));
|
||||
this.充值赞助列表1.setModel((TableModel) new DefaultTableModel(new Object[0][], new String[]{"角色ID", "玩家名字", "每日充值", "累计充值", "剩余积分", "可用点券"}) {
|
||||
this.充值赞助列表1.setModel((TableModel) new DefaultTableModel(new Object[0][], new String[]{"角色ID", "玩家名字", "每日充值", "累计充值", "元宝", "积分"}) {
|
||||
boolean[] canEdit = {false, false, false, false, false, false};
|
||||
|
||||
@Override
|
||||
|
|
@ -5854,7 +5857,7 @@ public class ppms extends JFrame {
|
|||
this.jPanel9.setLayout((LayoutManager) jPanel9Layout);
|
||||
jPanel9Layout.setHorizontalGroup((Group) jPanel9Layout.createParallelGroup(Alignment.LEADING).addGroup((Group) jPanel9Layout.createSequentialGroup().addContainerGap().addComponent((Component) this.jPanel78, -2, -1, -2).addContainerGap(130, 32767)));
|
||||
jPanel9Layout.setVerticalGroup((Group) jPanel9Layout.createParallelGroup(Alignment.LEADING).addGroup((Group) jPanel9Layout.createSequentialGroup().addComponent((Component) this.jPanel78, -2, -1, -2).addGap(0, 30, 32767)));
|
||||
ppms.主界面菜单.addTab("充值功能", (Icon) new ImageIcon(this.getClass().getResource("/image/管理自定义掉落.png")), (Component) this.jPanel9);
|
||||
ppms.主界面菜单.addTab("充值赞助", (Icon) new ImageIcon(this.getClass().getResource("/image/大金条.png")), (Component) this.jPanel9);
|
||||
this.jScrollPane20.setCursor(new Cursor(0));
|
||||
this.jTextArea1.setColumns(20);
|
||||
this.jTextArea1.setRows(5);
|
||||
|
|
@ -5865,15 +5868,18 @@ public class ppms extends JFrame {
|
|||
this.jPanel60.setLayout((LayoutManager) jPanel60Layout);
|
||||
jPanel60Layout.setHorizontalGroup((Group) jPanel60Layout.createParallelGroup(Alignment.LEADING).addGroup((Group) jPanel60Layout.createSequentialGroup().addContainerGap().addComponent((Component) this.jScrollPane20, -1, 1485, 32767).addContainerGap()));
|
||||
jPanel60Layout.setVerticalGroup((Group) jPanel60Layout.createParallelGroup(Alignment.LEADING).addComponent((Component) this.jScrollPane20, -1, 742, 32767));
|
||||
ppms.主界面菜单.addTab("通知内容", (Icon) new ImageIcon(this.getClass().getResource("/image/GM工具.png")), (Component) this.jPanel60);
|
||||
//ppms.主界面菜单.addTab("通知内容", (Icon) new ImageIcon(this.getClass().getResource("/image/GM工具.png")), (Component) this.jPanel60);
|
||||
|
||||
final GroupLayout LenheartUILayout = new GroupLayout((Container) this.LenheartUI);
|
||||
this.LenheartUI.setLayout((LayoutManager) LenheartUILayout);
|
||||
LenheartUILayout.setHorizontalGroup((Group) LenheartUILayout.createParallelGroup(Alignment.LEADING).addGroup((Group) LenheartUILayout.createSequentialGroup().addComponent((Component) this.贪玩功能面板, -2, 1495, 32767).addContainerGap()));
|
||||
LenheartUILayout.setVerticalGroup((Group) LenheartUILayout.createParallelGroup(Alignment.LEADING).addGroup((Group) LenheartUILayout.createSequentialGroup().addComponent((Component) this.贪玩功能面板, -2, 723, -2).addGap(0, 19, 32767)));
|
||||
ppms.主界面菜单.addTab("贪玩定制", (Icon) new ImageIcon(this.getClass().getResource("/image/至尊版工具.png")), (Component) this.LenheartUI);
|
||||
ppms.主界面菜单.addTab("贪玩新增", (Icon) new ImageIcon(this.getClass().getResource("/image/tw.png")), (Component) this.LenheartUI);
|
||||
this.LenheartUI.setPreferredSize(new Dimension(LenheartUI.getPreferredSize().width + 10, LenheartUI.getPreferredSize().height));
|
||||
this.UI_Control = new UI_LenheartUI(this.贪玩功能面板);
|
||||
// this.贪玩功能面板.addTab("专用功能",this.jPanel5);
|
||||
this.贪玩功能面板.insertTab("活动 & 发放", null, jPanel5, null, 0);
|
||||
this.贪玩功能面板.setSelectedIndex(0);
|
||||
|
||||
|
||||
this.jTextField1.setText("贪玩冒险岛079");
|
||||
|
|
@ -7379,7 +7385,7 @@ public class ppms extends JFrame {
|
|||
ps.executeUpdate();
|
||||
ps.close();
|
||||
} catch (SQLException e) {
|
||||
System.out.println("Error/" + a + ":" + e);
|
||||
// System.out.println("Error/" + a + ":" + e);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -8204,10 +8210,10 @@ public class ppms extends JFrame {
|
|||
发放类型名2 = "累计充值";
|
||||
}
|
||||
if (this.剩余余额.getState()) {
|
||||
发放类型名3 = "剩余余额";
|
||||
发放类型名3 = "元宝";
|
||||
}
|
||||
if (this.可用点券.getState()) {
|
||||
发放类型名4 = "可用点券";
|
||||
发放类型名4 = "积分";
|
||||
}
|
||||
final int answer = JOptionPane.showConfirmDialog((Component) this, "当前选择的类型是:" + 发放类型名 + " " + 发放类型名2 + " " + 发放类型名3 + " " + 发放类型名4 + "\r\n当前输入数量设置是:" + 道具数量 + "个\r\n当前发放范围设置是:" + 名字 + "\r\n当前你选择的角色名字是:" + 玩家的名字 + "\r\n请问您是否要发放呢?\r\n", "发放点卷抵用金币", 0);
|
||||
if (answer != 0) {
|
||||
|
|
@ -8227,7 +8233,7 @@ public class ppms extends JFrame {
|
|||
setKYDJ(玩家ID, 道具数量 * Integer.parseInt(ppms.点券比例.getText()));
|
||||
}
|
||||
this.初始化充值列表();
|
||||
JOptionPane.showMessageDialog(null, "处理完毕!", "充值赞助提示", 1);
|
||||
//JOptionPane.showMessageDialog(null, "处理完毕!", "充值赞助提示", 1);
|
||||
}
|
||||
|
||||
public void 修改技能() {
|
||||
|
|
@ -8449,18 +8455,24 @@ public class ppms extends JFrame {
|
|||
final int time = 持续时间MIN * 60 + 持续时间HOUR * 60 * 60;
|
||||
boolean bOk = true;
|
||||
if (选择类型 == 0) {
|
||||
for (final ChannelServer cservs : ChannelServer.getAllInstances()) {
|
||||
cservs.broadcastPacket(MaplePacketCreator.serverNotice(6, "经验倍率已经成功修改为 " + 数量 + "倍。祝大家游戏开心.经验倍率将在" + 持续时间HOUR + "小时" + 持续时间MIN + "分钟后自动更正!"));
|
||||
for (final ChannelServer cserv1 : ChannelServer.getAllInstances()) {
|
||||
for (final MapleCharacter mch : cserv1.getPlayerStorage().getAllCharacters()) {
|
||||
mch.startMapEffect(数量+"倍服务器经验倍率活动已经开始,持续时间" + 持续时间HOUR + "小时" + 持续时间MIN + "分钟!", 5120027);
|
||||
}
|
||||
}
|
||||
MapleParty.活动经验倍率 = 数量;
|
||||
} else if (选择类型 == 1) {
|
||||
for (final ChannelServer cservs : ChannelServer.getAllInstances()) {
|
||||
cservs.broadcastPacket(MaplePacketCreator.serverNotice(6, "爆率倍率已经成功修改为 " + 数量 + "倍。祝大家游戏开心.经验倍率将在" + 持续时间HOUR + "小时" + 持续时间MIN + "分钟后自动更正!!"));
|
||||
for (final ChannelServer cserv1 : ChannelServer.getAllInstances()) {
|
||||
for (final MapleCharacter mch : cserv1.getPlayerStorage().getAllCharacters()) {
|
||||
mch.startMapEffect(数量+"倍服务器物品倍率活动已经开始,持续时间" + 持续时间HOUR + "小时" + 持续时间MIN + "分钟!", 5120027);
|
||||
}
|
||||
}
|
||||
MapleParty.活动爆率倍率 = 数量;
|
||||
} else if (选择类型 == 2) {
|
||||
for (final ChannelServer cservs : ChannelServer.getAllInstances()) {
|
||||
cservs.broadcastPacket(MaplePacketCreator.serverNotice(6, "金币倍率已经成功修改为 " + 数量 + "倍。祝大家游戏开心.经验倍率将在" + 持续时间HOUR + "小时" + 持续时间MIN + "分钟后自动更正!!"));
|
||||
for (final ChannelServer cserv1 : ChannelServer.getAllInstances()) {
|
||||
for (final MapleCharacter mch : cserv1.getPlayerStorage().getAllCharacters()) {
|
||||
mch.startMapEffect(数量+"倍服务器金币倍率活动已经开始,持续时间" + 持续时间HOUR + "小时" + 持续时间MIN + "分钟!", 5120027);
|
||||
}
|
||||
}
|
||||
MapleParty.活动金币倍率 = 数量;
|
||||
} else {
|
||||
|
|
@ -8688,8 +8700,8 @@ public class ppms extends JFrame {
|
|||
}
|
||||
|
||||
private void 重载野外boss刷新列表() {
|
||||
Start.野外boss刷新.clear();
|
||||
Start.GetMobInMapTable();
|
||||
// Start.野外boss刷新.clear();
|
||||
// Start.GetMobInMapTable();
|
||||
}
|
||||
|
||||
private void 加载野外boss刷新列表() {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,140 @@
|
|||
package gui.tw;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class AotuNpc {
|
||||
|
||||
|
||||
|
||||
int npcId;
|
||||
|
||||
String scriptsName;
|
||||
|
||||
int lv;
|
||||
|
||||
String mapId="";
|
||||
|
||||
String noMapId="";
|
||||
|
||||
|
||||
int itemId;
|
||||
int itemNum;
|
||||
|
||||
int equId;
|
||||
|
||||
int time;
|
||||
|
||||
List<Integer> mapIdList;
|
||||
List<Integer> nomapIdList;
|
||||
|
||||
|
||||
|
||||
public int getItemNum() {
|
||||
return itemNum;
|
||||
}
|
||||
|
||||
public void setItemNum(int itemNum) {
|
||||
this.itemNum = itemNum;
|
||||
}
|
||||
|
||||
public int getLv() {
|
||||
return lv;
|
||||
}
|
||||
|
||||
public void setLv(int lv) {
|
||||
this.lv = lv;
|
||||
}
|
||||
|
||||
public String getNoMapId() {
|
||||
return noMapId;
|
||||
}
|
||||
|
||||
public void setNoMapId(String noMapId) {
|
||||
this.noMapId = noMapId;
|
||||
}
|
||||
|
||||
public String getMapId() {
|
||||
return mapId;
|
||||
}
|
||||
|
||||
public void setMapId(String mapId) {
|
||||
this.mapId = mapId;
|
||||
}
|
||||
|
||||
public int getNpcId() {
|
||||
return npcId;
|
||||
}
|
||||
|
||||
public void setNpcId(int npcId) {
|
||||
this.npcId = npcId;
|
||||
}
|
||||
|
||||
public String getScriptsName() {
|
||||
return scriptsName;
|
||||
}
|
||||
|
||||
public void setScriptsName(String scriptsName) {
|
||||
this.scriptsName = scriptsName;
|
||||
}
|
||||
|
||||
public int getItemId() {
|
||||
return itemId;
|
||||
}
|
||||
|
||||
public void setItemId(int itemId) {
|
||||
this.itemId = itemId;
|
||||
}
|
||||
|
||||
public int getEquId() {
|
||||
return equId;
|
||||
}
|
||||
|
||||
public void setEquId(int equId) {
|
||||
this.equId = equId;
|
||||
}
|
||||
|
||||
public int getTime() {
|
||||
return time;
|
||||
}
|
||||
|
||||
public void setTime(int time) {
|
||||
this.time = time;
|
||||
}
|
||||
|
||||
|
||||
public boolean isAutoMap(int mapId){
|
||||
if (mapIdList ==null ){
|
||||
mapIdList =new ArrayList<>();
|
||||
nomapIdList =new ArrayList<>();
|
||||
|
||||
if (!this.mapId.isEmpty()) {
|
||||
String[] split = this.mapId.split(",");
|
||||
for (String s : split) {
|
||||
mapIdList.add(Integer.parseInt(s));
|
||||
}
|
||||
}
|
||||
|
||||
if (!this.noMapId.isEmpty()) {
|
||||
String[] split = this.noMapId.split(",");
|
||||
for (String s : split) {
|
||||
nomapIdList.add(Integer.parseInt(s));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (Integer i : nomapIdList) {
|
||||
if (i == mapId ){
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
for (Integer i : mapIdList) {
|
||||
if (i == mapId|| i == 0){
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -9,11 +9,15 @@ public class BlConfig {
|
|||
int gold_rate;
|
||||
int item_rate;
|
||||
|
||||
int exp_rate;
|
||||
|
||||
String time_range;
|
||||
|
||||
int stackableNum;
|
||||
|
||||
|
||||
|
||||
|
||||
public int getItem_id() {
|
||||
return item_id;
|
||||
}
|
||||
|
|
@ -22,6 +26,18 @@ public class BlConfig {
|
|||
this.item_id = item_id;
|
||||
}
|
||||
|
||||
public int getExp_rate() {
|
||||
return exp_rate;
|
||||
}
|
||||
|
||||
public void setExp_rate(int exp_rate) {
|
||||
this.exp_rate = exp_rate;
|
||||
}
|
||||
|
||||
public void setStackableNum(int stackableNum) {
|
||||
this.stackableNum = stackableNum;
|
||||
}
|
||||
|
||||
public int getGold_rate() {
|
||||
return gold_rate;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,44 @@
|
|||
package gui.tw;
|
||||
|
||||
import gui.Start;
|
||||
import server.MapleItemInformationProvider;
|
||||
|
||||
public class DiaoLuoTiShi {
|
||||
|
||||
int id;
|
||||
|
||||
int itemId;
|
||||
|
||||
String name;
|
||||
|
||||
public DiaoLuoTiShi(int id, int itemId) {
|
||||
this.id = id;
|
||||
this.itemId = itemId;
|
||||
name = MapleItemInformationProvider.getInstance().getName(itemId);
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public int getItemId() {
|
||||
return itemId;
|
||||
}
|
||||
|
||||
public void setItemId(int itemId) {
|
||||
this.itemId = itemId;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -17,6 +17,7 @@ import tools.StringUtil;
|
|||
|
||||
import javax.swing.*;
|
||||
import javax.swing.table.DefaultTableModel;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.File;
|
||||
import java.sql.*;
|
||||
import java.util.ArrayList;
|
||||
|
|
@ -548,10 +549,8 @@ public class Drop {
|
|||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
List<Drop> qqs = getMobBLs();
|
||||
exportData("E:\\MXD\\cs.txt", qqs);
|
||||
|
||||
importDataQQ("E:\\MXD\\cs.txt");
|
||||
String string = MapleDataTool.getString((8140500 + "/name"), MapleLifeFactory.mobStringData, "未知怪物");
|
||||
System.out.println(string);
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,42 @@
|
|||
package gui.tw.diaoyu;
|
||||
|
||||
public class BL {
|
||||
|
||||
int id;
|
||||
int itemId;
|
||||
String name;
|
||||
|
||||
int bl;
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public int getItemId() {
|
||||
return itemId;
|
||||
}
|
||||
|
||||
public void setItemId(int itemId) {
|
||||
this.itemId = itemId;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public int getBl() {
|
||||
return bl;
|
||||
}
|
||||
|
||||
public void setBl(int bl) {
|
||||
this.bl = bl;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
package gui.tw.diaoyu;
|
||||
|
||||
public class DiaoYuMap {
|
||||
|
||||
int id;
|
||||
|
||||
String name;
|
||||
|
||||
int mapId;
|
||||
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public int getMapId() {
|
||||
return mapId;
|
||||
}
|
||||
|
||||
public void setMapId(int mapId) {
|
||||
this.mapId = mapId;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,305 @@
|
|||
package gui.tw.diaoyu;
|
||||
|
||||
import cn.hutool.core.lang.WeightRandom;
|
||||
import cn.hutool.core.util.RandomUtil;
|
||||
import handling.world.MapleParty;
|
||||
import provider.MapleDataTool;
|
||||
import scripting.PortalPlayerInteraction;
|
||||
import scripting.PortalScript;
|
||||
import server.MapleItemInformationProvider;
|
||||
import server.life.MapleLifeFactory;
|
||||
import server.maps.MapleMap;
|
||||
import server.maps.MapleMapFactory;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
public class DiaoyuConfig {
|
||||
|
||||
|
||||
|
||||
//包含高级鱼
|
||||
List<DiaoyuItem> items = new ArrayList<>();
|
||||
|
||||
//不包含高级鱼
|
||||
List<DiaoyuItem> items2 = new ArrayList<>();
|
||||
|
||||
List<DiaoyuItem> baodi = new ArrayList<>();
|
||||
List<DiaoyuItem> baodi2 = new ArrayList<>();
|
||||
|
||||
List<DiaoYuMap> mapIds=new ArrayList<>();
|
||||
|
||||
public List<DiaoYuMap> getMapIds() {
|
||||
return mapIds;
|
||||
}
|
||||
|
||||
public void setMapIds(List<DiaoYuMap> mapIds) {
|
||||
this.mapIds.clear();
|
||||
for (DiaoYuMap mapId : mapIds) {
|
||||
mapId.setName(MapleDataTool.getString("mapName", MapleMapFactory.nameData.getChildByPath(getMapStringName(mapId.getMapId())), ""));
|
||||
this.mapIds.add(mapId);
|
||||
}
|
||||
}
|
||||
|
||||
List<BL> bls=new ArrayList<>();
|
||||
|
||||
List<DiaoyuItem> All= new ArrayList<>();
|
||||
|
||||
|
||||
int count = 0;
|
||||
|
||||
int count2 = 0;
|
||||
|
||||
|
||||
int dykg = 1;
|
||||
int ryyz = 1;
|
||||
|
||||
int dytx = 1;
|
||||
|
||||
int kjbzdc = 1;
|
||||
|
||||
int bldj = 1;
|
||||
|
||||
int dyyg = 5340001;
|
||||
|
||||
int dyyz = 3011000;
|
||||
|
||||
int dyjg = 1000;
|
||||
|
||||
int ptye = 2300000;
|
||||
|
||||
int gjye = 2300001;
|
||||
//公告
|
||||
String notice = "";
|
||||
|
||||
|
||||
public List<BL> getBls() {
|
||||
return bls;
|
||||
}
|
||||
|
||||
public void setBls(List<BL> bls) {
|
||||
this.bls = bls;
|
||||
}
|
||||
|
||||
public void add(DiaoyuItem item) {
|
||||
All.add(item);
|
||||
if (item.getItemId()>0) {
|
||||
item.setItemName(MapleItemInformationProvider.getInstance().getName(item.getItemId()));
|
||||
}else if (item.getItemId() == 0){
|
||||
item.setItemName("金币");
|
||||
}else if (item.getItemId() ==-1){
|
||||
item.setItemName("经验");
|
||||
}else if (item.getItemId() == -2){
|
||||
item.setItemName("抵用券");
|
||||
}else if (item.getItemId() == -3){
|
||||
item.setItemName("点券");
|
||||
}
|
||||
|
||||
|
||||
if (item.getChance()>0){
|
||||
item.setChance2(item.getChance());
|
||||
this.items.add(item);
|
||||
count +=item.getChance();
|
||||
//根据几率进行排序
|
||||
items = items.stream().sorted(Comparator.comparingInt(DiaoyuItem::getChance)).collect(Collectors.toList());
|
||||
if (item.getIsAdvanced()!=1){
|
||||
items2.add(item);
|
||||
count2 +=item.getChance();
|
||||
}
|
||||
items2 = items2.stream().sorted(Comparator.comparingInt(DiaoyuItem::getChance)).collect(Collectors.toList());
|
||||
}else {
|
||||
item.setChance2(1);
|
||||
this.baodi.add(item);
|
||||
if (item.getIsAdvanced()!=1) {
|
||||
this.baodi2.add(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public List<DiaoyuItem> getAll() {
|
||||
return new ArrayList<>(this.All);
|
||||
}
|
||||
|
||||
public void setAll(List<DiaoyuItem> all) {
|
||||
items.clear();
|
||||
items2.clear();
|
||||
baodi.clear();
|
||||
baodi2.clear();
|
||||
All.clear();
|
||||
|
||||
count = 0;
|
||||
count2 = 0;
|
||||
for (DiaoyuItem diaoyuItem : all) {
|
||||
add(diaoyuItem);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public DiaoyuItem getItem(boolean gj) {
|
||||
int c = RandomUtil.randomInt(1, 1000000);
|
||||
if (gj){
|
||||
if (c<count){
|
||||
return qzsj(items);
|
||||
}else {
|
||||
return qzsj(baodi);
|
||||
}
|
||||
}else {
|
||||
if (c<count2){
|
||||
return qzsj(items2);
|
||||
}else {
|
||||
return qzsj(baodi2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public DiaoyuItem qzsj(List<DiaoyuItem> items) {
|
||||
List<WeightRandom.WeightObj<DiaoyuItem>> weightList = new ArrayList<>();
|
||||
for (DiaoyuItem item : items) {
|
||||
weightList.add(new WeightRandom.WeightObj<>(item, item.getChance2()));
|
||||
}
|
||||
|
||||
WeightRandom<DiaoyuItem> weightRandom = RandomUtil.weightRandom(weightList);
|
||||
DiaoyuItem selectedItem = weightRandom.next();
|
||||
return selectedItem;
|
||||
}
|
||||
|
||||
|
||||
public boolean isDyMap(int mapId) {
|
||||
return mapIds.stream().anyMatch(mapId1 -> mapId1.getMapId() == mapId);
|
||||
}
|
||||
|
||||
public int getDykg() {
|
||||
return dykg;
|
||||
}
|
||||
|
||||
public void setDykg(int dykg) {
|
||||
this.dykg = dykg;
|
||||
}
|
||||
|
||||
public int getRyyz() {
|
||||
return ryyz;
|
||||
}
|
||||
|
||||
public void setRyyz(int ryyz) {
|
||||
this.ryyz = ryyz;
|
||||
}
|
||||
|
||||
public int getDytx() {
|
||||
return dytx;
|
||||
}
|
||||
|
||||
public void setDytx(int dytx) {
|
||||
this.dytx = dytx;
|
||||
}
|
||||
|
||||
public int getKjbzdc() {
|
||||
return kjbzdc;
|
||||
}
|
||||
|
||||
public void setKjbzdc(int kjbzdc) {
|
||||
this.kjbzdc = kjbzdc;
|
||||
}
|
||||
|
||||
public int getBldj() {
|
||||
return bldj;
|
||||
}
|
||||
|
||||
public void setBldj(int bldj) {
|
||||
this.bldj = bldj;
|
||||
}
|
||||
|
||||
public int getDyyg() {
|
||||
return dyyg;
|
||||
}
|
||||
|
||||
public void setDyyg(int dyyg) {
|
||||
this.dyyg = dyyg;
|
||||
}
|
||||
|
||||
public int getDyyz() {
|
||||
return dyyz;
|
||||
}
|
||||
|
||||
public void setDyyz(int dyyz) {
|
||||
this.dyyz = dyyz;
|
||||
}
|
||||
|
||||
public int getDyjg() {
|
||||
return dyjg;
|
||||
}
|
||||
|
||||
public void setDyjg(int dyjg) {
|
||||
this.dyjg = dyjg;
|
||||
}
|
||||
|
||||
public int getPtye() {
|
||||
return ptye;
|
||||
}
|
||||
|
||||
public void setPtye(int ptye) {
|
||||
this.ptye = ptye;
|
||||
}
|
||||
|
||||
public String getNotice() {
|
||||
return notice;
|
||||
}
|
||||
|
||||
public void setNotice(String notice) {
|
||||
this.notice = notice;
|
||||
}
|
||||
|
||||
public int getGjye() {
|
||||
return gjye;
|
||||
}
|
||||
|
||||
public void setGjye(int gjye) {
|
||||
|
||||
|
||||
|
||||
this.gjye = gjye;
|
||||
}
|
||||
|
||||
|
||||
private static String getMapStringName(final int mapid) {
|
||||
final StringBuilder builder = new StringBuilder();
|
||||
if (mapid < 100000000) {
|
||||
builder.append("maple");
|
||||
} else if ((mapid >= 100000000 && mapid < 200000000) || mapid / 100000 == 5540) {
|
||||
builder.append("victoria");
|
||||
} else if (mapid >= 200000000 && mapid < 300000000) {
|
||||
builder.append("ossyria");
|
||||
} else if (mapid >= 300000000 && mapid < 400000000) {
|
||||
builder.append("elin");
|
||||
} else if (mapid >= 500000000 && mapid < 510000000) {
|
||||
builder.append("thai");
|
||||
} else if (mapid >= 540000000 && mapid < 600000000) {
|
||||
builder.append("SG");
|
||||
} else if (mapid >= 600000000 && mapid < 620000000) {
|
||||
builder.append("MasteriaGL");
|
||||
} else if ((mapid >= 670000000 && mapid < 677000000) || (mapid >= 678000000 && mapid < 682000000)) {
|
||||
builder.append("global");
|
||||
} else if (mapid >= 677000000 && mapid < 678000000) {
|
||||
builder.append("Episode1GL");
|
||||
} else if (mapid >= 682000000 && mapid < 683000000) {
|
||||
builder.append("HalloweenGL");
|
||||
} else if (mapid >= 683000000 && mapid < 684000000) {
|
||||
builder.append("event");
|
||||
} else if (mapid >= 684000000 && mapid < 685000000) {
|
||||
builder.append("event_5th");
|
||||
} else if (mapid >= 700000000 && mapid < 700000300) {
|
||||
builder.append("wedding");
|
||||
} else if (mapid >= 800000000 && mapid < 900000000) {
|
||||
builder.append("jp");
|
||||
} else if (mapid >= 700000000 && mapid < 782000002) {
|
||||
builder.append("chinese");
|
||||
} else {
|
||||
builder.append("etc");
|
||||
}
|
||||
builder.append("/");
|
||||
builder.append(mapid);
|
||||
return builder.toString();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,100 @@
|
|||
package gui.tw.diaoyu;
|
||||
|
||||
import cn.hutool.core.util.RandomUtil;
|
||||
|
||||
public class DiaoyuItem {
|
||||
int id;
|
||||
|
||||
String itemName;
|
||||
|
||||
int itemId;
|
||||
|
||||
int minNum;
|
||||
|
||||
int maxNum;
|
||||
|
||||
|
||||
int chance;
|
||||
|
||||
int chance2;
|
||||
|
||||
int notice;
|
||||
|
||||
int isAdvanced;
|
||||
|
||||
public int getChance2() {
|
||||
return chance2;
|
||||
}
|
||||
|
||||
public void setChance2(int chance2) {
|
||||
this.chance2 = chance2;
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getItemName() {
|
||||
return itemName;
|
||||
}
|
||||
|
||||
public void setItemName(String itemName) {
|
||||
this.itemName = itemName;
|
||||
}
|
||||
|
||||
public int getItemId() {
|
||||
return itemId;
|
||||
}
|
||||
|
||||
public void setItemId(int itemId) {
|
||||
this.itemId = itemId;
|
||||
}
|
||||
|
||||
public int getMinNum() {
|
||||
return minNum;
|
||||
}
|
||||
|
||||
public void setMinNum(int minNum) {
|
||||
this.minNum = minNum;
|
||||
}
|
||||
|
||||
public int getMaxNum() {
|
||||
return maxNum;
|
||||
}
|
||||
|
||||
public void setMaxNum(int maxNum) {
|
||||
this.maxNum = maxNum;
|
||||
}
|
||||
|
||||
public int getChance() {
|
||||
return chance;
|
||||
}
|
||||
|
||||
public void setChance(int chance) {
|
||||
this.chance = chance;
|
||||
}
|
||||
|
||||
public int getNotice() {
|
||||
return notice;
|
||||
}
|
||||
|
||||
public void setNotice(int notice) {
|
||||
this.notice = notice;
|
||||
}
|
||||
|
||||
public int getIsAdvanced() {
|
||||
return isAdvanced;
|
||||
}
|
||||
|
||||
public void setIsAdvanced(int isAdvanced) {
|
||||
this.isAdvanced = isAdvanced;
|
||||
}
|
||||
|
||||
public int getnum() {
|
||||
return RandomUtil.randomInt(minNum, maxNum+1);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,106 @@
|
|||
package gui.tw.rw;
|
||||
|
||||
import gui.Start;
|
||||
import provider.MapleDataTool;
|
||||
import server.life.MapleLifeFactory;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static cn.hutool.core.text.CharSequenceUtil.containsIgnoreCase;
|
||||
|
||||
public class XuanShangRenWu {
|
||||
|
||||
int cid;
|
||||
|
||||
String account;
|
||||
|
||||
String name;
|
||||
|
||||
int mobId;
|
||||
|
||||
String mobName;
|
||||
|
||||
int mobNum;
|
||||
|
||||
int maxNum;
|
||||
|
||||
public int getCid() {
|
||||
return cid;
|
||||
}
|
||||
|
||||
public void setCid(int cid) {
|
||||
this.cid = cid;
|
||||
}
|
||||
|
||||
public String getAccount() {
|
||||
return account;
|
||||
}
|
||||
|
||||
public void setAccount(String account) {
|
||||
this.account = account;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public int getMobId() {
|
||||
return mobId;
|
||||
}
|
||||
|
||||
public void setMobId(int mobId) {
|
||||
this.setMobName(MapleDataTool.getString((this.getMobId() + "/name"), MapleLifeFactory.mobStringData, "未知怪物"));
|
||||
this.mobId = mobId;
|
||||
}
|
||||
|
||||
public String getMobName() {
|
||||
return mobName;
|
||||
}
|
||||
|
||||
public void setMobName(String mobNName) {
|
||||
this.mobName = mobNName;
|
||||
}
|
||||
|
||||
public int getMobNum() {
|
||||
return mobNum;
|
||||
}
|
||||
|
||||
public void setMobNum(int mobNum) {
|
||||
this.mobNum = mobNum;
|
||||
}
|
||||
|
||||
public int getMaxNum() {
|
||||
return maxNum;
|
||||
}
|
||||
|
||||
public void setMaxNum(int maxNum) {
|
||||
this.maxNum = maxNum;
|
||||
}
|
||||
|
||||
|
||||
public static List<XuanShangRenWu> fuzzySearch( String keyword) {
|
||||
List<XuanShangRenWu> list = new ArrayList<>(Start.xsRW.values());
|
||||
if (keyword == null || keyword.trim().isEmpty()) {
|
||||
return list; // 如果关键词为空,返回所有
|
||||
}
|
||||
String lowerKeyword = keyword.toLowerCase();
|
||||
|
||||
return list.stream()
|
||||
.filter(item ->
|
||||
containsIgnoreCase(String.valueOf(item.cid), lowerKeyword) ||
|
||||
containsIgnoreCase(item.account, lowerKeyword) ||
|
||||
containsIgnoreCase(item.name, lowerKeyword) ||
|
||||
containsIgnoreCase(String.valueOf(item.mobId), lowerKeyword) ||
|
||||
containsIgnoreCase(item.mobName, lowerKeyword) ||
|
||||
containsIgnoreCase(String.valueOf(item.mobNum), lowerKeyword) ||
|
||||
containsIgnoreCase(String.valueOf(item.maxNum), lowerKeyword)
|
||||
)
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
package gui.tw.rw;
|
||||
|
||||
public class rwConfig {
|
||||
|
||||
int rwId;
|
||||
|
||||
int mobId;
|
||||
|
||||
int maxNum;
|
||||
|
||||
|
||||
public int getRwId() {
|
||||
return rwId;
|
||||
}
|
||||
|
||||
public void setRwId(int rwId) {
|
||||
this.rwId = rwId;
|
||||
}
|
||||
|
||||
public int getMobId() {
|
||||
return mobId;
|
||||
}
|
||||
|
||||
public void setMobId(int mobId) {
|
||||
this.mobId = mobId;
|
||||
}
|
||||
|
||||
public int getMaxNum() {
|
||||
return maxNum;
|
||||
}
|
||||
|
||||
public void setMaxNum(int maxNum) {
|
||||
this.maxNum = maxNum;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,7 +1,6 @@
|
|||
package gui;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.lang.management.ManagementFactory;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.PreparedStatement;
|
||||
|
|
@ -12,6 +11,7 @@ import javax.swing.JOptionPane;
|
|||
import cn.hutool.core.io.file.FileReader;
|
||||
import cn.hutool.core.io.file.FileWriter;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import database.DBConPool;
|
||||
|
|
@ -30,9 +30,11 @@ import java.awt.event.FocusAdapter;
|
|||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
|
||||
import gui.tw.BlConfig;
|
||||
import gui.tw.BsConfig;
|
||||
import gui.tw.ZLConfig;
|
||||
import gui.tw.*;
|
||||
import gui.tw.diaoyu.BL;
|
||||
import gui.tw.diaoyu.DiaoYuMap;
|
||||
import gui.tw.diaoyu.DiaoyuItem;
|
||||
import gui.tw.rw.rwConfig;
|
||||
import org.netbeans.lib.awtextra.AbsoluteConstraints;
|
||||
|
||||
import java.awt.Component;
|
||||
|
|
@ -54,6 +56,7 @@ import ppSetting.Game;
|
|||
|
||||
import java.awt.EventQueue;
|
||||
|
||||
import server.BossInMap;
|
||||
import tools.FileoutputUtil;
|
||||
|
||||
import javax.swing.UIManager;
|
||||
|
|
@ -72,10 +75,10 @@ import javax.swing.JPanel;
|
|||
import javax.swing.JLabel;
|
||||
import java.lang.management.MemoryMXBean;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import client.inventory.IItem;
|
||||
|
||||
|
|
@ -1048,13 +1051,61 @@ public class 特殊控制台 extends JFrame {
|
|||
fileReader = new FileReader(property + "\\配置文件\\战力显示.ini");
|
||||
String result4 = fileReader.readString();
|
||||
JSONObject jsonObject2 = JSONObject.parseObject(result4);
|
||||
JSONArray zl = jsonObject2.getJSONArray("zl");
|
||||
Start.zlConfigs = zl .toJavaList(ZLConfig.class).stream().sorted(Comparator.comparing(ZLConfig::getNum)).collect(Collectors.toList());
|
||||
Start.zlkg = jsonObject2.getInteger("zlkg");
|
||||
JSONArray zl = jsonObject2.getJSONArray("zl");
|
||||
Start.zlConfigs = zl .toJavaList(ZLConfig.class).stream().sorted(Comparator.comparing(ZLConfig::getNum)).collect(Collectors.toList());
|
||||
Start.zlkg = jsonObject2.getInteger("zlkg");
|
||||
|
||||
|
||||
JSONArray shxs1 = Start.ConfigValuesJson.getJSONArray("shxs");
|
||||
Start.shxs =shxs1.toArray(new String[0]);
|
||||
|
||||
|
||||
fileReader = new FileReader(property + "\\配置文件\\钓鱼.ini");
|
||||
String result5 = fileReader.readString();
|
||||
JSONObject jsonObject3 = JSONObject.parseObject(result5);
|
||||
List<DiaoyuItem> items = jsonObject3.getJSONArray("items").toJavaList(DiaoyuItem.class);
|
||||
Start.diaoyuConfig.setAll(items);
|
||||
List<DiaoYuMap> mapids = jsonObject3.getJSONArray("map").toJavaList(DiaoYuMap.class);
|
||||
Start.diaoyuConfig.setMapIds(mapids);
|
||||
List<BL> db = jsonObject3.getJSONArray("db").toJavaList(BL.class);
|
||||
Start.diaoyuConfig.setBls(db);
|
||||
|
||||
Start.diaoyuConfig.setNotice(jsonObject3.getString("notice"));
|
||||
Start.diaoyuConfig.setDykg(jsonObject3.getInteger("dykg"));
|
||||
Start.diaoyuConfig.setRyyz(jsonObject3.getInteger("ryyz"));
|
||||
Start.diaoyuConfig.setDytx(jsonObject3.getInteger("dytx"));
|
||||
Start.diaoyuConfig.setKjbzdc(jsonObject3.getInteger("kjbzdc"));
|
||||
Start.diaoyuConfig.setBldj(jsonObject3.getInteger("bldj"));
|
||||
Start.diaoyuConfig.setDyyg(jsonObject3.getInteger("dyyg"));
|
||||
Start.diaoyuConfig.setDyyz(jsonObject3.getInteger("dyyz"));
|
||||
Start.diaoyuConfig.setDyjg(jsonObject3.getInteger("dyjg"));
|
||||
Start.diaoyuConfig.setPtye(jsonObject3.getInteger("ptye"));
|
||||
Start.diaoyuConfig.setGjye(jsonObject3.getInteger("gjye"));
|
||||
|
||||
fileReader = new FileReader(property + "\\配置文件\\定时访问npc.ini");
|
||||
String result6 = fileReader.readString();
|
||||
JSONObject jsonObject4 = JSONObject.parseObject(result6);
|
||||
Start.aotuNpcs = jsonObject4.getJSONArray("npc").toJavaList(AotuNpc.class);
|
||||
|
||||
fileReader = new FileReader(property + "\\配置文件\\悬赏任务.ini");
|
||||
String result7 = fileReader.readString();
|
||||
JSONObject jsonObject5 = JSONObject.parseObject(result7);
|
||||
Start.xsRWConfig = jsonObject5.getJSONArray("rw").toJavaList(rwConfig.class);
|
||||
|
||||
fileReader = new FileReader(property + "\\配置文件\\掉落提示.ini");
|
||||
String result8 = fileReader.readString();
|
||||
JSONObject jsonObject6 = JSONObject.parseObject(result8);
|
||||
List<DiaoLuoTiShi> item = jsonObject6.getJSONArray("item").toJavaList(DiaoLuoTiShi.class);
|
||||
Start.diaoLuoTiShis =item.stream().collect(Collectors.toMap(DiaoLuoTiShi::getItemId, item1 -> item1));
|
||||
Start.diaoLuoGongGao = jsonObject6.getString("notice");
|
||||
|
||||
fileReader = new FileReader(property + "\\配置文件\\野外boss刷新.ini");
|
||||
String result9 = fileReader.readString();
|
||||
JSONObject jsonObject7 = JSONObject.parseObject(result9);
|
||||
Start.野外boss刷新 = jsonObject7.getJSONArray("boss").toJavaList(BossInMap.class);
|
||||
|
||||
|
||||
|
||||
JSONArray shxs1 = Start.ConfigValuesJson.getJSONArray("shxs");
|
||||
Start.shxs =shxs1.toArray(new String[0]);
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
|
@ -1095,6 +1146,46 @@ public class 特殊控制台 extends JFrame {
|
|||
fileWriter = new FileWriter(new File(property + "\\配置文件\\战力显示.ini"));
|
||||
fileWriter.write(jsonString2);
|
||||
|
||||
JSONObject jsonObject3 = new JSONObject();
|
||||
jsonObject3.put("items", Start.diaoyuConfig.getAll());
|
||||
jsonObject3.put("map", Start.diaoyuConfig.getMapIds());
|
||||
jsonObject3.put("db", Start.diaoyuConfig.getBls());
|
||||
jsonObject3.put("notice", Start.diaoyuConfig.getNotice());
|
||||
jsonObject3.put("dykg", Start.diaoyuConfig.getDykg());
|
||||
jsonObject3.put("ryyz", Start.diaoyuConfig.getRyyz());
|
||||
jsonObject3.put("dytx", Start.diaoyuConfig.getDytx());
|
||||
jsonObject3.put("kjbzdc", Start.diaoyuConfig.getKjbzdc());
|
||||
jsonObject3.put("bldj", Start.diaoyuConfig.getBldj());
|
||||
jsonObject3.put("dyyg", Start.diaoyuConfig.getDyyg());
|
||||
jsonObject3.put("dyyz", Start.diaoyuConfig.getDyyz());
|
||||
jsonObject3.put("dyjg", Start.diaoyuConfig.getDyjg());
|
||||
jsonObject3.put("ptye", Start.diaoyuConfig.getPtye());
|
||||
jsonObject3.put("gjye", Start.diaoyuConfig.getGjye());
|
||||
String jsonString3 = jsonObject3.toJSONString();
|
||||
fileWriter = new FileWriter(new File(property + "\\配置文件\\钓鱼.ini"));
|
||||
fileWriter.write(jsonString3);
|
||||
|
||||
fileWriter = new FileWriter(new File(property + "\\配置文件\\定时访问npc.ini"));
|
||||
JSONObject jsonObject4 = new JSONObject();
|
||||
jsonObject4.put("npc", JSON.toJSONString(Start.aotuNpcs));
|
||||
fileWriter.write(jsonObject4.toString());
|
||||
|
||||
fileWriter = new FileWriter(new File(property + "\\配置文件\\悬赏任务.ini"));
|
||||
JSONObject jsonObject5 = new JSONObject();
|
||||
jsonObject5.put("rw", JSON.toJSONString(Start.xsRWConfig));
|
||||
fileWriter.write(jsonObject5.toString());
|
||||
|
||||
fileWriter = new FileWriter(new File(property + "\\配置文件\\掉落提示.ini"));
|
||||
JSONObject jsonObject6 = new JSONObject();
|
||||
jsonObject6.put("item", JSON.toJSONString(Start.diaoLuoTiShis.values()));
|
||||
jsonObject6.put("notice", Start.diaoLuoGongGao);
|
||||
fileWriter.write(jsonObject6.toString());
|
||||
|
||||
fileWriter = new FileWriter(new File(property + "\\配置文件\\野外boss刷新.ini"));
|
||||
JSONObject jsonObject7 = new JSONObject();
|
||||
jsonObject7.put("boss", JSON.toJSONString(Start.野外boss刷新));
|
||||
fileWriter.write(jsonObject7.toString());
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -253,7 +253,7 @@ public class DamageParse {
|
|||
player.dropMessage("[GM 密语系统] " + player.getName() + " (等级 " + (int) player.getLevel() + ") 伤害异常。 最高伤害 40 本次伤害 " + eachd + " 技能ID " + attack.skill);
|
||||
}
|
||||
boolean ban = false;
|
||||
int atk = 2140000001;
|
||||
int atk = 2144444444;
|
||||
if (eachd.intValue() < 0) {
|
||||
if (!player.hasGmLevel(1)) {
|
||||
FileoutputUtil.logToFile("logs/Hack/Ban/伤害异常.txt", "\r\n " + FileoutputUtil.NowTime() + " 玩家<" + (int) player.getLevel() + ">: " + player.getName() + " 怪物 " + monster.getId() + " 地图: " + player.getMapId() + " 技能代码: " + attack.skill + " 伤害过低导致越界 本次伤害 :" + eachd + " 预计伤害: " + (int) maxDamagePerHit + "是否为BOSS: " + monster.getStats().isBoss());
|
||||
|
|
@ -679,25 +679,25 @@ public class DamageParse {
|
|||
if (ewbl!=null) {
|
||||
BigInteger damageIncrease = newtotDamage.multiply((ewbl[0].multiply(ewbl[1]))).divide(BigInteger.valueOf(100));
|
||||
newtotDamage = newtotDamage.add(damageIncrease);
|
||||
a = "伤害加成 #b" + process(ewbl[0].toString()) + "%#k";
|
||||
a = "伤害加成 #b#e" + process(ewbl[0].toString()) + "%#n#k";
|
||||
}
|
||||
|
||||
if (ewds != null) {
|
||||
b = "额外段伤 #b" + process(ewds[0].toString()) + "段#k";
|
||||
b = "技能段数 #b#e" + process(ewds[0].toString()) + "段#n#k";
|
||||
String s = process(v.toString());
|
||||
c = "段伤伤害 #b" + s + "#k";
|
||||
c = "段数伤害 #b#e" + s + "#n#k";
|
||||
}
|
||||
|
||||
if (ewzs != null) {
|
||||
String s = process(ewzs.toString());
|
||||
d = "切割伤害 #b" + s + "#k";
|
||||
d = "切割伤害 #b#e" + s + "#n#k";
|
||||
newtotDamage = newtotDamage.add(ewzs);
|
||||
}
|
||||
|
||||
|
||||
|
||||
String s2 = process(newtotDamage.toString());
|
||||
e = "伤害统计 #r" + s2 + "#k";
|
||||
e = "伤害总计 #r#e" + s2 + "#n#k";
|
||||
|
||||
int length = e.length();
|
||||
|
||||
|
|
@ -718,7 +718,7 @@ public class DamageParse {
|
|||
d = String.format("%-" + length + "s", d);
|
||||
if (d.length()>targetWidth)targetWidth = d.length();
|
||||
}
|
||||
targetWidth +=6;
|
||||
targetWidth +=12;
|
||||
|
||||
String f = "";
|
||||
String[] strs = {a, b, c, d, e};
|
||||
|
|
@ -884,7 +884,7 @@ public class DamageParse {
|
|||
}
|
||||
player.dropMessage("[GM 密语系统] " + player.getName() + " (等级 " + (int) player.getLevel() + ") 伤害异常。 最高伤害 40 本次伤害 " + eachd + " 技能ID " + attack.skill);
|
||||
}
|
||||
int atk = 2140000001;
|
||||
int atk = 2144444444;
|
||||
if (eachd.intValue() < 0) {
|
||||
if (!player.hasGmLevel(1)) {
|
||||
FileoutputUtil.logToFile("logs/Hack/Ban/伤害异常.txt", "\r\n " + FileoutputUtil.NowTime() + " 玩家<" + (int) player.getLevel() + ">: " + player.getName() + " 怪物 " + monster.getId() + " 地图: " + player.getMapId() + " 技能代码: " + attack.skill + " 伤害过低导致越界 本次伤害 :" + eachd + " 预计伤害: " + (int) maxDamagePerHit + "是否为BOSS: " + monster.getStats().isBoss());
|
||||
|
|
@ -1779,8 +1779,14 @@ public class DamageParse {
|
|||
|
||||
if (Magnification!=null) {
|
||||
BigInteger qgxsBigInt = new BigInteger(qgxs);
|
||||
BigInteger qGjs = play.getQGjs();
|
||||
if (qGjs == null){
|
||||
qGjs = BigInteger.valueOf(100);//
|
||||
}else{
|
||||
qGjs = qGjs.add(BigInteger.valueOf(100));//
|
||||
}
|
||||
|
||||
BigInteger result = Magnification.multiply(qgxsBigInt).divide(BigInteger.valueOf(100));
|
||||
BigInteger result = Magnification.multiply(qgxsBigInt).multiply(qGjs).divide(BigInteger.valueOf(10000));
|
||||
return result;
|
||||
} else {
|
||||
return null;
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import tools.packet.FamilyPacket;
|
|||
import tools.packet.PlayerShopPacket;
|
||||
import server.shops.IMaplePlayerShop;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.concurrent.locks.Lock;
|
||||
|
||||
import server.maps.MapleMapObject;
|
||||
|
|
@ -25,8 +26,6 @@ import client.inventory.MaplePet;
|
|||
import client.ISkill;
|
||||
import client.PlayerStats;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import server.maps.MapleKite;
|
||||
import server.MapleShopFactory;
|
||||
import server.PredictCardFactory;
|
||||
|
|
@ -41,8 +40,6 @@ import tools.FileoutputUtil;
|
|||
import constants.ServerConfig;
|
||||
import client.inventory.ItemFlag;
|
||||
|
||||
import java.util.EnumMap;
|
||||
|
||||
import client.MapleStat;
|
||||
import server.quest.MapleQuest;
|
||||
import server.life.MapleLifeFactory;
|
||||
|
|
@ -71,15 +68,8 @@ import server.MapleItemInformationProvider;
|
|||
import constants.GameConstants;
|
||||
import client.MapleCharacter;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
import client.inventory.IItem;
|
||||
|
||||
import java.util.LinkedList;
|
||||
|
||||
import client.inventory.MapleInventory;
|
||||
import scripting.NPCScriptManager;
|
||||
import tools.MaplePacketCreator;
|
||||
|
|
@ -2637,6 +2627,13 @@ public class InventoryHandler {
|
|||
if (mapitem.isRandDrop()) {
|
||||
chr.getMap().spawnRandDrop();
|
||||
}
|
||||
|
||||
if (mapitem.getIsmob() == 1) {
|
||||
String replace = Start.diaoLuoGongGao.replace("玩家名", chr.getName()).replace("地图名", chr.getMap().getMapName());
|
||||
|
||||
Broadcast.broadcastMessage(MaplePacketCreator.getGachaponMega2("【极品掉落】", " : "+replace, mapitem.getItem(), (byte)15));
|
||||
mapitem.setIsmob(0);
|
||||
}
|
||||
}
|
||||
|
||||
public static void removeItem(final MapleCharacter chr, final MapleMapItem mapitem, final MapleMapObject ob) {
|
||||
|
|
@ -2646,6 +2643,18 @@ public class InventoryHandler {
|
|||
if (mapitem.isRandDrop()) {
|
||||
chr.getMap().spawnRandDrop();
|
||||
}
|
||||
|
||||
if (mapitem.getIsmob() == 1) {
|
||||
String replace = Start.diaoLuoGongGao.replace("玩家名", chr.getName()).replace("地图名", chr.getMap().getMapName());
|
||||
|
||||
Broadcast.broadcastMessage(MaplePacketCreator.getGachaponMega2("【极品掉落】", " : "+replace, mapitem.getItem(), (byte)15));
|
||||
mapitem.setIsmob(0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
private static void addMedalString(final MapleCharacter c, final StringBuilder sb) {
|
||||
|
|
|
|||
|
|
@ -160,23 +160,20 @@ public class PlayerHandler {
|
|||
c.getSession().close();
|
||||
return;
|
||||
}
|
||||
if (itemId / 10000 == 301 && GameConstants.isFishingMap(chr.getMapId())) {
|
||||
boolean haz = false;
|
||||
for (final IItem item : c.getPlayer().getInventory(MapleInventoryType.CASH).list()) {
|
||||
if (item.getItemId() == 5340000) {
|
||||
haz = true;
|
||||
} else {
|
||||
if (item.getItemId() == 5340001) {
|
||||
haz = false;
|
||||
chr.startFishingTask(true);
|
||||
|
||||
if (Start.diaoyuConfig.getDykg()==1 && itemId / 10000 == 301 &&Start.diaoyuConfig.isDyMap(chr.getMapId())) {//判断地图和钓鱼开关
|
||||
if ( Start.diaoyuConfig.getRyyz()==1 || itemId==Start.diaoyuConfig.getDyyz()){//判断椅子
|
||||
|
||||
for (final IItem item : c.getPlayer().getInventory(MapleInventoryType.CASH).list()) {//判断鱼竿
|
||||
if (item.getItemId() == Start.diaoyuConfig.getDyyg()) {
|
||||
chr.startFishingTask2(false);
|
||||
break;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
}
|
||||
if (haz) {
|
||||
chr.startFishingTask(false);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
chr.setChair(itemId);
|
||||
boolean 判定 = false;
|
||||
|
|
@ -833,23 +830,24 @@ public class PlayerHandler {
|
|||
if (effect != null && effect.getBulletConsume() != 0) {
|
||||
bulletConsume = effect.getBulletConsume() * ((ShadowPartner != null) ? 2 : 1);
|
||||
}
|
||||
if (chr.getItemQuantity(5450000, false) < 1 && !MapleInventoryManipulator.removeById(c, MapleInventoryType.USE, projectile, bulletConsume, false, true)) {
|
||||
|
||||
if (chr.getJob()<500 &&chr.getItemQuantity(5450000, false) < 1 && !MapleInventoryManipulator.removeById(c, MapleInventoryType.USE, projectile, bulletConsume, false, true)) {
|
||||
chr.dropMessage(5, "你没有足够的箭/子弹/飞镖.");
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (attack.skill == 5211005) {
|
||||
if (!MapleInventoryManipulator.removeById(c, MapleInventoryType.USE, 2332000, 1, false, true)) {
|
||||
c.getPlayer().dropMessage(5, "您身上的冰蓝魔方不足");
|
||||
c.sendPacket(MaplePacketCreator.enableActions());
|
||||
return;
|
||||
}
|
||||
} else if (attack.skill == 5211004 && !MapleInventoryManipulator.removeById(c, MapleInventoryType.USE, 2331000, 1, false, true)) {
|
||||
c.getPlayer().dropMessage(5, "您身上的火红魔方不足");
|
||||
c.sendPacket(MaplePacketCreator.enableActions());
|
||||
return;
|
||||
}
|
||||
// if (attack.skill == 5211005) {
|
||||
// if (!MapleInventoryManipulator.removeById(c, MapleInventoryType.USE, 2332000, 1, false, true)) {
|
||||
// c.getPlayer().dropMessage(5, "您身上的冰蓝魔方不足");
|
||||
// c.sendPacket(MaplePacketCreator.enableActions());
|
||||
// return;
|
||||
// }
|
||||
// } else if (attack.skill == 5211004 && !MapleInventoryManipulator.removeById(c, MapleInventoryType.USE, 2331000, 1, false, true)) {
|
||||
// c.getPlayer().dropMessage(5, "您身上的火红魔方不足");
|
||||
// c.sendPacket(MaplePacketCreator.enableActions());
|
||||
// return;
|
||||
// }
|
||||
final Integer comboBuff = chr.getBuffedValue(MapleBuffStat.COMBO);
|
||||
if (attack.targets > 0 && comboBuff != null) {
|
||||
switch (chr.getJob()) {
|
||||
|
|
|
|||
|
|
@ -138,37 +138,67 @@ public class PlayersHandler {
|
|||
}
|
||||
NPCScriptManager.getInstance().dispose(c);
|
||||
c.getSession().write(MaplePacketCreator.enableActions());
|
||||
String string = "#d解卡完毕\r\n\r\n";
|
||||
String string = "#d#e★★★ 解卡完毕 ★★★#n#k\r\n\r\n";
|
||||
MapleCharacter player = c.getPlayer();
|
||||
//string += "时间 "+ FileoutputUtil.CurrentReadable_Time() + "\r\n";
|
||||
string += "#d贪玩冒险岛\r\n";
|
||||
string += "经验 " + Math.round((float) 人物经验) * MapleParty.活动经验倍率 + "倍,物品 " + Math.round((float) 人物物品爆率) + "倍, 金币 " + Math.round((float) 人物金币爆率) + "倍,\r\n\r\n";
|
||||
string += "#b个人倍率\r\n";
|
||||
string += "经验 " + (long) (Math.round((float) c.getPlayer().getEXPMod()) * 100) * Math.round(c.getPlayer().getStat().expBuff / 100.0) + "%, 爆率 " + (long) (Math.round((float) c.getPlayer().getDropMod()) * 100) * Math.round(c.getPlayer().getStat().dropBuff / 100.0) + "%, 金币 " +(long) (Math.round((float) c.getPlayer().getCashMod()) * 100) * Math.round(c.getPlayer().getStat().mesoBuff / 100.0) + "%\r\n";
|
||||
string += "#b#e服务器倍率信息#n#k\r\n";
|
||||
string += "#g#e↓↓↓#n#k\r\n";
|
||||
string += "经验#r#e" + Math.round((float) 人物经验) * MapleParty.活动经验倍率 + "#n#k倍 物品#r#e" + Math.round((float) 人物物品爆率) + "#n#k倍 金币#r#e" + Math.round((float) 人物金币爆率) + "#n#k倍\r\n\r\n";
|
||||
string += "#b#e角色倍率信息#n#k\r\n";
|
||||
string += "#g#e↓↓↓#n#k\r\n";
|
||||
string += "经验#r#e" + (long) (Math.round((float) c.getPlayer().getEXPMod()) * 100) * Math.round(c.getPlayer().getStat().expBuff / 100.0) + "#n#k% 物品#r#e" + (long) (Math.round((float) c.getPlayer().getDropMod()) * 100) * Math.round(c.getPlayer().getStat().dropBuff / 100.0) + "#n#k% 金币#r#e" +(long) (Math.round((float) c.getPlayer().getCashMod()) * 100) * Math.round(c.getPlayer().getStat().mesoBuff / 100.0) + "#n#k%\r\n\r\n";
|
||||
|
||||
if (Start.ConfigValuesJson.getInteger("isdb") ==1 &&player.getDB()!=null){
|
||||
string += "伤害加成 "+DamageParse.process(player.getDB().toString())+" " ;
|
||||
}
|
||||
|
||||
if (Start.ConfigValuesJson.getInteger("isdd") ==1 &&player.getDD()!=null){
|
||||
string += "多段次数 " +DamageParse.process(player.getDD().toString()) + "次\r\n" ;
|
||||
}else {
|
||||
string += "\r\n" ;
|
||||
}
|
||||
|
||||
if (Start.ConfigValuesJson.getInteger("isqg") ==1 &&player.getQG()!=null ){
|
||||
string += "切割伤害 "+DamageParse.process(player.getQG().toString())+" ";
|
||||
}
|
||||
if (Start.bskg == 1) {
|
||||
double v = player.getBSJL() / 100.0;
|
||||
DecimalFormat df = new DecimalFormat("#.##");
|
||||
string += "鞭尸几率 " + df.format(v) + "%\r\n";
|
||||
string += "#b#e特殊属性信息#n#k\r\n";
|
||||
string += "#g#e↓↓↓#n#k\r\n";
|
||||
string += "鞭尸几率#r#e" + df.format(v) + "#n#k%\r\n";
|
||||
}else {
|
||||
string += "\r\n" ;
|
||||
}
|
||||
|
||||
if (Start.ConfigValuesJson.getInteger("isqg") ==1 &&player.getQG()!=null ){
|
||||
string += "固定切割#r#e"+DamageParse.process(player.getQG().toString())+"#n#kHP ";
|
||||
}
|
||||
|
||||
if (Start.ConfigValuesJson.getInteger("isqgjs") ==1 &&player.getQGjs()!=null){
|
||||
string += "切割加深#r#e"+DamageParse.process(player.getQGjs().toString())+"#n#k%\r\n";
|
||||
}else {
|
||||
string += "\r\n" ;
|
||||
}
|
||||
string += "#r个人资产\r\n";
|
||||
string += "拥有:" + c.getPlayer().getCSPoints(1) + " 点劵\r\n\r\n";
|
||||
string += "延迟 " + c.getPlayer().getClient().getLatency() + " 毫秒\r\n";
|
||||
|
||||
if (Start.ConfigValuesJson.getInteger("isdd") ==1 &&player.getDD()!=null){
|
||||
string += "技能段数#r#e" +DamageParse.process(player.getDD().toString()) + "#n#k段 " ;
|
||||
}
|
||||
|
||||
if (Start.ConfigValuesJson.getInteger("isdb") ==1 &&player.getDB()!=null){
|
||||
string += "伤害加成#r#e"+DamageParse.process(player.getDB().toString())+"#n#k%\r\n" ;
|
||||
}else {
|
||||
string += "\r\n" ;
|
||||
}
|
||||
|
||||
|
||||
DecimalFormat df = new DecimalFormat("#.##");
|
||||
string += "\r\n#b#e个人资产信息#n#k\r\n";
|
||||
string += "#g#e↓↓↓#n#k\r\n";
|
||||
|
||||
string += "累计充值#r#e"+player.getLJJF(player.getId())+"#n#k大米\r\n";
|
||||
|
||||
string += "积分#r#e" +player.getKYDJ(player.getId())+"#n#k分 ";
|
||||
|
||||
string += "元宝#r#e"+player.getSYJF(player.getId())+"#n#k个\r\n" ;
|
||||
|
||||
string += "抵用券#r#e"+player.getCSPoints(2)+"#n#k点 ";
|
||||
|
||||
string += "点券#r#e"+player.getCSPoints(1)+"#n#k点\r\n";
|
||||
|
||||
|
||||
|
||||
//string += "#r个人资产\r\n";
|
||||
//string += "拥有:" + c.getPlayer().getCSPoints(1) + " 点劵\r\n\r\n";
|
||||
//string += "延迟 " + c.getPlayer().getClient().getLatency() + " 毫秒\r\n";
|
||||
c.getPlayer().showInstruction(string, 240, 10);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package handling.world;
|
||||
|
||||
import scripting.ReactorScriptManager;
|
||||
import server.BossInMap;
|
||||
import server.life.MapleMonsterInformationProvider;
|
||||
import handling.world.family.MapleFamilyCharacter;
|
||||
import handling.world.family.MapleFamily;
|
||||
|
|
@ -188,7 +189,16 @@ public class World {
|
|||
}
|
||||
}
|
||||
}
|
||||
if (map.characterSize() > 0) {
|
||||
int id = map.getId();
|
||||
boolean a =false;
|
||||
for (BossInMap bossInMap : Start.野外boss刷新) {
|
||||
if (id == bossInMap.getMap()) {
|
||||
a = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (map.characterSize() > 0 ||a) {
|
||||
if (map.canSpawn()) {
|
||||
map.respawn(false);
|
||||
}
|
||||
|
|
|
|||
Binary file not shown.
|
After Width: | Height: | Size: 731 B |
Binary file not shown.
|
After Width: | Height: | Size: 517 B |
Binary file not shown.
|
After Width: | Height: | Size: 757 B |
Binary file not shown.
|
After Width: | Height: | Size: 585 B |
|
|
@ -161,7 +161,7 @@ public abstract class AbstractPlayerInteraction {
|
|||
this.getPlayer().setBossLog1(bossid, number);
|
||||
}
|
||||
|
||||
public int getCombat() {
|
||||
public String getCombat() {
|
||||
return this.getPlayer().getCombat();
|
||||
}
|
||||
|
||||
|
|
@ -833,6 +833,83 @@ public abstract class AbstractPlayerInteraction {
|
|||
this.gainItemS(id, str, dex, luk, Int, hp, mp, watk, matk, wdef, mdef, hb, mz, ty, yd, this.c, time);
|
||||
}
|
||||
|
||||
public final void gainItemtw(final int id, final int str, final int dex, final int luk, final int Int, final int hp, final int mp, final int watk, final int matk, final int wdef, final int mdef, final int hb, final int mz, final int ty, final int yd, final int time,String dd,String db,String qg,String qgjs) {
|
||||
this.gainItemS(id, str, dex, luk, Int, hp, mp, watk, matk, wdef, mdef, hb, mz, ty, yd, this.c, time, dd, db, qg, qgjs);
|
||||
}
|
||||
|
||||
private void gainItemS(int id, int str, int dex, int luk, int anInt, int hp, int mp, int watk, int matk, int wdef, int mdef, int hb, int mz, int ty, int yd, MapleClient cg, int time, String dd, String db, String qg, String qgjs) {
|
||||
final MapleItemInformationProvider ii = MapleItemInformationProvider.getInstance();
|
||||
final MapleInventoryType type = GameConstants.getInventoryType(id);
|
||||
if (!MapleInventoryManipulator.checkSpace(cg, id, 1, "")) {
|
||||
return;
|
||||
}
|
||||
if (type.equals(MapleInventoryType.EQUIP) && !GameConstants.isThrowingStar(id) && !GameConstants.isBullet(id)) {
|
||||
final Equip item = (Equip) (Equip) ii.getEquipById(id);
|
||||
final String name = ii.getName(id);
|
||||
if (id / 10000 == 114 && name != null && name.length() > 0) {
|
||||
final String msg = "你已获得称号 <" + name + ">";
|
||||
cg.getPlayer().dropMessage(5, msg);
|
||||
cg.getPlayer().dropMessage(5, msg);
|
||||
}
|
||||
if (time > 0) {
|
||||
item.setExpiration(System.currentTimeMillis() + (long) (time * 60 * 60 * 1000));
|
||||
}
|
||||
if (str > 0) {
|
||||
item.setStr((short) str);
|
||||
}
|
||||
if (dex > 0) {
|
||||
item.setDex((short) dex);
|
||||
}
|
||||
if (luk > 0) {
|
||||
item.setLuk((short) luk);
|
||||
}
|
||||
if (anInt > 0) {
|
||||
item.setInt((short) anInt);
|
||||
}
|
||||
if (hp > 0) {
|
||||
item.setHp((short) hp);
|
||||
}
|
||||
if (mp > 0) {
|
||||
item.setMp((short) mp);
|
||||
}
|
||||
if (watk > 0) {
|
||||
item.setWatk((short) watk);
|
||||
}
|
||||
if (matk > 0) {
|
||||
item.setMatk((short) matk);
|
||||
}
|
||||
if (wdef > 0) {
|
||||
item.setWdef((short) wdef);
|
||||
}
|
||||
if (mdef > 0) {
|
||||
item.setMdef((short) mdef);
|
||||
}
|
||||
if (hb > 0) {
|
||||
item.setAvoid((short) hb);
|
||||
}
|
||||
if (mz > 0) {
|
||||
item.setAcc((short) mz);
|
||||
}
|
||||
if (ty > 0) {
|
||||
item.setJump((short) ty);
|
||||
}
|
||||
if (yd > 0) {
|
||||
item.setSpeed((short) yd);
|
||||
}
|
||||
|
||||
item.setdd(dd);
|
||||
item.setdb(db);
|
||||
item.setqg(qg);
|
||||
item.setqgjs(qgjs);
|
||||
|
||||
MapleInventoryManipulator.addbyItem(cg, item.copy());
|
||||
} else {
|
||||
MapleInventoryManipulator.addById(cg, id, (short) 1);
|
||||
}
|
||||
cg.getSession().write(MaplePacketCreator.getShowItemGain(id, (short) 1, true));
|
||||
|
||||
}
|
||||
|
||||
public final void gainItemTime(final int id, final short quantity, final long period) {
|
||||
if (MapleItemInformationProvider.getInstance().isCash(id)) {
|
||||
this.gainItem(id, quantity, false, period, -1, "");
|
||||
|
|
@ -1152,7 +1229,7 @@ public abstract class AbstractPlayerInteraction {
|
|||
if (this.getParty() != null) {
|
||||
for (final MaplePartyCharacter partyCharacter : this.getParty().getMembers()) {
|
||||
final MapleCharacter player = this.getChannelServer().getPlayerStorage().getCharacterById(partyCharacter.getId());
|
||||
if (player != null && player.getCombat() < a) {
|
||||
if (player != null && Integer.parseInt(player.getCombat()) < a) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
@ -1166,7 +1243,7 @@ public abstract class AbstractPlayerInteraction {
|
|||
}
|
||||
for (final MaplePartyCharacter partyCharacter : this.getParty().getMembers()) {
|
||||
final MapleCharacter player = this.getChannelServer().getPlayerStorage().getCharacterById(partyCharacter.getId());
|
||||
if (player != null && player.getCombat() < a) {
|
||||
if (player != null && Integer.parseInt(player.getCombat()) < a) {
|
||||
return partyCharacter;
|
||||
}
|
||||
}
|
||||
|
|
@ -2635,7 +2712,10 @@ public abstract class AbstractPlayerInteraction {
|
|||
public void itemlaba(final String name, final String txt, final Item item, final int labaid) {
|
||||
if (labaid == 16) {
|
||||
Broadcast.broadcastSmega(MaplePacketCreator.itemMegaphone(name + " : " + txt, true, this.c.getChannel(), item.copy()));
|
||||
} else {
|
||||
} else if(labaid == 15){
|
||||
Broadcast.broadcastMessage(MaplePacketCreator.getGachaponMega2(name, txt, item, (byte) 14));
|
||||
}else
|
||||
{
|
||||
Broadcast.broadcastMessage(MaplePacketCreator.getItemMega(this.getPlayer().getClient().getChannel(), name + " : " + txt, item, true));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -256,7 +256,7 @@ public class EventInstanceManager {
|
|||
return false;
|
||||
}
|
||||
|
||||
public final void saveBossQuest(final int points) {
|
||||
public final void savesQuest(final int points) {
|
||||
if (this.disposed) {
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -592,6 +592,7 @@ public class NPCConversationManager extends AbstractPlayerInteraction {
|
|||
}
|
||||
if (概率 > 0) {
|
||||
Broadcast.broadcastMessage(MaplePacketCreator.getGachaponMega("[" + msg + "]", " : 被玩家 " + this.c.getPlayer().getName() + " 获得!大家一起来恭喜他吧!", item, 概率));
|
||||
|
||||
}
|
||||
return item.getItemId();
|
||||
} catch (Exception e) {
|
||||
|
|
@ -4518,7 +4519,7 @@ public class NPCConversationManager extends AbstractPlayerInteraction {
|
|||
} else {
|
||||
map.setMobMoveChrId(c.getPlayer().getId());
|
||||
map.setChrPos(c.getPlayer().getOldPosition());
|
||||
//map.set吸怪Res(c.getPlayer().getLastRes());
|
||||
map.set吸怪Res(c.getPlayer().getLastRes());
|
||||
map.newStartMobMove();
|
||||
c.getPlayer().set吸怪状态(true);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ public class NPCScriptManager extends AbstractScriptManager {
|
|||
this.start(c, npc, 0, script);
|
||||
}
|
||||
|
||||
public final void start(final MapleClient c, final int npc, final int mode, final String script) {
|
||||
public final void start(final MapleClient c, final int npc, final int mode, final String script) {
|
||||
final Lock lock = c.getNPCLock();
|
||||
lock.lock();
|
||||
try {
|
||||
|
|
@ -120,6 +120,15 @@ public class NPCScriptManager extends AbstractScriptManager {
|
|||
c.sendPacket(MaplePacketCreator.enableActions());
|
||||
}
|
||||
} catch (ScriptException ex) {
|
||||
c.getPlayer().dropMessage(5, "NPC 脚本错误2, 它ID为 : " + npc + "_" + ((script == null) ? "" : ("(" + script + ")")) + ((mode == 0) ? "" : ("型号: " + mode)) + "." + ex);
|
||||
// System.err.println("NPC 脚本错误2, 它ID为 : " + npc + "_" + ((script == null) ? "" : ("(" + script + ")")) + ((mode == 0) ? "" : ("型号: " + mode)) + "." + ex);
|
||||
c.removeClickedNPC();
|
||||
NPCScriptManager.getInstance().dispose(c);
|
||||
c.getSession().write(MaplePacketCreator.enableActions());
|
||||
c.getPlayer().dropMessage(5, "你已假死,已为你自动解卡");
|
||||
if (c.getPlayer().isAdmin()) {
|
||||
c.getPlayer().getMap().broadcastMessage(MaplePacketCreator.boatEffect(1034));
|
||||
}
|
||||
} catch (NoSuchMethodException e) {
|
||||
System.err.println("NPC 脚本错误1, 它ID为 : " + npc + "_" + ((script == null) ? "" : ("(" + script + ")")) + ((mode == 0) ? "" : ("型号: " + mode)) + "." + e);
|
||||
if (c.getPlayer() != null && c.getPlayer().isGM()) {
|
||||
|
|
@ -132,6 +141,95 @@ public class NPCScriptManager extends AbstractScriptManager {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
public synchronized final void startds(final MapleClient c, final int npc, final int mode, final String script) {
|
||||
final Lock lock = c.getNPCLock();
|
||||
lock.lock();
|
||||
try {
|
||||
if (c.getPlayer().getMobVac() || c.getPlayer().getItemVac()) {
|
||||
c.getPlayer().dropMessage(1, "开着挂机的时候不能操作");
|
||||
return;
|
||||
}
|
||||
if (c.getPlayer().isGM()) {
|
||||
c.getPlayer().dropMessage("[系统提示]您已经建立与NPC:" + npc + ((script == null) ? "" : ("(" + script + ")")) + ((mode == 0) ? "" : ("型号: " + mode)) + "的对话。");
|
||||
}
|
||||
if (!this.cms.containsKey(c) && c.canClickNPC()) {
|
||||
if (c.getPlayer() != null && c.getPlayer().getDebugMessage()) {
|
||||
c.getPlayer().dropMessage("start - !cms.containsKey(c) && c.canClickNPC()");
|
||||
}
|
||||
if (c.getPlayer() != null && c.getPlayer().getDebugMessage()) {
|
||||
c.getPlayer().dropMessage("start - setInvocable");
|
||||
}
|
||||
Invocable iv;
|
||||
if (script == null) {
|
||||
if (mode != 0) {
|
||||
iv = this.getInvocable("npc/" + npc + "_" + mode + ".js", c, true);
|
||||
} else {
|
||||
iv = this.getInvocable("npc/" + npc + ".js", c, true);
|
||||
}
|
||||
} else {
|
||||
iv = this.getInvocable("special/" + script + ".js", c, true);
|
||||
}
|
||||
if (iv == null) {
|
||||
iv = this.getInvocable("special/notcoded.js", c, true);
|
||||
if (iv == null) {
|
||||
this.dispose(c);
|
||||
return;
|
||||
}
|
||||
}
|
||||
final ScriptEngine scriptengine = (ScriptEngine) iv;
|
||||
if (c.getPlayer() != null && c.getPlayer().getDebugMessage()) {
|
||||
c.getPlayer().dropMessage("start - iv");
|
||||
}
|
||||
final NPCConversationManager cm = new NPCConversationManager(c, npc, -1, mode, script, (byte) (-1), iv);
|
||||
if (c.getPlayer() != null && c.getPlayer().getDebugMessage()) {
|
||||
c.getPlayer().dropMessage("start - cm");
|
||||
}
|
||||
if (getInstance() == null) {
|
||||
if (c.getPlayer() != null && c.getPlayer().getDebugMessage()) {
|
||||
c.getPlayer().dropMessage("start = null");
|
||||
}
|
||||
this.dispose(c);
|
||||
return;
|
||||
}
|
||||
this.cms.put(c, cm);
|
||||
if (c.getPlayer() != null && c.getPlayer().getDebugMessage()) {
|
||||
c.getPlayer().dropMessage("start - cms");
|
||||
}
|
||||
scriptengine.put("cm", cm);
|
||||
if (c.getPlayer() != null) {
|
||||
c.getPlayer().setConversation(1);
|
||||
}
|
||||
if (c.getPlayer() != null && c.getPlayer().getDebugMessage()) {
|
||||
c.getPlayer().dropMessage("start - setConversation");
|
||||
}
|
||||
c.setClickedNPC();
|
||||
if (c.getPlayer() != null && c.getPlayer().getDebugMessage()) {
|
||||
c.getPlayer().dropMessage("start - setClickNPC");
|
||||
}
|
||||
try {
|
||||
iv.invokeFunction("start", new Object[0]);
|
||||
if (c.getPlayer() != null && c.getPlayer().getDebugMessage()) {
|
||||
c.getPlayer().dropMessage("start - cms");
|
||||
}
|
||||
} catch (NoSuchMethodException nsme) {
|
||||
iv.invokeFunction("action", Byte.valueOf((byte) 1), Byte.valueOf((byte) 0), Integer.valueOf(0));
|
||||
}
|
||||
}
|
||||
} catch (ScriptException ex) {
|
||||
} catch (NoSuchMethodException e) {
|
||||
System.err.println("NPC 脚本错误1, 它ID为 : " + npc + "_" + ((script == null) ? "" : ("(" + script + ")")) + ((mode == 0) ? "" : ("型号: " + mode)) + "." + e);
|
||||
if (c.getPlayer() != null && c.getPlayer().isGM()) {
|
||||
c.getPlayer().dropMessage("[系统提示] NPC " + npc + "_" + ((script == null) ? "" : ("(" + script + ")")) + ((mode == 0) ? "" : ("型号: " + mode)) + "脚本错误 " + e + "");
|
||||
}
|
||||
FilePrinter.printError("NPCScriptManager1.txt", "Error executing NPC script, NPC ID : " + npc + "." + e);
|
||||
this.dispose(c);
|
||||
} finally {
|
||||
lock.unlock();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public final void action(final MapleClient c, final byte mode, final byte type, final int selection) {
|
||||
int sl = selection;
|
||||
if (selection < 0) {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
package server;
|
||||
|
||||
import java.math.BigInteger;
|
||||
|
||||
public class BossInMap {
|
||||
private int mobid;
|
||||
private int map;
|
||||
|
|
@ -8,6 +10,16 @@ public class BossInMap {
|
|||
private String msg;
|
||||
private int time;
|
||||
|
||||
private String bosshp ="0";
|
||||
|
||||
public String getBosshp() {
|
||||
return bosshp;
|
||||
}
|
||||
|
||||
public void setBosshp(String bosshp) {
|
||||
this.bosshp = bosshp;
|
||||
}
|
||||
|
||||
public BossInMap(final int mobid, final int map, final int x, final int y, final String msg, final int time) {
|
||||
this.mobid = mobid;
|
||||
this.map = map;
|
||||
|
|
@ -16,6 +28,15 @@ public class BossInMap {
|
|||
this.msg = msg;
|
||||
this.time = time;
|
||||
}
|
||||
public BossInMap(final int mobid, final int map, final int x, final int y, final String msg, final int time, final String bosshp) {
|
||||
this.mobid = mobid;
|
||||
this.map = map;
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
this.msg = msg;
|
||||
this.time = time;
|
||||
this.bosshp = bosshp;
|
||||
}
|
||||
|
||||
public int getMobid() {
|
||||
return this.mobid;
|
||||
|
|
|
|||
|
|
@ -147,6 +147,13 @@ public class MapleInventoryManipulator {
|
|||
}
|
||||
|
||||
public static byte addId(final MapleClient c, final int itemId, short quantity, final String owner, final MaplePet pet, final long period, final boolean hours, final String gmLog) {
|
||||
if ( GameConstants.isMonsterCard(itemId)) {
|
||||
for (int i = 0; i < quantity; i++) {
|
||||
c.getPlayer().getMonsterBook().addCard(c, itemId);
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
final MapleItemInformationProvider ii = MapleItemInformationProvider.getInstance();
|
||||
if ((ii.isPickupRestricted(itemId) && c.getPlayer().haveItem(itemId, 1, true, false)) || !ii.itemExists(itemId)) {
|
||||
c.getSession().write(MaplePacketCreator.getInventoryFull());
|
||||
|
|
@ -1125,7 +1132,7 @@ public class MapleInventoryManipulator {
|
|||
c.sendPacket(MaplePacketCreator.enableActions());
|
||||
return false;
|
||||
}
|
||||
if (quantity >= 9999 || quantity < 1) {
|
||||
if (quantity >= 30001 || quantity < 1) {
|
||||
c.getSession().write(MaplePacketCreator.enableActions());
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -92,7 +92,9 @@ public class MapleShop {
|
|||
}
|
||||
final MapleShopItem item = this.findById(itemId);
|
||||
if (item != null && item.getPrice() > 0 && item.getReqItem() == 0) {
|
||||
long i = (long) item.getPrice() * quantity;
|
||||
final int price = GameConstants.isRechargable(itemId) ? item.getPrice() : (item.getPrice() * quantity);
|
||||
if (i>=Integer.MAX_VALUE &&!GameConstants.isRechargable(itemId))return;
|
||||
if (price >= 0 && c.getPlayer().getMeso() >= price) {
|
||||
if (MapleInventoryManipulator.checkSpace(c, itemId, (int) quantity, "")) {
|
||||
c.getPlayer().gainMeso(-price, false);
|
||||
|
|
|
|||
|
|
@ -1,8 +1,10 @@
|
|||
package server;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Set;
|
||||
import java.util.Iterator;
|
||||
|
||||
import gui.Start;
|
||||
import handling.cashshop.CashShopServer;
|
||||
import handling.login.LoginServer;
|
||||
import handling.world.World.Family;
|
||||
|
|
@ -96,8 +98,28 @@ public class ShutdownServer implements Runnable, ShutdownServerMBean {
|
|||
} catch (Exception e2) {
|
||||
System.out.println("[" + FileoutputUtil.CurrentReadable_Time() + "][信息]:购物商城服务器关闭失败" + e2);
|
||||
}
|
||||
Start.clearAndSaveAll();
|
||||
System.out.println("[" + FileoutputUtil.CurrentReadable_Time() + "][信息]:悬赏任务进度保存完毕");
|
||||
|
||||
|
||||
System.out.println("[" + FileoutputUtil.CurrentReadable_Time() + "][信息]:服务端已经完全关闭了请点击右上角的xx按钮关闭.");
|
||||
System.out.println("[" + FileoutputUtil.CurrentReadable_Time() + "][========================================]");
|
||||
|
||||
String property = System.getProperty("user.dir");
|
||||
String batFilePath = property+"\\A079.exe";
|
||||
Process process = null;
|
||||
try {
|
||||
process = Runtime.getRuntime().exec("cmd /c start " + batFilePath);
|
||||
int exitCode = process.waitFor();
|
||||
|
||||
System.exit(0);
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
} catch (InterruptedException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -38,6 +38,9 @@ public class OverrideMonsterStats {
|
|||
this.hp = hp;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public int getMp() {
|
||||
return this.mp;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
package server.life;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import handling.world.World;
|
||||
import tools.MaplePacketCreator;
|
||||
import server.maps.MapleMap;
|
||||
import server.Randomizer;
|
||||
|
|
@ -17,7 +19,9 @@ public class SpawnPointAreaBoss extends Spawns {
|
|||
private final AtomicBoolean spawned;
|
||||
private final String msg;
|
||||
|
||||
public SpawnPointAreaBoss(final MapleMonster monster, final Point pos1, final Point pos2, final Point pos3, final int mobTime, final String msg) {
|
||||
private String bighp;
|
||||
|
||||
public SpawnPointAreaBoss(final MapleMonster monster, final Point pos1, final Point pos2, final Point pos3, final int mobTime, final String msg, final String bighp) {
|
||||
this.spawned = new AtomicBoolean(false);
|
||||
this.monster = monster;
|
||||
this.pos1 = pos1;
|
||||
|
|
@ -26,6 +30,7 @@ public class SpawnPointAreaBoss extends Spawns {
|
|||
this.mobTime = ((mobTime < 0) ? -1 : (mobTime * 1000));
|
||||
this.msg = msg;
|
||||
this.nextPossibleSpawn = System.currentTimeMillis();
|
||||
this.bighp = bighp;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -53,6 +58,7 @@ public class SpawnPointAreaBoss extends Spawns {
|
|||
final int rand = Randomizer.nextInt(3);
|
||||
return (rand == 0) ? this.pos1 : ((rand == 1) ? this.pos2 : this.pos3);
|
||||
}
|
||||
int a = 1;
|
||||
|
||||
@Override
|
||||
public final MapleMonster spawnMonster(final MapleMap map) {
|
||||
|
|
@ -68,10 +74,18 @@ public class SpawnPointAreaBoss extends Spawns {
|
|||
SpawnPointAreaBoss.this.spawned.set(false);
|
||||
}
|
||||
});
|
||||
|
||||
map.spawnMonster(this.monster, -2);
|
||||
if (this.msg != null) {
|
||||
map.broadcastMessage(MaplePacketCreator.serverNotice(6, this.msg));
|
||||
if (!this.bighp.equals("0")){
|
||||
this.monster.setHp(this.bighp);
|
||||
}
|
||||
if (this.msg != null&&a>1) {
|
||||
String formatTime = DateUtil.formatTime(DateUtil.date());
|
||||
String replace ="【野外boss】 : "+ this.msg.replace("{time}", formatTime);
|
||||
World.Broadcast.broadcastMessage(MaplePacketCreator.serverNotice(11, map.getChannel(),replace));
|
||||
// map.broadcastMessage(MaplePacketCreator.serverNotice(6, this.msg));
|
||||
}
|
||||
a++;
|
||||
return this.monster;
|
||||
}
|
||||
|
||||
|
|
@ -79,4 +93,9 @@ public class SpawnPointAreaBoss extends Spawns {
|
|||
public final int getMobTime() {
|
||||
return this.mobTime;
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
String formatTime = DateUtil.formatTime(DateUtil.date());
|
||||
System.out.println(formatTime);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,10 +1,12 @@
|
|||
package server.maps;
|
||||
|
||||
import gui.tw.rw.XuanShangRenWu;
|
||||
import server.ServerProperties;
|
||||
import server.MapleCarnivalFactory.MCSkill;
|
||||
import server.MapleCarnivalFactory;
|
||||
import tools.Pair;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.math.BigInteger;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.Connection;
|
||||
|
|
@ -528,7 +530,11 @@ public final class MapleMap {
|
|||
for (MapleMonster mob : getAllMonstersThreadsafe()) {
|
||||
if (!mob.getStats().isBoss()) {
|
||||
mob.setPosition(getChrPos());
|
||||
broadcastMessage(MobPacket.moveMonster(false, 0, 0, mob.getObjectId(), getChrPos(), mob.getPosition(), get吸怪Res()), mob.getPosition());
|
||||
try {
|
||||
broadcastMessage(MobPacket.moveMonster(false, 0, 0, mob.getObjectId(), getChrPos(), mob.getPosition(), get吸怪Res()), mob.getPosition());
|
||||
}catch (Exception e){
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -560,7 +566,10 @@ public final class MapleMap {
|
|||
}
|
||||
}
|
||||
}
|
||||
} finally {
|
||||
} catch (Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
finally {
|
||||
charactersLock.readLock().unlock();
|
||||
}
|
||||
}
|
||||
|
|
@ -659,7 +668,7 @@ public final class MapleMap {
|
|||
}
|
||||
if (de2.itemId == 0) {
|
||||
final int mesos = Randomizer.nextInt(1 + Math.abs(de2.Maximum - de2.Minimum)) + de2.Minimum;
|
||||
int mmeos = (int) ((double) mesos * (chr.getStat().mesoBuff / 100.0) * (double) chr.getcashMod());
|
||||
int mmeos = (int) ((double) mesos * (chr.getStat().cashBuff / 100.0) * (double) chr.getcashMod()* (double) cmServerrate);
|
||||
if (((Integer) Start.ConfigValuesMap.get("金币重置")).intValue() < 1 && mmeos > 0) {
|
||||
if (((Integer) Start.ConfigValuesMap.get("金币全局砍数量")).intValue() > 0) {
|
||||
mmeos /= ((Integer) Start.ConfigValuesMap.get("金币砍全局倍率")).intValue();
|
||||
|
|
@ -667,7 +676,6 @@ public final class MapleMap {
|
|||
if (mmeos < 1) {
|
||||
mmeos = 1;
|
||||
}
|
||||
|
||||
this.spawnMobMesoDrop(mmeos, this.calcDropPos(pos, mob.getTruePosition()), (MapleMapObject) mob, chr, false, droptype);
|
||||
mesoDropped = true;
|
||||
}
|
||||
|
|
@ -675,7 +683,7 @@ public final class MapleMap {
|
|||
if (mob.getStats().isBoss()) {
|
||||
if (Randomizer.nextInt(10000) <= ((Integer) Start.ConfigValuesMap.get("BOSS出装备概率")).intValue()) {
|
||||
final IItem idrop = ii.randomizeStats((Equip) ii.getEquipById(de2.itemId));
|
||||
if ((chr.get刷钱模式() == 1 && idrop.getItemId() != 0) || (chr.get刷钱模式() == 2 && idrop.getItemId() / 1000000 == 1)) {
|
||||
if ((chr.get刷钱模式() == 1 && idrop.getItemId() != 0) || (chr.get刷钱模式() == 2 && (idrop.getItemId() / 1000000 == 1||(idrop.getItemId()>1999999&&idrop.getItemId()<2021000)||(idrop.getItemId()>2059999&&idrop.getItemId()<2080000)||(idrop.getItemId()>2329999&&idrop.getItemId()<2340000)))) {
|
||||
double price;
|
||||
if (GameConstants.isThrowingStar(idrop.getItemId()) || GameConstants.isBullet(idrop.getItemId())) {
|
||||
price = (double) ii.getWholePrice(idrop.getItemId());
|
||||
|
|
@ -686,7 +694,7 @@ public final class MapleMap {
|
|||
if (price != -1.0 && recvMesos > 0) {
|
||||
chr.gainMeso(recvMesos, true);
|
||||
if (recvMesos >= 10000) {
|
||||
chr.dropMessage(6, "掉落物品名称:" + MapleItemInformationProvider.getInstance().getName(idrop.getItemId()) + " 自动为你售卖掉获得:" + recvMesos + "金币");
|
||||
chr.dropMessage(6, "掉落物品:[ " + MapleItemInformationProvider.getInstance().getName(idrop.getItemId()) + " ] 自动卖出获得:" + recvMesos + "金币");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
|
@ -695,7 +703,7 @@ public final class MapleMap {
|
|||
}
|
||||
} else if (Randomizer.nextInt(10000) <= ((Integer) Start.ConfigValuesMap.get("出装备概率")).intValue()) {
|
||||
final IItem idrop = ii.randomizeStats((Equip) ii.getEquipById(de2.itemId));
|
||||
if ((chr.get刷钱模式() == 1 && idrop.getItemId() != 0) || (chr.get刷钱模式() == 2 && idrop.getItemId() / 1000000 == 1)) {
|
||||
if ((chr.get刷钱模式() == 1 && idrop.getItemId() != 0) || (chr.get刷钱模式() == 2 && (idrop.getItemId() / 1000000 == 1||(idrop.getItemId()>1999999&&idrop.getItemId()<2021000)||(idrop.getItemId()>2059999&&idrop.getItemId()<2080000)||(idrop.getItemId()>2329999&&idrop.getItemId()<2340000)))) {
|
||||
double price;
|
||||
if (GameConstants.isThrowingStar(idrop.getItemId()) || GameConstants.isBullet(idrop.getItemId())) {
|
||||
price = (double) ii.getWholePrice(idrop.getItemId());
|
||||
|
|
@ -706,7 +714,7 @@ public final class MapleMap {
|
|||
if (price != -1.0 && recvMesos > 0) {
|
||||
chr.gainMeso(recvMesos, true);
|
||||
if (recvMesos >= 10000) {
|
||||
chr.dropMessage(6, "掉落物品名称:" + MapleItemInformationProvider.getInstance().getName(idrop.getItemId()) + " 自动为你售卖掉获得:" + recvMesos + "金币");
|
||||
chr.dropMessage(6, "掉落物品:[ " + MapleItemInformationProvider.getInstance().getName(idrop.getItemId()) + " ] 自动卖出获得:" + recvMesos + "金币");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
|
@ -716,7 +724,25 @@ public final class MapleMap {
|
|||
} else {
|
||||
final int range = Math.abs(de2.Maximum - de2.Minimum);
|
||||
final IItem idrop = new Item(de2.itemId, (short) 0, (short) ((de2.Maximum != 1) ? (Randomizer.nextInt((range <= 0) ? 1 : range) + de2.Minimum) : 1), (byte) 0);
|
||||
this.spawnMobDrop(idrop, this.calcDropPos(pos, mob.getPosition()), mob, chr, droptype, de2.questid);
|
||||
|
||||
if ((chr.get刷钱模式() == 1 && idrop.getItemId() != 0) || (chr.get刷钱模式() == 2 && (idrop.getItemId() / 1000000 == 1||(idrop.getItemId()>1999999&&idrop.getItemId()<2021000)||(idrop.getItemId()>2059999&&idrop.getItemId()<2080000)||(idrop.getItemId()>2329999&&idrop.getItemId()<2340000)))) {
|
||||
double price;
|
||||
if (GameConstants.isThrowingStar(idrop.getItemId()) || GameConstants.isBullet(idrop.getItemId())) {
|
||||
price = (double) ii.getWholePrice(idrop.getItemId());
|
||||
} else {
|
||||
price = ii.getPrice(idrop.getItemId());
|
||||
}
|
||||
final int recvMesos = (int) Math.max(Math.ceil(price), 0.0);
|
||||
if (price != -1.0 && recvMesos > 0) {
|
||||
chr.gainMeso(recvMesos, true);
|
||||
if (recvMesos >= 10000) {
|
||||
chr.dropMessage(6, "掉落物品:[ " + MapleItemInformationProvider.getInstance().getName(idrop.getItemId()) + " ] 自动卖出获得:" + recvMesos + "金币");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
this.spawnMobDrop(idrop, this.calcDropPos(pos, mob.getPosition()), mob, chr, droptype, de2.questid);
|
||||
}
|
||||
|
||||
}
|
||||
++d;
|
||||
}
|
||||
|
|
@ -733,7 +759,7 @@ public final class MapleMap {
|
|||
break;
|
||||
}
|
||||
}
|
||||
double a = (double) mesos2 * (lastMeso / 100.0) * ((double) (chr.getVipExpRate() / 100) + 1.0) * (double) chr.getDropMod() * chr.getDropm() * (double) cmServerrate;
|
||||
double a = (double) mesos2 * (lastMeso / 100.0) * ((double) (chr.getVipExpRate() / 100) + 1.0) * (double) chr.getcashMod() * chr.getDropm() * (double) cmServerrate;
|
||||
this.spawnMobMesoDrop((int) (a), this.calcDropPos(pos, mob.getTruePosition()), (MapleMapObject) mob, chr, false, droptype);
|
||||
}
|
||||
}
|
||||
|
|
@ -743,7 +769,22 @@ public final class MapleMap {
|
|||
final int cashz = (mob.getStats().isBoss() && mob.getStats().getHPDisplayType() == 0) ? 20 : 1;
|
||||
final int cashModifier = (int) (mob.getStats().isBoss() ? 0L : ((long) (mob.getMobExp() / 1000) + mob.getMobMaxHp() / 10000L));
|
||||
for (final MonsterGlobalDropEntry de3 : globalEntry) {
|
||||
if (Randomizer.nextInt(999999) < (int) ((double) ((long) (de3.chance * chServerrate) * Math.round((double) chr.getDropMod() * chr.getStat().dropBuff / 100.0)) * (showdown / 100.0) / (double) ((Integer) Start.ConfigValuesMap.get("砍爆率")).intValue()) && (de3.continent < 0 || (de3.continent < 10 && this.mapid / 100000000 == de3.continent) || (de3.continent < 100 && this.mapid / 10000000 == de3.continent) || (de3.continent < 1000 && this.mapid / 1000000 == de3.continent))) {
|
||||
double baseChance = de3.chance * chServerrate;
|
||||
double dropModFactor = Math.round((double) chr.getDropMod() * chr.getStat().dropBuff / 100.0);
|
||||
double showdownFactor = showdown / 100.0;
|
||||
double configRate = ((Integer) Start.ConfigValuesMap.get("砍爆率")).intValue();
|
||||
double finalChance = (baseChance * dropModFactor * showdownFactor) / configRate;
|
||||
int chanceInt = (int) finalChance;
|
||||
|
||||
// boolean isGlobalDrop = de3.continent < 0;
|
||||
// boolean isContinent1 = de3.continent < 10 && this.mapid / 100000000 == de3.continent;
|
||||
// boolean isContinent4 = de3.continent < 10 && this.mapid / 100000000 == de3.continent;
|
||||
// boolean isContinent2 = de3.continent < 100 && this.mapid / 10000000 == de3.continent;
|
||||
// boolean isContinent3 = de3.continent < 1000 && this.mapid / 1000000 == de3.continent;
|
||||
// boolean isValidMap = isGlobalDrop || isContinent1 || isContinent2 || isContinent3;
|
||||
|
||||
|
||||
if (Randomizer.nextInt(999999) < chanceInt ){
|
||||
if (droptype == 3) {
|
||||
pos.x = mobpos + ((d % 2 == 0) ? (40 * (d + 1) / 2) : (-(40 * (d / 2))));
|
||||
} else {
|
||||
|
|
@ -762,7 +803,23 @@ public final class MapleMap {
|
|||
idrop = new Item(de3.itemId, (short) 0, (short) ((de3.Maximum != 1) ? (Randomizer.nextInt(de3.Maximum - de3.Minimum) + de3.Minimum) : 1), (byte) 0);
|
||||
}
|
||||
if (mob.getId() != 9300175) {
|
||||
this.spawnMobDrop(idrop, this.calcDropPos(pos, mob.getPosition()), mob, chr, (byte) (de3.onlySelf ? 0 : droptype), de3.questid);
|
||||
if ((chr.get刷钱模式() == 1 && idrop.getItemId() != 0) || (chr.get刷钱模式() == 2 && (idrop.getItemId() / 1000000 == 1||(idrop.getItemId()>1999999&&idrop.getItemId()<2021000)||(idrop.getItemId()>2059999&&idrop.getItemId()<2080000)||(idrop.getItemId()>2329999&&idrop.getItemId()<2340000)))) {
|
||||
double price;
|
||||
if (GameConstants.isThrowingStar(idrop.getItemId()) || GameConstants.isBullet(idrop.getItemId())) {
|
||||
price = (double) ii.getWholePrice(idrop.getItemId());
|
||||
} else {
|
||||
price = ii.getPrice(idrop.getItemId());
|
||||
}
|
||||
final int recvMesos = (int) Math.max(Math.ceil(price), 0.0);
|
||||
if (price != -1.0 && recvMesos > 0) {
|
||||
chr.gainMeso(recvMesos, true);
|
||||
if (recvMesos >= 10000) {
|
||||
chr.dropMessage(6, "掉落物品:[ " + MapleItemInformationProvider.getInstance().getName(idrop.getItemId()) + " ] 自动卖出获得:" + recvMesos + "金币");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
this.spawnMobDrop(idrop, this.calcDropPos(pos, mob.getPosition()), mob, chr, (byte) (de3.onlySelf ? 0 : droptype), de3.questid);
|
||||
}
|
||||
}
|
||||
++d;
|
||||
}
|
||||
|
|
@ -1038,13 +1095,24 @@ public final class MapleMap {
|
|||
}
|
||||
this.dropFromMonster(drop, monster);
|
||||
|
||||
XuanShangRenWu xuanShangRenWu = Start.xsRW.get(chr.getId());
|
||||
if (xuanShangRenWu != null&&xuanShangRenWu.getMobId()==mobid &&xuanShangRenWu.getMobNum()<xuanShangRenWu.getMaxNum()){
|
||||
xuanShangRenWu.setMobNum(xuanShangRenWu.getMobNum() + 1);
|
||||
chr.dropMessage(-1, xuanShangRenWu.getMobName() +xuanShangRenWu.getMobNum() +"/"+xuanShangRenWu.getMaxNum());
|
||||
}
|
||||
|
||||
|
||||
//贪玩鞭尸
|
||||
int bsjl = chr.getBSJL();
|
||||
int bsjl2 = Randomizer.rand(0, 10000);
|
||||
if (bsjl2 < bsjl) {
|
||||
String mapName1 = chr.getMap().getMapName();
|
||||
Broadcast.broadcastMessage(MaplePacketCreator.serverNotice(5, "恭喜[" + chr.getName() + "]在"+mapName1+"击杀怪物后触发鞭尸,怪物二次大爆!"));
|
||||
chr.dropMessage(-1, "击杀["+monster.getStats().getName()+"]触发鞭尸,怪物二次大爆!");
|
||||
if (monster.getStats().isBoss()) {
|
||||
Broadcast.broadcastMessage(MaplePacketCreator.serverNotice(5, "[" + chr.getName() + "]击杀["+monster.getStats().getName()+"]触发鞭尸,怪物二次大爆!"));
|
||||
}
|
||||
this.dropFromMonster(drop, monster);
|
||||
|
||||
}
|
||||
|
||||
int bs = chr.getBs();
|
||||
|
|
@ -2198,12 +2266,18 @@ public final class MapleMap {
|
|||
public final void spawnMesoDrop(final int meso, final Point position, final MapleMapObject dropper, final MapleCharacter owner, final boolean playerDrop, final byte droptype) {
|
||||
final Point droppos = this.calcDropPos(position, position);
|
||||
final MapleMapItem mdrop = new MapleMapItem(meso, droppos, dropper, owner, droptype, playerDrop);
|
||||
|
||||
this.spawnAndAddRangedMapObject((MapleMapObject) mdrop, (DelayedPacketCreation) new DelayedPacketCreation() {
|
||||
@Override
|
||||
public void sendPackets(final MapleClient c) {
|
||||
c.sendPacket(MaplePacketCreator.dropItemFromMapObject(mdrop, dropper.getPosition(), droppos, (byte) 1));
|
||||
if (mdrop.getMeso()==0 && Start.diaoLuoTiShis.get(mdrop.getItem().getItemId())!= null) {
|
||||
mdrop.setIsmob(1);
|
||||
}
|
||||
}
|
||||
}, null);
|
||||
|
||||
|
||||
if (((Integer) Start.ConfigValuesMap.get("特殊宠物吸取开关")).intValue() > 0 && ((Integer) Start.ConfigValuesMap.get("特殊宠物吸金开关")).intValue() > 0 && owner.getEventInstance() == null) {
|
||||
boolean 吸物状态 = false;
|
||||
int 宠物数据库ID = 0;
|
||||
|
|
@ -2245,6 +2319,8 @@ public final class MapleMap {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (!this.everlast) {
|
||||
mdrop.registerExpire(120000L);
|
||||
if (droptype == 0 || droptype == 1) {
|
||||
|
|
@ -2255,12 +2331,19 @@ public final class MapleMap {
|
|||
|
||||
public final void spawnMobMesoDrop(final int meso, final Point position, final MapleMapObject dropper, final MapleCharacter owner, final boolean playerDrop, final byte droptype) {
|
||||
final MapleMapItem mdrop = new MapleMapItem(meso, position, dropper, owner, droptype, playerDrop);
|
||||
|
||||
this.spawnAndAddRangedMapObject((MapleMapObject) mdrop, (DelayedPacketCreation) new DelayedPacketCreation() {
|
||||
@Override
|
||||
public void sendPackets(final MapleClient c) {
|
||||
c.sendPacket(MaplePacketCreator.dropItemFromMapObject(mdrop, dropper.getPosition(), position, (byte) 1));
|
||||
if (mdrop.getMeso()==0 && Start.diaoLuoTiShis.get(mdrop.getItem().getItemId())!= null) {
|
||||
mdrop.setIsmob(1);
|
||||
}
|
||||
}
|
||||
}, null);
|
||||
|
||||
|
||||
|
||||
if (((Integer) Start.ConfigValuesMap.get("特殊宠物吸取开关")).intValue() > 0 && ((Integer) Start.ConfigValuesMap.get("特殊宠物吸金开关")).intValue() > 0 && owner.getEventInstance() == null) {
|
||||
boolean 吸物状态 = false;
|
||||
int 宠物数据库ID = 0;
|
||||
|
|
@ -2306,18 +2389,31 @@ public final class MapleMap {
|
|||
if (droptype == 0 || droptype == 1) {
|
||||
mdrop.registerFFA(30000L);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public final void spawnMobDrop(final IItem idrop, final Point dropPos, final MapleMonster mob, final MapleCharacter chr, final byte droptype, final short questid) {
|
||||
if ( GameConstants.isMonsterCard(idrop.getItemId())) {
|
||||
chr.getMonsterBook().addCard(chr.getClient(), idrop.getItemId());
|
||||
// InventoryHandler.removeItem(owner, mdrop, mdrop);
|
||||
return;
|
||||
}
|
||||
|
||||
final MapleMapItem mdrop = new MapleMapItem(idrop, dropPos, (MapleMapObject) mob, chr, droptype, false, (int) questid);
|
||||
|
||||
this.spawnAndAddRangedMapObject((MapleMapObject) mdrop, (DelayedPacketCreation) new DelayedPacketCreation() {
|
||||
@Override
|
||||
public void sendPackets(final MapleClient c) {
|
||||
if (questid <= 0 || c.getPlayer().getQuestStatus((int) questid) == 1) {
|
||||
c.sendPacket(MaplePacketCreator.dropItemFromMapObject(mdrop, mob.getPosition(), dropPos, (byte) 1));
|
||||
if (mdrop.getMeso()==0 && Start.diaoLuoTiShis.get(mdrop.getItem().getItemId())!= null) {
|
||||
mdrop.setIsmob(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}, null);
|
||||
|
||||
if (((Integer) Start.ConfigValuesMap.get("特殊宠物吸取开关")).intValue() > 0 && ((Integer) Start.ConfigValuesMap.get("特殊宠物吸物开关")).intValue() > 0 && chr.getEventInstance() == null ) {
|
||||
boolean 吸物状态 = false;
|
||||
int 宠物数据库ID = 0;
|
||||
|
|
@ -2368,6 +2464,11 @@ public final class MapleMap {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (mdrop.getMeso()==0 && GameConstants.isMonsterCard(mdrop.getItemId())) {
|
||||
//InventoryHandler.removeItem(chr, mdrop, mdrop);
|
||||
}
|
||||
mdrop.registerExpire(120000L);
|
||||
if (droptype == 0 || droptype == 1) {
|
||||
mdrop.registerFFA(30000L);
|
||||
|
|
@ -3386,7 +3487,7 @@ public final class MapleMap {
|
|||
return sp;
|
||||
}
|
||||
|
||||
public final void addAreaMonsterSpawn(final MapleMonster monster, Point pos1, Point pos2, Point pos3, final int mobTime, final String msg) {
|
||||
public final void addAreaMonsterSpawn(final MapleMonster monster, Point pos1, Point pos2, Point pos3, final int mobTime, final String msg,String bighp) {
|
||||
pos1 = this.calcPointBelow(pos1);
|
||||
pos2 = this.calcPointBelow(pos2);
|
||||
pos3 = this.calcPointBelow(pos3);
|
||||
|
|
@ -3428,7 +3529,7 @@ public final class MapleMap {
|
|||
pos2 = new Point(pos3);
|
||||
}
|
||||
}
|
||||
this.monsterSpawn.add(new SpawnPointAreaBoss(monster, pos1, pos2, pos3, mobTime, msg));
|
||||
this.monsterSpawn.add(new SpawnPointAreaBoss(monster, pos1, pos2, pos3, mobTime, msg,bighp));
|
||||
}
|
||||
|
||||
public final List<MapleCharacter> getCharacters() {
|
||||
|
|
@ -3620,6 +3721,9 @@ public final class MapleMap {
|
|||
}
|
||||
|
||||
public void respawn(final boolean force) {
|
||||
|
||||
|
||||
|
||||
this.lastSpawnTime = System.currentTimeMillis();
|
||||
final MapleMonster mobb = this.getMonsterById(9990026);
|
||||
final int monmun = MapConstants.isMonsterSpawn(this);
|
||||
|
|
@ -3632,12 +3736,33 @@ public final class MapleMap {
|
|||
this.createMobInterval = newsh;
|
||||
numm = 1;
|
||||
}
|
||||
for (int i = 0; i < this.monsterSpawn.size(); i++) {
|
||||
Spawns spawns = this.monsterSpawn.get(i);
|
||||
if (spawns instanceof SpawnPointAreaBoss){
|
||||
SpawnPointAreaBoss spawnPoint2 = (SpawnPointAreaBoss) spawns;
|
||||
if (spawnPoint2.shouldSpawn() || MapConstants.isForceRespawn(this.mapid)) {
|
||||
spawnPoint2.spawnMonster(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (force) {
|
||||
final int numShouldSpawn = this.monsterSpawn.size() * monmun * numm - this.spawnedMonstersOnMap.get();
|
||||
if (numShouldSpawn > 0) {
|
||||
int spawned = 0;
|
||||
for (final Spawns spawnPoint : this.monsterSpawn) {
|
||||
spawnPoint.spawnMonster(this);
|
||||
MapleMonster mapleMonster = spawnPoint.spawnMonster(this);
|
||||
if (mobMoveChrId!=-1) {
|
||||
if (!mapleMonster.getStats().isBoss()) {
|
||||
mapleMonster.setPosition(getChrPos());
|
||||
try {
|
||||
broadcastMessage(MobPacket.moveMonster(false, 0, 0, mapleMonster.getObjectId(), getChrPos(), mapleMonster.getPosition(), get吸怪Res()), mapleMonster.getPosition());
|
||||
}catch (Exception e){
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
if (++spawned >= numShouldSpawn) {
|
||||
break;
|
||||
}
|
||||
|
|
@ -3652,7 +3777,17 @@ public final class MapleMap {
|
|||
for (final Spawns spawnPoint2 : randomSpawn) {
|
||||
if (spawnPoint2.shouldSpawn() || MapConstants.isForceRespawn(this.mapid)) {
|
||||
for (int i = 0; i < monmun * numm; ++i) {
|
||||
spawnPoint2.spawnMonster(this);
|
||||
MapleMonster mapleMonster = spawnPoint2.spawnMonster(this);
|
||||
if (mobMoveChrId!=-1) {
|
||||
if (!mapleMonster.getStats().isBoss()) {
|
||||
mapleMonster.setPosition(getChrPos());
|
||||
try {
|
||||
broadcastMessage(MobPacket.moveMonster(false, 0, 0, mapleMonster.getObjectId(), getChrPos(), mapleMonster.getPosition(), get吸怪Res()), mapleMonster.getPosition());
|
||||
}catch (Exception e){
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
++spawned;
|
||||
}
|
||||
}
|
||||
|
|
@ -3660,6 +3795,7 @@ public final class MapleMap {
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ import provider.MapleDataProvider;
|
|||
|
||||
public class MapleMapFactory {
|
||||
private static final MapleDataProvider source = MapleDataProviderFactory.getDataProvider("Map.wz");
|
||||
private static final MapleData nameData = MapleDataProviderFactory.getDataProvider("String.wz").getData("Map.img");
|
||||
public static final MapleData nameData = MapleDataProviderFactory.getDataProvider("String.wz").getData("Map.img");
|
||||
private final Map<Integer, MapleMap> maps;
|
||||
private final Map<Integer, MapleMap> instanceMap;
|
||||
private static final Map<Integer, MapleNodes> mapInfos = new HashMap();
|
||||
|
|
@ -54,6 +54,8 @@ public class MapleMapFactory {
|
|||
private int channel;
|
||||
private static boolean changed = false;
|
||||
|
||||
|
||||
|
||||
public MapleMapFactory() {
|
||||
this.maps = (Map<Integer, MapleMap>) new HashMap();
|
||||
this.instanceMap = (Map<Integer, MapleMap>) new HashMap();
|
||||
|
|
@ -491,11 +493,13 @@ public class MapleMapFactory {
|
|||
Point pos1 = null;
|
||||
Point pos2 = null;
|
||||
Point pos3 = null;
|
||||
String hp = null;
|
||||
for (int a = 0; a < Start.野外boss刷新.size(); ++a) {
|
||||
if (map.getId() == ((BossInMap) Start.野外boss刷新.get(a)).getMap()) {
|
||||
mobtime = ((BossInMap) Start.野外boss刷新.get(a)).getTime() * 60;
|
||||
monsterid = ((BossInMap) Start.野外boss刷新.get(a)).getMobid();
|
||||
msg = ((BossInMap) Start.野外boss刷新.get(a)).getMsg();
|
||||
hp = (Start.野外boss刷新.get(a)).getBosshp();
|
||||
pos1 = new Point(((BossInMap) Start.野外boss刷新.get(a)).getX(), ((BossInMap) Start.野外boss刷新.get(a)).getY());
|
||||
pos2 = new Point(((BossInMap) Start.野外boss刷新.get(a)).getX(), ((BossInMap) Start.野外boss刷新.get(a)).getY());
|
||||
pos3 = new Point(((BossInMap) Start.野外boss刷新.get(a)).getX(), ((BossInMap) Start.野外boss刷新.get(a)).getY());
|
||||
|
|
@ -503,7 +507,12 @@ public class MapleMapFactory {
|
|||
}
|
||||
}
|
||||
if (monsterid > 0) {
|
||||
map.addAreaMonsterSpawn(MapleLifeFactory.getMonster(monsterid), pos1, pos2, pos3, mobtime, msg);
|
||||
MapleMonster monster = MapleLifeFactory.getMonster(monsterid);
|
||||
if (!hp.equals("0")) {
|
||||
map.addAreaMonsterSpawn(monster, pos1, pos2, pos3, mobtime, msg, hp+"000000");//野外BOSS血量
|
||||
}else {
|
||||
map.addAreaMonsterSpawn(monster, pos1, pos2, pos3, mobtime, msg,"0");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -13,6 +13,11 @@ import client.inventory.IItem;
|
|||
|
||||
public class MapleMapItem extends AbstractMapleMapObject {
|
||||
protected IItem item;
|
||||
|
||||
protected int ismob = 0;
|
||||
|
||||
|
||||
|
||||
protected MapleMapObject dropper;
|
||||
protected int character_ownerid;
|
||||
protected int meso;
|
||||
|
|
@ -191,4 +196,13 @@ public class MapleMapItem extends AbstractMapleMapObject {
|
|||
map.spawnRandDrop();
|
||||
}
|
||||
}
|
||||
|
||||
public int getIsmob() {
|
||||
return ismob;
|
||||
}
|
||||
|
||||
public void setIsmob(int ismob) {
|
||||
this.ismob = ismob;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -441,6 +441,18 @@ public class MaplePacketCreator {
|
|||
return mplew.getPacket();
|
||||
}
|
||||
|
||||
|
||||
//14绿 15红
|
||||
public static byte[] getGachaponMega2(final String name, final String message, final IItem item, final byte rareness) {
|
||||
final MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
|
||||
mplew.writeShort((int) SendPacketOpcode.SERVERMESSAGE.getValue());
|
||||
mplew.write(rareness);
|
||||
mplew.writeMapleAsciiString(name + message);
|
||||
mplew.writeInt(0);
|
||||
PacketHelper.addItemInfo(mplew, item, true, true);
|
||||
return mplew.getPacket();
|
||||
}
|
||||
|
||||
public static byte[] getGachaponMega(final String name, final String message, final IItem item, final byte rareness, final int Channel) {
|
||||
final MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
|
||||
mplew.writeShort((int) SendPacketOpcode.SERVERMESSAGE.getValue());
|
||||
|
|
@ -840,6 +852,10 @@ public class MaplePacketCreator {
|
|||
}
|
||||
|
||||
public static byte[] dropItemFromMapObject(final MapleMapItem drop, final Point dropfrom, final Point dropto, final byte mod) {
|
||||
|
||||
|
||||
|
||||
|
||||
final MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
|
||||
mplew.writeShort((int) SendPacketOpcode.DROP_ITEM_FROM_MAPOBJECT.getValue());
|
||||
mplew.write(mod);
|
||||
|
|
@ -854,6 +870,8 @@ public class MaplePacketCreator {
|
|||
mplew.writePos(dropfrom);
|
||||
mplew.writeShort(0);
|
||||
}
|
||||
|
||||
|
||||
if (drop.getMeso() == 0) {
|
||||
PacketHelper.addExpirationTime(mplew, drop.getItem().getExpiration());
|
||||
}
|
||||
|
|
@ -880,24 +898,6 @@ public class MaplePacketCreator {
|
|||
mplew.write((int) chr.getLevel());
|
||||
mplew.writeMapleAsciiString(chr.getName());
|
||||
String xl = "";
|
||||
if (chr.getCombat() <= 1000)
|
||||
xl = "[青铜]";
|
||||
else if (chr.getCombat() > 1000 && chr.getCombat() <= 5000)
|
||||
xl = "[白银]";
|
||||
else if (chr.getCombat() > 5000 && chr.getCombat() <= 10000)
|
||||
xl = "[黄金]";
|
||||
else if (chr.getCombat() > 10000 && chr.getCombat() <= 50000)
|
||||
xl = "[铂金]";
|
||||
else if (chr.getCombat() > 50000 && chr.getCombat() <= 100000)
|
||||
xl = "[钻石]";
|
||||
else if (chr.getCombat() > 100000 && chr.getCombat() <= 500000)
|
||||
xl = "[大师]";
|
||||
else if (chr.getCombat() > 500000 && chr.getCombat() <= 600000)
|
||||
xl = "[☆王者☆]";
|
||||
else if (chr.getCombat() > 600000 && chr.getCombat() <= 1000000)
|
||||
xl = "[☆超级王者☆]";
|
||||
else if (chr.getCombat() > 1100000)
|
||||
xl = "[☆宇宙王者☆]";
|
||||
|
||||
|
||||
String name="";
|
||||
|
|
@ -2868,24 +2868,7 @@ public class MaplePacketCreator {
|
|||
mplew.write(1);
|
||||
mplew.writeInt(0);
|
||||
String xl = "";
|
||||
if (c.getCombat() <= 1000)
|
||||
xl = "[青铜]";
|
||||
else if (c.getCombat() > 1000 && c.getCombat() <= 5000)
|
||||
xl = "[白银]";
|
||||
else if (c.getCombat() > 5000 && c.getCombat() <= 10000)
|
||||
xl = "[黄金]";
|
||||
else if (c.getCombat() > 10000 && c.getCombat() <= 50000)
|
||||
xl = "[铂金]";
|
||||
else if (c.getCombat() > 50000 && c.getCombat() <= 100000)
|
||||
xl = "[钻石]";
|
||||
else if (c.getCombat() > 100000 && c.getCombat() <= 500000)
|
||||
xl = "[王者]";
|
||||
else if (c.getCombat() > 500000 && c.getCombat() <= 600000)
|
||||
xl = "[☆大师☆]";
|
||||
else if (c.getCombat() > 600000 && c.getCombat() <= 1000000)
|
||||
xl = "[☆超级王者☆]";
|
||||
else if (c.getCombat() > 1100000)
|
||||
xl = "[☆宇宙王者☆]";
|
||||
|
||||
|
||||
String name="";
|
||||
if (Start.zlkg == 1) {
|
||||
|
|
@ -2943,24 +2926,24 @@ public class MaplePacketCreator {
|
|||
public static void getGuildInfo(final MaplePacketLittleEndianWriter mplew, final MapleGuild guild, final MapleCharacter c) {
|
||||
mplew.writeInt(guild.getId());
|
||||
String xl = "";
|
||||
if (c.getCombat() <= 1000)
|
||||
xl = "[青铜]";
|
||||
else if (c.getCombat() > 1000 && c.getCombat() <= 5000)
|
||||
xl = "[白银]";
|
||||
else if (c.getCombat() > 5000 && c.getCombat() <= 10000)
|
||||
xl = "[黄金]";
|
||||
else if (c.getCombat() > 10000 && c.getCombat() <= 50000)
|
||||
xl = "[铂金]";
|
||||
else if (c.getCombat() > 50000 && c.getCombat() <= 100000)
|
||||
xl = "[钻石]";
|
||||
else if (c.getCombat() > 100000 && c.getCombat() <= 500000)
|
||||
xl = "[大师]";
|
||||
else if (c.getCombat() > 500000 && c.getCombat() <= 600000)
|
||||
xl = "[☆王者☆]";
|
||||
else if (c.getCombat() > 600000 && c.getCombat() <= 1000000)
|
||||
xl = "[☆超级王者☆]";
|
||||
else if (c.getCombat() > 1100000)
|
||||
xl = "[☆宇宙王者☆]";
|
||||
// if (c.getCombat() <= 1000)
|
||||
// xl = "[青铜]";
|
||||
// else if (c.getCombat() > 1000 && c.getCombat() <= 5000)
|
||||
// xl = "[白银]";
|
||||
// else if (c.getCombat() > 5000 && c.getCombat() <= 10000)
|
||||
// xl = "[黄金]";
|
||||
// else if (c.getCombat() > 10000 && c.getCombat() <= 50000)
|
||||
// xl = "[铂金]";
|
||||
// else if (c.getCombat() > 50000 && c.getCombat() <= 100000)
|
||||
// xl = "[钻石]";
|
||||
// else if (c.getCombat() > 100000 && c.getCombat() <= 500000)
|
||||
// xl = "[大师]";
|
||||
// else if (c.getCombat() > 500000 && c.getCombat() <= 600000)
|
||||
// xl = "[☆王者☆]";
|
||||
// else if (c.getCombat() > 600000 && c.getCombat() <= 1000000)
|
||||
// xl = "[☆超级王者☆]";
|
||||
// else if (c.getCombat() > 1100000)
|
||||
// xl = "[☆宇宙王者☆]";
|
||||
String name="";
|
||||
if (Start.zlkg == 1) {
|
||||
int 转生次数 = c.getAccountidLogByCid("飞升");
|
||||
|
|
|
|||
|
|
@ -102,11 +102,11 @@ public class MaplePacketLittleEndianWriter {
|
|||
this.writeAsciiString(s);
|
||||
}
|
||||
|
||||
public final void writeUTF8(final String s) {
|
||||
public final void writeUTF8(String s) {
|
||||
if (s == null ||s.isEmpty()){
|
||||
this.writeShort(0);
|
||||
return;
|
||||
s = "0";
|
||||
}
|
||||
|
||||
this.writeShort((int) (short)s.getBytes(StandardCharsets.UTF_8).length);
|
||||
this.write(s.getBytes(StandardCharsets.UTF_8));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -482,6 +482,7 @@ public class PacketHelper {
|
|||
mplew.writeUTF8(equip.getdd());
|
||||
mplew.writeUTF8(equip.getdb());
|
||||
mplew.writeUTF8(equip.getqg());
|
||||
mplew.writeUTF8(equip.getqgjs());
|
||||
} else {
|
||||
mplew.writeShort((int) item.getQuantity());
|
||||
mplew.writeMapleAsciiString(item.getOwner());
|
||||
|
|
|
|||
|
|
@ -0,0 +1,29 @@
|
|||
### IntelliJ IDEA ###
|
||||
out/
|
||||
!**/src/main/**/out/
|
||||
!**/src/test/**/out/
|
||||
|
||||
### Eclipse ###
|
||||
.apt_generated
|
||||
.classpath
|
||||
.factorypath
|
||||
.project
|
||||
.settings
|
||||
.springBeans
|
||||
.sts4-cache
|
||||
bin/
|
||||
!**/src/main/**/bin/
|
||||
!**/src/test/**/bin/
|
||||
|
||||
### NetBeans ###
|
||||
/nbproject/private/
|
||||
/nbbuild/
|
||||
/dist/
|
||||
/nbdist/
|
||||
/.nb-gradle/
|
||||
|
||||
### VS Code ###
|
||||
.vscode/
|
||||
|
||||
### Mac OS ###
|
||||
.DS_Store
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
//TIP 要<b>运行</b>代码,请按 <shortcut actionId="Run"/> 或
|
||||
// 点击装订区域中的 <icon src="AllIcons.Actions.Execute"/> 图标。
|
||||
public class Main {
|
||||
public static void main(String[] args) {
|
||||
//TIP 当文本光标位于高亮显示的文本处时按 <shortcut actionId="ShowIntentionActions"/>
|
||||
// 查看 IntelliJ IDEA 建议如何修正。
|
||||
System.out.printf("Hello and welcome!");
|
||||
|
||||
for (int i = 1; i <= 5; i++) {
|
||||
//TIP 按 <shortcut actionId="Debug"/> 开始调试代码。我们已经设置了一个 <icon src="AllIcons.Debugger.Db_set_breakpoint"/> 断点
|
||||
// 但您始终可以通过按 <shortcut actionId="ToggleLineBreakpoint"/> 添加更多断点。
|
||||
System.out.println("i = " + i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
||||
Loading…
Reference in New Issue