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){
|
if (item1.getNotice() == 1){
|
||||||
String s = MapleCharacter.this.getName();
|
String s = MapleCharacter.this.getName();
|
||||||
String d =item1.getItemName() + " x " + num;
|
String d="";
|
||||||
String replace = Start.diaoyuConfig.getNotice().replace("%s", s).replace("%d", d);
|
if (item1.getItemId() > 1) {
|
||||||
World.Broadcast.broadcastMessage(MaplePacketCreator.serverNotice(6, replace));
|
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);
|
c.getPlayer().getMap().broadcastMessage(c.getPlayer(), MonsterBookPacket.showForeginCardEffect(c.getPlayer().getId()), false);
|
||||||
if (this.cards.containsKey(Integer.valueOf(cardid))) {
|
if (this.cards.containsKey(Integer.valueOf(cardid))) {
|
||||||
final int levels = ((Integer) this.cards.get(Integer.valueOf(cardid))).intValue();
|
final int levels = ((Integer) this.cards.get(Integer.valueOf(cardid))).intValue();
|
||||||
if (levels >= 5) {
|
if (levels > 6) {
|
||||||
c.sendPacket(MonsterBookPacket.addCard(true, cardid, levels));
|
// c.sendPacket(MonsterBookPacket.addCard(true, cardid, levels));
|
||||||
} else {
|
} else {
|
||||||
if (GameConstants.isSpecialCard(cardid)) {
|
if (GameConstants.isSpecialCard(cardid)) {
|
||||||
++this.SpecialCard;
|
++this.SpecialCard;
|
||||||
|
|
|
||||||
|
|
@ -11,11 +11,8 @@ import client.inventory.IItem;
|
||||||
import client.messages.commands.GMCommand;
|
import client.messages.commands.GMCommand;
|
||||||
import cn.hutool.http.HttpUtil;
|
import cn.hutool.http.HttpUtil;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import gui.tw.AotuNpc;
|
import gui.tw.*;
|
||||||
import gui.tw.BlConfig;
|
|
||||||
import gui.tw.BsConfig;
|
|
||||||
import gui.tw.diaoyu.DiaoyuConfig;
|
import gui.tw.diaoyu.DiaoyuConfig;
|
||||||
import gui.tw.ZLConfig;
|
|
||||||
import gui.tw.rw.XuanShangRenWu;
|
import gui.tw.rw.XuanShangRenWu;
|
||||||
import gui.tw.rw.rwConfig;
|
import gui.tw.rw.rwConfig;
|
||||||
import server.MapleInventoryManipulator;
|
import server.MapleInventoryManipulator;
|
||||||
|
|
@ -111,6 +108,8 @@ public class Start {
|
||||||
|
|
||||||
public static Map<Integer, XuanShangRenWu> xsRW = new HashMap<>();
|
public static Map<Integer, XuanShangRenWu> xsRW = new HashMap<>();
|
||||||
public static List<rwConfig> xsRWConfig = new ArrayList<>();
|
public static List<rwConfig> xsRWConfig = new ArrayList<>();
|
||||||
|
public static Map<Integer,DiaoLuoTiShi> diaoLuoTiShis = new HashMap<>();
|
||||||
|
public static String diaoLuoGongGao = "";
|
||||||
|
|
||||||
|
|
||||||
public static String[] shxs= {"万", "亿", "兆", "京", "垓","秭", "穰", "沟", "涧", "正", "载", "极","恒河沙", "阿僧祇", "那由他", "不可思议", "无量", "古戈尔","频菠萝", "矜羯罗","不可说不可说转","超限数",
|
public static String[] shxs= {"万", "亿", "兆", "京", "垓","秭", "穰", "沟", "涧", "正", "载", "极","恒河沙", "阿僧祇", "那由他", "不可思议", "无量", "古戈尔","频菠萝", "矜羯罗","不可说不可说转","超限数",
|
||||||
|
|
@ -719,30 +718,30 @@ public class Start {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void GetMobInMapTable() {
|
public static void GetMobInMapTable() {
|
||||||
Connection con = null;
|
// Connection con = null;
|
||||||
PreparedStatement ps = null;
|
// PreparedStatement ps = null;
|
||||||
ResultSet rs = null;
|
// ResultSet rs = null;
|
||||||
try {
|
// try {
|
||||||
con = (Connection) DBConPool.getInstance().getDataSource().getConnection();
|
// con = (Connection) DBConPool.getInstance().getDataSource().getConnection();
|
||||||
ps = con.prepareStatement("SELECT mobid, map,x,y,msg,time FROM bossmobinmap");
|
// ps = con.prepareStatement("SELECT mobid, map,x,y,msg,time FROM bossmobinmap");
|
||||||
rs = ps.executeQuery();
|
// rs = ps.executeQuery();
|
||||||
while (rs.next()) {
|
// while (rs.next()) {
|
||||||
final String msg = rs.getString("msg");
|
// final String msg = rs.getString("msg");
|
||||||
final int mobid = rs.getInt("mobid");
|
// final int mobid = rs.getInt("mobid");
|
||||||
final int map = rs.getInt("map");
|
// final int map = rs.getInt("map");
|
||||||
final int x = rs.getInt("x");
|
// final int x = rs.getInt("x");
|
||||||
final int y = rs.getInt("y");
|
// final int y = rs.getInt("y");
|
||||||
final int time = rs.getInt("time");
|
// final int time = rs.getInt("time");
|
||||||
Start.野外boss刷新.add(new BossInMap(mobid, map, x, y, msg, time));
|
// Start.野外boss刷新.add(new BossInMap(mobid, map, x, y, msg, time));
|
||||||
}
|
// }
|
||||||
rs.close();
|
// rs.close();
|
||||||
ps.close();
|
// ps.close();
|
||||||
con.close();
|
// con.close();
|
||||||
} catch (SQLException ex) {
|
// } catch (SQLException ex) {
|
||||||
System.err.println("读取道具经验表出错:" + ex.getMessage());
|
// System.err.println("读取道具经验表出错:" + ex.getMessage());
|
||||||
} finally {
|
// } finally {
|
||||||
DBConPool.cleanUP(rs, ps, con);
|
// DBConPool.cleanUP(rs, ps, con);
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void GetItemExpTable() {
|
public static void GetItemExpTable() {
|
||||||
|
|
@ -1302,7 +1301,7 @@ public class Start {
|
||||||
exptable = (List<Pair<String, Integer>>) new ArrayList();
|
exptable = (List<Pair<String, Integer>>) new ArrayList();
|
||||||
经验加成表 = (List<Pair<String, Integer>>) new ArrayList();
|
经验加成表 = (List<Pair<String, Integer>>) new ArrayList();
|
||||||
套装加成表 = (List<Pair<Integer, Pair<String, 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();
|
不参与叠加道具 = (List<String>) new ArrayList();
|
||||||
SkillType = (List<SkillType>) new ArrayList();
|
SkillType = (List<SkillType>) new ArrayList();
|
||||||
子弹列表 = (List<String>) new ArrayList();
|
子弹列表 = (List<String>) new ArrayList();
|
||||||
|
|
|
||||||
|
|
@ -7380,7 +7380,7 @@ public class ppms extends JFrame {
|
||||||
ps.executeUpdate();
|
ps.executeUpdate();
|
||||||
ps.close();
|
ps.close();
|
||||||
} catch (SQLException e) {
|
} 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刷新列表() {
|
private void 重载野外boss刷新列表() {
|
||||||
Start.野外boss刷新.clear();
|
// Start.野外boss刷新.clear();
|
||||||
Start.GetMobInMapTable();
|
// Start.GetMobInMapTable();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void 加载野外boss刷新列表() {
|
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 provider.MapleDataTool;
|
||||||
import scripting.PortalPlayerInteraction;
|
import scripting.PortalPlayerInteraction;
|
||||||
import scripting.PortalScript;
|
import scripting.PortalScript;
|
||||||
|
import server.MapleItemInformationProvider;
|
||||||
import server.life.MapleLifeFactory;
|
import server.life.MapleLifeFactory;
|
||||||
import server.maps.MapleMap;
|
import server.maps.MapleMap;
|
||||||
import server.maps.MapleMapFactory;
|
import server.maps.MapleMapFactory;
|
||||||
|
|
@ -84,7 +85,7 @@ public class DiaoyuConfig {
|
||||||
|
|
||||||
public void add(DiaoyuItem item) {
|
public void add(DiaoyuItem item) {
|
||||||
All.add(item);
|
All.add(item);
|
||||||
|
item.setItemName(MapleItemInformationProvider.getInstance().getName(item.getItemId()));
|
||||||
|
|
||||||
if (item.getChance()>0){
|
if (item.getChance()>0){
|
||||||
item.setChance2(item.getChance());
|
item.setChance2(item.getChance());
|
||||||
|
|
|
||||||
|
|
@ -95,6 +95,6 @@ public class DiaoyuItem {
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getnum() {
|
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.ActionEvent;
|
||||||
import java.awt.event.ActionListener;
|
import java.awt.event.ActionListener;
|
||||||
|
|
||||||
import gui.tw.AotuNpc;
|
import gui.tw.*;
|
||||||
import gui.tw.BlConfig;
|
|
||||||
import gui.tw.BsConfig;
|
|
||||||
import gui.tw.diaoyu.BL;
|
import gui.tw.diaoyu.BL;
|
||||||
import gui.tw.diaoyu.DiaoYuMap;
|
import gui.tw.diaoyu.DiaoYuMap;
|
||||||
import gui.tw.diaoyu.DiaoyuItem;
|
import gui.tw.diaoyu.DiaoyuItem;
|
||||||
import gui.tw.ZLConfig;
|
|
||||||
import gui.tw.rw.rwConfig;
|
import gui.tw.rw.rwConfig;
|
||||||
import org.netbeans.lib.awtextra.AbsoluteConstraints;
|
import org.netbeans.lib.awtextra.AbsoluteConstraints;
|
||||||
|
|
||||||
|
|
@ -59,6 +56,7 @@ import ppSetting.Game;
|
||||||
|
|
||||||
import java.awt.EventQueue;
|
import java.awt.EventQueue;
|
||||||
|
|
||||||
|
import server.BossInMap;
|
||||||
import tools.FileoutputUtil;
|
import tools.FileoutputUtil;
|
||||||
|
|
||||||
import javax.swing.UIManager;
|
import javax.swing.UIManager;
|
||||||
|
|
@ -80,6 +78,7 @@ import java.util.ArrayList;
|
||||||
import java.util.Comparator;
|
import java.util.Comparator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
import java.util.stream.Stream;
|
||||||
|
|
||||||
import client.inventory.IItem;
|
import client.inventory.IItem;
|
||||||
|
|
||||||
|
|
@ -1093,6 +1092,19 @@ public class 特殊控制台 extends JFrame {
|
||||||
JSONObject jsonObject5 = JSONObject.parseObject(result7);
|
JSONObject jsonObject5 = JSONObject.parseObject(result7);
|
||||||
Start.xsRWConfig = jsonObject5.getJSONArray("rw").toJavaList(rwConfig.class);
|
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){
|
}catch (Exception e){
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
|
@ -1163,6 +1175,19 @@ public class 特殊控制台 extends JFrame {
|
||||||
jsonObject5.put("rw", JSON.toJSONString(Start.xsRWConfig));
|
jsonObject5.put("rw", JSON.toJSONString(Start.xsRWConfig));
|
||||||
fileWriter.write(jsonObject5.toString());
|
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) {
|
public void 配置更新(final String name, final int value) {
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ import tools.packet.FamilyPacket;
|
||||||
import tools.packet.PlayerShopPacket;
|
import tools.packet.PlayerShopPacket;
|
||||||
import server.shops.IMaplePlayerShop;
|
import server.shops.IMaplePlayerShop;
|
||||||
|
|
||||||
|
import java.util.*;
|
||||||
import java.util.concurrent.locks.Lock;
|
import java.util.concurrent.locks.Lock;
|
||||||
|
|
||||||
import server.maps.MapleMapObject;
|
import server.maps.MapleMapObject;
|
||||||
|
|
@ -25,8 +26,6 @@ import client.inventory.MaplePet;
|
||||||
import client.ISkill;
|
import client.ISkill;
|
||||||
import client.PlayerStats;
|
import client.PlayerStats;
|
||||||
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
import server.maps.MapleKite;
|
import server.maps.MapleKite;
|
||||||
import server.MapleShopFactory;
|
import server.MapleShopFactory;
|
||||||
import server.PredictCardFactory;
|
import server.PredictCardFactory;
|
||||||
|
|
@ -41,8 +40,6 @@ import tools.FileoutputUtil;
|
||||||
import constants.ServerConfig;
|
import constants.ServerConfig;
|
||||||
import client.inventory.ItemFlag;
|
import client.inventory.ItemFlag;
|
||||||
|
|
||||||
import java.util.EnumMap;
|
|
||||||
|
|
||||||
import client.MapleStat;
|
import client.MapleStat;
|
||||||
import server.quest.MapleQuest;
|
import server.quest.MapleQuest;
|
||||||
import server.life.MapleLifeFactory;
|
import server.life.MapleLifeFactory;
|
||||||
|
|
@ -71,15 +68,8 @@ import server.MapleItemInformationProvider;
|
||||||
import constants.GameConstants;
|
import constants.GameConstants;
|
||||||
import client.MapleCharacter;
|
import client.MapleCharacter;
|
||||||
|
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Iterator;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import client.inventory.IItem;
|
import client.inventory.IItem;
|
||||||
|
|
||||||
import java.util.LinkedList;
|
|
||||||
|
|
||||||
import client.inventory.MapleInventory;
|
import client.inventory.MapleInventory;
|
||||||
import scripting.NPCScriptManager;
|
import scripting.NPCScriptManager;
|
||||||
import tools.MaplePacketCreator;
|
import tools.MaplePacketCreator;
|
||||||
|
|
@ -2637,6 +2627,13 @@ public class InventoryHandler {
|
||||||
if (mapitem.isRandDrop()) {
|
if (mapitem.isRandDrop()) {
|
||||||
chr.getMap().spawnRandDrop();
|
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) {
|
public static void removeItem(final MapleCharacter chr, final MapleMapItem mapitem, final MapleMapObject ob) {
|
||||||
|
|
@ -2646,6 +2643,18 @@ public class InventoryHandler {
|
||||||
if (mapitem.isRandDrop()) {
|
if (mapitem.isRandDrop()) {
|
||||||
chr.getMap().spawnRandDrop();
|
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) {
|
private static void addMedalString(final MapleCharacter c, final StringBuilder sb) {
|
||||||
|
|
|
||||||
|
|
@ -256,7 +256,7 @@ public class EventInstanceManager {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public final void saveBossQuest(final int points) {
|
public final void savesQuest(final int points) {
|
||||||
if (this.disposed) {
|
if (this.disposed) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -592,6 +592,7 @@ public class NPCConversationManager extends AbstractPlayerInteraction {
|
||||||
}
|
}
|
||||||
if (概率 > 0) {
|
if (概率 > 0) {
|
||||||
Broadcast.broadcastMessage(MaplePacketCreator.getGachaponMega("[" + msg + "]", " : 被玩家 " + this.c.getPlayer().getName() + " 获得!大家一起来恭喜他吧!", item, 概率));
|
Broadcast.broadcastMessage(MaplePacketCreator.getGachaponMega("[" + msg + "]", " : 被玩家 " + this.c.getPlayer().getName() + " 获得!大家一起来恭喜他吧!", item, 概率));
|
||||||
|
|
||||||
}
|
}
|
||||||
return item.getItemId();
|
return item.getItemId();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|
|
||||||
|
|
@ -120,6 +120,15 @@ public class NPCScriptManager extends AbstractScriptManager {
|
||||||
c.sendPacket(MaplePacketCreator.enableActions());
|
c.sendPacket(MaplePacketCreator.enableActions());
|
||||||
}
|
}
|
||||||
} catch (ScriptException ex) {
|
} 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) {
|
} catch (NoSuchMethodException e) {
|
||||||
System.err.println("NPC 脚本错误1, 它ID为 : " + npc + "_" + ((script == null) ? "" : ("(" + script + ")")) + ((mode == 0) ? "" : ("型号: " + mode)) + "." + e);
|
System.err.println("NPC 脚本错误1, 它ID为 : " + npc + "_" + ((script == null) ? "" : ("(" + script + ")")) + ((mode == 0) ? "" : ("型号: " + mode)) + "." + e);
|
||||||
if (c.getPlayer() != null && c.getPlayer().isGM()) {
|
if (c.getPlayer() != null && c.getPlayer().isGM()) {
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
package server;
|
package server;
|
||||||
|
|
||||||
|
import java.math.BigInteger;
|
||||||
|
|
||||||
public class BossInMap {
|
public class BossInMap {
|
||||||
private int mobid;
|
private int mobid;
|
||||||
private int map;
|
private int map;
|
||||||
|
|
@ -8,6 +10,16 @@ public class BossInMap {
|
||||||
private String msg;
|
private String msg;
|
||||||
private int time;
|
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) {
|
public BossInMap(final int mobid, final int map, final int x, final int y, final String msg, final int time) {
|
||||||
this.mobid = mobid;
|
this.mobid = mobid;
|
||||||
this.map = map;
|
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) {
|
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();
|
final MapleItemInformationProvider ii = MapleItemInformationProvider.getInstance();
|
||||||
if ((ii.isPickupRestricted(itemId) && c.getPlayer().haveItem(itemId, 1, true, false)) || !ii.itemExists(itemId)) {
|
if ((ii.isPickupRestricted(itemId) && c.getPlayer().haveItem(itemId, 1, true, false)) || !ii.itemExists(itemId)) {
|
||||||
c.getSession().write(MaplePacketCreator.getInventoryFull());
|
c.getSession().write(MaplePacketCreator.getInventoryFull());
|
||||||
|
|
|
||||||
|
|
@ -74,8 +74,8 @@ public class SpawnPointAreaBoss extends Spawns {
|
||||||
map.spawnMonster(this.monster, -2);
|
map.spawnMonster(this.monster, -2);
|
||||||
if (this.msg != null&&a>1) {
|
if (this.msg != null&&a>1) {
|
||||||
String formatTime = DateUtil.formatTime(DateUtil.date());
|
String formatTime = DateUtil.formatTime(DateUtil.date());
|
||||||
String replace = this.msg.replace("{time}", formatTime);
|
String replace ="【野外boss】 : "+ this.msg.replace("{time}", formatTime);
|
||||||
World.Broadcast.broadcastMessage(MaplePacketCreator.serverNotice(6, replace));
|
World.Broadcast.broadcastMessage(MaplePacketCreator.serverNotice(11, map.getChannel(),replace));
|
||||||
// map.broadcastMessage(MaplePacketCreator.serverNotice(6, this.msg));
|
// map.broadcastMessage(MaplePacketCreator.serverNotice(6, this.msg));
|
||||||
}
|
}
|
||||||
a++;
|
a++;
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ import server.MapleCarnivalFactory.MCSkill;
|
||||||
import server.MapleCarnivalFactory;
|
import server.MapleCarnivalFactory;
|
||||||
import tools.Pair;
|
import tools.Pair;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
import java.math.BigInteger;
|
import java.math.BigInteger;
|
||||||
import java.sql.PreparedStatement;
|
import java.sql.PreparedStatement;
|
||||||
import java.sql.Connection;
|
import java.sql.Connection;
|
||||||
|
|
@ -565,7 +566,10 @@ public final class MapleMap {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} finally {
|
} catch (Exception e){
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
finally {
|
||||||
charactersLock.readLock().unlock();
|
charactersLock.readLock().unlock();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -664,7 +668,7 @@ public final class MapleMap {
|
||||||
}
|
}
|
||||||
if (de2.itemId == 0) {
|
if (de2.itemId == 0) {
|
||||||
final int mesos = Randomizer.nextInt(1 + Math.abs(de2.Maximum - de2.Minimum)) + de2.Minimum;
|
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() < 1 && mmeos > 0) {
|
||||||
if (((Integer) Start.ConfigValuesMap.get("金币全局砍数量")).intValue() > 0) {
|
if (((Integer) Start.ConfigValuesMap.get("金币全局砍数量")).intValue() > 0) {
|
||||||
mmeos /= ((Integer) Start.ConfigValuesMap.get("金币砍全局倍率")).intValue();
|
mmeos /= ((Integer) Start.ConfigValuesMap.get("金币砍全局倍率")).intValue();
|
||||||
|
|
@ -672,7 +676,6 @@ public final class MapleMap {
|
||||||
if (mmeos < 1) {
|
if (mmeos < 1) {
|
||||||
mmeos = 1;
|
mmeos = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.spawnMobMesoDrop(mmeos, this.calcDropPos(pos, mob.getTruePosition()), (MapleMapObject) mob, chr, false, droptype);
|
this.spawnMobMesoDrop(mmeos, this.calcDropPos(pos, mob.getTruePosition()), (MapleMapObject) mob, chr, false, droptype);
|
||||||
mesoDropped = true;
|
mesoDropped = true;
|
||||||
}
|
}
|
||||||
|
|
@ -756,7 +759,7 @@ public final class MapleMap {
|
||||||
break;
|
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);
|
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) {
|
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 Point droppos = this.calcDropPos(position, position);
|
||||||
final MapleMapItem mdrop = new MapleMapItem(meso, droppos, dropper, owner, droptype, playerDrop);
|
final MapleMapItem mdrop = new MapleMapItem(meso, droppos, dropper, owner, droptype, playerDrop);
|
||||||
|
|
||||||
this.spawnAndAddRangedMapObject((MapleMapObject) mdrop, (DelayedPacketCreation) new DelayedPacketCreation() {
|
this.spawnAndAddRangedMapObject((MapleMapObject) mdrop, (DelayedPacketCreation) new DelayedPacketCreation() {
|
||||||
@Override
|
@Override
|
||||||
public void sendPackets(final MapleClient c) {
|
public void sendPackets(final MapleClient c) {
|
||||||
c.sendPacket(MaplePacketCreator.dropItemFromMapObject(mdrop, dropper.getPosition(), droppos, (byte) 1));
|
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);
|
}, null);
|
||||||
|
|
||||||
|
|
||||||
if (((Integer) Start.ConfigValuesMap.get("特殊宠物吸取开关")).intValue() > 0 && ((Integer) Start.ConfigValuesMap.get("特殊宠物吸金开关")).intValue() > 0 && owner.getEventInstance() == null) {
|
if (((Integer) Start.ConfigValuesMap.get("特殊宠物吸取开关")).intValue() > 0 && ((Integer) Start.ConfigValuesMap.get("特殊宠物吸金开关")).intValue() > 0 && owner.getEventInstance() == null) {
|
||||||
boolean 吸物状态 = false;
|
boolean 吸物状态 = false;
|
||||||
int 宠物数据库ID = 0;
|
int 宠物数据库ID = 0;
|
||||||
|
|
@ -2295,6 +2304,8 @@ public final class MapleMap {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (!this.everlast) {
|
if (!this.everlast) {
|
||||||
mdrop.registerExpire(120000L);
|
mdrop.registerExpire(120000L);
|
||||||
if (droptype == 0 || droptype == 1) {
|
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) {
|
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);
|
final MapleMapItem mdrop = new MapleMapItem(meso, position, dropper, owner, droptype, playerDrop);
|
||||||
|
|
||||||
this.spawnAndAddRangedMapObject((MapleMapObject) mdrop, (DelayedPacketCreation) new DelayedPacketCreation() {
|
this.spawnAndAddRangedMapObject((MapleMapObject) mdrop, (DelayedPacketCreation) new DelayedPacketCreation() {
|
||||||
@Override
|
@Override
|
||||||
public void sendPackets(final MapleClient c) {
|
public void sendPackets(final MapleClient c) {
|
||||||
c.sendPacket(MaplePacketCreator.dropItemFromMapObject(mdrop, dropper.getPosition(), position, (byte) 1));
|
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);
|
}, null);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (((Integer) Start.ConfigValuesMap.get("特殊宠物吸取开关")).intValue() > 0 && ((Integer) Start.ConfigValuesMap.get("特殊宠物吸金开关")).intValue() > 0 && owner.getEventInstance() == null) {
|
if (((Integer) Start.ConfigValuesMap.get("特殊宠物吸取开关")).intValue() > 0 && ((Integer) Start.ConfigValuesMap.get("特殊宠物吸金开关")).intValue() > 0 && owner.getEventInstance() == null) {
|
||||||
boolean 吸物状态 = false;
|
boolean 吸物状态 = false;
|
||||||
int 宠物数据库ID = 0;
|
int 宠物数据库ID = 0;
|
||||||
|
|
@ -2356,18 +2374,31 @@ public final class MapleMap {
|
||||||
if (droptype == 0 || droptype == 1) {
|
if (droptype == 0 || droptype == 1) {
|
||||||
mdrop.registerFFA(30000L);
|
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) {
|
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);
|
final MapleMapItem mdrop = new MapleMapItem(idrop, dropPos, (MapleMapObject) mob, chr, droptype, false, (int) questid);
|
||||||
|
|
||||||
this.spawnAndAddRangedMapObject((MapleMapObject) mdrop, (DelayedPacketCreation) new DelayedPacketCreation() {
|
this.spawnAndAddRangedMapObject((MapleMapObject) mdrop, (DelayedPacketCreation) new DelayedPacketCreation() {
|
||||||
@Override
|
@Override
|
||||||
public void sendPackets(final MapleClient c) {
|
public void sendPackets(final MapleClient c) {
|
||||||
if (questid <= 0 || c.getPlayer().getQuestStatus((int) questid) == 1) {
|
if (questid <= 0 || c.getPlayer().getQuestStatus((int) questid) == 1) {
|
||||||
c.sendPacket(MaplePacketCreator.dropItemFromMapObject(mdrop, mob.getPosition(), dropPos, (byte) 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);
|
}, null);
|
||||||
|
|
||||||
if (((Integer) Start.ConfigValuesMap.get("特殊宠物吸取开关")).intValue() > 0 && ((Integer) Start.ConfigValuesMap.get("特殊宠物吸物开关")).intValue() > 0 && chr.getEventInstance() == null ) {
|
if (((Integer) Start.ConfigValuesMap.get("特殊宠物吸取开关")).intValue() > 0 && ((Integer) Start.ConfigValuesMap.get("特殊宠物吸物开关")).intValue() > 0 && chr.getEventInstance() == null ) {
|
||||||
boolean 吸物状态 = false;
|
boolean 吸物状态 = false;
|
||||||
int 宠物数据库ID = 0;
|
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);
|
mdrop.registerExpire(120000L);
|
||||||
if (droptype == 0 || droptype == 1) {
|
if (droptype == 0 || droptype == 1) {
|
||||||
mdrop.registerFFA(30000L);
|
mdrop.registerFFA(30000L);
|
||||||
|
|
|
||||||
|
|
@ -493,11 +493,13 @@ public class MapleMapFactory {
|
||||||
Point pos1 = null;
|
Point pos1 = null;
|
||||||
Point pos2 = null;
|
Point pos2 = null;
|
||||||
Point pos3 = null;
|
Point pos3 = null;
|
||||||
|
String hp = null;
|
||||||
for (int a = 0; a < Start.野外boss刷新.size(); ++a) {
|
for (int a = 0; a < Start.野外boss刷新.size(); ++a) {
|
||||||
if (map.getId() == ((BossInMap) Start.野外boss刷新.get(a)).getMap()) {
|
if (map.getId() == ((BossInMap) Start.野外boss刷新.get(a)).getMap()) {
|
||||||
mobtime = ((BossInMap) Start.野外boss刷新.get(a)).getTime() * 60;
|
mobtime = ((BossInMap) Start.野外boss刷新.get(a)).getTime() * 60;
|
||||||
monsterid = ((BossInMap) Start.野外boss刷新.get(a)).getMobid();
|
monsterid = ((BossInMap) Start.野外boss刷新.get(a)).getMobid();
|
||||||
msg = ((BossInMap) Start.野外boss刷新.get(a)).getMsg();
|
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());
|
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());
|
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());
|
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) {
|
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 {
|
public class MapleMapItem extends AbstractMapleMapObject {
|
||||||
protected IItem item;
|
protected IItem item;
|
||||||
|
|
||||||
|
protected int ismob = 0;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
protected MapleMapObject dropper;
|
protected MapleMapObject dropper;
|
||||||
protected int character_ownerid;
|
protected int character_ownerid;
|
||||||
protected int meso;
|
protected int meso;
|
||||||
|
|
@ -191,4 +196,13 @@ public class MapleMapItem extends AbstractMapleMapObject {
|
||||||
map.spawnRandDrop();
|
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();
|
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) {
|
public static byte[] getGachaponMega(final String name, final String message, final IItem item, final byte rareness, final int Channel) {
|
||||||
final MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
|
final MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
|
||||||
mplew.writeShort((int) SendPacketOpcode.SERVERMESSAGE.getValue());
|
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) {
|
public static byte[] dropItemFromMapObject(final MapleMapItem drop, final Point dropfrom, final Point dropto, final byte mod) {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
|
final MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
|
||||||
mplew.writeShort((int) SendPacketOpcode.DROP_ITEM_FROM_MAPOBJECT.getValue());
|
mplew.writeShort((int) SendPacketOpcode.DROP_ITEM_FROM_MAPOBJECT.getValue());
|
||||||
mplew.write(mod);
|
mplew.write(mod);
|
||||||
|
|
@ -854,6 +870,8 @@ public class MaplePacketCreator {
|
||||||
mplew.writePos(dropfrom);
|
mplew.writePos(dropfrom);
|
||||||
mplew.writeShort(0);
|
mplew.writeShort(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (drop.getMeso() == 0) {
|
if (drop.getMeso() == 0) {
|
||||||
PacketHelper.addExpirationTime(mplew, drop.getItem().getExpiration());
|
PacketHelper.addExpirationTime(mplew, drop.getItem().getExpiration());
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue