Compare commits
3 Commits
2992e3fcea
...
285da62cfd
| Author | SHA1 | Date |
|---|---|---|
|
|
285da62cfd | |
|
|
f78fed284c | |
|
|
8263aed9d8 |
|
|
@ -2026,7 +2026,8 @@ public class MapleCharacter extends AbstractAnimatedMapleMapObject implements Se
|
||||||
bl = Math.max(bl, (blobj.getBl()));
|
bl = Math.max(bl, (blobj.getBl()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
num = (num + (num*bl/100));
|
long aa = (long)num *bl;
|
||||||
|
num = (int) (num + (aa/100));
|
||||||
|
|
||||||
switch (item1.getItemId()) {
|
switch (item1.getItemId()) {
|
||||||
case 0:
|
case 0:
|
||||||
|
|
@ -5334,10 +5335,24 @@ public class MapleCharacter extends AbstractAnimatedMapleMapObject implements Se
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Num = Num.add((this.getQG()).divide(BigInteger.valueOf(100)));
|
BigInteger qg = this.getQG();
|
||||||
Num = Num.add((this.getQGjs()).multiply(BigInteger.valueOf(100)));
|
if (qg!=null) {
|
||||||
Num = Num.add((this.getDD()).multiply(BigInteger.valueOf(666)));
|
Num = Num.add(qg.divide(BigInteger.valueOf(100)));
|
||||||
Num = Num.add((this.getDB()).multiply(BigInteger.valueOf(1000)));
|
}
|
||||||
|
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());
|
return DamageParse.process(Num.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -639,9 +639,7 @@ public class PlayerStats implements Serializable {
|
||||||
dsbbh++;
|
dsbbh++;
|
||||||
if (!first_login) {
|
if (!first_login) {
|
||||||
for (AotuNpc npc : Start.aotuNpcs) {
|
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) {
|
private void dsnpcfw(MapleCharacter chra, AotuNpc aotuNpc,int dsbbh2) {
|
||||||
if (dsbbh2!=this.dsbbh)return;
|
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()))) {
|
if ((aotuNpc.getMapId() == chra.getMapId()||aotuNpc.getMapId()==0)) {
|
||||||
final NPCConversationManager cm = NPCScriptManager.getInstance().getCM(chra.getClient());
|
if ((aotuNpc.getItemId() == 0 || chra.getItemNum(aotuNpc.getItemId())>=aotuNpc.getItemNum()) && (aotuNpc.getEquId() == 0 || chra.hasEquipped(aotuNpc.getEquId()))){
|
||||||
if (cm == null || chra.getConversation() == 0 || cm.getLastMsg() != 4) {
|
final NPCConversationManager cm = NPCScriptManager.getInstance().getCM(chra.getClient());
|
||||||
NPCScriptManager.getInstance().startds(chra.getClient(), aotuNpc.getNpcId(),0,aotuNpc.getScriptsName());
|
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);
|
Start.executor.schedule(()->dsnpcfw(chra,aotuNpc,dsbbh2), aotuNpc.getTime(), TimeUnit.MILLISECONDS);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,8 @@ public class AotuNpc {
|
||||||
|
|
||||||
int equId;
|
int equId;
|
||||||
|
|
||||||
|
int time;
|
||||||
|
|
||||||
public int getItemNum() {
|
public int getItemNum() {
|
||||||
return itemNum;
|
return itemNum;
|
||||||
}
|
}
|
||||||
|
|
@ -21,7 +23,7 @@ public class AotuNpc {
|
||||||
this.itemNum = itemNum;
|
this.itemNum = itemNum;
|
||||||
}
|
}
|
||||||
|
|
||||||
int time;
|
|
||||||
|
|
||||||
public int getMapId() {
|
public int getMapId() {
|
||||||
return mapId;
|
return mapId;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
package gui.tw.rw;
|
package gui.tw.rw;
|
||||||
|
|
||||||
import gui.Start;
|
import gui.Start;
|
||||||
|
import provider.MapleDataTool;
|
||||||
|
import server.life.MapleLifeFactory;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
@ -53,6 +55,7 @@ public class XuanShangRenWu {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setMobId(int mobId) {
|
public void setMobId(int mobId) {
|
||||||
|
this.setMobName(MapleDataTool.getString((this.getMobId() + "/name"), MapleLifeFactory.mobStringData, "未知怪物"));
|
||||||
this.mobId = mobId;
|
this.mobId = mobId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
package server;
|
package server;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.Iterator;
|
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() + "][信息]:服务端已经完全关闭了请点击右上角的xx按钮关闭.");
|
||||||
System.out.println("[" + FileoutputUtil.CurrentReadable_Time() + "][========================================]");
|
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
|
@Override
|
||||||
|
|
|
||||||
|
|
@ -529,7 +529,11 @@ public final class MapleMap {
|
||||||
for (MapleMonster mob : getAllMonstersThreadsafe()) {
|
for (MapleMonster mob : getAllMonstersThreadsafe()) {
|
||||||
if (!mob.getStats().isBoss()) {
|
if (!mob.getStats().isBoss()) {
|
||||||
mob.setPosition(getChrPos());
|
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){
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue