Reformat and clean up "server" package
This commit is contained in:
@@ -48,10 +48,12 @@ import java.util.concurrent.locks.Lock;
|
|||||||
public class CashShop {
|
public class CashShop {
|
||||||
public static class CashItem {
|
public static class CashItem {
|
||||||
|
|
||||||
private int sn, itemId, price;
|
private final int sn;
|
||||||
private long period;
|
private final int itemId;
|
||||||
private short count;
|
private final int price;
|
||||||
private boolean onSale;
|
private final long period;
|
||||||
|
private final short count;
|
||||||
|
private final boolean onSale;
|
||||||
|
|
||||||
private CashItem(int sn, int itemId, int price, long period, short count, boolean onSale) {
|
private CashItem(int sn, int itemId, int price, long period, short count, boolean onSale) {
|
||||||
this.sn = sn;
|
this.sn = sn;
|
||||||
@@ -120,8 +122,9 @@ public class CashShop {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static class SpecialCashItem {
|
public static class SpecialCashItem {
|
||||||
private int sn, modifier;
|
private final int sn;
|
||||||
private byte info; //?
|
private final int modifier;
|
||||||
|
private final byte info; //?
|
||||||
|
|
||||||
public SpecialCashItem(int sn, int modifier, byte info) {
|
public SpecialCashItem(int sn, int modifier, byte info) {
|
||||||
this.sn = sn;
|
this.sn = sn;
|
||||||
@@ -240,13 +243,17 @@ public class CashShop {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private int accountId, characterId, nxCredit, maplePoint, nxPrepaid;
|
private final int accountId;
|
||||||
|
private final int characterId;
|
||||||
|
private int nxCredit;
|
||||||
|
private int maplePoint;
|
||||||
|
private int nxPrepaid;
|
||||||
private boolean opened;
|
private boolean opened;
|
||||||
private ItemFactory factory;
|
private ItemFactory factory;
|
||||||
private List<Item> inventory = new ArrayList<>();
|
private final List<Item> inventory = new ArrayList<>();
|
||||||
private List<Integer> wishList = new ArrayList<>();
|
private final List<Integer> wishList = new ArrayList<>();
|
||||||
private int notes = 0;
|
private int notes = 0;
|
||||||
private Lock lock = MonitoredReentrantLockFactory.createLock(MonitoredLockType.CASHSHOP);
|
private final Lock lock = MonitoredReentrantLockFactory.createLock(MonitoredLockType.CASHSHOP);
|
||||||
|
|
||||||
public CashShop(int accountId, int characterId, int jobType) throws SQLException {
|
public CashShop(int accountId, int characterId, int jobType) throws SQLException {
|
||||||
this.accountId = accountId;
|
this.accountId = accountId;
|
||||||
|
|||||||
@@ -22,8 +22,9 @@
|
|||||||
package server;
|
package server;
|
||||||
|
|
||||||
import client.inventory.Item;
|
import client.inventory.Item;
|
||||||
import java.util.Calendar;
|
|
||||||
import java.sql.Timestamp;
|
import java.sql.Timestamp;
|
||||||
|
import java.util.Calendar;
|
||||||
|
|
||||||
public class DueyPackage {
|
public class DueyPackage {
|
||||||
private String sender = null;
|
private String sender = null;
|
||||||
|
|||||||
@@ -22,18 +22,20 @@
|
|||||||
package server;
|
package server;
|
||||||
|
|
||||||
import client.inventory.Item;
|
import client.inventory.Item;
|
||||||
|
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author Traitor
|
* @author Traitor
|
||||||
*/
|
*/
|
||||||
public class MTSItemInfo {
|
public class MTSItemInfo {
|
||||||
private int price;
|
private final int price;
|
||||||
private Item item;
|
private final Item item;
|
||||||
private String seller;
|
private final String seller;
|
||||||
private int id;
|
private final int id;
|
||||||
private int year, month, day = 1;
|
private final int year;
|
||||||
|
private final int month;
|
||||||
|
private int day = 1;
|
||||||
|
|
||||||
public MTSItemInfo(Item item, int price, int id, int cid, String seller, String date) {
|
public MTSItemInfo(Item item, int price, int id, int cid, String seller, String date) {
|
||||||
this.item = item;
|
this.item = item;
|
||||||
|
|||||||
@@ -31,25 +31,24 @@ import java.util.Map;
|
|||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author Jay Estrella, Ronan
|
* @author Jay Estrella, Ronan
|
||||||
*/
|
*/
|
||||||
public class MakerItemFactory {
|
public class MakerItemFactory {
|
||||||
private static ItemInformationProvider ii = ItemInformationProvider.getInstance();
|
private static final ItemInformationProvider ii = ItemInformationProvider.getInstance();
|
||||||
|
|
||||||
public static MakerItemCreateEntry getItemCreateEntry(int toCreate, int stimulantid, Map<Integer, Short> reagentids) {
|
public static MakerItemCreateEntry getItemCreateEntry(int toCreate, int stimulantid, Map<Integer, Short> reagentids) {
|
||||||
MakerItemCreateEntry makerEntry = ii.getMakerItemEntry(toCreate);
|
MakerItemCreateEntry makerEntry = ii.getMakerItemEntry(toCreate);
|
||||||
if(makerEntry.isInvalid()) {
|
if (makerEntry.isInvalid()) {
|
||||||
return makerEntry;
|
return makerEntry;
|
||||||
}
|
}
|
||||||
|
|
||||||
// THEY DECIDED FOR SOME BIZARRE PATTERN ON THE FEE THING, ALMOST RANDOMIZED.
|
// THEY DECIDED FOR SOME BIZARRE PATTERN ON THE FEE THING, ALMOST RANDOMIZED.
|
||||||
if(stimulantid != -1) {
|
if (stimulantid != -1) {
|
||||||
makerEntry.addCost(getMakerStimulantFee(toCreate));
|
makerEntry.addCost(getMakerStimulantFee(toCreate));
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!reagentids.isEmpty()) {
|
if (!reagentids.isEmpty()) {
|
||||||
for(Entry<Integer, Short> r : reagentids.entrySet()) {
|
for (Entry<Integer, Short> r : reagentids.entrySet()) {
|
||||||
makerEntry.addCost((getMakerReagentFee(toCreate, ((r.getKey() % 10) + 1))) * r.getValue());
|
makerEntry.addCost((getMakerReagentFee(toCreate, ((r.getKey() % 10) + 1))) * r.getValue());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -75,11 +74,11 @@ public class MakerItemFactory {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static double getMakerStimulantFee(int itemid) {
|
private static double getMakerStimulantFee(int itemid) {
|
||||||
if(YamlConfig.config.server.USE_MAKER_FEE_HEURISTICS) {
|
if (YamlConfig.config.server.USE_MAKER_FEE_HEURISTICS) {
|
||||||
EquipType et = EquipType.getEquipTypeById(itemid);
|
EquipType et = EquipType.getEquipTypeById(itemid);
|
||||||
int eqpLevel = ii.getEquipLevelReq(itemid);
|
int eqpLevel = ii.getEquipLevelReq(itemid);
|
||||||
|
|
||||||
switch(et) {
|
switch (et) {
|
||||||
case CAP:
|
case CAP:
|
||||||
return 1145.736246 * Math.exp(0.03336832546 * eqpLevel);
|
return 1145.736246 * Math.exp(0.03336832546 * eqpLevel);
|
||||||
|
|
||||||
@@ -110,11 +109,11 @@ public class MakerItemFactory {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static double getMakerReagentFee(int itemid, int reagentLevel) {
|
private static double getMakerReagentFee(int itemid, int reagentLevel) {
|
||||||
if(YamlConfig.config.server.USE_MAKER_FEE_HEURISTICS) {
|
if (YamlConfig.config.server.USE_MAKER_FEE_HEURISTICS) {
|
||||||
EquipType et = EquipType.getEquipTypeById(itemid);
|
EquipType et = EquipType.getEquipTypeById(itemid);
|
||||||
int eqpLevel = ii.getEquipLevelReq(itemid);
|
int eqpLevel = ii.getEquipLevelReq(itemid);
|
||||||
|
|
||||||
switch(et) {
|
switch (et) {
|
||||||
case CAP:
|
case CAP:
|
||||||
return 5592.01613 * Math.exp(0.02914576018 * eqpLevel) * reagentLevel;
|
return 5592.01613 * Math.exp(0.02914576018 * eqpLevel) * reagentLevel;
|
||||||
|
|
||||||
@@ -145,11 +144,12 @@ public class MakerItemFactory {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static class MakerItemCreateEntry {
|
public static class MakerItemCreateEntry {
|
||||||
private int reqLevel, reqMakerLevel;
|
private final int reqLevel;
|
||||||
|
private final int reqMakerLevel;
|
||||||
private double cost;
|
private double cost;
|
||||||
private int reqCost;
|
private int reqCost;
|
||||||
private List<Pair<Integer, Integer>> reqItems = new ArrayList<>(); // itemId / amount
|
private final List<Pair<Integer, Integer>> reqItems = new ArrayList<>(); // itemId / amount
|
||||||
private List<Pair<Integer, Integer>> gainItems = new ArrayList<>(); // itemId / amount
|
private final List<Pair<Integer, Integer>> gainItems = new ArrayList<>(); // itemId / amount
|
||||||
|
|
||||||
public MakerItemCreateEntry(int cost, int reqLevel, int reqMakerLevel) {
|
public MakerItemCreateEntry(int cost, int reqLevel, int reqMakerLevel) {
|
||||||
this.cost = cost;
|
this.cost = cost;
|
||||||
|
|||||||
@@ -1648,7 +1648,9 @@ public class StatEffect {
|
|||||||
private boolean isCureAllAbnormalStatus() {
|
private boolean isCureAllAbnormalStatus() {
|
||||||
if (skill) {
|
if (skill) {
|
||||||
return isHerosWill(sourceid);
|
return isHerosWill(sourceid);
|
||||||
} else return sourceid == 2022544;
|
} else {
|
||||||
|
return sourceid == 2022544;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isHerosWill(int skillid) {
|
public static boolean isHerosWill(int skillid) {
|
||||||
|
|||||||
@@ -22,11 +22,10 @@ package server;
|
|||||||
import java.util.concurrent.*;
|
import java.util.concurrent.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author Ronan
|
* @author Ronan
|
||||||
*/
|
*/
|
||||||
public class ThreadManager {
|
public class ThreadManager {
|
||||||
private static ThreadManager instance = new ThreadManager();
|
private static final ThreadManager instance = new ThreadManager();
|
||||||
|
|
||||||
public static ThreadManager getInstance() {
|
public static ThreadManager getInstance() {
|
||||||
return instance;
|
return instance;
|
||||||
@@ -61,7 +60,8 @@ public class ThreadManager {
|
|||||||
tpe.shutdown();
|
tpe.shutdown();
|
||||||
try {
|
try {
|
||||||
tpe.awaitTermination(5, TimeUnit.MINUTES);
|
tpe.awaitTermination(5, TimeUnit.MINUTES);
|
||||||
} catch (InterruptedException ie) {}
|
} catch (InterruptedException ie) {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ import java.util.concurrent.TimeUnit;
|
|||||||
import java.util.concurrent.atomic.AtomicInteger;
|
import java.util.concurrent.atomic.AtomicInteger;
|
||||||
|
|
||||||
public class TimerManager implements TimerManagerMBean {
|
public class TimerManager implements TimerManagerMBean {
|
||||||
private static TimerManager instance = new TimerManager();
|
private static final TimerManager instance = new TimerManager();
|
||||||
|
|
||||||
public static TimerManager getInstance() {
|
public static TimerManager getInstance() {
|
||||||
return instance;
|
return instance;
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ import client.Character;
|
|||||||
import client.SkillFactory;
|
import client.SkillFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author kevintjuh93
|
* @author kevintjuh93
|
||||||
*/
|
*/
|
||||||
public class RescueGaga extends Events {
|
public class RescueGaga extends Events {
|
||||||
|
|||||||
@@ -1,17 +1,16 @@
|
|||||||
package server.gachapon;
|
package server.gachapon;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* @author Ronan - parsed MapleSEA loots
|
||||||
* @author Ronan - parsed MapleSEA loots
|
* <p>
|
||||||
*
|
* MapleSEA-like loots thanks to AyumiLove - src: https://ayumilovemaple.wordpress.com/maplestory-gachapon-guide/
|
||||||
* MapleSEA-like loots thanks to AyumiLove - src: https://ayumilovemaple.wordpress.com/maplestory-gachapon-guide/
|
*/
|
||||||
*/
|
|
||||||
|
|
||||||
public class ElNath extends GachaponItems {
|
public class ElNath extends GachaponItems {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int[] getCommonItems() {
|
public int[] getCommonItems() {
|
||||||
return new int [] {
|
return new int[]{
|
||||||
|
|
||||||
/* Scroll */
|
/* Scroll */
|
||||||
2041012, 2048003, 2043800, 2043301, 2040301, 2043101, 2043201, 2043001, 2044301, 2043801, 2044201, 2043701, 2044502,
|
2041012, 2048003, 2043800, 2043301, 2040301, 2043101, 2043201, 2043001, 2044301, 2043801, 2044201, 2043701, 2044502,
|
||||||
@@ -54,12 +53,12 @@ public class ElNath extends GachaponItems {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int[] getUncommonItems() {
|
public int[] getUncommonItems() {
|
||||||
return new int [] {2022439, 2040804, 2040805, 2340000};
|
return new int[]{2022439, 2040804, 2040805, 2340000};
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int[] getRareItems() {
|
public int[] getRareItems() {
|
||||||
return new int [] {2043803, 1102085};
|
return new int[]{2043803, 1102085};
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,18 +1,17 @@
|
|||||||
package server.gachapon;
|
package server.gachapon;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* @author Alan (SharpAceX) - gachapon source classes stub & pirate equipment
|
||||||
* @author Alan (SharpAceX) - gachapon source classes stub & pirate equipment
|
* @author Ronan - parsed MapleSEA loots
|
||||||
* @author Ronan - parsed MapleSEA loots
|
* <p>
|
||||||
*
|
* MapleSEA-like loots thanks to AyumiLove - src: https://ayumilovemaple.wordpress.com/maplestory-gachapon-guide/
|
||||||
* MapleSEA-like loots thanks to AyumiLove - src: https://ayumilovemaple.wordpress.com/maplestory-gachapon-guide/
|
*/
|
||||||
*/
|
|
||||||
|
|
||||||
public class Ellinia extends GachaponItems {
|
public class Ellinia extends GachaponItems {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int[] getCommonItems() {
|
public int[] getCommonItems() {
|
||||||
return new int[] {
|
return new int[]{
|
||||||
|
|
||||||
/* Scroll */
|
/* Scroll */
|
||||||
2043302, 2040002, 2043102, 2043002, 2044402, 2044302, 2043802, 2044002, 2041017, 2044902,
|
2043302, 2040002, 2043102, 2043002, 2044402, 2044302, 2043802, 2044002, 2041017, 2044902,
|
||||||
@@ -55,12 +54,12 @@ public class Ellinia extends GachaponItems {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int[] getUncommonItems() {
|
public int[] getUncommonItems() {
|
||||||
return new int [] {1082149, 1002391, 1002419};
|
return new int[]{1082149, 1002391, 1002419};
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int[] getRareItems() {
|
public int[] getRareItems() {
|
||||||
return new int [] {};
|
return new int[]{};
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,19 +23,18 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
package server.gachapon;
|
package server.gachapon;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* @author Alan (SharpAceX)
|
||||||
* @author Alan (SharpAceX)
|
*/
|
||||||
*/
|
|
||||||
|
|
||||||
public abstract class GachaponItems {
|
public abstract class GachaponItems {
|
||||||
|
|
||||||
public abstract int [] getCommonItems();
|
public abstract int[] getCommonItems();
|
||||||
public abstract int [] getUncommonItems();
|
public abstract int[] getUncommonItems();
|
||||||
public abstract int [] getRareItems();
|
public abstract int[] getRareItems();
|
||||||
|
|
||||||
private final int [] commonItems;
|
private final int[] commonItems;
|
||||||
private final int [] uncommonItems;
|
private final int[] uncommonItems;
|
||||||
private final int [] rareItems;
|
private final int[] rareItems;
|
||||||
|
|
||||||
public GachaponItems() {
|
public GachaponItems() {
|
||||||
this.commonItems = getCommonItems();
|
this.commonItems = getCommonItems();
|
||||||
|
|||||||
@@ -1,16 +1,15 @@
|
|||||||
package server.gachapon;
|
package server.gachapon;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* @author Alan (SharpAceX)
|
||||||
* @author Alan (SharpAceX)
|
* @author Ronan - added ores and reworked global loots
|
||||||
* @author Ronan - added ores and reworked global loots
|
*/
|
||||||
*/
|
|
||||||
|
|
||||||
public class Global extends GachaponItems {
|
public class Global extends GachaponItems {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int[] getCommonItems() {
|
public int[] getCommonItems() {
|
||||||
return new int[] {
|
return new int[]{
|
||||||
/* Potions */
|
/* Potions */
|
||||||
2000004, 2000005, 2001002, 2001001, 2020012, 2020013, 2020014, 2020015,
|
2000004, 2000005, 2001002, 2001001, 2020012, 2020013, 2020014, 2020015,
|
||||||
|
|
||||||
@@ -24,7 +23,7 @@ public class Global extends GachaponItems {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int[] getUncommonItems() {
|
public int[] getUncommonItems() {
|
||||||
return new int[] {
|
return new int[]{
|
||||||
/* Potions */
|
/* Potions */
|
||||||
2022179, 2022273, 2022282, 2022283, 2022285, 2022245, 2022182,
|
2022179, 2022273, 2022282, 2022283, 2022285, 2022245, 2022182,
|
||||||
|
|
||||||
@@ -35,7 +34,7 @@ public class Global extends GachaponItems {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int[] getRareItems() {
|
public int[] getRareItems() {
|
||||||
return new int[] {
|
return new int[]{
|
||||||
/* Scrolls */
|
/* Scrolls */
|
||||||
2049100, 2340000,
|
2049100, 2340000,
|
||||||
|
|
||||||
|
|||||||
@@ -1,18 +1,17 @@
|
|||||||
package server.gachapon;
|
package server.gachapon;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* @author Alan (SharpAceX) - gachapon source classes stub
|
||||||
* @author Alan (SharpAceX) - gachapon source classes stub
|
* @author Ronan - parsed MapleSEA loots
|
||||||
* @author Ronan - parsed MapleSEA loots
|
* <p>
|
||||||
*
|
* MapleSEA-like loots thanks to AyumiLove - src: https://ayumilovemaple.wordpress.com/maplestory-gachapon-guide/
|
||||||
* MapleSEA-like loots thanks to AyumiLove - src: https://ayumilovemaple.wordpress.com/maplestory-gachapon-guide/
|
*/
|
||||||
*/
|
|
||||||
|
|
||||||
public class Henesys extends GachaponItems {
|
public class Henesys extends GachaponItems {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int[] getCommonItems() {
|
public int[] getCommonItems() {
|
||||||
return new int [] {
|
return new int[]{
|
||||||
|
|
||||||
/* Scroll */
|
/* Scroll */
|
||||||
2040001, 2041002, 2040702, 2043802, 2040402, 2043702, 2044813,
|
2040001, 2041002, 2040702, 2043802, 2040402, 2043702, 2044813,
|
||||||
@@ -50,12 +49,12 @@ public class Henesys extends GachaponItems {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int[] getUncommonItems() {
|
public int[] getUncommonItems() {
|
||||||
return new int[] {2040805, 1102041, 1102042, 1442018};
|
return new int[]{2040805, 1102041, 1102042, 1442018};
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int[] getRareItems() {
|
public int[] getRareItems() {
|
||||||
return new int[] {};
|
return new int[]{};
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,18 +1,17 @@
|
|||||||
package server.gachapon;
|
package server.gachapon;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* @author Alan (SharpAceX) - gachapon source classes stub & pirate equipment
|
||||||
* @author Alan (SharpAceX) - gachapon source classes stub & pirate equipment
|
* @author Ronan - parsed MapleSEA loots
|
||||||
* @author Ronan - parsed MapleSEA loots
|
* <p>
|
||||||
*
|
* MapleSEA-like loots thanks to AyumiLove - src: https://ayumilovemaple.wordpress.com/maplestory-gachapon-guide/
|
||||||
* MapleSEA-like loots thanks to AyumiLove - src: https://ayumilovemaple.wordpress.com/maplestory-gachapon-guide/
|
*/
|
||||||
*/
|
|
||||||
|
|
||||||
public class KerningCity extends GachaponItems {
|
public class KerningCity extends GachaponItems {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int[] getCommonItems() {
|
public int[] getCommonItems() {
|
||||||
return new int [] {
|
return new int[]{
|
||||||
|
|
||||||
/* Scroll */
|
/* Scroll */
|
||||||
2041016, 2043302, 2040902, 2044804, 2044906,
|
2041016, 2043302, 2040902, 2044804, 2044906,
|
||||||
@@ -48,12 +47,12 @@ public class KerningCity extends GachaponItems {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int[] getUncommonItems() {
|
public int[] getUncommonItems() {
|
||||||
return new int[] {2040805, 1082149, 1102041};
|
return new int[]{2040805, 1082149, 1102041};
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int[] getRareItems() {
|
public int[] getRareItems() {
|
||||||
return new int[] {};
|
return new int[]{};
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,17 +1,16 @@
|
|||||||
package server.gachapon;
|
package server.gachapon;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* @author Ronan - parsed MapleSEA loots
|
||||||
* @author Ronan - parsed MapleSEA loots
|
* <p>
|
||||||
*
|
* MapleSEA-like loots thanks to AyumiLove - src: https://ayumilovemaple.wordpress.com/maplestory-gachapon-guide/
|
||||||
* MapleSEA-like loots thanks to AyumiLove - src: https://ayumilovemaple.wordpress.com/maplestory-gachapon-guide/
|
*/
|
||||||
*/
|
|
||||||
|
|
||||||
public class Ludibrium extends GachaponItems {
|
public class Ludibrium extends GachaponItems {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int[] getCommonItems() {
|
public int[] getCommonItems() {
|
||||||
return new int [] {
|
return new int[]{
|
||||||
|
|
||||||
/* Scroll */
|
/* 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,
|
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,
|
||||||
@@ -45,12 +44,12 @@ public class Ludibrium extends GachaponItems {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int[] getUncommonItems() {
|
public int[] getUncommonItems() {
|
||||||
return new int [] {2040805, 1002419, 1442018};
|
return new int[]{2040805, 1002419, 1442018};
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int[] getRareItems() {
|
public int[] getRareItems() {
|
||||||
return new int [] {};
|
return new int[]{};
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,18 +1,17 @@
|
|||||||
package server.gachapon;
|
package server.gachapon;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* @author Alan (SharpAceX) - gachapon source classes stub
|
||||||
* @author Alan (SharpAceX) - gachapon source classes stub
|
* @author Ronan - parsed MapleSEA loots
|
||||||
* @author Ronan - parsed MapleSEA loots
|
* <p>
|
||||||
*
|
* MapleSEA-like loots thanks to AyumiLove - src: https://ayumilovemaple.wordpress.com/maplestory-gachapon-guide/
|
||||||
* MapleSEA-like loots thanks to AyumiLove - src: https://ayumilovemaple.wordpress.com/maplestory-gachapon-guide/
|
*/
|
||||||
*/
|
|
||||||
|
|
||||||
public class MushroomShrine extends GachaponItems {
|
public class MushroomShrine extends GachaponItems {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int[] getCommonItems() {
|
public int[] getCommonItems() {
|
||||||
return new int [] {
|
return new int[]{
|
||||||
|
|
||||||
/* Scroll */
|
/* Scroll */
|
||||||
2040305, 2040306, 2040308, 2044604, 2041039, 2041037, 2041035, 2041034, 2041041, 2040608, 2040605, 2040604, 2040611,
|
2040305, 2040306, 2040308, 2044604, 2041039, 2041037, 2041035, 2041034, 2041041, 2040608, 2040605, 2040604, 2040611,
|
||||||
@@ -47,12 +46,12 @@ public class MushroomShrine extends GachaponItems {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int[] getUncommonItems() {
|
public int[] getUncommonItems() {
|
||||||
return new int [] {2040811, 2040810, 2040815, 1102041, 1102042, 1082149};
|
return new int[]{2040811, 2040810, 2040815, 1102041, 1102042, 1082149};
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int[] getRareItems() {
|
public int[] getRareItems() {
|
||||||
return new int [] {1102084, 3010019};
|
return new int[]{1102084, 3010019};
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,18 +1,17 @@
|
|||||||
package server.gachapon;
|
package server.gachapon;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* @author Alan (SharpAceX) - gachapon source classes stub & pirate items
|
||||||
* @author Alan (SharpAceX) - gachapon source classes stub & pirate items
|
* @author Ronan - parsed MapleSEA loots
|
||||||
* @author Ronan - parsed MapleSEA loots
|
* <p>
|
||||||
*
|
* MapleSEA-like loots thanks to AyumiLove - src: https://ayumilovemaple.wordpress.com/maplestory-gachapon-guide/
|
||||||
* MapleSEA-like loots thanks to AyumiLove - src: https://ayumilovemaple.wordpress.com/maplestory-gachapon-guide/
|
*/
|
||||||
*/
|
|
||||||
|
|
||||||
public class NautilusHarbor extends GachaponItems {
|
public class NautilusHarbor extends GachaponItems {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int[] getCommonItems() {
|
public int[] getCommonItems() {
|
||||||
return new int[] {
|
return new int[]{
|
||||||
/* Scroll */
|
/* Scroll */
|
||||||
2040605, 2040626, 2040609, 2040607, 2041029, 2041027, 2041031, 2041037, 2041033, 2041039, 2041041, 2041035,
|
2040605, 2040626, 2040609, 2040607, 2041029, 2041027, 2041031, 2041037, 2041033, 2041039, 2041041, 2041035,
|
||||||
2040809, 2040813, 2040015, 2040009, 2040011, 2040013, 2040509, 2040521, 2040519, 2040507, 2040905, 2040909,
|
2040809, 2040813, 2040015, 2040009, 2040011, 2040013, 2040509, 2040521, 2040519, 2040507, 2040905, 2040909,
|
||||||
@@ -55,12 +54,12 @@ public class NautilusHarbor extends GachaponItems {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int[] getUncommonItems() {
|
public int[] getUncommonItems() {
|
||||||
return new int[] {2040811, 2040815, 2101001};
|
return new int[]{2040811, 2040815, 2101001};
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int[] getRareItems() {
|
public int[] getRareItems() {
|
||||||
return new int[] {};
|
return new int[]{};
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,18 +1,17 @@
|
|||||||
package server.gachapon;
|
package server.gachapon;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* @author Alan (SharpAceX) - gachapon source classes stub & pirate equipment
|
||||||
* @author Alan (SharpAceX) - gachapon source classes stub & pirate equipment
|
* @author Ronan - parsed MapleSEA loots, thanks Vcoc for noticing somewhat unbalanced loots in NLC
|
||||||
* @author Ronan - parsed MapleSEA loots, thanks Vcoc for noticing somewhat unbalanced loots in NLC
|
* <p>
|
||||||
*
|
* MapleSEA-like loots thanks to AyumiLove - src: https://ayumilovemaple.wordpress.com/maplestory-gachapon-guide/
|
||||||
* MapleSEA-like loots thanks to AyumiLove - src: https://ayumilovemaple.wordpress.com/maplestory-gachapon-guide/
|
*/
|
||||||
*/
|
|
||||||
|
|
||||||
public class NewLeafCity extends GachaponItems {
|
public class NewLeafCity extends GachaponItems {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int[] getCommonItems() {
|
public int[] getCommonItems() {
|
||||||
return new int[] {
|
return new int[]{
|
||||||
|
|
||||||
/* Scroll */
|
/* Scroll */
|
||||||
2040406, 2040408, 2040404, 2040411, 2040409, 2044405, 2040610, 2040607, 2040812, 2041039, 2041040, 2041034,
|
2040406, 2040408, 2040404, 2040411, 2040409, 2044405, 2040610, 2040607, 2040812, 2041039, 2041040, 2041034,
|
||||||
@@ -44,12 +43,12 @@ public class NewLeafCity extends GachaponItems {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int[] getUncommonItems() {
|
public int[] getUncommonItems() {
|
||||||
return new int[] {2022284, 2040811, 2040815, 2040811, 1102041, 1102042, 1082149};
|
return new int[]{2022284, 2040811, 2040815, 2040811, 1102041, 1102042, 1082149};
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int[] getRareItems() {
|
public int[] getRareItems() {
|
||||||
return new int[] {};
|
return new int[]{};
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,18 +1,17 @@
|
|||||||
package server.gachapon;
|
package server.gachapon;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* @author Alan (SharpAceX) - gachapon source classes stub & pirate equipment
|
||||||
* @author Alan (SharpAceX) - gachapon source classes stub & pirate equipment
|
* @author Ronan - parsed MapleSEA loots
|
||||||
* @author Ronan - parsed MapleSEA loots
|
* <p>
|
||||||
*
|
* MapleSEA-like loots thanks to AyumiLove - src: https://ayumilovemaple.wordpress.com/maplestory-gachapon-guide/
|
||||||
* MapleSEA-like loots thanks to AyumiLove - src: https://ayumilovemaple.wordpress.com/maplestory-gachapon-guide/
|
*/
|
||||||
*/
|
|
||||||
|
|
||||||
public class Perion extends GachaponItems {
|
public class Perion extends GachaponItems {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int[] getCommonItems() {
|
public int[] getCommonItems() {
|
||||||
return new int [] {
|
return new int[]{
|
||||||
|
|
||||||
/* Scrolls */
|
/* Scrolls */
|
||||||
2044907, 2044802,
|
2044907, 2044802,
|
||||||
@@ -46,12 +45,12 @@ public class Perion extends GachaponItems {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int[] getUncommonItems() {
|
public int[] getUncommonItems() {
|
||||||
return new int [] {1082149, 1002391, 1002419, 1102041};
|
return new int[]{1082149, 1002391, 1002419, 1102041};
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int[] getRareItems() {
|
public int[] getRareItems() {
|
||||||
return new int [] {};
|
return new int[]{};
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,18 +1,17 @@
|
|||||||
package server.gachapon;
|
package server.gachapon;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* @author Alan (SharpAceX) - gachapon source classes stub
|
||||||
* @author Alan (SharpAceX) - gachapon source classes stub
|
* @author Ronan - parsed MapleSEA loots
|
||||||
* @author Ronan - parsed MapleSEA loots
|
* <p>
|
||||||
*
|
* MapleSEA-like loots src: http://maplesecrets.blogspot.com/2011/06/gachapon-showa-towns-sauna-female-spa.html
|
||||||
* MapleSEA-like loots src: http://maplesecrets.blogspot.com/2011/06/gachapon-showa-towns-sauna-female-spa.html
|
*/
|
||||||
*/
|
|
||||||
|
|
||||||
public class ShowaSpaFemale extends GachaponItems {
|
public class ShowaSpaFemale extends GachaponItems {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int[] getCommonItems() {
|
public int[] getCommonItems() {
|
||||||
return new int [] {
|
return new int[]{
|
||||||
|
|
||||||
/* Scroll */
|
/* Scroll */
|
||||||
2048005, 2048002, 2043202, 2044602, 2043214, 2041307, 2041035, 2044104, 2044505, 2044305, 2043304, 2041309,
|
2048005, 2048002, 2043202, 2044602, 2043214, 2041307, 2041035, 2044104, 2044505, 2044305, 2043304, 2041309,
|
||||||
@@ -47,12 +46,12 @@ public class ShowaSpaFemale extends GachaponItems {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int[] getUncommonItems() {
|
public int[] getUncommonItems() {
|
||||||
return new int [] {2040916, 1102042};
|
return new int[]{2040916, 1102042};
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int[] getRareItems() {
|
public int[] getRareItems() {
|
||||||
return new int [] {};
|
return new int[]{};
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,18 +1,17 @@
|
|||||||
package server.gachapon;
|
package server.gachapon;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* @author Alan (SharpAceX) - gachapon source classes stub
|
||||||
* @author Alan (SharpAceX) - gachapon source classes stub
|
* @author Ronan - parsed MapleSEA loots
|
||||||
* @author Ronan - parsed MapleSEA loots
|
* <p>
|
||||||
*
|
* MapleSEA-like loots src: http://maplesecrets.blogspot.com/2011/05/gachapon-showa-towns-sauna.html
|
||||||
* MapleSEA-like loots src: http://maplesecrets.blogspot.com/2011/05/gachapon-showa-towns-sauna.html
|
*/
|
||||||
*/
|
|
||||||
|
|
||||||
public class ShowaSpaMale extends GachaponItems {
|
public class ShowaSpaMale extends GachaponItems {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int[] getCommonItems() {
|
public int[] getCommonItems() {
|
||||||
return new int [] {
|
return new int[]{
|
||||||
|
|
||||||
/* Scroll */
|
/* Scroll */
|
||||||
2048005, 2048002, 2043202, 2044602, 2043214, 2041307, 2041035, 2044104, 2044505, 2044305, 2043304, 2044902,
|
2048005, 2048002, 2043202, 2044602, 2043214, 2041307, 2041035, 2044104, 2044505, 2044305, 2043304, 2044902,
|
||||||
@@ -49,12 +48,12 @@ public class ShowaSpaMale extends GachaponItems {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int[] getUncommonItems() {
|
public int[] getUncommonItems() {
|
||||||
return new int [] {2040916, 1102042};
|
return new int[]{2040916, 1102042};
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int[] getRareItems() {
|
public int[] getRareItems() {
|
||||||
return new int [] {};
|
return new int[]{};
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,18 +1,17 @@
|
|||||||
package server.gachapon;
|
package server.gachapon;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* @author Alan (SharpAceX) - gachapon source classes stub & pirate equipment
|
||||||
* @author Alan (SharpAceX) - gachapon source classes stub & pirate equipment
|
* @author Ronan - parsed MapleSEA loots
|
||||||
* @author Ronan - parsed MapleSEA loots
|
* <p>
|
||||||
*
|
* MapleSEA-like loots thanks to AyumiLove - src: https://ayumilovemaple.wordpress.com/maplestory-gachapon-guide/
|
||||||
* MapleSEA-like loots thanks to AyumiLove - src: https://ayumilovemaple.wordpress.com/maplestory-gachapon-guide/
|
*/
|
||||||
*/
|
|
||||||
|
|
||||||
public class Sleepywood extends GachaponItems {
|
public class Sleepywood extends GachaponItems {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int[] getCommonItems() {
|
public int[] getCommonItems() {
|
||||||
return new int [] {
|
return new int[]{
|
||||||
|
|
||||||
/* Scroll */
|
/* Scroll */
|
||||||
2048003, 2048000, 2040601, 2044501, 2041019, 2041016, 2041022, 2041010, 2041013, 2043301, 2040301, 2040801, 2040001,
|
2048003, 2048000, 2040601, 2044501, 2041019, 2041016, 2041022, 2041010, 2041013, 2043301, 2040301, 2040801, 2040001,
|
||||||
@@ -48,12 +47,12 @@ public class Sleepywood extends GachaponItems {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int[] getUncommonItems() {
|
public int[] getUncommonItems() {
|
||||||
return new int [] {2040804, 2040817, 2040805, 2340000, 1082149, 1442018};
|
return new int[]{2040804, 2040817, 2040805, 2340000, 1082149, 1442018};
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int[] getRareItems() {
|
public int[] getRareItems() {
|
||||||
return new int [] {};
|
return new int[]{};
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,6 +49,6 @@ public class ChangeableStats extends OverrideMonsterStats {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public ChangeableStats(MonsterStats stats, float statModifier, boolean pqMob) {
|
public ChangeableStats(MonsterStats stats, float statModifier, boolean pqMob) {
|
||||||
this(stats, (int)(statModifier * stats.getLevel()), pqMob);
|
this(stats, (int) (statModifier * stats.getLevel()), pqMob);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,13 +24,14 @@ package server.life;
|
|||||||
public enum Element {
|
public enum Element {
|
||||||
NEUTRAL(0), PHYSICAL(1), FIRE(2, true), ICE(3, true), LIGHTING(4), POISON(5), HOLY(6, true), DARKNESS(7);
|
NEUTRAL(0), PHYSICAL(1), FIRE(2, true), ICE(3, true), LIGHTING(4), POISON(5), HOLY(6, true), DARKNESS(7);
|
||||||
|
|
||||||
private int value;
|
private final int value;
|
||||||
private boolean special = false;
|
private boolean special = false;
|
||||||
private Element(int v) {
|
|
||||||
|
Element(int v) {
|
||||||
this.value = v;
|
this.value = v;
|
||||||
}
|
}
|
||||||
|
|
||||||
private Element(int v, boolean special) {
|
Element(int v, boolean special) {
|
||||||
this.value = v;
|
this.value = v;
|
||||||
this.special = special;
|
this.special = special;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,7 +22,6 @@
|
|||||||
package server.life;
|
package server.life;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author Danny (Leifde)
|
* @author Danny (Leifde)
|
||||||
*/
|
*/
|
||||||
public class MobAttackInfo {
|
public class MobAttackInfo {
|
||||||
|
|||||||
@@ -32,12 +32,11 @@ import java.util.HashMap;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author Danny (Leifde)
|
* @author Danny (Leifde)
|
||||||
*/
|
*/
|
||||||
public class MobAttackInfoFactory {
|
public class MobAttackInfoFactory {
|
||||||
private static Map<String, MobAttackInfo> mobAttacks = new HashMap<>();
|
private static final Map<String, MobAttackInfo> mobAttacks = new HashMap<>();
|
||||||
private static DataProvider dataSource = DataProviderFactory.getDataProvider(WZFiles.MOB);
|
private static final DataProvider dataSource = DataProviderFactory.getDataProvider(WZFiles.MOB);
|
||||||
|
|
||||||
public static MobAttackInfo getMobAttackInfo(Monster mob, int attack) {
|
public static MobAttackInfo getMobAttackInfo(Monster mob, int attack) {
|
||||||
MobAttackInfo ret = mobAttacks.get(mob.getId() + "" + attack);
|
MobAttackInfo ret = mobAttacks.get(mob.getId() + "" + attack);
|
||||||
|
|||||||
@@ -39,13 +39,14 @@ import java.util.List;
|
|||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author Danny (Leifde)
|
* @author Danny (Leifde)
|
||||||
*/
|
*/
|
||||||
public class MobSkill {
|
public class MobSkill {
|
||||||
|
|
||||||
private int skillId, skillLevel, mpCon;
|
private final int skillId;
|
||||||
private List<Integer> toSummon = new ArrayList<>();
|
private final int skillLevel;
|
||||||
|
private int mpCon;
|
||||||
|
private final List<Integer> toSummon = new ArrayList<>();
|
||||||
private int spawnEffect, hp, x, y, count;
|
private int spawnEffect, hp, x, y, count;
|
||||||
private long duration, cooltime;
|
private long duration, cooltime;
|
||||||
private float prop;
|
private float prop;
|
||||||
|
|||||||
@@ -40,14 +40,13 @@ import java.util.List;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author Danny (Leifde)
|
* @author Danny (Leifde)
|
||||||
*/
|
*/
|
||||||
public class MobSkillFactory {
|
public class MobSkillFactory {
|
||||||
|
|
||||||
private static Map<String, MobSkill> mobSkills = new HashMap<>();
|
private static final Map<String, MobSkill> mobSkills = new HashMap<>();
|
||||||
private final static DataProvider dataSource = DataProviderFactory.getDataProvider(WZFiles.SKILL);
|
private final static DataProvider dataSource = DataProviderFactory.getDataProvider(WZFiles.SKILL);
|
||||||
private static Data skillRoot = dataSource.getData("MobSkill.img");
|
private static final Data skillRoot = dataSource.getData("MobSkill.img");
|
||||||
private final static MonitoredReentrantReadWriteLock dataLock = new MonitoredReentrantReadWriteLock(MonitoredLockType.MOBSKILL_FACTORY);
|
private final static MonitoredReentrantReadWriteLock dataLock = new MonitoredReentrantReadWriteLock(MonitoredLockType.MOBSKILL_FACTORY);
|
||||||
private final static MonitoredReadLock rL = MonitoredReadLockFactory.createLock(dataLock);
|
private final static MonitoredReadLock rL = MonitoredReadLockFactory.createLock(dataLock);
|
||||||
private final static MonitoredWriteLock wL = MonitoredWriteLockFactory.createLock(dataLock);
|
private final static MonitoredWriteLock wL = MonitoredWriteLockFactory.createLock(dataLock);
|
||||||
|
|||||||
@@ -21,7 +21,6 @@
|
|||||||
package server.life;
|
package server.life;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author LightPepsi
|
* @author LightPepsi
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -33,6 +32,7 @@ public class MonsterDropEntry {
|
|||||||
this.Minimum = Minimum;
|
this.Minimum = Minimum;
|
||||||
this.Maximum = Maximum;
|
this.Maximum = Maximum;
|
||||||
}
|
}
|
||||||
|
|
||||||
public short questid;
|
public short questid;
|
||||||
public int itemId, chance, Minimum, Maximum;
|
public int itemId, chance, Minimum, Maximum;
|
||||||
}
|
}
|
||||||
@@ -21,7 +21,6 @@
|
|||||||
package server.life;
|
package server.life;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author LightPepsi
|
* @author LightPepsi
|
||||||
*/
|
*/
|
||||||
public class MonsterGlobalDropEntry {
|
public class MonsterGlobalDropEntry {
|
||||||
@@ -33,6 +32,7 @@ public class MonsterGlobalDropEntry {
|
|||||||
this.Minimum = Minimum;
|
this.Minimum = Minimum;
|
||||||
this.Maximum = Maximum;
|
this.Maximum = Maximum;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int itemId, chance, Minimum, Maximum, continentid;
|
public int itemId, chance, Minimum, Maximum, continentid;
|
||||||
public short questid;
|
public short questid;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
package server.life;
|
package server.life;
|
||||||
|
|
||||||
import client.Character;
|
import client.Character;
|
||||||
|
|
||||||
public interface MonsterListener {
|
public interface MonsterListener {
|
||||||
|
|||||||
@@ -28,12 +28,17 @@ import java.awt.*;
|
|||||||
import java.util.concurrent.atomic.AtomicInteger;
|
import java.util.concurrent.atomic.AtomicInteger;
|
||||||
|
|
||||||
public class SpawnPoint {
|
public class SpawnPoint {
|
||||||
private int monster, mobTime, team, fh, f;
|
private final int monster;
|
||||||
private Point pos;
|
private final int mobTime;
|
||||||
|
private final int team;
|
||||||
|
private final int fh;
|
||||||
|
private final int f;
|
||||||
|
private final Point pos;
|
||||||
private long nextPossibleSpawn;
|
private long nextPossibleSpawn;
|
||||||
private int mobInterval = 5000;
|
private int mobInterval = 5000;
|
||||||
private AtomicInteger spawnedMonsters = new AtomicInteger(0);
|
private final AtomicInteger spawnedMonsters = new AtomicInteger(0);
|
||||||
private boolean immobile, denySpawn = false;
|
private final boolean immobile;
|
||||||
|
private boolean denySpawn = false;
|
||||||
|
|
||||||
public SpawnPoint(final Monster monster, Point pos, boolean immobile, int mobTime, int mobInterval, int team) {
|
public SpawnPoint(final Monster monster, Point pos, boolean immobile, int mobTime, int mobInterval, int team) {
|
||||||
this.monster = monster.getId();
|
this.monster = monster.getId();
|
||||||
@@ -67,11 +72,7 @@ public class SpawnPoint {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean shouldForceSpawn() {
|
public boolean shouldForceSpawn() {
|
||||||
if (mobTime < 0 || spawnedMonsters.get() > 0) {
|
return mobTime >= 0 && spawnedMonsters.get() <= 0;
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public Monster getMonster() {
|
public Monster getMonster() {
|
||||||
|
|||||||
@@ -21,7 +21,6 @@
|
|||||||
package server.maps;
|
package server.maps;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author AngelSL
|
* @author AngelSL
|
||||||
*/
|
*/
|
||||||
public enum FieldLimit {
|
public enum FieldLimit {
|
||||||
@@ -53,9 +52,9 @@ public enum FieldLimit {
|
|||||||
DROP_LIMIT(0x400000);
|
DROP_LIMIT(0x400000);
|
||||||
//ROCKETBOOSTER_LIMIT(0x800000) //lol we don't even have mechanics <3
|
//ROCKETBOOSTER_LIMIT(0x800000) //lol we don't even have mechanics <3
|
||||||
|
|
||||||
private long i;
|
private final long i;
|
||||||
|
|
||||||
private FieldLimit(long i) {
|
FieldLimit(long i) {
|
||||||
this.i = i;
|
this.i = i;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -37,9 +37,9 @@ public class MapleTVEffect {
|
|||||||
|
|
||||||
private final static boolean[] ACTIVE = new boolean[Server.getInstance().getWorldsSize()];
|
private final static boolean[] ACTIVE = new boolean[Server.getInstance().getWorldsSize()];
|
||||||
|
|
||||||
public static synchronized boolean broadcastMapleTVIfNotActive(Character player, Character victim, List<String> messages, int tvType){
|
public static synchronized boolean broadcastMapleTVIfNotActive(Character player, Character victim, List<String> messages, int tvType) {
|
||||||
int w = player.getWorld();
|
int w = player.getWorld();
|
||||||
if(!ACTIVE[w]) {
|
if (!ACTIVE[w]) {
|
||||||
broadcastTV(true, w, messages, player, tvType, victim);
|
broadcastTV(true, w, messages, player, tvType, victim);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -334,7 +334,9 @@ public class Reactor extends AbstractMapObject {
|
|||||||
if (this.getDelay() > 0) {
|
if (this.getDelay() > 0) {
|
||||||
this.delayedRespawn();
|
this.delayedRespawn();
|
||||||
}
|
}
|
||||||
} else return !this.inDelayedRespawn();
|
} else {
|
||||||
|
return !this.inDelayedRespawn();
|
||||||
|
}
|
||||||
} finally {
|
} finally {
|
||||||
reactorLock.unlock();
|
reactorLock.unlock();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ public class ReactorDropEntry {
|
|||||||
this.chance = chance;
|
this.chance = chance;
|
||||||
this.questid = questId;
|
this.questid = questId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int itemId, chance, questid;
|
public int itemId, chance, questid;
|
||||||
public int assignedRangeStart, assignedRangeLength;
|
public int assignedRangeStart, assignedRangeLength;
|
||||||
}
|
}
|
||||||
@@ -22,7 +22,8 @@
|
|||||||
package server.maps;
|
package server.maps;
|
||||||
|
|
||||||
public class SavedLocation {
|
public class SavedLocation {
|
||||||
private int mapid = 102000000, portal;
|
private int mapid = 102000000;
|
||||||
|
private final int portal;
|
||||||
|
|
||||||
public SavedLocation(int mapid, int portal) {
|
public SavedLocation(int mapid, int portal) {
|
||||||
this.mapid = mapid;
|
this.mapid = mapid;
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ public enum SummonMovementType {
|
|||||||
STATIONARY(0), FOLLOW(1), CIRCLE_FOLLOW(3);
|
STATIONARY(0), FOLLOW(1), CIRCLE_FOLLOW(3);
|
||||||
private final int val;
|
private final int val;
|
||||||
|
|
||||||
private SummonMovementType(int val) {
|
SummonMovementType(int val) {
|
||||||
this.val = val;
|
this.val = val;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -21,12 +21,13 @@
|
|||||||
*/
|
*/
|
||||||
package server.movement;
|
package server.movement;
|
||||||
|
|
||||||
import java.awt.Point;
|
import java.awt.*;
|
||||||
|
|
||||||
public abstract class AbstractLifeMovement implements LifeMovement {
|
public abstract class AbstractLifeMovement implements LifeMovement {
|
||||||
private Point position;
|
private final Point position;
|
||||||
private int duration;
|
private final int duration;
|
||||||
private int newstate, type;
|
private final int newstate;
|
||||||
|
private final int type;
|
||||||
|
|
||||||
public AbstractLifeMovement(int type, Point position, int duration, int newstate) {
|
public AbstractLifeMovement(int type, Point position, int duration, int newstate) {
|
||||||
super();
|
super();
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
*/
|
*/
|
||||||
package server.movement;
|
package server.movement;
|
||||||
|
|
||||||
import java.awt.Point;
|
import java.awt.*;
|
||||||
|
|
||||||
public interface LifeMovement extends LifeMovementFragment {
|
public interface LifeMovement extends LifeMovementFragment {
|
||||||
Point getPosition();
|
Point getPosition();
|
||||||
|
|||||||
@@ -35,7 +35,6 @@ import java.util.Map.Entry;
|
|||||||
import java.util.concurrent.ScheduledFuture;
|
import java.util.concurrent.ScheduledFuture;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author Ronan
|
* @author Ronan
|
||||||
*/
|
*/
|
||||||
public class AriantColiseum {
|
public class AriantColiseum {
|
||||||
@@ -43,8 +42,8 @@ public class AriantColiseum {
|
|||||||
private Expedition exped;
|
private Expedition exped;
|
||||||
private MapleMap map;
|
private MapleMap map;
|
||||||
|
|
||||||
private Map<Character, Integer> score;
|
private final Map<Character, Integer> score;
|
||||||
private Map<Character, Integer> rewardTier;
|
private final Map<Character, Integer> rewardTier;
|
||||||
private boolean scoreDirty = false;
|
private boolean scoreDirty = false;
|
||||||
|
|
||||||
private ScheduledFuture<?> ariantUpdate;
|
private ScheduledFuture<?> ariantUpdate;
|
||||||
|
|||||||
@@ -1,9 +1,8 @@
|
|||||||
package server.partyquest;
|
package server.partyquest;
|
||||||
|
|
||||||
import java.awt.Point;
|
import java.awt.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author David
|
* @author David
|
||||||
*/
|
*/
|
||||||
public class GuardianSpawnPoint {
|
public class GuardianSpawnPoint {
|
||||||
|
|||||||
@@ -13,8 +13,8 @@ import java.util.List;
|
|||||||
public class MonsterCarnivalParty {
|
public class MonsterCarnivalParty {
|
||||||
|
|
||||||
private List<Character> members = new LinkedList<>();
|
private List<Character> members = new LinkedList<>();
|
||||||
private Character leader;
|
private final Character leader;
|
||||||
private byte team;
|
private final byte team;
|
||||||
private short availableCP = 0, totalCP = 0;
|
private short availableCP = 0, totalCP = 0;
|
||||||
private int summons = 8;
|
private int summons = 8;
|
||||||
private boolean winner = false;
|
private boolean winner = false;
|
||||||
@@ -77,11 +77,12 @@ public class MonsterCarnivalParty {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void warpOut() {
|
public void warpOut() {
|
||||||
if (winner == true)
|
if (winner == true) {
|
||||||
warpOut(980000003 + (leader.getMonsterCarnival().getRoom() * 100));
|
warpOut(980000003 + (leader.getMonsterCarnival().getRoom() * 100));
|
||||||
else
|
} else {
|
||||||
warpOut(980000004 + (leader.getMonsterCarnival().getRoom() * 100));
|
warpOut(980000004 + (leader.getMonsterCarnival().getRoom() * 100));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public boolean allInMap(MapleMap map) {
|
public boolean allInMap(MapleMap map) {
|
||||||
boolean status = true;
|
boolean status = true;
|
||||||
|
|||||||
@@ -32,7 +32,6 @@ import java.util.ArrayList;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author kevintjuh93
|
* @author kevintjuh93
|
||||||
*/
|
*/
|
||||||
public class PartyQuest {
|
public class PartyQuest {
|
||||||
@@ -49,11 +48,12 @@ public class PartyQuest {
|
|||||||
for (PartyCharacter pchr : party.getMembers()) {
|
for (PartyCharacter pchr : party.getMembers()) {
|
||||||
if (pchr.getChannel() == channel && pchr.getMapId() == mapid) {
|
if (pchr.getChannel() == channel && pchr.getMapId() == mapid) {
|
||||||
Character chr = Server.getInstance().getWorld(world).getChannel(channel).getPlayerStorage().getCharacterById(pchr.getId());
|
Character chr = Server.getInstance().getWorld(world).getChannel(channel).getPlayerStorage().getCharacterById(pchr.getId());
|
||||||
if (chr != null)
|
if (chr != null) {
|
||||||
this.participants.add(chr);
|
this.participants.add(chr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public Party getParty() {
|
public Party getParty() {
|
||||||
return party;
|
return party;
|
||||||
@@ -67,43 +67,45 @@ public class PartyQuest {
|
|||||||
synchronized (participants) {
|
synchronized (participants) {
|
||||||
participants.remove(chr);
|
participants.remove(chr);
|
||||||
chr.setPartyQuest(null);
|
chr.setPartyQuest(null);
|
||||||
if (participants.isEmpty()) super.finalize();
|
if (participants.isEmpty()) {
|
||||||
|
super.finalize();
|
||||||
|
}
|
||||||
//System.gc();
|
//System.gc();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static int getExp(String PQ, int level) {
|
public static int getExp(String PQ, int level) {
|
||||||
if (PQ.equals("HenesysPQ")){
|
if (PQ.equals("HenesysPQ")) {
|
||||||
return 1250 * level / 5;
|
return 1250 * level / 5;
|
||||||
} else if(PQ.equals("KerningPQFinal")){
|
} else if (PQ.equals("KerningPQFinal")) {
|
||||||
return 500 * level / 5;
|
return 500 * level / 5;
|
||||||
} else if(PQ.equals("KerningPQ4th")){
|
} else if (PQ.equals("KerningPQ4th")) {
|
||||||
return 400 * level / 5;
|
return 400 * level / 5;
|
||||||
} else if(PQ.equals("KerningPQ3rd")){
|
} else if (PQ.equals("KerningPQ3rd")) {
|
||||||
return 300 * level / 5;
|
return 300 * level / 5;
|
||||||
} else if(PQ.equals("KerningPQ2nd")){
|
} else if (PQ.equals("KerningPQ2nd")) {
|
||||||
return 200 * level / 5;
|
return 200 * level / 5;
|
||||||
} else if(PQ.equals("KerningPQ1st")){
|
} else if (PQ.equals("KerningPQ1st")) {
|
||||||
return 100 * level / 5;
|
return 100 * level / 5;
|
||||||
} else if(PQ.equals("LudiMazePQ")){
|
} else if (PQ.equals("LudiMazePQ")) {
|
||||||
return 2000 * level / 5;
|
return 2000 * level / 5;
|
||||||
} else if(PQ.equals("LudiPQ1st")) {
|
} else if (PQ.equals("LudiPQ1st")) {
|
||||||
return 100 * level / 5;
|
return 100 * level / 5;
|
||||||
} else if(PQ.equals("LudiPQ2nd")) {
|
} else if (PQ.equals("LudiPQ2nd")) {
|
||||||
return 250 * level / 5;
|
return 250 * level / 5;
|
||||||
} else if(PQ.equals("LudiPQ3rd")) {
|
} else if (PQ.equals("LudiPQ3rd")) {
|
||||||
return 350 * level / 5;
|
return 350 * level / 5;
|
||||||
} else if(PQ.equals("LudiPQ4th")) {
|
} else if (PQ.equals("LudiPQ4th")) {
|
||||||
return 350 * level / 5;
|
return 350 * level / 5;
|
||||||
} else if(PQ.equals("LudiPQ5th")) {
|
} else if (PQ.equals("LudiPQ5th")) {
|
||||||
return 400 * level / 5;
|
return 400 * level / 5;
|
||||||
} else if(PQ.equals("LudiPQ6th")) {
|
} else if (PQ.equals("LudiPQ6th")) {
|
||||||
return 450 * level / 5;
|
return 450 * level / 5;
|
||||||
} else if(PQ.equals("LudiPQ7th")) {
|
} else if (PQ.equals("LudiPQ7th")) {
|
||||||
return 500 * level / 5;
|
return 500 * level / 5;
|
||||||
} else if(PQ.equals("LudiPQ8th")) {
|
} else if (PQ.equals("LudiPQ8th")) {
|
||||||
return 650 * level / 5;
|
return 650 * level / 5;
|
||||||
} else if(PQ.equals("LudiPQLast")) {
|
} else if (PQ.equals("LudiPQLast")) {
|
||||||
return 800 * level / 5;
|
return 800 * level / 5;
|
||||||
}
|
}
|
||||||
FilePrinter.printError(FilePrinter.NPC, "Unhandled PartyQuest: " + PQ);
|
FilePrinter.printError(FilePrinter.NPC, "Unhandled PartyQuest: " + PQ);
|
||||||
|
|||||||
@@ -31,7 +31,6 @@ import tools.PacketCreator;
|
|||||||
import java.util.concurrent.ScheduledFuture;
|
import java.util.concurrent.ScheduledFuture;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author kevintjuh93
|
* @author kevintjuh93
|
||||||
*/
|
*/
|
||||||
public class Pyramid extends PartyQuest {
|
public class Pyramid extends PartyQuest {
|
||||||
@@ -82,7 +81,9 @@ public class Pyramid extends PartyQuest {
|
|||||||
count = 0;
|
count = 0;
|
||||||
gaugeSchedule = TimerManager.getInstance().register(() -> {
|
gaugeSchedule = TimerManager.getInstance().register(() -> {
|
||||||
gauge -= decrease;
|
gauge -= decrease;
|
||||||
if (gauge <= 0) warp(926010001);
|
if (gauge <= 0) {
|
||||||
|
warp(926010001);
|
||||||
|
}
|
||||||
|
|
||||||
}, 1000);
|
}, 1000);
|
||||||
}
|
}
|
||||||
@@ -90,20 +91,28 @@ public class Pyramid extends PartyQuest {
|
|||||||
|
|
||||||
public void kill() {
|
public void kill() {
|
||||||
kill++;
|
kill++;
|
||||||
if (gauge < 100) count++;
|
if (gauge < 100) {
|
||||||
|
count++;
|
||||||
|
}
|
||||||
gauge++;
|
gauge++;
|
||||||
broadcastInfo("hit", kill);
|
broadcastInfo("hit", kill);
|
||||||
if (gauge >= 100) gauge = 100;
|
if (gauge >= 100) {
|
||||||
|
gauge = 100;
|
||||||
|
}
|
||||||
checkBuffs();
|
checkBuffs();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void cool() {
|
public void cool() {
|
||||||
cool++;
|
cool++;
|
||||||
int plus = coolAdd;
|
int plus = coolAdd;
|
||||||
if ((gauge + coolAdd) > 100) plus -= ((gauge + coolAdd) - 100);
|
if ((gauge + coolAdd) > 100) {
|
||||||
|
plus -= ((gauge + coolAdd) - 100);
|
||||||
|
}
|
||||||
gauge += plus;
|
gauge += plus;
|
||||||
count += plus;
|
count += plus;
|
||||||
if (gauge >= 100) gauge = 100;
|
if (gauge >= 100) {
|
||||||
|
gauge = 100;
|
||||||
|
}
|
||||||
broadcastInfo("cool", cool);
|
broadcastInfo("cool", cool);
|
||||||
checkBuffs();
|
checkBuffs();
|
||||||
|
|
||||||
@@ -118,10 +127,11 @@ public class Pyramid extends PartyQuest {
|
|||||||
|
|
||||||
public int timer() {
|
public int timer() {
|
||||||
int value;
|
int value;
|
||||||
if (stage > 0)
|
if (stage > 0) {
|
||||||
value = 180;
|
value = 180;
|
||||||
else
|
} else {
|
||||||
value = 120;
|
value = 120;
|
||||||
|
}
|
||||||
|
|
||||||
timer = TimerManager.getInstance().schedule(() -> {
|
timer = TimerManager.getInstance().schedule(() -> {
|
||||||
stage++;
|
stage++;
|
||||||
@@ -146,7 +156,9 @@ public class Pyramid extends PartyQuest {
|
|||||||
gaugeSchedule = null;
|
gaugeSchedule = null;
|
||||||
timer.cancel(false);
|
timer.cancel(false);
|
||||||
timer = null;
|
timer = null;
|
||||||
} else stage = 0;
|
} else {
|
||||||
|
stage = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void broadcastInfo(String info, int amount) {
|
public void broadcastInfo(String info, int amount) {
|
||||||
@@ -157,7 +169,9 @@ public class Pyramid extends PartyQuest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean useSkill() {
|
public boolean useSkill() {
|
||||||
if (skill < 1) return false;
|
if (skill < 1) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
skill--;
|
skill--;
|
||||||
broadcastInfo("skill", skill);
|
broadcastInfo("skill", skill);
|
||||||
@@ -169,8 +183,9 @@ public class Pyramid extends PartyQuest {
|
|||||||
if (buffcount == 0 && total >= 250) {
|
if (buffcount == 0 && total >= 250) {
|
||||||
buffcount++;
|
buffcount++;
|
||||||
ItemInformationProvider ii = ItemInformationProvider.getInstance();
|
ItemInformationProvider ii = ItemInformationProvider.getInstance();
|
||||||
for (Character chr : getParticipants())
|
for (Character chr : getParticipants()) {
|
||||||
ii.getItemEffect(2022585).applyTo(chr);
|
ii.getItemEffect(2022585).applyTo(chr);
|
||||||
|
}
|
||||||
|
|
||||||
} else if (buffcount == 1 && total >= 500) {
|
} else if (buffcount == 1 && total >= 500) {
|
||||||
buffcount++;
|
buffcount++;
|
||||||
@@ -212,20 +227,34 @@ public class Pyramid extends PartyQuest {
|
|||||||
if (exp == 0) {
|
if (exp == 0) {
|
||||||
int totalkills = (kill + cool);
|
int totalkills = (kill + cool);
|
||||||
if (stage == 5) {
|
if (stage == 5) {
|
||||||
if (totalkills >= 3000) rank = 0;
|
if (totalkills >= 3000) {
|
||||||
else if (totalkills >= 2000) rank = 1;
|
rank = 0;
|
||||||
else if (totalkills >= 1500) rank = 2;
|
} else if (totalkills >= 2000) {
|
||||||
else if(totalkills >= 500) rank = 3;
|
rank = 1;
|
||||||
else rank = 4;
|
} else if (totalkills >= 1500) {
|
||||||
|
rank = 2;
|
||||||
|
} else if (totalkills >= 500) {
|
||||||
|
rank = 3;
|
||||||
} else {
|
} else {
|
||||||
if (totalkills >= 2000) rank = 3;
|
rank = 4;
|
||||||
else rank = 4;
|
}
|
||||||
|
} else {
|
||||||
|
if (totalkills >= 2000) {
|
||||||
|
rank = 3;
|
||||||
|
} else {
|
||||||
|
rank = 4;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rank == 0) exp = (60500 + (5500 * mode.getMode()));
|
if (rank == 0) {
|
||||||
else if(rank == 1) exp = (55000 + (5000 * mode.getMode()));
|
exp = (60500 + (5500 * mode.getMode()));
|
||||||
else if (rank == 2) exp = (46750 + (4250 * mode.getMode()));
|
} else if (rank == 1) {
|
||||||
else if (rank == 3) exp = (22000 + (2000 * mode.getMode()));
|
exp = (55000 + (5000 * mode.getMode()));
|
||||||
|
} else if (rank == 2) {
|
||||||
|
exp = (46750 + (4250 * mode.getMode()));
|
||||||
|
} else if (rank == 3) {
|
||||||
|
exp = (22000 + (2000 * mode.getMode()));
|
||||||
|
}
|
||||||
|
|
||||||
exp += ((kill * 2) + (cool * 10));
|
exp += ((kill * 2) + (cool * 10));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,7 +29,6 @@ import server.quest.Quest;
|
|||||||
import server.quest.QuestActionType;
|
import server.quest.QuestActionType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author Tyler (Twdtwd)
|
* @author Tyler (Twdtwd)
|
||||||
*/
|
*/
|
||||||
public class BuffAction extends AbstractQuestAction {
|
public class BuffAction extends AbstractQuestAction {
|
||||||
|
|||||||
@@ -29,7 +29,6 @@ import server.quest.Quest;
|
|||||||
import server.quest.QuestActionType;
|
import server.quest.QuestActionType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author Tyler (Twdtwd)
|
* @author Tyler (Twdtwd)
|
||||||
*/
|
*/
|
||||||
public class ExpAction extends AbstractQuestAction {
|
public class ExpAction extends AbstractQuestAction {
|
||||||
|
|||||||
@@ -28,7 +28,6 @@ import server.quest.Quest;
|
|||||||
import server.quest.QuestActionType;
|
import server.quest.QuestActionType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author Tyler (Twdtwd)
|
* @author Tyler (Twdtwd)
|
||||||
*/
|
*/
|
||||||
public class FameAction extends AbstractQuestAction {
|
public class FameAction extends AbstractQuestAction {
|
||||||
|
|||||||
@@ -26,13 +26,12 @@ import server.quest.Quest;
|
|||||||
import server.quest.QuestActionType;
|
import server.quest.QuestActionType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author Ronan
|
* @author Ronan
|
||||||
*/
|
*/
|
||||||
public class InfoAction extends AbstractQuestAction {
|
public class InfoAction extends AbstractQuestAction {
|
||||||
|
|
||||||
private String info;
|
private String info;
|
||||||
private int questID;
|
private final int questID;
|
||||||
|
|
||||||
public InfoAction(Quest quest, Data data) {
|
public InfoAction(Quest quest, Data data) {
|
||||||
super(QuestActionType.INFO, quest);
|
super(QuestActionType.INFO, quest);
|
||||||
|
|||||||
@@ -43,7 +43,6 @@ import java.util.LinkedList;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author Tyler (Twdtwd)
|
* @author Tyler (Twdtwd)
|
||||||
* @author Ronan
|
* @author Ronan
|
||||||
*/
|
*/
|
||||||
@@ -65,16 +64,19 @@ public class ItemAction extends AbstractQuestAction {
|
|||||||
|
|
||||||
Integer prop = null;
|
Integer prop = null;
|
||||||
Data propData = iEntry.getChildByPath("prop");
|
Data propData = iEntry.getChildByPath("prop");
|
||||||
if(propData != null)
|
if (propData != null) {
|
||||||
prop = DataTool.getInt(propData);
|
prop = DataTool.getInt(propData);
|
||||||
|
}
|
||||||
|
|
||||||
int gender = 2;
|
int gender = 2;
|
||||||
if (iEntry.getChildByPath("gender") != null)
|
if (iEntry.getChildByPath("gender") != null) {
|
||||||
gender = DataTool.getInt(iEntry.getChildByPath("gender"));
|
gender = DataTool.getInt(iEntry.getChildByPath("gender"));
|
||||||
|
}
|
||||||
|
|
||||||
int job = -1;
|
int job = -1;
|
||||||
if (iEntry.getChildByPath("job") != null)
|
if (iEntry.getChildByPath("job") != null) {
|
||||||
job = DataTool.getInt(iEntry.getChildByPath("job"));
|
job = DataTool.getInt(iEntry.getChildByPath("job"));
|
||||||
|
}
|
||||||
|
|
||||||
items.add(new ItemData(Integer.parseInt(iEntry.getName()), id, count, prop, job, gender, period));
|
items.add(new ItemData(Integer.parseInt(iEntry.getName()), id, count, prop, job, gender, period));
|
||||||
}
|
}
|
||||||
@@ -88,8 +90,8 @@ public class ItemAction extends AbstractQuestAction {
|
|||||||
List<ItemData> giveItem = new LinkedList<>();
|
List<ItemData> giveItem = new LinkedList<>();
|
||||||
|
|
||||||
int props = 0, rndProps = 0, accProps = 0;
|
int props = 0, rndProps = 0, accProps = 0;
|
||||||
for(ItemData item : items) {
|
for (ItemData item : items) {
|
||||||
if(item.getProp() != null && item.getProp() != -1 && canGetItem(item, chr)) {
|
if (item.getProp() != null && item.getProp() != -1 && canGetItem(item, chr)) {
|
||||||
props += item.getProp();
|
props += item.getProp();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -103,14 +105,15 @@ public class ItemAction extends AbstractQuestAction {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(iEntry.getProp() != null) {
|
if (iEntry.getProp() != null) {
|
||||||
if(iEntry.getProp() == -1) {
|
if (iEntry.getProp() == -1) {
|
||||||
if(extSelection != extNum++)
|
if (extSelection != extNum++) {
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
accProps += iEntry.getProp();
|
accProps += iEntry.getProp();
|
||||||
|
|
||||||
if(accProps <= rndProps) {
|
if (accProps <= rndProps) {
|
||||||
continue;
|
continue;
|
||||||
} else {
|
} else {
|
||||||
accProps = Integer.MIN_VALUE;
|
accProps = Integer.MIN_VALUE;
|
||||||
@@ -118,7 +121,7 @@ public class ItemAction extends AbstractQuestAction {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(iEntry.getCount() < 0) { // Remove Item
|
if (iEntry.getCount() < 0) { // Remove Item
|
||||||
takeItem.add(iEntry);
|
takeItem.add(iEntry);
|
||||||
} else { // Give Item
|
} else { // Give Item
|
||||||
giveItem.add(iEntry);
|
giveItem.add(iEntry);
|
||||||
@@ -127,15 +130,15 @@ public class ItemAction extends AbstractQuestAction {
|
|||||||
|
|
||||||
// must take all needed items before giving others
|
// must take all needed items before giving others
|
||||||
|
|
||||||
for(ItemData iEntry: takeItem) {
|
for (ItemData iEntry : takeItem) {
|
||||||
int itemid = iEntry.getId(), count = iEntry.getCount();
|
int itemid = iEntry.getId(), count = iEntry.getCount();
|
||||||
|
|
||||||
InventoryType type = ItemConstants.getInventoryType(itemid);
|
InventoryType type = ItemConstants.getInventoryType(itemid);
|
||||||
int quantity = count * -1; // Invert
|
int quantity = count * -1; // Invert
|
||||||
if(type.equals(InventoryType.EQUIP)) {
|
if (type.equals(InventoryType.EQUIP)) {
|
||||||
if(chr.getInventory(type).countById(itemid) < quantity) {
|
if (chr.getInventory(type).countById(itemid) < quantity) {
|
||||||
// Not enough in the equip inventoty, so check Equipped...
|
// Not enough in the equip inventoty, so check Equipped...
|
||||||
if(chr.getInventory(InventoryType.EQUIPPED).countById(itemid) > quantity) {
|
if (chr.getInventory(InventoryType.EQUIPPED).countById(itemid) > quantity) {
|
||||||
// Found it equipped, so change the type to equipped.
|
// Found it equipped, so change the type to equipped.
|
||||||
type = InventoryType.EQUIPPED;
|
type = InventoryType.EQUIPPED;
|
||||||
}
|
}
|
||||||
@@ -146,7 +149,7 @@ public class ItemAction extends AbstractQuestAction {
|
|||||||
chr.sendPacket(PacketCreator.getShowItemGain(itemid, (short) count, true));
|
chr.sendPacket(PacketCreator.getShowItemGain(itemid, (short) count, true));
|
||||||
}
|
}
|
||||||
|
|
||||||
for(ItemData iEntry: giveItem) {
|
for (ItemData iEntry : giveItem) {
|
||||||
int itemid = iEntry.getId(), count = iEntry.getCount(), period = iEntry.getPeriod(); // thanks Vcoc for noticing quest milestone item not getting removed from inventory after a while
|
int itemid = iEntry.getId(), count = iEntry.getCount(), period = iEntry.getPeriod(); // thanks Vcoc for noticing quest milestone item not getting removed from inventory after a while
|
||||||
|
|
||||||
InventoryManipulator.addById(chr.getClient(), itemid, (short) count, "", -1, period > 0 ? (System.currentTimeMillis() + period * 60 * 1000) : -1);
|
InventoryManipulator.addById(chr.getClient(), itemid, (short) count, "", -1, period > 0 ? (System.currentTimeMillis() + period * 60 * 1000) : -1);
|
||||||
@@ -161,18 +164,20 @@ public class ItemAction extends AbstractQuestAction {
|
|||||||
List<Pair<Item, InventoryType>> randomList = new LinkedList<>();
|
List<Pair<Item, InventoryType>> randomList = new LinkedList<>();
|
||||||
|
|
||||||
List<Integer> allSlotUsed = new ArrayList(5);
|
List<Integer> allSlotUsed = new ArrayList(5);
|
||||||
for(byte i = 0; i < 5; i++) allSlotUsed.add(0);
|
for (byte i = 0; i < 5; i++) {
|
||||||
|
allSlotUsed.add(0);
|
||||||
|
}
|
||||||
|
|
||||||
for(ItemData item : items) {
|
for (ItemData item : items) {
|
||||||
if (!canGetItem(item, chr)) {
|
if (!canGetItem(item, chr)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
InventoryType type = ItemConstants.getInventoryType(item.getId());
|
InventoryType type = ItemConstants.getInventoryType(item.getId());
|
||||||
if(item.getProp() != null) {
|
if (item.getProp() != null) {
|
||||||
Item toItem = new Item(item.getId(), (short) 0, (short) item.getCount());
|
Item toItem = new Item(item.getId(), (short) 0, (short) item.getCount());
|
||||||
|
|
||||||
if(item.getProp() < 0) {
|
if (item.getProp() < 0) {
|
||||||
selectList.add(new Pair<>(toItem, type));
|
selectList.add(new Pair<>(toItem, type));
|
||||||
} else {
|
} else {
|
||||||
randomList.add(new Pair<>(toItem, type));
|
randomList.add(new Pair<>(toItem, type));
|
||||||
@@ -183,14 +188,15 @@ public class ItemAction extends AbstractQuestAction {
|
|||||||
Item toItem = new Item(item.getId(), (short) 0, (short) item.getCount());
|
Item toItem = new Item(item.getId(), (short) 0, (short) item.getCount());
|
||||||
gainList.add(new Pair<>(toItem, type));
|
gainList.add(new Pair<>(toItem, type));
|
||||||
|
|
||||||
if(item.getCount() < 0) {
|
if (item.getCount() < 0) {
|
||||||
// Make sure they actually have the item.
|
// Make sure they actually have the item.
|
||||||
int quantity = item.getCount() * -1;
|
int quantity = item.getCount() * -1;
|
||||||
|
|
||||||
int freeSlotCount = chr.getInventory(type).freeSlotCountById(item.getId(), quantity);
|
int freeSlotCount = chr.getInventory(type).freeSlotCountById(item.getId(), quantity);
|
||||||
if(freeSlotCount == -1) {
|
if (freeSlotCount == -1) {
|
||||||
if(type.equals(InventoryType.EQUIP) && chr.getInventory(InventoryType.EQUIPPED).countById(item.getId()) > quantity)
|
if (type.equals(InventoryType.EQUIP) && chr.getInventory(InventoryType.EQUIPPED).countById(item.getId()) > quantity) {
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
announceInventoryLimit(Collections.singletonList(item.getId()), chr);
|
announceInventoryLimit(Collections.singletonList(item.getId()), chr);
|
||||||
return false;
|
return false;
|
||||||
@@ -202,18 +208,20 @@ public class ItemAction extends AbstractQuestAction {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!randomList.isEmpty()) {
|
if (!randomList.isEmpty()) {
|
||||||
int result;
|
int result;
|
||||||
Client c = chr.getClient();
|
Client c = chr.getClient();
|
||||||
|
|
||||||
List<Integer> rndUsed = new ArrayList(5);
|
List<Integer> rndUsed = new ArrayList(5);
|
||||||
for(byte i = 0; i < 5; i++) rndUsed.add(allSlotUsed.get(i));
|
for (byte i = 0; i < 5; i++) {
|
||||||
|
rndUsed.add(allSlotUsed.get(i));
|
||||||
|
}
|
||||||
|
|
||||||
for(Pair<Item, InventoryType> it: randomList) {
|
for (Pair<Item, InventoryType> it : randomList) {
|
||||||
int idx = it.getRight().getType() - 1;
|
int idx = it.getRight().getType() - 1;
|
||||||
|
|
||||||
result = InventoryManipulator.checkSpaceProgressively(c, it.getLeft().getItemId(), it.getLeft().getQuantity(), "", rndUsed.get(idx), false);
|
result = InventoryManipulator.checkSpaceProgressively(c, it.getLeft().getItemId(), it.getLeft().getQuantity(), "", rndUsed.get(idx), false);
|
||||||
if(result % 2 == 0) {
|
if (result % 2 == 0) {
|
||||||
announceInventoryLimit(Collections.singletonList(it.getLeft().getItemId()), chr);
|
announceInventoryLimit(Collections.singletonList(it.getLeft().getItemId()), chr);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -222,7 +230,7 @@ public class ItemAction extends AbstractQuestAction {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!selectList.isEmpty()) {
|
if (!selectList.isEmpty()) {
|
||||||
Pair<Item, InventoryType> selected = selectList.get(extSelection);
|
Pair<Item, InventoryType> selected = selectList.get(extSelection);
|
||||||
gainList.add(selected);
|
gainList.add(selected);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,7 +29,6 @@ import server.quest.Quest;
|
|||||||
import server.quest.QuestActionType;
|
import server.quest.QuestActionType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author Tyler (Twdtwd)
|
* @author Tyler (Twdtwd)
|
||||||
*/
|
*/
|
||||||
public class MesoAction extends AbstractQuestAction {
|
public class MesoAction extends AbstractQuestAction {
|
||||||
|
|||||||
@@ -30,7 +30,6 @@ import server.quest.QuestActionType;
|
|||||||
import tools.PacketCreator;
|
import tools.PacketCreator;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author Tyler (Twdtwd)
|
* @author Tyler (Twdtwd)
|
||||||
*/
|
*/
|
||||||
public class NextQuestAction extends AbstractQuestAction {
|
public class NextQuestAction extends AbstractQuestAction {
|
||||||
|
|||||||
@@ -30,7 +30,6 @@ import server.quest.Quest;
|
|||||||
import server.quest.QuestActionType;
|
import server.quest.QuestActionType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author Tyler (Twdtwd)
|
* @author Tyler (Twdtwd)
|
||||||
*/
|
*/
|
||||||
public class PetSkillAction extends AbstractQuestAction {
|
public class PetSkillAction extends AbstractQuestAction {
|
||||||
@@ -51,8 +50,9 @@ public class PetSkillAction extends AbstractQuestAction {
|
|||||||
@Override
|
@Override
|
||||||
public boolean check(Character chr, Integer extSelection) {
|
public boolean check(Character chr, Integer extSelection) {
|
||||||
QuestStatus status = chr.getQuest(Quest.getInstance(questID));
|
QuestStatus status = chr.getQuest(Quest.getInstance(questID));
|
||||||
if(!(status.getStatus() == QuestStatus.Status.NOT_STARTED && status.getForfeited() > 0))
|
if (!(status.getStatus() == QuestStatus.Status.NOT_STARTED && status.getForfeited() > 0)) {
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
return chr.getPet(0) != null;
|
return chr.getPet(0) != null;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,7 +27,6 @@ import server.quest.Quest;
|
|||||||
import server.quest.QuestActionType;
|
import server.quest.QuestActionType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author Ronan
|
* @author Ronan
|
||||||
*/
|
*/
|
||||||
public class PetSpeedAction extends AbstractQuestAction {
|
public class PetSpeedAction extends AbstractQuestAction {
|
||||||
@@ -46,7 +45,9 @@ public class PetSpeedAction extends AbstractQuestAction {
|
|||||||
Client c = chr.getClient();
|
Client c = chr.getClient();
|
||||||
|
|
||||||
Pet pet = chr.getPet(0); // assuming here only the pet leader will gain owner speed
|
Pet pet = chr.getPet(0); // assuming here only the pet leader will gain owner speed
|
||||||
if(pet == null) return;
|
if (pet == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
c.lockClient();
|
c.lockClient();
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -28,7 +28,6 @@ import server.quest.Quest;
|
|||||||
import server.quest.QuestActionType;
|
import server.quest.QuestActionType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author Ronan
|
* @author Ronan
|
||||||
*/
|
*/
|
||||||
public class PetTamenessAction extends AbstractQuestAction {
|
public class PetTamenessAction extends AbstractQuestAction {
|
||||||
@@ -51,7 +50,9 @@ public class PetTamenessAction extends AbstractQuestAction {
|
|||||||
Client c = chr.getClient();
|
Client c = chr.getClient();
|
||||||
|
|
||||||
Pet pet = chr.getPet(0); // assuming here only the pet leader will gain tameness
|
Pet pet = chr.getPet(0); // assuming here only the pet leader will gain tameness
|
||||||
if(pet == null) return;
|
if (pet == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
c.lockClient();
|
c.lockClient();
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -32,7 +32,6 @@ import java.util.HashMap;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author Tyler (Twdtwd)
|
* @author Tyler (Twdtwd)
|
||||||
*/
|
*/
|
||||||
public class QuestAction extends AbstractQuestAction {
|
public class QuestAction extends AbstractQuestAction {
|
||||||
@@ -57,7 +56,7 @@ public class QuestAction extends AbstractQuestAction {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void run(Character chr, Integer extSelection) {
|
public void run(Character chr, Integer extSelection) {
|
||||||
for(Integer questID : quests.keySet()) {
|
for (Integer questID : quests.keySet()) {
|
||||||
int stat = quests.get(questID);
|
int stat = quests.get(questID);
|
||||||
chr.updateQuestStatus(new QuestStatus(Quest.getInstance(questID), QuestStatus.Status.getById(stat)));
|
chr.updateQuestStatus(new QuestStatus(Quest.getInstance(questID), QuestStatus.Status.getById(stat)));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,7 +36,6 @@ import java.util.List;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author Tyler (Twdtwd)
|
* @author Tyler (Twdtwd)
|
||||||
*/
|
*/
|
||||||
public class SkillAction extends AbstractQuestAction {
|
public class SkillAction extends AbstractQuestAction {
|
||||||
@@ -55,13 +54,14 @@ public class SkillAction extends AbstractQuestAction {
|
|||||||
byte skillLevel = 0;
|
byte skillLevel = 0;
|
||||||
int skillid = DataTool.getInt(sEntry.getChildByPath("id"));
|
int skillid = DataTool.getInt(sEntry.getChildByPath("id"));
|
||||||
Data skillLevelData = sEntry.getChildByPath("skillLevel");
|
Data skillLevelData = sEntry.getChildByPath("skillLevel");
|
||||||
if(skillLevelData != null)
|
if (skillLevelData != null) {
|
||||||
skillLevel = (byte) DataTool.getInt(skillLevelData);
|
skillLevel = (byte) DataTool.getInt(skillLevelData);
|
||||||
|
}
|
||||||
int masterLevel = DataTool.getInt(sEntry.getChildByPath("masterLevel"));
|
int masterLevel = DataTool.getInt(sEntry.getChildByPath("masterLevel"));
|
||||||
List<Integer> jobs = new ArrayList<>();
|
List<Integer> jobs = new ArrayList<>();
|
||||||
|
|
||||||
Data applicableJobs = sEntry.getChildByPath("job");
|
Data applicableJobs = sEntry.getChildByPath("job");
|
||||||
if(applicableJobs != null) {
|
if (applicableJobs != null) {
|
||||||
for (Data applicableJob : applicableJobs.getChildren()) {
|
for (Data applicableJob : applicableJobs.getChildren()) {
|
||||||
jobs.add(DataTool.getInt(applicableJob));
|
jobs.add(DataTool.getInt(applicableJob));
|
||||||
}
|
}
|
||||||
@@ -73,14 +73,13 @@ public class SkillAction extends AbstractQuestAction {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void run(Character chr, Integer extSelection) {
|
public void run(Character chr, Integer extSelection) {
|
||||||
for(SkillData skill : skillData.values()) {
|
for (SkillData skill : skillData.values()) {
|
||||||
Skill skillObject = SkillFactory.getSkill(skill.getId());
|
Skill skillObject = SkillFactory.getSkill(skill.getId());
|
||||||
if(skillObject == null) continue;
|
if (skillObject == null) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
boolean shouldLearn = false;
|
boolean shouldLearn = skill.jobsContains(chr.getJob()) || skillObject.isBeginnerSkill();
|
||||||
|
|
||||||
if(skill.jobsContains(chr.getJob()) || skillObject.isBeginnerSkill())
|
|
||||||
shouldLearn = true;
|
|
||||||
|
|
||||||
byte skillLevel = (byte) Math.max(skill.getLevel(), chr.getSkillLevel(skillObject));
|
byte skillLevel = (byte) Math.max(skill.getLevel(), chr.getSkillLevel(skillObject));
|
||||||
int masterLevel = Math.max(skill.getMasterLevel(), chr.getMasterLevel(skillObject));
|
int masterLevel = Math.max(skill.getMasterLevel(), chr.getMasterLevel(skillObject));
|
||||||
|
|||||||
@@ -26,7 +26,6 @@ import server.quest.Quest;
|
|||||||
import server.quest.QuestRequirementType;
|
import server.quest.QuestRequirementType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author Ronan
|
* @author Ronan
|
||||||
*/
|
*/
|
||||||
public class BuffExceptRequirement extends AbstractQuestRequirement {
|
public class BuffExceptRequirement extends AbstractQuestRequirement {
|
||||||
|
|||||||
@@ -26,7 +26,6 @@ import server.quest.Quest;
|
|||||||
import server.quest.QuestRequirementType;
|
import server.quest.QuestRequirementType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author Ronan
|
* @author Ronan
|
||||||
*/
|
*/
|
||||||
public class BuffRequirement extends AbstractQuestRequirement {
|
public class BuffRequirement extends AbstractQuestRequirement {
|
||||||
|
|||||||
@@ -28,7 +28,6 @@ import server.quest.Quest;
|
|||||||
import server.quest.QuestRequirementType;
|
import server.quest.QuestRequirementType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author Tyler (Twdtwd)
|
* @author Tyler (Twdtwd)
|
||||||
*/
|
*/
|
||||||
public class CompletedQuestRequirement extends AbstractQuestRequirement {
|
public class CompletedQuestRequirement extends AbstractQuestRequirement {
|
||||||
|
|||||||
@@ -30,7 +30,6 @@ import server.quest.QuestRequirementType;
|
|||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author Tyler (Twdtwd)
|
* @author Tyler (Twdtwd)
|
||||||
*/
|
*/
|
||||||
public class EndDateRequirement extends AbstractQuestRequirement {
|
public class EndDateRequirement extends AbstractQuestRequirement {
|
||||||
@@ -43,7 +42,6 @@ public class EndDateRequirement extends AbstractQuestRequirement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @param data
|
* @param data
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -28,7 +28,6 @@ import server.quest.Quest;
|
|||||||
import server.quest.QuestRequirementType;
|
import server.quest.QuestRequirementType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author Tyler (Twdtwd)
|
* @author Tyler (Twdtwd)
|
||||||
*/
|
*/
|
||||||
public class FieldEnterRequirement extends AbstractQuestRequirement {
|
public class FieldEnterRequirement extends AbstractQuestRequirement {
|
||||||
|
|||||||
@@ -31,12 +31,11 @@ import java.util.ArrayList;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author Tyler (Twdtwd)
|
* @author Tyler (Twdtwd)
|
||||||
*/
|
*/
|
||||||
public class InfoExRequirement extends AbstractQuestRequirement {
|
public class InfoExRequirement extends AbstractQuestRequirement {
|
||||||
private List<String> infoExpected = new ArrayList<>();
|
private final List<String> infoExpected = new ArrayList<>();
|
||||||
private int questID;
|
private final int questID;
|
||||||
|
|
||||||
|
|
||||||
public InfoExRequirement(Quest quest, Data data) {
|
public InfoExRequirement(Quest quest, Data data) {
|
||||||
@@ -48,7 +47,7 @@ public class InfoExRequirement extends AbstractQuestRequirement {
|
|||||||
@Override
|
@Override
|
||||||
public void processData(Data data) {
|
public void processData(Data data) {
|
||||||
// Because we have to...
|
// Because we have to...
|
||||||
for(Data infoEx : data.getChildren()) {
|
for (Data infoEx : data.getChildren()) {
|
||||||
Data value = infoEx.getChildByPath("value");
|
Data value = infoEx.getChildByPath("value");
|
||||||
infoExpected.add(DataTool.getString(value, ""));
|
infoExpected.add(DataTool.getString(value, ""));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,13 +26,12 @@ import server.quest.Quest;
|
|||||||
import server.quest.QuestRequirementType;
|
import server.quest.QuestRequirementType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author Ronan
|
* @author Ronan
|
||||||
*/
|
*/
|
||||||
public class InfoNumberRequirement extends AbstractQuestRequirement {
|
public class InfoNumberRequirement extends AbstractQuestRequirement {
|
||||||
|
|
||||||
private short infoNumber;
|
private short infoNumber;
|
||||||
private int questID;
|
private final int questID;
|
||||||
|
|
||||||
public InfoNumberRequirement(Quest quest, Data data) {
|
public InfoNumberRequirement(Quest quest, Data data) {
|
||||||
super(QuestRequirementType.INFO_NUMBER);
|
super(QuestRequirementType.INFO_NUMBER);
|
||||||
|
|||||||
@@ -29,12 +29,11 @@ import server.quest.Quest;
|
|||||||
import server.quest.QuestRequirementType;
|
import server.quest.QuestRequirementType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author Tyler (Twdtwd)
|
* @author Tyler (Twdtwd)
|
||||||
*/
|
*/
|
||||||
public class IntervalRequirement extends AbstractQuestRequirement {
|
public class IntervalRequirement extends AbstractQuestRequirement {
|
||||||
private int interval = -1;
|
private int interval = -1;
|
||||||
private int questID;
|
private final int questID;
|
||||||
|
|
||||||
public IntervalRequirement(Quest quest, Data data) {
|
public IntervalRequirement(Quest quest, Data data) {
|
||||||
super(QuestRequirementType.INTERVAL);
|
super(QuestRequirementType.INTERVAL);
|
||||||
@@ -58,24 +57,25 @@ public class IntervalRequirement extends AbstractQuestRequirement {
|
|||||||
long leftTime = futureTime - System.currentTimeMillis();
|
long leftTime = futureTime - System.currentTimeMillis();
|
||||||
|
|
||||||
byte mode = 0;
|
byte mode = 0;
|
||||||
if(leftTime / (60*1000) > 0) {
|
if (leftTime / (60 * 1000) > 0) {
|
||||||
mode++; //counts minutes
|
mode++; //counts minutes
|
||||||
|
|
||||||
if(leftTime / (60*60*1000) > 0)
|
if (leftTime / (60 * 60 * 1000) > 0) {
|
||||||
mode++; //counts hours
|
mode++; //counts hours
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
switch(mode) {
|
switch (mode) {
|
||||||
case 2:
|
case 2:
|
||||||
int hours = (int) ((leftTime / (1000*60*60)));
|
int hours = (int) ((leftTime / (1000 * 60 * 60)));
|
||||||
str.append(hours + " hours, ");
|
str.append(hours + " hours, ");
|
||||||
|
|
||||||
case 1:
|
case 1:
|
||||||
int minutes = (int) ((leftTime / (1000*60)) % 60);
|
int minutes = (int) ((leftTime / (1000 * 60)) % 60);
|
||||||
str.append(minutes + " minutes, ");
|
str.append(minutes + " minutes, ");
|
||||||
|
|
||||||
default:
|
default:
|
||||||
int seconds = (int) (leftTime / 1000) % 60 ;
|
int seconds = (int) (leftTime / 1000) % 60;
|
||||||
str.append(seconds + " seconds");
|
str.append(seconds + " seconds");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -35,7 +35,6 @@ import java.util.HashMap;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author Tyler (Twdtwd)
|
* @author Tyler (Twdtwd)
|
||||||
*/
|
*/
|
||||||
public class ItemRequirement extends AbstractQuestRequirement {
|
public class ItemRequirement extends AbstractQuestRequirement {
|
||||||
@@ -61,7 +60,7 @@ public class ItemRequirement extends AbstractQuestRequirement {
|
|||||||
@Override
|
@Override
|
||||||
public boolean check(Character chr, Integer npcid) {
|
public boolean check(Character chr, Integer npcid) {
|
||||||
ItemInformationProvider ii = ItemInformationProvider.getInstance();
|
ItemInformationProvider ii = ItemInformationProvider.getInstance();
|
||||||
for(Integer itemId : items.keySet()) {
|
for (Integer itemId : items.keySet()) {
|
||||||
int countNeeded = items.get(itemId);
|
int countNeeded = items.get(itemId);
|
||||||
int count = 0;
|
int count = 0;
|
||||||
|
|
||||||
@@ -75,13 +74,13 @@ public class ItemRequirement extends AbstractQuestRequirement {
|
|||||||
}
|
}
|
||||||
//Weird stuff, nexon made some quests only available when wearing gm clothes. This enables us to accept it ><
|
//Weird stuff, nexon made some quests only available when wearing gm clothes. This enables us to accept it ><
|
||||||
if (iType.equals(InventoryType.EQUIP) && !ItemConstants.isMedal(itemId)) {
|
if (iType.equals(InventoryType.EQUIP) && !ItemConstants.isMedal(itemId)) {
|
||||||
if(chr.isGM()) {
|
if (chr.isGM()) {
|
||||||
for (Item item : chr.getInventory(InventoryType.EQUIPPED).listById(itemId)) {
|
for (Item item : chr.getInventory(InventoryType.EQUIPPED).listById(itemId)) {
|
||||||
count += item.getQuantity();
|
count += item.getQuantity();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if(count < countNeeded) {
|
if (count < countNeeded) {
|
||||||
if(chr.getInventory(InventoryType.EQUIPPED).countById(itemId) + count >= countNeeded) {
|
if (chr.getInventory(InventoryType.EQUIPPED).countById(itemId) + count >= countNeeded) {
|
||||||
chr.dropMessage(5, "Unequip the required " + ii.getName(itemId) + " before trying this quest operation.");
|
chr.dropMessage(5, "Unequip the required " + ii.getName(itemId) + " before trying this quest operation.");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -89,7 +88,7 @@ public class ItemRequirement extends AbstractQuestRequirement {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(count < countNeeded || countNeeded <= 0 && count > 0) {
|
if (count < countNeeded || countNeeded <= 0 && count > 0) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,7 +32,6 @@ import java.util.ArrayList;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author Tyler (Twdtwd)
|
* @author Tyler (Twdtwd)
|
||||||
*/
|
*/
|
||||||
public class JobRequirement extends AbstractQuestRequirement {
|
public class JobRequirement extends AbstractQuestRequirement {
|
||||||
@@ -44,7 +43,6 @@ public class JobRequirement extends AbstractQuestRequirement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @param data
|
* @param data
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@@ -57,7 +55,7 @@ public class JobRequirement extends AbstractQuestRequirement {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean check(Character chr, Integer npcid) {
|
public boolean check(Character chr, Integer npcid) {
|
||||||
for(Integer job : jobs) {
|
for (Integer job : jobs) {
|
||||||
if (chr.getJob().equals(Job.getById(job)) || chr.isGM()) {
|
if (chr.getJob().equals(Job.getById(job)) || chr.isGM()) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,7 +28,6 @@ import server.quest.Quest;
|
|||||||
import server.quest.QuestRequirementType;
|
import server.quest.QuestRequirementType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author Tyler (Twdtwd)
|
* @author Tyler (Twdtwd)
|
||||||
*/
|
*/
|
||||||
public class MaxLevelRequirement extends AbstractQuestRequirement {
|
public class MaxLevelRequirement extends AbstractQuestRequirement {
|
||||||
@@ -41,7 +40,6 @@ public class MaxLevelRequirement extends AbstractQuestRequirement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @param data
|
* @param data
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -26,7 +26,6 @@ import server.quest.Quest;
|
|||||||
import server.quest.QuestRequirementType;
|
import server.quest.QuestRequirementType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author Ronan
|
* @author Ronan
|
||||||
*/
|
*/
|
||||||
public class MesoRequirement extends AbstractQuestRequirement {
|
public class MesoRequirement extends AbstractQuestRequirement {
|
||||||
|
|||||||
@@ -28,7 +28,6 @@ import server.quest.Quest;
|
|||||||
import server.quest.QuestRequirementType;
|
import server.quest.QuestRequirementType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author Tyler (Twdtwd)
|
* @author Tyler (Twdtwd)
|
||||||
*/
|
*/
|
||||||
public class MinLevelRequirement extends AbstractQuestRequirement {
|
public class MinLevelRequirement extends AbstractQuestRequirement {
|
||||||
|
|||||||
@@ -29,7 +29,6 @@ import server.quest.Quest;
|
|||||||
import server.quest.QuestRequirementType;
|
import server.quest.QuestRequirementType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author Tyler (Twdtwd)
|
* @author Tyler (Twdtwd)
|
||||||
*/
|
*/
|
||||||
public class MinTamenessRequirement extends AbstractQuestRequirement {
|
public class MinTamenessRequirement extends AbstractQuestRequirement {
|
||||||
@@ -42,7 +41,6 @@ public class MinTamenessRequirement extends AbstractQuestRequirement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @param data
|
* @param data
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@@ -55,12 +53,15 @@ public class MinTamenessRequirement extends AbstractQuestRequirement {
|
|||||||
public boolean check(Character chr, Integer npcid) {
|
public boolean check(Character chr, Integer npcid) {
|
||||||
int curCloseness = 0;
|
int curCloseness = 0;
|
||||||
|
|
||||||
for(Pet pet : chr.getPets()) {
|
for (Pet pet : chr.getPets()) {
|
||||||
if(pet == null) continue;
|
if (pet == null) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if(pet.getCloseness() > curCloseness)
|
if (pet.getCloseness() > curCloseness) {
|
||||||
curCloseness = pet.getCloseness();
|
curCloseness = pet.getCloseness();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return curCloseness >= minTameness;
|
return curCloseness >= minTameness;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,12 +33,11 @@ import java.util.HashMap;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author Tyler (Twdtwd)
|
* @author Tyler (Twdtwd)
|
||||||
*/
|
*/
|
||||||
public class MobRequirement extends AbstractQuestRequirement {
|
public class MobRequirement extends AbstractQuestRequirement {
|
||||||
Map<Integer, Integer> mobs = new HashMap<>();
|
Map<Integer, Integer> mobs = new HashMap<>();
|
||||||
private int questID;
|
private final int questID;
|
||||||
|
|
||||||
public MobRequirement(Quest quest, Data data) {
|
public MobRequirement(Quest quest, Data data) {
|
||||||
super(QuestRequirementType.MOB);
|
super(QuestRequirementType.MOB);
|
||||||
@@ -47,7 +46,6 @@ public class MobRequirement extends AbstractQuestRequirement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @param data
|
* @param data
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@@ -63,7 +61,7 @@ public class MobRequirement extends AbstractQuestRequirement {
|
|||||||
@Override
|
@Override
|
||||||
public boolean check(Character chr, Integer npcid) {
|
public boolean check(Character chr, Integer npcid) {
|
||||||
QuestStatus status = chr.getQuest(Quest.getInstance(questID));
|
QuestStatus status = chr.getQuest(Quest.getInstance(questID));
|
||||||
for(Integer mobID : mobs.keySet()) {
|
for (Integer mobID : mobs.keySet()) {
|
||||||
int countReq = mobs.get(mobID);
|
int countReq = mobs.get(mobID);
|
||||||
int progress;
|
int progress;
|
||||||
|
|
||||||
@@ -74,14 +72,15 @@ public class MobRequirement extends AbstractQuestRequirement {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(progress < countReq)
|
if (progress < countReq) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getRequiredMobCount(int mobid) {
|
public int getRequiredMobCount(int mobid) {
|
||||||
if(mobs.containsKey(mobid)) {
|
if (mobs.containsKey(mobid)) {
|
||||||
return mobs.get(mobid);
|
return mobs.get(mobid);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
@@ -28,7 +28,6 @@ import server.quest.Quest;
|
|||||||
import server.quest.QuestRequirementType;
|
import server.quest.QuestRequirementType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author Tyler (Twdtwd)
|
* @author Tyler (Twdtwd)
|
||||||
*/
|
*/
|
||||||
public class MonsterBookCountRequirement extends AbstractQuestRequirement {
|
public class MonsterBookCountRequirement extends AbstractQuestRequirement {
|
||||||
|
|||||||
@@ -28,7 +28,6 @@ import server.quest.Quest;
|
|||||||
import server.quest.QuestRequirementType;
|
import server.quest.QuestRequirementType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author Tyler (Twdtwd)
|
* @author Tyler (Twdtwd)
|
||||||
*/
|
*/
|
||||||
public class NpcRequirement extends AbstractQuestRequirement {
|
public class NpcRequirement extends AbstractQuestRequirement {
|
||||||
|
|||||||
@@ -32,7 +32,6 @@ import java.util.ArrayList;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author Tyler (Twdtwd)
|
* @author Tyler (Twdtwd)
|
||||||
*/
|
*/
|
||||||
public class PetRequirement extends AbstractQuestRequirement {
|
public class PetRequirement extends AbstractQuestRequirement {
|
||||||
@@ -47,7 +46,7 @@ public class PetRequirement extends AbstractQuestRequirement {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void processData(Data data) {
|
public void processData(Data data) {
|
||||||
for(Data petData : data.getChildren()) {
|
for (Data petData : data.getChildren()) {
|
||||||
petIDs.add(DataTool.getInt(petData.getChildByPath("id")));
|
petIDs.add(DataTool.getInt(petData.getChildByPath("id")));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -55,12 +54,15 @@ public class PetRequirement extends AbstractQuestRequirement {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean check(Character chr, Integer npcid) {
|
public boolean check(Character chr, Integer npcid) {
|
||||||
for(Pet pet : chr.getPets()) {
|
for (Pet pet : chr.getPets()) {
|
||||||
if(pet == null) continue; // thanks Arufonsu for showing a NPE occurring here
|
if (pet == null) {
|
||||||
|
continue; // thanks Arufonsu for showing a NPE occurring here
|
||||||
|
}
|
||||||
|
|
||||||
if(petIDs.contains(pet.getItemId()))
|
if (petIDs.contains(pet.getItemId())) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,7 +29,6 @@ import java.util.HashMap;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author Tyler (Twdtwd)
|
* @author Tyler (Twdtwd)
|
||||||
*/
|
*/
|
||||||
public class QuestRequirement extends AbstractQuestRequirement {
|
public class QuestRequirement extends AbstractQuestRequirement {
|
||||||
@@ -41,7 +40,6 @@ public class QuestRequirement extends AbstractQuestRequirement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @param data
|
* @param data
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@@ -56,14 +54,15 @@ public class QuestRequirement extends AbstractQuestRequirement {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean check(Character chr, Integer npcid) {
|
public boolean check(Character chr, Integer npcid) {
|
||||||
for(Integer questID : quests.keySet()) {
|
for (Integer questID : quests.keySet()) {
|
||||||
int stateReq = quests.get(questID);
|
int stateReq = quests.get(questID);
|
||||||
QuestStatus qs = chr.getQuest(Quest.getInstance(questID));
|
QuestStatus qs = chr.getQuest(Quest.getInstance(questID));
|
||||||
|
|
||||||
if(qs == null && QuestStatus.Status.getById(stateReq).equals(QuestStatus.Status.NOT_STARTED))
|
if (qs == null && QuestStatus.Status.getById(stateReq).equals(QuestStatus.Status.NOT_STARTED)) {
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if(qs == null || !qs.getStatus().equals(QuestStatus.Status.getById(stateReq))) {
|
if (qs == null || !qs.getStatus().equals(QuestStatus.Status.getById(stateReq))) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -26,7 +26,6 @@ import server.quest.Quest;
|
|||||||
import server.quest.QuestRequirementType;
|
import server.quest.QuestRequirementType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author Ronan
|
* @author Ronan
|
||||||
*/
|
*/
|
||||||
public class ScriptRequirement extends AbstractQuestRequirement {
|
public class ScriptRequirement extends AbstractQuestRequirement {
|
||||||
|
|||||||
Reference in New Issue
Block a user