Compare commits

...

3 Commits

Author SHA1 Message Date
雪风 285da62cfd Merge branch 'master' of http://192.168.200.25:3000/Lenheart/MXD-Server 2025-04-08 13:42:24 +08:00
雪风 f78fed284c no message 2025-04-08 13:42:21 +08:00
雪风 8263aed9d8 no message 2025-04-06 17:16:44 +08:00
6 changed files with 55 additions and 14 deletions

View File

@ -2026,7 +2026,8 @@ public class MapleCharacter extends AbstractAnimatedMapleMapObject implements Se
bl = Math.max(bl, (blobj.getBl()));
}
}
num = (num + (num*bl/100));
long aa = (long)num *bl;
num = (int) (num + (aa/100));
switch (item1.getItemId()) {
case 0:
@ -5334,10 +5335,24 @@ public class MapleCharacter extends AbstractAnimatedMapleMapObject implements Se
}
}
Num = Num.add((this.getQG()).divide(BigInteger.valueOf(100)));
Num = Num.add((this.getQGjs()).multiply(BigInteger.valueOf(100)));
Num = Num.add((this.getDD()).multiply(BigInteger.valueOf(666)));
Num = Num.add((this.getDB()).multiply(BigInteger.valueOf(1000)));
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.divide(BigInteger.valueOf(100)));
}
BigInteger dd = this.getDD();
if (dd!=null) {
Num = Num.add(dd.divide(BigInteger.valueOf(666)));
}
BigInteger db = this.getDB();
if (db!=null) {
Num = Num.add(this.getDB().divide(BigInteger.valueOf(1000)));
}
return DamageParse.process(Num.toString());
}

View File

@ -639,9 +639,7 @@ public class PlayerStats implements Serializable {
dsbbh++;
if (!first_login) {
for (AotuNpc npc : Start.aotuNpcs) {
if ((npc.getMapId() == chra.getMapId()||npc.getMapId()==0) && (npc.getItemId() == 0 || chra.getItemNum(npc.getItemId())>=npc.getItemNum()) && (npc.getEquId() == 0 || chra.hasEquipped(npc.getEquId()))) {
Start.executor.schedule(() -> dsnpcfw(chra, npc,dsbbh), npc.getTime(), TimeUnit.MILLISECONDS);
}
Start.executor.schedule(() -> dsnpcfw(chra, npc,dsbbh), npc.getTime(), TimeUnit.MILLISECONDS);
}
}
@ -985,10 +983,12 @@ public class PlayerStats implements Serializable {
private void dsnpcfw(MapleCharacter chra, AotuNpc aotuNpc,int dsbbh2) {
if (dsbbh2!=this.dsbbh)return;
if ((aotuNpc.getMapId() == chra.getMapId()||aotuNpc.getMapId()==0) && (aotuNpc.getItemId() == 0 || chra.getItemNum(aotuNpc.getItemId())>=aotuNpc.getItemNum()) && (aotuNpc.getEquId() == 0 || chra.hasEquipped(aotuNpc.getEquId()))) {
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());
if ((aotuNpc.getMapId() == chra.getMapId()||aotuNpc.getMapId()==0)) {
if ((aotuNpc.getItemId() == 0 || chra.getItemNum(aotuNpc.getItemId())>=aotuNpc.getItemNum()) && (aotuNpc.getEquId() == 0 || chra.hasEquipped(aotuNpc.getEquId()))){
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);
}

View File

@ -13,6 +13,8 @@ public class AotuNpc {
int equId;
int time;
public int getItemNum() {
return itemNum;
}
@ -21,7 +23,7 @@ public class AotuNpc {
this.itemNum = itemNum;
}
int time;
public int getMapId() {
return mapId;

View File

@ -1,6 +1,8 @@
package gui.tw.rw;
import gui.Start;
import provider.MapleDataTool;
import server.life.MapleLifeFactory;
import java.util.ArrayList;
import java.util.List;
@ -53,6 +55,7 @@ public class XuanShangRenWu {
}
public void setMobId(int mobId) {
this.setMobName(MapleDataTool.getString((this.getMobId() + "/name"), MapleLifeFactory.mobStringData, "未知怪物"));
this.mobId = mobId;
}

View File

@ -1,5 +1,6 @@
package server;
import java.io.IOException;
import java.util.Set;
import java.util.Iterator;
@ -103,6 +104,22 @@ public class ShutdownServer implements Runnable, ShutdownServerMBean {
System.out.println("[" + FileoutputUtil.CurrentReadable_Time() + "][信息]:服务端已经完全关闭了请点击右上角的xx按钮关闭.");
System.out.println("[" + FileoutputUtil.CurrentReadable_Time() + "][========================================]");
String property = System.getProperty("user.dir");
String batFilePath = property+"\\启动.bat";
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

View File

@ -529,7 +529,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){
}
}
}
}