no message
This commit is contained in:
parent
86bd4525af
commit
26e6493fd6
|
|
@ -2060,9 +2060,19 @@ public class MapleCharacter extends AbstractAnimatedMapleMapObject implements Se
|
|||
}
|
||||
if (item1.getNotice() == 1){
|
||||
String s = MapleCharacter.this.getName();
|
||||
String d =item1.getItemName() + " x " + num;
|
||||
String replace = Start.diaoyuConfig.getNotice().replace("%s", s).replace("%d", d);
|
||||
World.Broadcast.broadcastMessage(MaplePacketCreator.serverNotice(6, replace));
|
||||
String d="";
|
||||
if (item1.getItemId() > 1) {
|
||||
d = item1.getItemName() + " 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);
|
||||
World.Broadcast.broadcastMessage(MaplePacketCreator.serverNotice(6, replace));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -11,11 +11,8 @@ import client.inventory.IItem;
|
|||
import client.messages.commands.GMCommand;
|
||||
import cn.hutool.http.HttpUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import gui.tw.AotuNpc;
|
||||
import gui.tw.BlConfig;
|
||||
import gui.tw.BsConfig;
|
||||
import gui.tw.*;
|
||||
import gui.tw.diaoyu.DiaoyuConfig;
|
||||
import gui.tw.ZLConfig;
|
||||
import gui.tw.rw.XuanShangRenWu;
|
||||
import gui.tw.rw.rwConfig;
|
||||
import server.MapleInventoryManipulator;
|
||||
|
|
@ -111,6 +108,8 @@ public class Start {
|
|||
|
||||
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= {"万", "亿", "兆", "京", "垓","秭", "穰", "沟", "涧", "正", "载", "极","恒河沙", "阿僧祇", "那由他", "不可思议", "无量", "古戈尔","频菠萝", "矜羯罗","不可说不可说转","超限数",
|
||||
|
|
@ -719,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() {
|
||||
|
|
@ -1302,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();
|
||||
|
|
|
|||
|
|
@ -7380,7 +7380,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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -8695,8 +8695,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,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;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -6,6 +6,7 @@ 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;
|
||||
|
|
@ -84,7 +85,7 @@ public class DiaoyuConfig {
|
|||
|
||||
public void add(DiaoyuItem item) {
|
||||
All.add(item);
|
||||
|
||||
item.setItemName(MapleItemInformationProvider.getInstance().getName(item.getItemId()));
|
||||
|
||||
if (item.getChance()>0){
|
||||
item.setChance2(item.getChance());
|
||||
|
|
|
|||
|
|
@ -95,6 +95,6 @@ public class DiaoyuItem {
|
|||
}
|
||||
|
||||
public int getnum() {
|
||||
return RandomUtil.randomInt(minNum, maxNum);
|
||||
return RandomUtil.randomInt(minNum, maxNum+1);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,13 +30,10 @@ import java.awt.event.FocusAdapter;
|
|||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
|
||||
import gui.tw.AotuNpc;
|
||||
import gui.tw.BlConfig;
|
||||
import gui.tw.BsConfig;
|
||||
import gui.tw.*;
|
||||
import gui.tw.diaoyu.BL;
|
||||
import gui.tw.diaoyu.DiaoYuMap;
|
||||
import gui.tw.diaoyu.DiaoyuItem;
|
||||
import gui.tw.ZLConfig;
|
||||
import gui.tw.rw.rwConfig;
|
||||
import org.netbeans.lib.awtextra.AbsoluteConstraints;
|
||||
|
||||
|
|
@ -59,6 +56,7 @@ import ppSetting.Game;
|
|||
|
||||
import java.awt.EventQueue;
|
||||
|
||||
import server.BossInMap;
|
||||
import tools.FileoutputUtil;
|
||||
|
||||
import javax.swing.UIManager;
|
||||
|
|
@ -80,6 +78,7 @@ import java.util.ArrayList;
|
|||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import client.inventory.IItem;
|
||||
|
||||
|
|
@ -1093,6 +1092,19 @@ public class 特殊控制台 extends JFrame {
|
|||
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);
|
||||
|
||||
|
||||
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
|
|
@ -1163,6 +1175,19 @@ public class 特殊控制台 extends JFrame {
|
|||
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());
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
public void 配置更新(final String name, final int value) {
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -120,6 +120,15 @@ public class NPCScriptManager extends AbstractScriptManager {
|
|||
c.sendPacket(MaplePacketCreator.enableActions());
|
||||
}
|
||||
} catch (ScriptException ex) {
|
||||
c.getPlayer().dropMessage(6, "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(1, "你已假死,已为你自动解卡");
|
||||
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()) {
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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());
|
||||
|
|
|
|||
|
|
@ -74,8 +74,8 @@ public class SpawnPointAreaBoss extends Spawns {
|
|||
map.spawnMonster(this.monster, -2);
|
||||
if (this.msg != null&&a>1) {
|
||||
String formatTime = DateUtil.formatTime(DateUtil.date());
|
||||
String replace = this.msg.replace("{time}", formatTime);
|
||||
World.Broadcast.broadcastMessage(MaplePacketCreator.serverNotice(6, replace));
|
||||
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++;
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ 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;
|
||||
|
|
@ -565,7 +566,10 @@ public final class MapleMap {
|
|||
}
|
||||
}
|
||||
}
|
||||
} finally {
|
||||
} catch (Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
finally {
|
||||
charactersLock.readLock().unlock();
|
||||
}
|
||||
}
|
||||
|
|
@ -664,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();
|
||||
|
|
@ -672,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;
|
||||
}
|
||||
|
|
@ -756,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);
|
||||
}
|
||||
}
|
||||
|
|
@ -2248,12 +2251,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;
|
||||
|
|
@ -2295,6 +2304,8 @@ public final class MapleMap {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (!this.everlast) {
|
||||
mdrop.registerExpire(120000L);
|
||||
if (droptype == 0 || droptype == 1) {
|
||||
|
|
@ -2305,12 +2316,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;
|
||||
|
|
@ -2356,18 +2374,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;
|
||||
|
|
@ -2418,6 +2449,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);
|
||||
|
|
|
|||
|
|
@ -493,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());
|
||||
|
|
@ -505,7 +507,11 @@ 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")) {
|
||||
monster.setHp(hp+"00000000");
|
||||
}
|
||||
map.addAreaMonsterSpawn(monster, pos1, pos2, pos3, mobtime, msg);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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());
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue