Roaring tiger + party EXP fix + Owl leaderboard

Fixed Roaring Tiger messenger effect sticking on the client after the end on the animation. Fixed an issue with party EXP handing to low-level players leech EXP. Fixed party EXP system giving players way too much EXP in some cases. Added Owl item search ranking feature, items most searched can be displayed by the Owl instead of the hard-coded counterpart.
This commit is contained in:
ronancpl
2017-10-20 12:48:49 -02:00
parent 57c29603d1
commit 75e11e1996
54 changed files with 146 additions and 51 deletions

View File

@@ -642,9 +642,9 @@ public class AbstractPlayerInteraction {
public void givePartyExp(String PQ, boolean instance) {
//1 player = 0% bonus (100)
//2 players = 0% bonus (100)
//3 players = +0% bonus (100)
//1 player = +0% bonus (100)
//2 players = +0% bonus (100)
//3 players = +0% bonus (100)
//4 players = +10% bonus (110)
//5 players = +20% bonus (120)
//6 players = +30% bonus (130)
@@ -671,8 +671,8 @@ public class AbstractPlayerInteraction {
int base = PartyQuest.getExp(PQ, player.getLevel());
int exp = base * bonus / 100;
player.gainExp(exp, true, true);
if(ServerConstants.PQ_BONUS_EXP_MOD > 0 && System.currentTimeMillis() <= ServerConstants.EVENT_END_TIMESTAMP) {
player.gainExp((int) (exp * ServerConstants.PQ_BONUS_EXP_MOD), true, true);
if(ServerConstants.PQ_BONUS_EXP_RATE > 0 && System.currentTimeMillis() <= ServerConstants.EVENT_END_TIMESTAMP) {
player.gainExp((int) (exp * ServerConstants.PQ_BONUS_EXP_RATE), true, true);
}
}
}

View File

@@ -33,6 +33,8 @@ import java.util.logging.Logger;
import javax.script.Invocable;
import javax.script.ScriptException;
import constants.ServerConstants;
import client.MapleCharacter;
import net.server.Server;
import net.server.world.World;
import net.server.channel.Channel;
@@ -44,15 +46,14 @@ import server.expeditions.MapleExpedition;
import server.maps.MapleMap;
import server.life.MapleMonster;
import server.life.MapleLifeFactory;
import server.quest.MapleQuest;
import client.MapleCharacter;
import java.util.List;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.Queue;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;
import server.quest.MapleQuest;
/**
*
@@ -75,11 +76,9 @@ public class EventManager {
private String name;
private Lock lobbyLock = new ReentrantLock();
private Lock queueLock = new ReentrantLock();
private static final int limitGuilds = 10; // max numbers of guilds in queue for GPQ.
private static final int maxLobbys = 8; // an event manager holds up to this amount of concurrent lobbys
private static final long lobbyDelay = 10; // 10 seconds cooldown before reopening a lobby
private static final int maxLobbys = 8; // an event manager holds up to this amount of concurrent lobbys
public EventManager(Channel cserv, Invocable iv, String name) {
this.server = Server.getInstance();
this.iv = iv;
@@ -107,7 +106,7 @@ public class EventManager {
}
public long getLobbyDelay() {
return lobbyDelay;
return ServerConstants.EVENT_LOBBY_DELAY;
}
private List<Integer> getLobbyRange() {
@@ -128,6 +127,7 @@ public class EventManager {
public ScheduledFuture<?> schedule(final String methodName, final EventInstanceManager eim, long delay) {
return TimerManager.getInstance().schedule(new Runnable() {
@Override
public void run() {
try {
iv.invokeFunction(methodName, eim);
@@ -140,6 +140,7 @@ public class EventManager {
public ScheduledFuture<?> scheduleAtTimestamp(final String methodName, long timestamp) {
return TimerManager.getInstance().scheduleAtTimestamp(new Runnable() {
@Override
public void run() {
try {
iv.invokeFunction(methodName, (Object) null);
@@ -190,7 +191,7 @@ public class EventManager {
freeLobbyInstance(name);
instances.remove(name);
}
}, lobbyDelay * 1000);
}, ServerConstants.EVENT_LOBBY_DELAY * 1000);
}
public void setProperty(String key, String value) {
@@ -561,7 +562,7 @@ public class EventManager {
public boolean isQueueFull() {
synchronized(queuedGuilds) {
return queuedGuilds.size() >= limitGuilds;
return queuedGuilds.size() >= ServerConstants.EVENT_MAX_GUILD_QUEUE;
}
}