Reworked Singapore/Malaysia + warp fix

Reworked many aspects of the Malaysia/Singapore region (added DB data,
enabled Latanica & Scarga expedition, fixed maps). Fixed some issues
related with player warping.
This commit is contained in:
ronancpl
2017-07-14 20:40:06 -03:00
parent 7f80f45553
commit 8fab2a6e3e
120 changed files with 17684 additions and 16759 deletions

View File

@@ -561,7 +561,6 @@ public class MapleItemInformationProvider {
Map<String, Integer> stats = this.getEquipStats(scrollId);
Map<String, Integer> eqstats = this.getEquipStats(equip.getItemId());
System.out.println("GM: " + isGM + "\tWS: " + usingWhiteScroll + "\tITEM: " + scrollId);
if (((nEquip.getUpgradeSlots() > 0 || isCleanSlate(scrollId))) || isGM) {
if(isGM || rollSuccessChance((double)stats.get("success"))) {
short flag = nEquip.getFlag();

View File

@@ -861,7 +861,7 @@ public class MapleStatEffect {
door.getTown().spawnDoor(door.getTownDoor());
} else {
if(door.getOwnerId() == -1) applyto.dropMessage(5, "There are no door portals available for the town at this moment. Try again later.");
else applyto.dropMessage(5, "This position is not suitable for a Mystic Door, try elsewhere.");
else applyto.dropMessage(5, "Mystic Door cannot be cast on a slope, try elsewhere.");
applyto.cancelBuffStats(MapleBuffStat.SOULARROW); // cancel door buff
}

View File

@@ -111,9 +111,8 @@ public class MapleExpedition {
leader.getClient().getChannelServer().getExpeditions().remove(exped);
startMap.broadcastMessage(MaplePacketCreator.serverNotice(6, "Time limit has been reached. Expedition has been disbanded."));
broadcastExped(MaplePacketCreator.removeClock());
dispose(false);
}
dispose(false);
}
}, type.getRegistrationTime() * 60 * 1000);
}

View File

@@ -1604,7 +1604,7 @@ public class MapleMap {
}
}, time);
}
public void addPlayer(final MapleCharacter chr) {
chrWLock.lock();
try {
@@ -1849,6 +1849,16 @@ public class MapleMap {
}
return closest;
}
public MaplePortal findMarketPortal() {
for (MaplePortal portal : portals.values()) {
String ptScript = portal.getScriptName();
if(ptScript != null && ptScript.contains("market")) {
return portal;
}
}
return null;
}
public Collection<MaplePortal> getPortals() {
return Collections.unmodifiableCollection(portals.values());
@@ -2769,7 +2779,7 @@ public class MapleMap {
private boolean specialEquip() {//Maybe I shouldn't use fieldType :\
return fieldType == 4 || fieldType == 19;
}
public void setCoconut(MapleCoconut nut) {
this.coconut = nut;
}

View File

@@ -42,7 +42,7 @@ public enum MapleMiniDungeon {
THE_RESTORING_MEMORY(240040511, 240040800, 19),
NEWT_SECURED_ZONE(240040520, 240040900, 19),
PILLAGE_OF_TREASURE_ISLAND(251010402, 251010410, 30),
;
LONGEST_RIDE_ON_BYEBYE_STATION(551030000, 551030001, 19);
private int baseId;
private int dungeonId;

View File

@@ -22,7 +22,6 @@
package server.quest.actions;
import client.MapleCharacter;
import client.MapleJob;
import client.inventory.Item;
import client.inventory.MapleInventory;
import client.inventory.MapleInventoryType;
@@ -43,10 +42,10 @@ import tools.Randomizer;
/**
*
* @author Tyler (Twdtwd)
* @author Tyler (Twdtwd), Ronan
*/
public class ItemAction extends MapleQuestAction {
Map<Integer, ItemData> items = new HashMap<>();
List<ItemData> items = new ArrayList<>();
public ItemAction(MapleQuest quest, MapleData data) {
super(MapleQuestActionType.ITEM, quest);
@@ -73,27 +72,25 @@ public class ItemAction extends MapleQuestAction {
if (iEntry.getChildByPath("job") != null)
job = MapleDataTool.getInt(iEntry.getChildByPath("job"));
items.put(id, new ItemData(id, count, prop, job, gender));
items.add(new ItemData(id, count, prop, job, gender));
}
}
@Override
public void run(MapleCharacter chr, Integer extSelection) {
MapleItemInformationProvider ii = MapleItemInformationProvider.getInstance();
Map<Integer, Integer> props = new HashMap<>();
for(ItemData item : items.values()) {
int props = 0, rndProps = 0, accProps = 0;
for(ItemData item : items) {
if(item.getProp() != null && item.getProp() != -1 && canGetItem(item, chr)) {
for (int i = 0; i < item.getProp(); i++) {
props.put(props.size(), item.getId());
}
props += item.getProp();
}
}
int selection = 0;
int extNum = 0;
if (props.size() > 0) {
selection = props.get(Randomizer.nextInt(props.size()));
if (props > 0) {
rndProps = Randomizer.nextInt(props);
}
for (ItemData iEntry : items.values()) {
for (ItemData iEntry : items) {
if (!canGetItem(iEntry, chr)) {
continue;
}
@@ -101,8 +98,15 @@ public class ItemAction extends MapleQuestAction {
if(iEntry.getProp() == -1) {
if(extSelection != extNum++)
continue;
} else if(iEntry.getId() != selection)
continue;
} else {
accProps += iEntry.getProp();
if(accProps <= rndProps) {
continue;
} else {
accProps = Integer.MIN_VALUE;
}
}
}
if(iEntry.getCount() < 0) { // Remove Items
@@ -135,7 +139,7 @@ public class ItemAction extends MapleQuestAction {
MapleItemInformationProvider ii = MapleItemInformationProvider.getInstance();
EnumMap<MapleInventoryType, Integer> props = new EnumMap<>(MapleInventoryType.class);
List<Pair<Item, MapleInventoryType>> itemList = new ArrayList<>();
for(ItemData item : items.values()) {
for(ItemData item : items) {
if (!canGetItem(item, chr)) {
continue;
}
@@ -188,17 +192,6 @@ public class ItemAction extends MapleQuestAction {
break;
}
}
/*
if (!jobFound && item.jobEx > 0) {
final List<Integer> codeEx = getJobBySimpleEncoding(item.jobEx);
for (int codec : codeEx) {
if ((codec / 100 % 10) == (chr.getJob().getId() / 100 % 10)) {
jobFound = true;
break;
}
}
}
*/
return jobFound;
}
return true;