Item Raise + Gachapon Rework + Minigames & M. Magnet & M. Door patch

Fixed a glitch in inventory that would happen when trying to put items into storage.
Added "Item Raise" functionality.
Adjusted Party Search. Token sessions no longer expires due to no players found, rather are sent into a brief "inactivity" period.
Fixed Fredrick stored items not being properly erased after a character deletion.
Fixed skillbooks in stacked quantities not being useable.
New tool: MapleGachaponItemidRetriever. This tool parses the gachapon descriptor file (holding several item names, for several gachapons) and generates files for each defined gachapon with itemids of the loots.
Revised Mushroom Empire transition portals that interacts with scripted items (items now are useable through inventory, no longer being automatically removed from inventory upon crossing portals).
Fixed script "secretroom" always requiring a new key (quest reward) to access the inner rooms, which would make the room unreachable.
Reworked gachapons loots throughout the game. New loots are supposed to represent an old-school MapleSEA-like escalation of gachapon loots.
Fixed issues that would show up in the case null PIN/PIC gets checked.
Reworked skill Monster Magnet, no longer using "catch success rate" as a skill progression element. This fixes the skill disconnecting caster upon failure.
Revised Mystic Doors, no longer crashing players after the caster decides to cancel the buff moments after casting (during portal deploying effect in course).
Fixed portal access to Prime Minister crashing when trying to access on a party.
Refactored the several "startQuest/completeQuest" methods widely used in the many scripting managers. Methods that does essentially the same thing now are accessed from the superclass.
Fixed "rechargeable items" not being properly accounted for slots availability in inventory slot checking.
Fixed several issues of late within minigames.
Fixed minigames regarding double results when handling some rare scenarios.
Implemented "call for leave after finishing game" functionality of minigames.
This commit is contained in:
ronancpl
2019-06-01 21:12:40 -03:00
parent 89eca2995b
commit edb3920852
111 changed files with 6597 additions and 1943 deletions
+45 -9
View File
@@ -136,6 +136,7 @@ public class MapleItemInformationProvider {
protected Map<Integer, Map<String, Integer>> skillUpgradeCache = new HashMap<>();
protected Map<Integer, MapleData> skillUpgradeInfoCache = new HashMap<>();
protected Map<Integer, Pair<Integer, Set<Integer>>> cashPetFoodCache = new HashMap<>();
protected Map<Integer, QuestConsItem> questItemConsCache = new HashMap<>();
private MapleItemInformationProvider() {
loadCardIdData();
@@ -1377,12 +1378,6 @@ public class MapleItemInformationProvider {
return partyquestItem;
}
public int getQuestIdFromItem(int itemId) {
MapleData data = getItemData(itemId);
int questItem = MapleDataTool.getIntConvert("info/quest", data, 0);
return questItem;
}
private void loadCardIdData() {
PreparedStatement ps = null;
ResultSet rs = null;
@@ -1436,9 +1431,10 @@ public class MapleItemInformationProvider {
if ((itemId / 10000) != 243) {
return null;
}
ScriptedItem script = new ScriptedItem(MapleDataTool.getInt("spec/npc", getItemData(itemId), 0),
MapleDataTool.getString("spec/script", getItemData(itemId), ""),
MapleDataTool.getInt("spec/runOnPickup", getItemData(itemId), 0) == 1);
MapleData itemInfo = getItemData(itemId);
ScriptedItem script = new ScriptedItem(MapleDataTool.getInt("spec/npc", itemInfo, 0),
MapleDataTool.getString("spec/script", itemInfo, ""),
MapleDataTool.getInt("spec/runOnPickup", itemInfo, 0) == 1);
scriptedItemCache.put(itemId, script);
return scriptedItemCache.get(itemId);
}
@@ -2121,6 +2117,35 @@ public class MapleItemInformationProvider {
return skillbook;
}
public final QuestConsItem getQuestConsumablesInfo(final int itemId) {
if (questItemConsCache.containsKey(itemId)) {
return questItemConsCache.get(itemId);
}
MapleData data = getItemData(itemId);
MapleData infoData = data.getChildByPath("info");
MapleData ciData = infoData.getChildByPath("consumeItem");
QuestConsItem qcItem = null;
if (ciData != null) {
qcItem = new QuestConsItem();
qcItem.exp = MapleDataTool.getInt("exp", infoData);
qcItem.grade = MapleDataTool.getInt("grade", infoData);
qcItem.questid = MapleDataTool.getInt("questId", infoData);
qcItem.items = new HashMap<>(2);
Map<Integer, Integer> cItems = qcItem.items;
for (MapleData ciItem : ciData.getChildren()) {
int itemid = MapleDataTool.getInt("0", ciItem);
int qty = MapleDataTool.getInt("1", ciItem);
cItems.put(itemid, qty);
}
}
questItemConsCache.put(itemId, qcItem);
return qcItem;
}
public class ScriptedItem {
@@ -2153,4 +2178,15 @@ public class MapleItemInformationProvider {
public short prob, quantity;
public String effect, worldmsg;
}
public static final class QuestConsItem {
public int questid, exp, grade;
public Map<Integer, Integer> items;
public Integer getItemRequirement(int itemid) {
return items.get(itemid);
}
}
}
-2
View File
@@ -1045,8 +1045,6 @@ public class MapleStatEffect {
door.getTarget().spawnDoor(door.getAreaDoor());
door.getTown().spawnDoor(door.getTownDoor());
applyto.disableDoorSpawn();
} else {
MapleInventoryManipulator.addFromDrop(applyto.getClient(), new Item(4006000, (short) 0, (short) 1), false);
+65
View File
@@ -0,0 +1,65 @@
package server.gachapon;
/**
*
* @author Ronan - parsed MapleSEA loots
*
* MapleSEA-like loots thanks to AyumiLove, src: https://ayumilovemaple.wordpress.com/maplestory-gachapon-guide/
*/
public class ElNath extends GachaponItems {
@Override
public int[] getCommonItems() {
return new int [] {
/* Scroll */
2041012, 2048003, 2043800, 2043301, 2040301, 2043101, 2043201, 2043001, 2044301, 2043801, 2044201, 2043701, 2044502,
2041011, 2041014, 2044602, 2043302, 2043202, 2043002, 2048005, 2044402, 2044302, 2043802, 2044102, 2044202, 2043702,
2044812,
/* Useable drop */
2000004, 2000005,
/* Common equipment */
1402010, 1032003, 1442013, 1432009, 1302022, 1302029, 1322021, 1302026, 1442017, 1322023, 1102011, 1032008, 1322026,
1442016, 1312000, 1032007, 1322025, 1322027, 1032020, 1442015, 1432017, 1302027, 1302049, 1372006, 1032022, 1032021,
1372004, 1332020, 1322007, 1032006, 1302028, 1322003, 1302007, 1092030, 1302021, 1322024, 1322012, 1032005, 1322022,
1032013, 1302025, 1302013, 1032017, 1032002, 1032001, 1302017, 1432018, 1442012, 1302000, 1032000, 1102013, 1442022,
1372005, 1442021, 1032009, 1302016,
/* Warrior equipment */
1442003, 1312007, 1402008, 1312008, 1412008, 1442009, 1302004, 1312006, 1442016, 1402012, 1302003, 1312005, 1432002,
1432001, 1302008, 1040030, 1402015, 1322015, 1432006, 1322002, 1302010, 1322017, 1402003, 1402006, 1322000, 1422001,
1442001, 1422004, 1412004, 1322009, 1322011, 1442000, 1412005, 1402002, 1432004, 1442010, 1422008, 1442007, 1422009,
1322019, 1412003, 1412007, 1302009, 1412000, 1322014, 1402001, 1402007, 1432005,
/* Magician equipment */
1382001, 1372007, 1382010, 1382007, 1372000, 1372003, 1382011, 1382006, 1382000,
/* Bowman equipment */
1452004, 1452000, 1452010, 1452015, 1452014, 1462012, 1462010, 1452017, 1462000, 1452008, 1452006, 1462006, 1452007,
1452002, 1402001,
/* Thief equipment */
1472006, 1472010, 1332022, 1332011, 1472015, 1472016, 1472023, 1472028, 1472022, 1472011, 1472026, 1332024, 1332009,
1472017, 1472013, 1472029, 1472021, 1332015, 1332031, 1332023, 1332004, 1472000, 1332019, 1472027, 1332018, 1472007,
1332012, 1332016, 1472024, 1332017, 1332003, 1472012, 1472014, 1472005, 1472018, 1472001,
/* Pirate equipment */
1072294, 1492009
};
}
@Override
public int[] getUncommonItems() {
return new int [] {2022439, 2040804, 2040805, 2340000};
}
@Override
public int[] getRareItems() {
return new int [] {2043803, 1102085};
}
}
+42 -80
View File
@@ -2,7 +2,10 @@ package server.gachapon;
/**
*
* @author Alan (SharpAceX)
* @author Alan (SharpAceX) - gachapon source classes stub & pirate equipment
* @author Ronan - parsed MapleSEA loots
*
* MapleSEA-like loots thanks to AyumiLove, src: https://ayumilovemaple.wordpress.com/maplestory-gachapon-guide/
*/
public class Ellinia extends GachaponItems {
@@ -10,95 +13,54 @@ public class Ellinia extends GachaponItems {
@Override
public int[] getCommonItems() {
return new int[] {
//warriorEquips = {
1082025, 1060028, 1051011, 1060016, 1051001,
1422001, 1002025, 1082000, 1302002, 1412012,
//magicianEquips = {
1002013, 1002016, 1002017, 1002034, 1002035,
1002036, 1002037, 1002038, 1002064, 1002065,
1002072, 1002073, 1002074, 1002075, 1002102,
1002103, 1002104, 1002105, 1002106, 1002141,
1002142, 1002143, 1002144, 1002145, 1002151,
1002152, 1002153, 1002154, 1002155, 1002215,
1002216, 1002217, 1002218, 1002242, 1002243,
1002244, 1002245, 1002246, 1002252, 1002253,
1002254, 1002271, 1002272, 1002273, 1002274,
1002363, 1002364, 1002365, 1002366, 1002398,
1002399, 1002400, 1002401, 1002579, 1002773,
1040004, 1040017, 1040018,
1040019, 1040020, 1041015, 1041016, 1041017,
1041018, 1041025, 1041026, 1041029, 1041030,
1041031, 1041041, 1041042, 1041043, 1041051,
1041052, 1041053, 1050001, 1050002, 1050003,
1050008, 1050009, 1050010, 1050023, 1050024,
1050025, 1050026, 1050027, 1050028, 1050029,
1050030, 1050031, 1050035, 1050036, 1050037,
1050038, 1050039, 1050045, 1050046, 1050047,
1050048, 1050049, 1050053, 1050054, 1050055,
1050056, 1050067, 1050068, 1050069, 1050070,
1050072, 1050073, 1050074, 1050092, 1050093,
1050094, 1050095, 1050102, 1050103, 1050104,
1050105, 1051003, 1051004, 1051005, 1051023,
1051024, 1051025, 1051026, 1051027, 1051030,
1051031, 1051032, 1051033, 1051034, 1051044,
1051045, 1051046, 1051047, 1051052, 1051053,
1051054, 1051055, 1051056, 1051057, 1051058,
1051094, 1051095, 1051096, 1051097, 1051101,
1051102, 1051103, 1051104, 1052076,
1060012, 1060013, 1060014, 1060015,
1061010, 1061011, 1061012, 1061013, 1061021,
1061022, 1061027, 1061028, 1061034, 1061035,
1061036, 1061047, 1061048, 1061049, 1072006,
1072019, 1072020, 1072021, 1072023, 1072024,
1072044, 1072045, 1072072, 1072073, 1072074,
1072075, 1072076, 1072077, 1072078, 1072089,
1072090, 1072091, 1072114, 1072115, 1072116,
1072117, 1072136, 1072137, 1072138, 1072139,
1072140, 1072141, 1072142, 1072143, 1072157,
1072158, 1072159, 1072160, 1072169, 1072177,
1072178, 1072179, 1072206, 1072207, 1072208,
1072209, 1072223, 1072224, 1072225, 1072226,
1072268, 1082019, 1082020,
1082021, 1082022, 1082026, 1082027, 1082028,
1082051, 1082052, 1082053, 1082054, 1082055,
1082056, 1082062, 1082063, 1082064, 1082080,
1082081, 1082082, 1082086, 1082087, 1082088,
1082098, 1082099, 1082100, 1082121, 1082122,
1082123, 1082131, 1082132, 1082133, 1082134,
1082151, 1082152, 1082153, 1082154, 1082164,
1092021, 1092029, 1092057,
1372000, 1372001, 1372002, 1372003, 1372004,
1372007, 1372008, 1372009, 1372010, 1372011,
1372012, 1372014, 1372015, 1372016, 1372032,
1382000, 1382001, 1382002, 1382003, 1382004,
1382005, 1382006, 1382007, 1382008, 1382010,
1382011, 1382014, 1382015, 1382016, 1382017,
1382018, 1382019, 1382035, 1382036, 1382037,
1382041, 1382053, 1382054, 1382055, 1382056,
1382060,
//bowmanEquips = {
1040003, 1462005, 1002157, 1002119, 1062002,
1062004, 1041083, 1061082, 1082017, 1041061,
//thiefEquips = {
1002174, 1040063, 1072108, 1082044, 1061071,
1060052, 1072029, 1472002, 1082031, 1060023,
//pirateEquips = {
/* Scroll */
2043302, 2040002, 2043102, 2043002, 2044402, 2044302, 2043802, 2044002, 2041017, 2044902,
/* Useable drop */
2000004, 2000005, 2022025, 2022026,
/* Common equipment */
1402010, 1442013, 1432009, 1002060, 1002063, 1322023, 1002042, 1050018, 1082147, 1002026, 1002392, 1062024, 1442016, 1322025,
1322027, 1302027, 1372006, 1302019, 1092022, 1302021, 1041004, 1002395, 1322024, 1082148, 1002012, 1322012, 1032028, 1102012,
1322022, 1051017, 1302013, 1082146, 1442014, 1302017, 1102013, 1102003, 1002041, 1002097, 1302016, 1082145,
/* Warrior equipment */
1412006, 1040029, 1040086, 1050005, 1060028, 1002059, 1060008, 1061088, 1402012, 1302003, 1432002, 1312011, 1302008, 1040030,
1002004, 1402015, 1322028, 1322015, 1432006, 1442006, 1322000, 1002085, 1002056, 1092013, 1002058, 1002050, 1060011, 1322009,
1322011, 1442000, 1051011, 1061016, 1060018, 1041024, 1061020, 1302005, 1402002, 1002030, 1092004, 1041023, 1422008, 1060009,
1051000, 1002021, 1442005, 1412003, 1412007, 1422007, 1302009, 1402000, 1402001, 1402007, 1432005,
/* Magician equipment */
1382001, 1002037, 1060014, 1040018, 1061027, 1050002, 1002152, 1051027, 1050035, 1050056, 1051047, 1051030, 1002274, 1050074,
1002218, 1002254, 1082088, 1382007, 1002013, 1082087, 1372008, 1382008, 1372002, 1372003, 1382011, 1382004, 1050047, 1040019,
1041041, 1061034, 1041051, 1051045, 1051024, 1082081, 1041030, 1040018, 1002073, 1382003, 1082086, 1382014, 1050055, 1050025,
1002155, 1060015,
/* Bowman equipment */
1452004, 1462003, 1060070, 1002118, 1061058, 1040003, 1002160, 1002121, 1040068, 1061063, 1040080, 1462004, 1041008, 1061006,
1061009, 1040022, 1002168, 1040067, 1060056, 1041054, 1041067, 1060063, 1002213, 1002119, 1462005, 1452001, 1462000, 1040025,
1002166, 1002161, 1040069, 1051039, 1452006, 1462006, 1452007, 1402001, 1041062,
/* Thief equipment */
1472010, 1472006, 1332011, 1472031, 1041048, 1472019, 1041095, 1040095, 1002128, 1061077, 1060025, 1041040, 1061033, 1472028,
1472022, 1472011, 1040096, 1062002, 1002129, 1472026, 1332009, 1060043, 1002249, 1472021, 1040084, 1332015, 1002173, 1002148,
1332004, 1332018, 1472009, 1061069, 1002176, 1041044, 1061037, 1060032, 1472020, 1040060, 1472018, 1332013, 1332002, 1402001,
/* Pirate equipment */
1002625, 1002616, 1482005, 1052098, 1482003,
1482001, 1492004, 1002622, 1492005, 1082195
};
};
}
@Override
public int[] getUncommonItems() {
return new int [] { 1372035, 1372036, 1372037, 1372038, 1372039,
1372040, 1372041, 1372042, 1382045, 1382046,
1382047, 1382048, 1382049, 1382050, 1382051,
1382052 };
return new int [] {1082149, 1002391, 1002419};
}
@Override
public int[] getRareItems() {
return new int [] {1382059, 1382057, 1072362, 1002791, 1052161, 1082240};
return new int [] {};
}
}
+19 -32
View File
@@ -3,6 +3,7 @@ package server.gachapon;
/**
*
* @author Alan (SharpAceX)
* @author Ronan - added ores, reworked global loots
*/
public class Global extends GachaponItems {
@@ -10,50 +11,36 @@ public class Global extends GachaponItems {
@Override
public int[] getCommonItems() {
return new int[] {
/* Gloves */ 1082002, 1082147, 1082148, 1082146, 1082145, 1082150,
/* Capes */ 1102040, 1102043, 1102087, 1102079, 1102080, 1102081, 1102082, 1102083, 1102053, 1102054,
1102055, 1102056, 1102176, 1102177, 1102178, 1102179, 1102000, 1102001, 1102002, 1102003,
1102004, 1102011, 1102012, 1102013, 1102014, 1102015, 1102016, 1102017, 1102018, 1102021,
1102022, 1102023, 1102024, 1102026, 1102027, 1102028,
/* Tube Eqp */ 1322026, 1322025, 1322024, 1322022, 1322021,
/* Umbrellas */ 1302026, 1302027, 1302028, 1302017,
/* Snowboards */ 1442017, 1442016, 1442014, 1442012,
/* Skis */ 1432017, 1432016, 1432015,
/* Beginner Eqp */ 1442018, 1422011,
/* Potions */ 2000004, 2000005, 2001002, 2001001, 2020012, 2020013, 2020014, 2020015, 2022182, 2022245,
2022284, 2022285, 2022439,
/* Other Scrolls */ 2049000, 2049001, 2049002, 2041058, 2040727,
/* 10% Scrolls */ 2041002, 2040402, 2040702, 2040805, 2040026, 2040031, 2040318, 2040323, 2040328, 2040419,
2040422, 2040427, 2040534, 2040619, 2040622, 2040627, 2040825, 2040925, 2040928, 2040933,
2040016,
/* 60% Scrolls */ 2040001, 2040321, 2040425, 2040625, 2040931, 2048013, 2040025, 2040326, 2040532, 2040824,
2048010, 2040029, 2040418, 2040618, 2040924, 2048011, 2040317, 2040421, 2040621, 2040927,
2048012,
/* 100% Scrolls */ 2040923, 2040027, 2040417, 2040617, 2040000, 2040202, 2040400, 2040512, 2040700, 2040803,
2041000, 2041012, 2048000, 2040926, 2040316, 2040420, 2040620, 2040003, 2040207, 2040414,
2040515, 2040703, 2040818, 2041003, 2041015, 2048003, 2040929, 2040319, 2040423, 2040623,
2040102, 2040300, 2040500, 2040600, 2040706, 2040900, 2041006, 2041018, 2040024, 2040324,
2040530, 2040823, 2040107, 2040312, 2040503, 2040614, 2040800, 2040918, 2041009, 2041021
/* Potions */
2000004, 2000005, 2001002, 2001001, 2020012, 2020013, 2020014, 2020015,
/* Ores */
4004000, 4004001, 4004002, 4004003, 4004004,
4006000, 4006001,
4010000, 4010001, 4010002, 4010003, 4010004, 4010005, 4010006, 4010007,
4020000, 4020001, 4020002, 4020003, 4020004, 4020005, 4020006, 4020007, 4020008
};
}
@Override
public int[] getUncommonItems() {
return new int[] {
/* Capes */ 1102180,
/* Potions */ 2022179, 2022273, 2022282, 2022283,
/* Scrolls */ 2049003,
/* Skis */ 1432018
/* Potions */
2022179, 2022273, 2022282, 2022283, 2022285, 2022245, 2022182,
/* Scrolls */
2049003
};
}
@Override
public int[] getRareItems() {
return new int[] {
/* Gloves */ 1082149,
/* Capes */ 1102041, 1102042, 1102084, 1102085,
/* Scrolls */ 2049100, 2340000,
/* Chairs */ 3010046, 3010047
/* Scrolls */
2049100, 2340000,
/* Chairs */
3010063, 3010064
};
}
+39 -18
View File
@@ -2,7 +2,10 @@ package server.gachapon;
/**
*
* @author Alan (SharpAceX)
* @author Alan (SharpAceX) - gachapon source classes stub
* @author Ronan - parsed MapleSEA loots
*
* MapleSEA-like loots thanks to AyumiLove, src: https://ayumilovemaple.wordpress.com/maplestory-gachapon-guide/
*/
public class Henesys extends GachaponItems {
@@ -10,31 +13,49 @@ public class Henesys extends GachaponItems {
@Override
public int[] getCommonItems() {
return new int [] {
/* Common Eqps */ 1432009, 1302022, 1322027, 1062000, 1002033, 1092022, 1302021, 1322009, 1002012, 1322012,
/* Warrior Eqps */ 1312007, 1002093, 1051016, 1040030, 1060009, 1060000, 1082025, 1402002, 1092000, 1072041,
/* Mage Equips */ 1051023, 1002035, 1061028, 1040019, 1002152, 1002155, 1041018, 1050031, 1002102, 1082028,
/* Bowman Equips */ 1002010, 1002057, 1002112, 1002113, 1002114, 1002115, 1002116, 1002117, 1002118, 1002119,
1002120, 1002121, 1002135, 1002136, 1002137, 1002138, 1002139, 1002156, 1002157, 1002158,
1002159, 1002160, 1002161, 1002162, 1002163, 1002164, 1002165, 1002166, 1002167, 1002168,
1002169, 1002170, 1002211, 1002212, 1002213, 1002214, 1002267, 1002268, 1002269, 1002270,
1002275, 1002276, 1002277, 1002278, 1002286, 1002287, 1002288, 1002289, 1002402, 1002403,
1002404, 1002405, 1002406, 1002407, 1002408, 1002580, 1002749
};
/* Scroll */
2040001, 2041002, 2040702, 2043802, 2040402, 2043702, 2044813,
/* Useable Drops */
2000004, 2000005, 2020012, 2030007,
/* Common equipment */
1432009, 1302022, 1322021, 1302026, 1442017, 1082147, 1102043, 1322026, 1442016, 1402012, 1322025, 1322027, 1302027,
1312012, 1062000, 1332020, 1302028, 1372002, 1002033, 1092022, 1302021, 1322009, 1322024, 1082148, 1002012, 1322012,
1322022, 1002020, 1302013, 1082146, 1442014, 1002096, 1302017, 1442012,
/* Warrior equipment */
1092011, 1092014, 1302003, 1432001, 1312011, 1002088, 1041020, 1322015, 1442004, 1422008, 1302056, 1432000, 1442005,
/* Magician equipment */
1382001, 1041053, 1041029, 1050053, 1051032, 1050073, 1061036, 1002253, 1002034, 1051025, 1050067, 1051052, 1002072,
1002144, 1051054, 1050069, 1372007, 1050056, 1050074, 1002254, 1002274, 1002218, 1051055, 1382010, 1002246, 1050039,
1382007, 1372000, 1002013, 1050072, 1002036, 1002244, 1372008, 1382008, 1382011, 1092021, 1051034, 1050047, 1040019,
1041031, 1051033, 1002153, 1002252, 1051024, 1051053, 1050068, 1382003, 1382006, 1050055, 1051031, 1050025, 1002155,
1002245, 1372001,
/* Bowman equipment */
1452004, 1452023, 1060057, 1432001, 1040071, 1002137, 1462009, 1452017, 1040025, 1041027, 1452005, 1452007, 1061057,
/* Thief equipment */
1472006, 1472019, 1060084, 1472028, 1472004, 1002179, 1082074, 1472029, 1040100, 1332015, 1432001, 1040097, 1060071,
1472007, 1472002, 1051009, 1041044, 1041003, 1332016, 1472020, 1332003,
/* Pirate equipment */
1002622, 1082204, 1082213, 1082198, 1002631, 1052122, 1482012, 1052131, 1482007, 1482004, 1072318, 1492007
};
}
@Override
public int[] getUncommonItems() {
return new int[] {
/* 110 Equips */ 1002547
};
return new int[] {2040805, 1102041, 1102042, 1442018};
}
@Override
public int[] getRareItems() {
return new int[] {
/* Reverse Eqps */ 1002792,
1462052, 1462053, 1462054, 1462055,
};
return new int[] {};
}
}
+37 -99
View File
@@ -2,7 +2,10 @@ package server.gachapon;
/**
*
* @author Alan (SharpAceX)
* @author Alan (SharpAceX) - gachapon source classes stub & pirate equipment
* @author Ronan - parsed MapleSEA loots
*
* MapleSEA-like loots thanks to AyumiLove, src: https://ayumilovemaple.wordpress.com/maplestory-gachapon-guide/
*/
public class KerningCity extends GachaponItems {
@@ -10,112 +13,47 @@ public class KerningCity extends GachaponItems {
@Override
public int[] getCommonItems() {
return new int [] {
//warriorEquips = {
1002023, 1082001, 1041084, 1060017, 1422008,
1402018, 1060019, 1072047, 1040009, 1060060,
//magicianEquips = {
1050029, 1072045, 1050028, 1372001, 1051024,
1061049, 1072091, 1041030, 1041042, 1002036,
//bowmanEquips = {
1072103, 1072034, 1072069, 1062004, 1082050,
1040003, 1061064, 1040074, 1061051, 1040079,
//thiefEquips = {
1002107, 1002108, 1002109, 1002110, 1002111,
1002122, 1002123, 1002124, 1002125, 1002126,
1002127, 1002128, 1002129, 1002130, 1002131,
1002146, 1002147, 1002148, 1002149, 1002150,
1002171, 1002172, 1002173, 1002174, 1002175,
1002176, 1002177, 1002178, 1002179, 1002180,
1002181, 1002182, 1002183, 1002184, 1002185,
1002207, 1002208, 1002209, 1002210, 1002247,
1002248, 1002249, 1002281, 1002282, 1002283,
1002284, 1002285, 1002323, 1002324, 1002325,
1002326, 1002327, 1002328, 1002329, 1002330,
1002380, 1002381, 1002382, 1002383, 1002550,
1002577, 1002656, 1002750,
1040031, 1040032, 1040033, 1040034, 1040035,
1040042, 1040043, 1040044, 1040048, 1040049,
1040050, 1040057, 1040058, 1040059, 1040060,
1040061, 1040062, 1040063, 1040082, 1040083,
1040084, 1040094, 1040095, 1040096, 1040097,
1040098, 1040099, 1040100, 1040105, 1040106,
1040107, 1040108, 1040109, 1040110, 1040115,
1040116, 1040117, 1040118, 1041003, 1041036,
1041037, 1041038, 1041039, 1041040, 1041044,
1041045, 1041047, 1041048, 1041049, 1041050,
1041057, 1041058, 1041059, 1041060, 1041074,
1041075, 1041076, 1041077, 1041078, 1041079,
1041080, 1041094, 1041095, 1041096, 1041100,
1041101, 1041102, 1041103, 1041105, 1041106,
1041107, 1041115, 1041116, 1041117, 1041118,
1050096, 1050097, 1050098, 1050099, 1051006,
1051007, 1051008, 1051009, 1051090, 1051091,
1051092, 1051093, 1052072, 1052163,
1060021, 1060022, 1060023, 1060024, 1060025,
1060031, 1060032, 1060033, 1060037, 1060038,
1060039, 1060043, 1060044, 1060045, 1060046,
1060050, 1060051, 1060052, 1060071, 1060072,
1060073, 1060083, 1060084, 1060085, 1060086,
1060087, 1060088, 1060089, 1060093, 1060094,
1060095, 1060097, 1060098, 1060099, 1060104,
1060105, 1060106, 1060107, 1061003, 1061029,
1061030, 1061031, 1061032, 1061033, 1061037,
1061038, 1061040, 1061041, 1061042, 1061043,
1061044, 1061045, 1061046, 1061053, 1061054,
1061055, 1061056, 1061069, 1061070, 1061071,
1061076, 1061077, 1061078, 1061079, 1061093,
1061094, 1061095, 1061099, 1061100, 1061101,
1061102, 1061104, 1061105, 1061106, 1061114,
1061115, 1061116, 1061117, 1072022, 1072028,
1072029, 1072030, 1072031, 1072032, 1072033,
1072035, 1072036, 1072065, 1072066, 1072070,
1072071, 1072084, 1072085, 1072086, 1072087,
1072104, 1072105, 1072106, 1072107, 1072108,
1072109, 1072110, 1072128, 1072129, 1072130,
1072131, 1072150, 1072151, 1072152, 1072161,
1072162, 1072163, 1072171, 1072172, 1072173,
1072174, 1072192, 1072193, 1072194, 1072195,
1072213, 1072214, 1072215, 1072216, 1072272,
1072346, 1082029, 1082030,
1082031, 1082032, 1082033, 1082034, 1082037,
1082038, 1082039, 1082042, 1082043, 1082044,
1082045, 1082046, 1082047, 1082065, 1082066,
1082067, 1082074, 1082075, 1082076, 1082092,
1082093, 1082094, 1082095, 1082096, 1082097,
1082118, 1082119, 1082120, 1082135, 1082136,
1082137, 1082138, 1082142, 1082143, 1082144,
1082167, 1082242, 1092018, 1092019,
1092020, 1302001,
1312002, 1332000, 1332001, 1332002, 1332003,
1332004, 1332011, 1332012, 1332013, 1332014,
1332015, 1332018, 1332023, 1332024, 1332027,
1332031, 1332050, 1332052, 1332054,
1332067, 1332068, 1332069, 1332070, 1332071,
1332072, 1332077,
1472000, 1472001, 1472002,
1472003, 1472004, 1472005, 1472006, 1472007,
1472008, 1472009, 1472010, 1472011, 1472012,
1472013, 1472014, 1472015, 1472016, 1472017,
1472018, 1472019, 1472020, 1472021, 1472022,
1472023, 1472024, 1472025, 1472026, 1472027,
1472028, 1472029, 1472031, 1472033, 1472051,
1472052,
1472069, 1472072, 1472074,
1472075,
///pirateEquips = {
1082192, 1072288, 1492003, 1052113, 1052104,
1492002, 1052095, 1492001, 1002613, 1492004,
};
/* Scroll */
2041016, 2043302, 2040902, 2044804, 2044906,
/* Useable drop */
2000004, 2000005, 2022025, 2022027,
/* Common equipment */
1442013, 1432009, 1322021, 1050018, 1002392, 1002394, 1442004, 1372002, 1002418, 1002033, 1092008,
1082148, 1062001, 1302017, 1032023, 1102013, 1102040, 1002041, 1002097,
/* Warrior equipment */
1332026, 1051010, 1432001, 1422005, 1332019, 1302010, 1002056, 1060011, 1322011, 1432004, 1002028,
1051000, 1442007, 1302002,
/* Magician equipment */
1002037, 1002034, 1082020, 1050039, 1372000, 1002215, 1051034, 1040019, 1061034, 1382003, 1382006,
1050025,
/* Bowman equipment */
1002118, 1061081, 1452011, 1462012, 1452006, 1452007,
/* Thief equipment */
1472010, 1472029, 1041048, 1041095, 1060031, 1061033, 1041049, 1472011, 1040096, 1472033, 1332026,
1051006, 1082074, 1472025, 1061106, 1040084, 1332015, 1472000, 1332019, 1002183, 1002209, 1092020,
1332029, 1092019, 1061099, 1060106, 1040032, 1040059, 1332003, 1040060, 1060046, 1472005, 1332027,
/* Pirate equipment */
1082192, 1072288, 1492003, 1052113, 1052104,
1492002, 1052095, 1492001, 1002613, 1492004
};
}
@Override
public int[] getUncommonItems() {
return new int[] {1472053, 1332064, 1092050, 1472054};
return new int[] {2040805, 1082149, 1102041};
}
@Override
public int[] getRareItems() {
return new int[] {1472073, 1092049, 1002793, 1332079, 1072364, 1472062, 1332078, 1332080};
return new int[] {};
}
}
+56
View File
@@ -0,0 +1,56 @@
package server.gachapon;
/**
*
* @author Ronan - parsed MapleSEA loots
*
* MapleSEA-like loots thanks to AyumiLove, src: https://ayumilovemaple.wordpress.com/maplestory-gachapon-guide/
*/
public class Ludibrium extends GachaponItems {
@Override
public int[] getCommonItems() {
return new int [] {
/* Scroll */
2048000, 2040601, 2041019, 2041007, 2041016, 2041022, 2041001, 2041010, 2041013, 2041004, 2044701, 2043301, 2040301, 2048004, 2048001, 2040901, 2040701, 2040704, 2040707, 2040602, 2041020, 2041008, 2041017, 2041023, 2041002, 2041011, 2041014, 2041005, 2044702, 2043302, 2040302, 2040002, 2044402, 2048005, 2048002, 2040702, 2040705, 2040708, 2044302, 2043802, 2040402, 2043702, 2044811,
/* Useable drop */
2000004, 2000005, 4006000, 4006001,
/* Common equipment */
1032003, 1432009, 1302022, 1302029, 1102014, 1102018, 1312014, 1302026, 1102015, 1032011, 1312013, 1032008, 1032019, 1032007, 1332030, 1032020, 1032004, 1302027, 1032022, 1312012, 1032021, 1032006, 1302028, 1322003, 1032016, 1032015, 1302024, 1092008, 1032018, 1302021, 1032014, 1332021, 1322012, 1032005, 1032013, 1102012, 1302025, 1302013, 1032002, 1032001, 1032012, 1302017, 1032010, 1402014, 1102017, 1102013, 1442021, 1032009,
/* Beginner equipment */
1332021, 1422011,
/* Warrior equipment */
1402017, 1422005, 1002023, 1332016, 1432005,
/* Magician equipment */
1002037, 1002034, 1002064, 1002038, 1002013, 1002036, 1382011, 1002035, 1002065, 1382014, 1372001,
/* Bowman equipment */
1452026, 1002162, 1002164, 1462018, 1002165, 1452014, 1002163, 1452012, 1002161, 1452009, 1462007,
/* Thief Equipment */
1332022, 1002175, 1002172, 1002174, 1040096, 1472033, 1002173, 1332054, 1472054, 1002171, 1332016,
/* Pirate equipment */
1002646
};
}
@Override
public int[] getUncommonItems() {
return new int [] {2040805, 1002419, 1442018};
}
@Override
public int[] getRareItems() {
return new int [] {};
}
}
+45 -3
View File
@@ -21,6 +21,7 @@
*/
package server.gachapon;
import server.MapleItemInformationProvider;
import tools.Randomizer;
/**
@@ -46,9 +47,11 @@ public class MapleGachapon {
MUSHROOM_SHRINE(9100105, 90, 8, 2, new MushroomShrine()),
SHOWA_SPA_MALE(9100106, 90, 8, 2, new ShowaSpaMale()),
SHOWA_SPA_FEMALE(9100107, 90, 8, 2, new ShowaSpaFemale()),
LUDIBRIUM(9100108, 90, 8, 2, new Ludibrium()),
NEW_LEAF_CITY(9100109, 90, 8, 2, new NewLeafCity()),
EL_NATH(9100110, 90, 8, 2, new ElNath()),
NAUTILUS_HARBOR(9100117, 90, 8, 2, new NautilusHarbor());
private static final Gachapon[] values = Gachapon.values();
private GachaponItems gachapon;
@@ -71,8 +74,9 @@ public class MapleGachapon {
return 2; //Rare
} else if (chance > common) {
return 1; //Uncommon
}
return 0; //Common
} else {
return 0; //Common
}
}
public int [] getItems(int tier){
@@ -94,6 +98,44 @@ public class MapleGachapon {
}
return null;
}
public static String[] getLootInfo() {
MapleItemInformationProvider ii = MapleItemInformationProvider.getInstance();
String[] strList = new String[values.length + 1];
String menuStr = "";
int j = 0;
for (Gachapon gacha : values) {
menuStr += "#L" + j + "#" + gacha.name() + "#l\r\n";
j++;
String str = "";
for (int i = 0; i < 3; i++) {
int[] gachaItems = gacha.getItems(i);
if (gachaItems.length > 0) {
str += (" #rTier " + i + "#k:\r\n");
for (int itemid : gachaItems) {
String itemName = ii.getName(itemid);
if (itemName == null) {
itemName = "MISSING NAME #" + itemid;
}
str += (" " + itemName + "\r\n");
}
str += "\r\n";
}
}
str += "\r\n";
strList[j] = str;
}
strList[0] = menuStr;
return strList;
}
}
public MapleGachaponItem process(int npcId) {
+37 -19
View File
@@ -2,39 +2,57 @@ package server.gachapon;
/**
*
* @author Alan (SharpAceX)
* @author Alan (SharpAceX) - gachapon source classes stub
* @author Ronan - parsed MapleSEA loots
*
* MapleSEA-like loots thanks to AyumiLove, src: https://ayumilovemaple.wordpress.com/maplestory-gachapon-guide/
*/
public class MushroomShrine extends GachaponItems {
@Override
public int[] getCommonItems() {
return new int []{
1382011, 1332024, 1302022, 1302021, 1462006, 1402009, 1402010, 1322012, 1312013, 1472008,
1432008, 1050100, 1051098,
};
return new int [] {
/* Scroll */
2040305, 2040306, 2040308, 2044604, 2041039, 2041037, 2041035, 2041034, 2041041, 2040608, 2040605, 2040604, 2040611,
2040610, 2040813, 2040808, 2043004, 2040017, 2040015, 2040011, 2040013, 2040405, 2040406, 2040410, 2040511, 2040509,
2040508, 2040519, 2040521, 2040108, 2040904, 2040908, 2043104, 2044104, 2043005, 2043004, 2043006, 2044004, 2044205,
2043304, 2040607, 2040715, 2040713, 2044305, 2044904,
/* Common equipment */
1102040, 1002392, 1432009, 1002393, 1002394, 1082147, 1082148, 1032028, 1002585, 1002586, 1432013, 1022047, 1322027,
1012056, 1432018,
/* Beginner equipment */
1072264, 1072262, 1072263,
/* Warrior equipment */
1060074, 1322002, 1002340, 1442004, 1402037, 1422008, 1050022,
/* Mage equipment */
1382037, 1060014, 1051026, 1050056, 1050029, 1051030, 1382036, 1372032, 1041015, 1382015, 1372008, 1382008,
/* Bowman equipment */
1452018, 1041068, 1462007,
/* Thief equipment */
1060052, 1472013, 1002180, 1002170, 1060073, 1060099,
/* Pirate equipment */
1492004, 1492012, 1482009, 1072303, 1002637, 1052107, 1082189, 1052116, 1072309
};
}
@Override
public int[] getUncommonItems() {
//All Scrolls
return new int [] {
2043015, 2043017, 2043019, 2044000, 2044001, 2044002, 2044004, 2044005, 2044010, 2044012,
2044014, 2043200, 2043201, 2043202, 2043204, 2043205, 2043210, 2043212, 2043214, 2044200,
2044201, 2044202, 2044204, 2044205, 2044210, 2044212, 2044214, 2044300, 2044301, 2044302,
2044304, 2044305, 2044310, 2044312, 2044314, 2044400, 2044401, 2044402, 2044404, 2044405,
2044410, 2044412, 2044414,
2043800, 2043801, 2043802, 2043804, 2043805, 2043700, 2043701, 2043702, 2043704, 2043705,
2044605, 2044604, 2044602, 2044601, 2044600, 2044505, 2044504, 2044502, 2044501, 2044500,
2044700, 2044701, 2044702, 2044704, 2044705, 2043300, 2043301, 2043302, 2043304, 2043305,
2044800, 2044801, 2044802, 2044803, 2044804, 2044805, 2044807, 2044809, 2044900, 2044901,
2044902, 2044903, 2044904,
};
return new int [] {2040811, 2040810, 2040815, 1102041, 1102042, 1082149};
}
@Override
public int[] getRareItems() {
return new int [] {};
return new int [] {1102084, 3010019};
}
}
+44 -27
View File
@@ -2,7 +2,10 @@ package server.gachapon;
/**
*
* @author Alan (SharpAceX)
* @author Alan (SharpAceX) - gachapon source classes stub & pirate items
* @author Ronan - parsed MapleSEA loots
*
* MapleSEA-like loots thanks to AyumiLove, src: https://ayumilovemaple.wordpress.com/maplestory-gachapon-guide/
*/
public class NautilusHarbor extends GachaponItems {
@@ -10,40 +13,54 @@ public class NautilusHarbor extends GachaponItems {
@Override
public int[] getCommonItems() {
return new int[] {
/* Warrior Equips*/ 1060017, 1302008, 1002055, 1041064, 1072127, 1072047, 1072002, 1040028, 1072041, 1092000,
/* Mage Equips */ 1050010, 1072006, 1061022, 1051003, 1072074, 1050008, 1082053, 1051026, 1382015, 1002013,
/* Bowman Equips */ 1082048, 1041056, 1002157, 1462048, 1041054, 1061061, 1002161, 1002162, 1002158, 1002120,
/* Thief Equips */ 1040061, 1072031, 1051009, 1072036, 1002182, 1060073, 1472013, 1472009, 1002184, 1061055,
/* Pirate Equips */ 1002610, 1002616, 1002622, 1002628, 1002634, 1002640, 1002646, 1052095, 1052101, 1052107,
1052113, 1052119, 1052125, 1052131, 1072285, 1072291, 1072297, 1072303, 1072309, 1072315,
1082180, 1082186, 1082192, 1082198, 1082204, 1082210, 1482001, 1482003, 1482005, 1482007,
1482009, 1482011, 1492000, 1492002, 1492004, 1492006, 1492008, 1492010, 1492012, 1002613,
1002619, 1002625, 1002631, 1002637, 1002643, 1052098, 1052104, 1052110, 1052116, 1052122,
1052128, 1072288, 1072294, 1072300, 1072306, 1072312, 1072318, 1072338, 1082183, 1082189,
1082195, 1082201, 1082207, 1082213, 1482000, 1482002, 1482004, 1482006, 1482008, 1482010,
1482012, 1492001, 1492003, 1492005, 1492007, 1492009, 1492011,
/*KnucklerScrolls*/ 2044800, 2044801, 2044802, 2044803, 2044804, 2044805, 2044806, 2044807, 2044808, 2044809,
/* Gun Scrolls */ 2044900, 2044901, 2044902, 2044903, 2044904,
/* Bullets */ 2330005, 2330004
};
/* Scroll */
2040605, 2040626, 2040609, 2040607, 2041029, 2041027, 2041031, 2041037, 2041033, 2041039, 2041041, 2041035,
2040809, 2040813, 2040015, 2040009, 2040011, 2040013, 2040509, 2040521, 2040519, 2040507, 2040905, 2040909,
2040907, 2040713, 2040715, 2040717, 2040405, 2040409, 2040407, 2040426, 2040303, 2040307, 2040309, 2044505,
2044705, 2044605, 2043305, 2043105, 2043205, 2043005, 2043007, 2044405, 2044305, 2043805, 2044105, 2044205,
2044005, 2043705, 2044901,
/* Useable drop */
2012000, 2000004, 2020008, 2000005, 2012002, 2101004, 2101005, 2101002, 2101003, 4006000,
/* Warrior equipment */
1092014, 1402017,
/* Magician equipment */
1002037, 1002034, 1002064, 1002038, 1382037, 1372000, 1002013, 1002035, 1002065, 1382000,
/* Bowman equipment */
1452018,
/* Thief equipment */
1472010, 1002175, 1472017, 1472025,
/* Pirate equipment */
1002610, 1002616, 1002622, 1002628, 1002634, 1002640, 1002646, 1052095, 1052101, 1052107,
1052113, 1052119, 1052125, 1052131, 1072285, 1072291, 1072297, 1072303, 1072309, 1072315,
1082180, 1082186, 1082192, 1082198, 1082204, 1082210, 1482001, 1482003, 1482005, 1482007,
1482009, 1482011, 1492000, 1492002, 1492004, 1492006, 1492008, 1492010, 1492012, 1002613,
1002619, 1002625, 1002631, 1002637, 1002643, 1052098, 1052104, 1052110, 1052116, 1052122,
1052128, 1072288, 1072294, 1072300, 1072306, 1072312, 1072318, 1072338, 1082183, 1082189,
1082195, 1082201, 1082207, 1082213, 1482000, 1482002, 1482004, 1482006, 1482008, 1482010,
1482012, 1492001, 1492003, 1492005, 1492007, 1492009, 1492011,
/* Knuckler Scrolls */
2044800, 2044801, 2044802, 2044803, 2044804, 2044805, 2044806, 2044807, 2044808, 2044809,
/* Gun Scrolls */
2044900, 2044901, 2044902, 2044903, 2044904
};
}
@Override
public int[] getUncommonItems() {
return new int[] {
/* Pirate Equips */ 1072321, 1082216, 1482013, 1002649, 1052134, 1492013,
/* Mastery Books */ 2290097, 2290098, 2290099, 2290100, 2290101, 2290102, 2290103, 2290104, 2290105, 2290106,
2290107, 2290108, 2290110, 2290111, 2290111, 2290113, 2290114, 2290115, 2290116, 2290117,
2290118, 2290119, 2290120, 2290121, 2290122, 2290123, 2290124
};
return new int[] {2040811, 2040815, 2101001};
}
@Override
public int[] getRareItems() {
return new int[] {
/* Pirate Equips */ 1082243, 1482024, 1002794, 1052164, 1072365,
1482034, 1492025
};
return new int[] {};
}
}
+33 -44
View File
@@ -2,7 +2,10 @@ package server.gachapon;
/**
*
* @author Alan (SharpAceX)
* @author Alan (SharpAceX) - gachapon source classes stub & pirate equipment
* @author Ronan - parsed MapleSEA loots, thanks Vcoc for noticing somewhat unbalanced loots in NLC
*
* MapleSEA-like loots thanks to AyumiLove, src: https://ayumilovemaple.wordpress.com/maplestory-gachapon-guide/
*/
public class NewLeafCity extends GachaponItems {
@@ -10,57 +13,43 @@ public class NewLeafCity extends GachaponItems {
@Override
public int[] getCommonItems() {
return new int[] {
/* Warrior Equips*/ 1002338, 1002339, 1002340, 1002377, 1002378, 1002379, 1002528, 1002529, 1002530, 1002531,
1002532, 1040111, 1040112, 1040113, 1040120, 1040121, 1040122, 1041119, 1041120, 1041121,
1041122, 1041123, 1041124, 1050080, 1050081, 1050082, 1050083, 1051077, 1051078, 1051079,
1051080, 1060100, 1060101, 1060102, 1060109, 1060110, 1060111, 1061118, 1061119, 1061120,
1061121, 1061122, 1061123, 1072196, 1072197, 1072198, 1072210, 1072211, 1072212, 1072220,
1072221, 1072222, 1082114, 1082115, 1082116, 1082117, 1082128, 1082129, 1082130, 1082139,
1082140, 1082141, 1092023, 1092024, 1092025, 1092026, 1092027, 1092028, 1092036, 1092037,
1092038, 1092061, 1302018, 1302023, 1302056, 1312011, 1312015, 1312030, 1322020, 1322028,
1322029, 1322045, 1402004, 1402005, 1402015, 1402016, 1402035,
1412009, 1412010, 1412021, 1412040, 1422012, 1422013, 1422027, 1432010,
1432011, 1432030, 1432056, 1442019, 1442020, 1442044,
/* Mage Equips */ 1002271, 1002272, 1002273, 1002274, 1002363, 1002364, 1002365, 1002366, 1002398, 1002399,
1002400, 1002401, 1050072, 1050073, 1050074, 1050092, 1050093, 1050094, 1050095, 1050102,
1050103, 1050104, 1050105, 1051056, 1051057, 1051058, 1051094, 1051095, 1051096, 1051097,
1051101, 1051102, 1051103, 1051104, 1072177, 1072178, 1072179, 1072206, 1072207, 1072208,
1072209, 1072223, 1072224, 1072225, 1072226, 1082121, 1082122, 1082123, 1082131, 1082132,
1082133, 1082134, 1082151, 1082152, 1082153, 1082154, 1372009, 1372010, 1372016, 1382008,
1382010, 1382016, 1382035, 1382056, 1382060,
/* Bowman Equips */ 1002275, 1002276, 1002277, 1002275, 1002278, 1002402, 1002403, 1002404, 1002405, 1002406,
1002407, 1002408, 1050075, 1050076, 1050077, 1050078, 1050088, 1050089, 1050090, 1050091,
1050106, 1050107, 1050108, 1002275, 1051066, 1051067, 1051068, 1051069, 1051082, 1051083,
1051084, 1051085, 1051105, 1051106, 1051107, 1072182, 1072183, 1072184, 1072185, 1072203,
1072204, 1072205, 1072227, 1072228, 1072229, 1082109, 1082110, 1082111, 1082112, 1082125,
1082126, 1082127, 1082158, 1082159, 1082160, 1452012, 1452013, 1452014, 1452015, 1452017,
1452019, 1452020, 1452021, 1452025, 1452026, 1452060, 1462010, 1452017, 1462011, 1462012,
1462013, 1462015, 1462016, 1462017, 1462018, 1462021, 1462022, 1462049,
/* Thief Equips */ 1002323, 1002324, 1002325, 1002326, 1002327, 1002328, 1002329, 1002330, 1002380, 1002381,
1002382, 1002383, 1040108, 1040109, 1040110, 1040115, 1040117, 1040118, 1041105, 1041106,
1041107, 1041115, 1041116, 1041117, 1041118, 1050096, 1050097, 1050098, 1050099, 1051090,
1051091, 1051092, 1051093, 1060097, 1060098, 1060099, 1060104, 1060105, 1060106, 1060107,
1061104, 1061105, 1061106, 1061114, 1061115, 1061116, 1061117, 1072172, 1072173, 1072174,
1072192, 1072193, 1072194, 1072195, 1072213, 1072214, 1072215, 1072216, 1082118, 1082119,
1082120, 1082135, 1082136, 1082137, 1082138, 1082143, 1082144, 1092050, 1332023, 1332027,
1332052, 1332069, 1332072, 1472031, 1472033, 1472053,
/* Pirate Equips */ 1002640, 1002643, 1002646, 1052125, 1052128, 1052131, 1072312, 1072315, 1072318, 1082207,
1082210, 1082213, 1482010, 1482011, 1002640, 1482012, 1492010, 1492011, 1492012
};
/* Scroll */
2040406, 2040408, 2040404, 2040411, 2040409, 2044405, 2040610, 2040607, 2040812, 2041039, 2041040, 2041034,
2041030, 2041037, 2043105, 2043304, 2040103, 2040605, 2040611, 2043004, 2043204, 2044204, 2044005, 2040521,
2040510, 2043304, 2040908, 2040904, 2040907, 2040809, 2040812, 2040014, 2040714, 2040712, 2044004, 2043705,
2044505, 2040519, 2040204, 2040104, 2040109, 2044704, 2040906, 2044304, 2043007, 2040307, 2040304, 2040309,
2040208, 2040209, 2044803,
/* Common equipment */
1102040, 1102086, 1082145, 1032027, 1082146, 1002395, 1002083, 1002392, 1002587, 1022047,
/* Warrior equipment */
1312002, 1432013, 1060030, 1422008, 1050022, 1050011, 1402013, 1402017, 1302012,
/* Mage equipment */
1002074, 1050029, 1040093, 1050056, 1050039, 1382008,
/* Bowman equipment */
1002159, 1061051, 1040023,
/* Thief equipment */
1061054, 1061106, 1002249, 1040084, 1060052, 1472054,
/* Pirate equipment */
1002640, 1002643, 1002646, 1052125, 1052128, 1052131, 1072312, 1072315, 1072318, 1082207, 1082210, 1082213,
1482010, 1482011, 1002640, 1482012, 1492010, 1492011, 1492012
};
}
@Override
public int[] getUncommonItems() {
return new int[] {
2022179
};
return new int[] {2022284, 2040811, 2040815, 2040811, 1102041, 1102042, 1082149};
}
@Override
public int[] getRareItems() {
return new int[] {
2049100
};
return new int[] {};
}
}
+35 -115
View File
@@ -2,7 +2,10 @@ package server.gachapon;
/**
*
* @author Alan (SharpAceX)
* @author Alan (SharpAceX) - gachapon source classes stub & pirate equipment
* @author Ronan - parsed MapleSEA loots
*
* MapleSEA-like loots thanks to AyumiLove, src: https://ayumilovemaple.wordpress.com/maplestory-gachapon-guide/
*/
public class Perion extends GachaponItems {
@@ -10,128 +13,45 @@ public class Perion extends GachaponItems {
@Override
public int[] getCommonItems() {
return new int [] {
//warriorEquips = {
1002002, 1002003, 1002004, 1002005, 1002007,
1002009, 1002011, 1002021, 1002022, 1002023,
1002024, 1002025, 1002027, 1002028, 1002029,
1002030, 1002039, 1002040, 1002043, 1002044,
1002045, 1002046, 1002047, 1002048, 1002049,
1002050, 1002051, 1002052, 1002055, 1002056,
1002058, 1002059, 1002084, 1002085, 1002086,
1002087, 1002088, 1002091, 1002092, 1002093,
1002094, 1002095, 1002098, 1002099, 1002100,
1002101, 1002338, 1002339, 1002340, 1002377,
1002378, 1002379, 1002528, 1002529, 1002530,
1002531, 1002532, 1002551, 1002578,
1002790, 1040000, 1040009, 1040012, 1040015,
1040016, 1040021, 1040026, 1040028, 1040029,
1040030, 1040037, 1040038, 1040039, 1040040,
1040041, 1040085, 1040086, 1040087, 1040088,
1040089, 1040090, 1040091, 1040092, 1040093,
1040102, 1040103, 1040104, 1040111, 1040112,
1040113, 1040120, 1040121, 1040122, 1041014,
1041019, 1041020, 1041021, 1041022, 1041023,
1041024, 1041064, 1041084, 1041085, 1041086,
1041087, 1041088, 1041089, 1041091, 1041092,
1041093, 1041097, 1041098, 1041099, 1041119,
1041120, 1041121, 1041122, 1041123, 1041124,
1050000, 1050005, 1050006, 1050007, 1050011,
1050021, 1050022, 1050080, 1050081, 1050082,
1050083, 1051000, 1051001, 1051010, 1051011,
1051012, 1051013, 1051014, 1051015, 1051016,
1051077, 1051078, 1051079, 1051080, 1052075,
1052160, 1060000, 1060008, 1060009,
1060010, 1060011, 1060016, 1060017, 1060018,
1060019, 1060020, 1060027, 1060028, 1060029,
1060030, 1060060, 1060074, 1060075, 1060076,
1060077, 1060078, 1060079, 1060080, 1060081,
1060082, 1060090, 1060091, 1060092, 1060100,
1060101, 1060102, 1060109, 1060110, 1060111,
1061014, 1061015, 1061016, 1061017, 1061018,
1061019, 1061020, 1061023, 1061083, 1061084,
1061085, 1061086, 1061087, 1061088, 1061090,
1061091, 1061092, 1061096, 1061097, 1061098,
1061118, 1061119, 1061120, 1061121, 1061122,
1061123, 1072000, 1072002, 1072003, 1072007,
1072009, 1072011, 1072039, 1072040, 1072041,
1072046, 1072047, 1072050, 1072051, 1072052,
1072053, 1072112, 1072113, 1072126, 1072127,
1072132, 1072133, 1072134, 1072135, 1072147,
1072148, 1072149, 1072154, 1072155, 1072156,
1072168, 1072196, 1072197, 1072198, 1072210,
1072211, 1072212, 1072220, 1072221, 1072222,
1072273, 1082000, 1082001,
1082003, 1082004, 1082005, 1082006, 1082007,
1082008, 1082009, 1082010, 1082011, 1082023,
1082024, 1082025, 1082035, 1082036, 1082059,
1082060, 1082061, 1082103, 1082104, 1082105,
1082114, 1082115, 1082116, 1082117, 1082128,
1082129, 1082130, 1082139, 1082140, 1082141,
1082168, 1082218, 1082239, 1092000,
1092001, 1092002, 1092004, 1092005, 1092006,
1092007, 1092009, 1092010, 1092011, 1092012,
1092013, 1092014, 1092015, 1092016, 1092017,
1092023, 1092024, 1092025, 1092026, 1092027,
1092028, 1092036, 1092037, 1092038,
1092060, 1092061, 1302002, 1302004, 1302005,
1302008, 1302009, 1302010, 1302011, 1302012,
1302015, 1302018, 1302019, 1302023, 1302037,
1302056, 1302059, 1302068, 1302079,
1312001, 1312003, 1312005,
1312006, 1312007, 1312008, 1312009, 1312010,
1312011, 1312015, 1312016, 1312030, 1312031,
1322014, 1322015,
1322016, 1322017, 1322018, 1322019, 1322020,
1322028, 1322029, 1322045, 1322052, 1322059,
1322062, 1402000,
1402002, 1402003, 1402004, 1402005, 1402006,
1402007, 1402008, 1402011, 1402012, 1402015,
1402016, 1402017, 1402018, 1402035, 1402036,
1412000, 1412002,
1412003, 1412004, 1412005, 1412006, 1412007,
1412008, 1412009, 1412010, 1412012, 1412021,
1412026, 1412032, 1412040,
1422001, 1422002, 1422003, 1422005,
1422007, 1422008, 1422009, 1422010, 1422012,
1422013, 1422027, 1422028, 1422030, 1422031,
1422038, 1422044, 1432002, 1432003,
1432004, 1432005, 1432006, 1432007, 1432010,
1432011, 1432030, 1432038, 1432045,
1432048, 1432056, 1442001, 1442002,
1442003, 1442005, 1442006, 1442007, 1442008,
1442009, 1442010, 1442019, 1442020, 1442044,
1442045, 1442060, 1442067,
//magicianEquips = {
1002075, 1050035, 1002151, 1051023, 1072089,
1072115, 1072076, 1040018, 1382017, 1072072,
//bowmanEquips = {
1040011, 1041061, 1040076, 1040003, 1072059,
1082017, 1002114, 1041066, 1060057, 1040007,
//thiefEquips = {
1072032, 1472011, 1082037, 1040059, 1040084,
1040043, 1072085, 1040031, 1332031, 1082075,
//pirateEquips = {
1482001, 1492002, 1052113, 1002616, 1072294,
1492004, 1482006, 1082192, 1082189, 1082195,
};
/* Scrolls */
2044907, 2044802,
/* Useable drop */
2000004, 2000005,
/* Common equipment */
1402010, 1302022, 1002060, 1322021, 1082147, 1002006, 1002026, 1002392, 1322025, 1322027, 1102000, 1082150,
1332020, 1322007, 1302021, 1002395, 1082148, 1322012, 1302017, 1322010, 1032000, 1102013, 1002097,
/* Warrior equipment */
1322020, 1312007, 1312008, 1302004, 1312006, 1082036, 1082117, 1061088, 1302008, 1422005, 1002048, 1061087,
1302018, 1322017, 1422001, 1040103, 1060077, 1002022, 1002050, 1442000, 1432030, 1402037, 1092002, 1041092,
1050006, 1432004, 1061019, 1432000, 1060009, 1051000, 1002021, 1322014, 1432005,
/* Magician equipment */
1051032, 1040018, 1051027, 1372007, 1050049, 1002036, 1382012, 1002217, 1051033, 1382006, 1050048,
/* Bowman equipment */
1061061, 1060062, 1040075, 1462013, 1041065, 1452006,
/* Thief equipment */
1040095, 1060084, 1002182, 1041049, 1002247, 1332024, 1332009, 1060024, 1332015, 1041060, 1061032, 1041074,
1041003, 1332016, 1472020, 1332003, 1041059,
/* Pirate equipment */
1482001, 1492002, 1052113, 1002616, 1072294, 1492004, 1482006, 1082192, 1082189, 1082195
};
}
@Override
public int[] getUncommonItems() {
//All Scrolls
return new int [] {
2043000, 2043001, 2043002, 2043004, 2043005, 2043006, 2043007, 2043008, 2043009, 2043010,
2043015, 2043017, 2043019, 2044000, 2044001, 2044002, 2044004, 2044005, 2044010, 2044012,
2044014, 2043200, 2043201, 2043202, 2043204, 2043205, 2043210, 2043212, 2043214, 2044200,
2044201, 2044202, 2044204, 2044205, 2044210, 2044212, 2044214, 2044300, 2044301, 2044302,
2044304, 2044305, 2044310, 2044312, 2044314, 2044400, 2044401, 2044402, 2044404, 2044405,
2044410, 2044412, 2044414,
};
return new int [] {1082149, 1002391, 1002419, 1102041};
}
@Override
public int[] getRareItems() {
return new int [] {1402037, 1402049, 1072361, 1402048, 1402049, 1402050, 1402051};
return new int [] {};
}
}
+37 -4
View File
@@ -2,24 +2,57 @@ package server.gachapon;
/**
*
* @author Alan (SharpAceX)
* @author Alan (SharpAceX) - gachapon source classes stub
* @author Ronan - parsed MapleSEA loots
*
* MapleSEA-like loots src: http://maplesecrets.blogspot.com/2011/06/gachapon-showa-towns-sauna-female-spa.html
*/
public class ShowaSpaFemale extends GachaponItems {
@Override
public int[] getCommonItems() {
return new int [] {};
return new int [] {
/* Scroll */
2048005, 2048002, 2043202, 2044602, 2043214, 2041307, 2041035, 2044104, 2044505, 2044305, 2043304, 2041309,
2044010, 2044803, 2044814, 2044904, 2044902, 2044901,
/* Useable drop */
2022016, 2000005, 2022025, 2022027,
/* Common equipment */
1402000, 1402013, 1002418, 1022047, 1082145, 1082147, 1082146, 1082178, 1082175,
/* Common setup */
3010073, 3010099,
/* Warrior equipment */
1422013, 1432030,
/* Magician equipment */
1372002, 1382003,
/* Bowman equipment */
1040023,
/* Thief equipment */
1332003, 1002209,
/* Pirate equipment */
1082198, 1082213, 1482007, 1492004, 1002646
};
}
@Override
public int[] getUncommonItems() {
return new int [] {};
return new int [] {2040916, 1102042};
}
@Override
public int[] getRareItems() {
return new int [] {1022082, 1022060};
return new int [] {};
}
}
+39 -4
View File
@@ -2,24 +2,59 @@ package server.gachapon;
/**
*
* @author Alan (SharpAceX)
* @author Alan (SharpAceX) - gachapon source classes stub
* @author Ronan - parsed MapleSEA loots
*
* MapleSEA-like loots src: http://maplesecrets.blogspot.com/2011/05/gachapon-showa-towns-sauna.html
*/
public class ShowaSpaMale extends GachaponItems {
@Override
public int[] getCommonItems() {
return new int [] {};
return new int [] {
/* Scroll */
2048005, 2048002, 2043202, 2044602, 2043214, 2041307, 2041035, 2044104, 2044505, 2044305, 2043304, 2044902,
2044901, 2044811, 2044903, 2044804,
/* Useable drop */
2022016, 2000005, 2022025, 2022027,
/* Common equipment */
1332020, 1312004, 1332032, 1322023, 1322026, 1322022, 1322012, 1302014, 1302049, 1302017, 1332007, 1432009,
1432016, 1432017, 1432009, 1402013, 1402044, 1442014, 1442017, 1442016, 1442025, 1002418, 1082178, 1082179,
1082148, 1032027, 1032032, 1102028, 1102086,
/* Common setup */
3010073, 3010111,
/* Warrior equipment */
1412005, 1402048, 1402049, 1322011, 1302003, 1302004, 1302008,
/* Magician equipment */
1372000, 1372009, 1372001, 1372011, 1382006, 1382014,
/* Bowman equipment */
1452018, 1452006, 1452008, 1452005, 1462002, 1462007, 1462003, 1002169,
/* Thief equipment */
1472023, 1332012, 1332017, 1332022, 1332006, 1332029, 1040097,
/* Pirate equipment */
1052107, 1082204, 1072318, 1002637, 1482009, 1492007
};
}
@Override
public int[] getUncommonItems() {
return new int [] {};
return new int [] {2040916, 1102042};
}
@Override
public int[] getRareItems() {
return new int [] {1022082, 1022060};
return new int [] {};
}
}
+37 -84
View File
@@ -2,7 +2,10 @@ package server.gachapon;
/**
*
* @author Alan (SharpAceX)
* @author Alan (SharpAceX) - gachapon source classes stub & pirate equipment
* @author Ronan - parsed MapleSEA loots
*
* MapleSEA-like loots thanks to AyumiLove, src: https://ayumilovemaple.wordpress.com/maplestory-gachapon-guide/
*/
public class Sleepywood extends GachaponItems {
@@ -10,97 +13,47 @@ public class Sleepywood extends GachaponItems {
@Override
public int[] getCommonItems() {
return new int [] {
//warriorEquips = {
1002022, 1002024, 1002028, 1002029, 1002030,
1002045, 1002046, 1002084, 1002085, 1002086,
1002091, 1002094, 1002095, 1002100, 1002101,
1040087, 1040088, 1040089, 1040090, 1040091,
1040092, 1040093, 1040102, 1040103, 1040104,
1041087, 1041088, 1041089, 1041091, 1041092,
1041093, 1041097, 1041098, 1041099, 1060076,
1060077, 1060078, 1060079, 1060080, 1060081,
1060082, 1060090, 1060091, 1060092, 1061086,
1061087, 1061088, 1061090, 1061091, 1061092,
1061096, 1061097, 1061098, 1072132, 1072133,
1072134, 1072135, 1072147, 1072148, 1072149,
1072154, 1072155, 1072156, 1082009, 1082010,
1082011, 1082059, 1082060, 1082061, 1082103,
1082104, 1082105, 1082218, 1092004, 1092009,
1092010, 1092011, 1092015, 1092016, 1092017,
1302010, 1302011, 1302012, 1302015, 1302019,
1302037, 1302079, 1312008, 1312009,
1312010, 1322017, 1322018, 1322019, 1322059,
1402003, 1402011, 1402012, 1402017, 1412003,
1412007, 1412008, 1412032, 1422005, 1422009,
1422010, 1432004, 1432006, 1432007, 1432045,
1442005, 1442008, 1442010, 1442060,
//magicianEquips = {
1002215, 1002216, 1002217, 1002218, 1002242,
1002243, 1002244, 1002245, 1002246, 1002252,
1002253, 1002254, 1050045, 1050046, 1050047,
1050048, 1050049, 1050053, 1050054, 1050055,
1050056, 1050067, 1050068, 1050069, 1050070,
1051030, 1051031, 1051032, 1051033, 1051034,
1051044, 1051045, 1051046, 1051047, 1051052,
1051053, 1051054, 1051055, 1072136, 1072137,
1072138, 1072139, 1072140, 1072141, 1072142,
1072143, 1072157, 1072158, 1072159, 1072160,
1082080, 1082081, 1082082, 1082086, 1082087,
1082088, 1082098, 1082099, 1082100, 1372007,
1372008, 1372011, 1372014, 1372015, 1372035,
1372036, 1372037, 1372038, 1382001, 1382006,
1382007, 1382011, 1382014, 1382041,
//bowmanEquips = {
1002211, 1002212, 1002213, 1002214, 1002267,
1002268, 1002269, 1002270, 1002286, 1002287,
1002288, 1002289, 1002749, 1050051, 1050052,
1050058, 1050059, 1050060, 1050061, 1050062,
1050063, 1050064, 1051037, 1051038, 1051039,
1051041, 1051042, 1051043, 1051062, 1051063,
1051064, 1051065, 1072122, 1072123, 1072124,
1072125, 1072144, 1072145, 1072146, 1072164,
1072165, 1072166, 1072167, 1072345, 1082083,
1082084, 1082085, 1082089, 1082090, 1082091,
1082106, 1082107, 1082108, 1452004, 1452008,
1452009, 1452010, 1452011, 1452018, 1452023,
1452052, 1462006, 1462007, 1462008, 1462009,
1462046,
//thiefEquips = {
1002207, 1002208, 1002209, 1002210, 1002247,
1002248, 1002249, 1002281, 1002282, 1002283,
1002284, 1002285, 1002656, 1002750, 1040094,
1040095, 1040096, 1040097, 1040098, 1040099,
1040100, 1040105, 1040106, 1040107, 1041077,
1041078, 1041079, 1041080, 1041094, 1041095,
1041096, 1041100, 1041101, 1041102, 1041103,
1060083, 1060084, 1060085, 1060086, 1060087,
1060088, 1060089, 1060093, 1060094, 1060095,
1061076, 1061077, 1061078, 1061079, 1061093,
1061094, 1061095, 1061099, 1061100, 1061101,
1061102, 1072128, 1072129, 1072130, 1072131,
1072150, 1072151, 1072152, 1072161, 1072162,
1072163, 1072346, 1082065, 1082066, 1082067,
1082092, 1082093, 1082094, 1082095, 1082096,
1082097, 1332003, 1332015, 1332018, 1332024,
1332054, 1332064, 1472018, 1472019, 1472020,
1472021, 1472022, 1472023, 1472024, 1472025,
1472026, 1472027, 1472028, 1472029, 1472054,
1472062,
//pirateEquips = {
1002631, 1002634, 1002637, 1052116, 1052119,
1052122, 1072303, 1072306, 1072309, 1082198,
1082201, 1082204, 1482007, 1482008, 1482009,
};
/* Scroll */
2048003, 2048000, 2040601, 2044501, 2041019, 2041016, 2041022, 2041010, 2041013, 2043301, 2040301, 2040801, 2040001,
2040004, 2043101, 2043201, 2043001, 2040504, 2040501, 2048004, 2048001, 2044401, 2040901, 2040701, 2040704, 2040707,
2044301, 2043801, 2044101, 2044201, 2044001, 2040602, 2044502, 2041020, 2041017, 2041023, 2041014, 2041005, 2044702,
2044602, 2043302, 2040302, 2040802, 2040005, 2043202, 2043002, 2040505, 2040502, 2048005, 2048002, 2044402, 2040902,
2040702, 2040705, 2040708, 2044302, 2043802, 2044202, 2044002, 2044801, 2044903, 2044814,
/* Useable drop */
2012000, 2012003, 2020007, 2000004, 2012001, 2020008, 2070006, 2020012, 2000005, 2030007, 2012002, 2002001, 2070005,
/* Common equipment */
1032003, 1432009, 1102014, 1102018, 1002392, 1322026, 1032022, 1312012, 1332020, 1092030, 1032016, 1032015, 1032014,
1322024, 1032013, 1322022, 1102016, 1032012, 1032023, 1402014, 1032000, 1102017,
/* Warrior equipment */
1402017, 1051010, 1432011, 1442006, 1322002, 1422004, 1432010, 1051011, 1060018, 1432000, 1422003, 1412003, 1422000,
/* Magician equipment */
1002034, 1002142, 1382010, 1002013, 1382008, 1382011, 1050047, 1002065,
/* Bowman equipment */
1452003, 1002165, 1040068, 1462013, 1462011, 1462012, 1061050, 1462010, 1002161,
/* Thief equipment */
1332022, 1002175, 1040042, 1472004, 1040057, 1332031, 1332023, 1332010, 1002171, 1060046,
/* Pirate equipment */
1002631, 1002634, 1002637, 1052116, 1052119, 1052122, 1072303, 1072306, 1072309, 1082198, 1082201, 1082204, 1482007,
1482008, 1482009
};
}
@Override
public int[] getUncommonItems() {
return new int [] {};
return new int [] {2040804, 2040817, 2040805, 2340000, 1082149, 1442018};
}
@Override
public int[] getRareItems() {
return new int [] {1302068, 2070007, 1022082, 1022058};
return new int [] {};
}
}
+4
View File
@@ -269,6 +269,10 @@ public class MapleLifeFactory {
public static MapleNPC getNPC(int nid) {
return new MapleNPC(nid, new MapleNPCStats(MapleDataTool.getString(nid + "/name", npcStringData, "MISSINGNO")));
}
public static String getNPCDefaultTalk(int nid) {
return MapleDataTool.getString(nid + "/d0", npcStringData, "(...)");
}
public static class BanishInfo {
+73
View File
@@ -22,6 +22,7 @@
package server.maps;
import java.awt.Point;
import java.util.Collection;
import tools.Pair;
import server.MaplePortal;
@@ -39,6 +40,8 @@ public class MapleDoor {
private MaplePortal townPortal;
private MapleMap target;
private Pair<String, Integer> posStatus = null;
private long deployTime;
private boolean active;
private MapleDoorObject townDoor;
private MapleDoorObject areaDoor;
@@ -55,6 +58,8 @@ public class MapleDoor {
if(posStatus == null) {
this.town = this.target.getReturnMap();
this.townPortal = getTownDoorPortal(owner.getDoorSlot());
this.deployTime = System.currentTimeMillis();
this.active = true;
if(townPortal != null) {
this.areaDoor = new MapleDoorObject(ownerId, town, target, townPortal.getId(), targetPosition, townPortal.getPosition());
@@ -83,6 +88,57 @@ public class MapleDoor {
}
}
private void broadcastRemoveDoor(MapleCharacter owner) {
MapleDoorObject areaDoor = this.getAreaDoor();
MapleDoorObject townDoor = this.getTownDoor();
MapleMap target = this.getTarget();
MapleMap town = this.getTown();
Collection<MapleCharacter> targetChars = target.getCharacters();
Collection<MapleCharacter> townChars = town.getCharacters();
target.removeMapObject(areaDoor);
town.removeMapObject(townDoor);
for (MapleCharacter chr : targetChars) {
areaDoor.sendDestroyData(chr.getClient());
}
for (MapleCharacter chr : townChars) {
townDoor.sendDestroyData(chr.getClient());
}
owner.removePartyDoor(false);
if (this.getTownPortal().getId() == 0x80) {
for (MapleCharacter chr : townChars) {
MapleDoor door = chr.getMainTownDoor();
if (door != null) {
townDoor.sendSpawnData(chr.getClient());
}
}
}
}
public static void attemptRemoveDoor(final MapleCharacter owner) {
final MapleDoor destroyDoor = owner.getPlayerDoor();
if (destroyDoor != null && destroyDoor.dispose()) {
long effectTimeLeft = 3000 - destroyDoor.getElapsedDeployTime(); // portal deployment effect duration
if (effectTimeLeft > 0) {
MapleMap town = destroyDoor.getTown();
town.getChannelServer().registerOverallAction(town.getId(), new Runnable() {
@Override
public void run() {
destroyDoor.broadcastRemoveDoor(owner); // thanks BHB88 for noticing doors crashing players when instantly cancelling buff
}
}, effectTimeLeft);
} else {
destroyDoor.broadcastRemoveDoor(owner);
}
}
}
private MaplePortal getTownDoorPortal(int doorid) {
return town.getDoorPortal(doorid);
}
@@ -114,4 +170,21 @@ public class MapleDoor {
public Pair<String, Integer> getDoorStatus() {
return posStatus;
}
public long getElapsedDeployTime() {
return System.currentTimeMillis() - deployTime;
}
private boolean dispose() {
if (active) {
active = false;
return true;
} else {
return false;
}
}
public boolean isActive() {
return active;
}
}
+12 -7
View File
@@ -100,15 +100,20 @@ public class MapleDoorObject extends AbstractMapleMapObject {
@Override
public void sendSpawnData(MapleClient client) {
sendSpawnData(client, true);
}
public void sendSpawnData(MapleClient client, boolean launched) {
MapleCharacter chr = client.getPlayer();
if (from.getId() == chr.getMapId()) {
MapleParty party = chr.getParty();
if (party != null && (ownerId == chr.getId() || party.getMemberById(ownerId) != null)) {
client.announce(MaplePacketCreator.partyPortal(this.getFrom().getId(), this.getTo().getId(), this.toPosition()));
if (this.getFrom().getId() == chr.getMapId()) {
if (chr.getParty() != null && (this.getOwnerId() == chr.getId() || chr.getParty().getMemberById(this.getOwnerId()) != null)) {
chr.announce(MaplePacketCreator.partyPortal(this.getFrom().getId(), this.getTo().getId(), this.toPosition()));
}
chr.announce(MaplePacketCreator.spawnPortal(this.getFrom().getId(), this.getTo().getId(), this.toPosition()));
if (!this.inTown()) {
chr.announce(MaplePacketCreator.spawnDoor(this.getOwnerId(), this.getPosition(), launched));
}
client.announce(MaplePacketCreator.spawnPortal(this.getFrom().getId(), this.getTo().getId(), this.toPosition()));
if(!this.inTown()) client.announce(MaplePacketCreator.spawnDoor(this.getOwnerId(), this.getPosition(), true));
}
}
+1 -1
View File
@@ -238,7 +238,7 @@ public class MapleHiredMerchant extends AbstractMapleMapObject {
}
}
private static boolean canBuy(MapleClient c, Item newItem) { // thanks xiaokelvin for noticing a leaked test code here
private static boolean canBuy(MapleClient c, Item newItem) { // thanks xiaokelvin (Conrad) for noticing a leaked test code here
return MapleInventoryManipulator.checkSpace(c, newItem.getItemId(), newItem.getQuantity(), newItem.getOwner()) && MapleInventoryManipulator.addFromDrop(c, newItem, false);
}
+1 -12
View File
@@ -2131,18 +2131,7 @@ public class MapleMap {
spawnAndAddRangedMapObject(door, new DelayedPacketCreation() {
@Override
public void sendPackets(MapleClient c) {
if (door.getFrom().getId() == c.getPlayer().getMapId()) {
if (c.getPlayer().getParty() != null && (door.getOwnerId() == c.getPlayer().getId() || c.getPlayer().getParty().getMemberById(door.getOwnerId()) != null)) {
c.announce(MaplePacketCreator.partyPortal(door.getFrom().getId(), door.getTo().getId(), door.toPosition()));
}
c.announce(MaplePacketCreator.spawnPortal(door.getFrom().getId(), door.getTo().getId(), door.toPosition()));
if (!door.inTown()) {
c.announce(MaplePacketCreator.spawnDoor(door.getOwnerId(), door.getPosition(), false));
}
}
c.announce(MaplePacketCreator.enableActions());
door.sendSpawnData(c, false);
}
}, new SpawnCondition() {
@Override
+65 -6
View File
@@ -50,6 +50,7 @@ public class MapleMiniGame extends AbstractMapleMapObject {
private int firstslot = 0;
private int visitorpoints = 0, visitorscore = 0, visitorforfeits = 0, lastvisitor = -1;
private int ownerpoints = 0, ownerscore = 0, ownerforfeits = 0;
private boolean visitorquit, ownerquit;
private long nextavailabletie = 0;
private int matchestowin = 0;
@@ -112,10 +113,33 @@ public class MapleMiniGame extends AbstractMapleMapObject {
owner.getMap().broadcastMessage(MaplePacketCreator.addMatchCardBox(owner, 2, 0));
}
}
public void removeVisitor(MapleCharacter challenger) {
if (visitor == challenger) {
public void closeRoom(boolean forceClose) {
owner.getMap().broadcastMessage(MaplePacketCreator.removeMinigameBox(owner));
if (forceClose) {
this.broadcastToOwner(MaplePacketCreator.getMiniGameClose(false, 4));
}
this.broadcastToVisitor(MaplePacketCreator.getMiniGameClose(true, 3));
if (visitor != null) {
visitor.setMiniGame(null);
visitor = null;
}
owner.setMiniGame(null);
owner = null;
}
public void removeVisitor(boolean forceClose, MapleCharacter challenger) {
if (visitor == challenger) {
if (forceClose) {
visitor.announce(MaplePacketCreator.getMiniGameClose(true, 4));
}
challenger.setMiniGame(null);
visitor = null;
this.getOwner().getClient().announce(MaplePacketCreator.getMiniGameRemoveVisitor());
if (GameType == MiniGameType.OMOK) {
this.getOwner().getMap().broadcastMessage(MaplePacketCreator.addOmokBox(owner, 1, 0));
@@ -154,13 +178,37 @@ public class MapleMiniGame extends AbstractMapleMapObject {
this.getOwner().getMap().broadcastMessage(MaplePacketCreator.addOmokBox(owner, visitor != null ? 2 : 1, inprogress));
}
private synchronized boolean minigameMatchFinish() {
if (isMatchInProgress()) {
inprogress = 0;
return true;
} else {
return false;
}
}
private void minigameMatchFinished() {
inprogress = 0;
updateMiniGameBox();
if (ownerquit) {
owner.closeMiniGame(true);
} else if (visitorquit) {
visitor.closeMiniGame(true);
}
}
public void minigameMatchStarted() {
inprogress = 1;
ownerquit = false;
visitorquit = false;
}
public void setQuitAfterGame(MapleCharacter player, boolean quit) {
if (isOwner(player)) {
ownerquit = quit;
} else {
visitorquit = quit;
}
}
public boolean isMatchInProgress() {
@@ -177,33 +225,43 @@ public class MapleMiniGame extends AbstractMapleMapObject {
public boolean isTieDenied(MapleCharacter chr) {
if (this.isOwner(chr)) {
return ((inprogress >> 1) % 2) == 1;
} else {
return ((inprogress >> 2) % 2) == 1;
} else {
return ((inprogress >> 1) % 2) == 1;
}
}
public void minigameMatchOwnerWins(boolean forfeit) {
if (!minigameMatchFinish()) return;
owner.setMiniGamePoints(visitor, 1, this.isOmok());
if (visitorforfeits < 4 || !forfeit) ownerscore += 50;
visitorscore += (15 * (forfeit ? -1 : 1));
if (forfeit) visitorforfeits++;
this.broadcast(MaplePacketCreator.getMiniGameOwnerWin(this, forfeit));
minigameMatchFinished();
}
public void minigameMatchVisitorWins(boolean forfeit) {
if (!minigameMatchFinish()) return;
owner.setMiniGamePoints(visitor, 2, this.isOmok());
if (ownerforfeits < 4 || !forfeit) visitorscore += 50;
ownerscore += (15 * (forfeit ? -1 : 1));
if (forfeit) ownerforfeits++;
this.broadcast(MaplePacketCreator.getMiniGameVisitorWin(this, forfeit));
minigameMatchFinished();
}
public void minigameMatchDraw() {
if (!minigameMatchFinish()) return;
owner.setMiniGamePoints(visitor, 3, this.isOmok());
long timeNow = Server.getInstance().getCurrentTime();
@@ -215,6 +273,7 @@ public class MapleMiniGame extends AbstractMapleMapObject {
}
this.broadcast(MaplePacketCreator.getMiniGameTie(this));
minigameMatchFinished();
}