Quest clock & ThreadTracker & MapleArrowFetcher patches

Fixed quest timer UI not disappearing on the client on quest complete.
Fixed a bug on ThreadTracker, not displaying properly the last acquired lock-type.
Fixed MapleArrowFetcher giving out same values from min and max ranges. Max should always be greater than min. Updated DB drops.
Readjusted player ids now starting from 1 again, and moved field oids to start counting from 1bil.
This commit is contained in:
ronancpl
2017-11-18 11:24:24 -02:00
parent 2b38b62683
commit 71ad2ee3a9
49 changed files with 786 additions and 683 deletions

View File

@@ -23,7 +23,7 @@ package tools.locks;
* @author RonanLana
*/
public enum MonitoredEnums {
public enum MonitoredLockType {
UNDEFINED(-1),
CHR(0),
EFF(1),
@@ -33,8 +33,8 @@ public enum MonitoredEnums {
BOOK(5),
ITEM(6),
INVENTORY(7),
SHANDLER_IDLE(8),
SHANDLER_TEMP(9),
SRVHANDLER_IDLE(8),
SRVHANDLER_TEMP(9),
BUFF_STORAGE(10),
PLAYER_STORAGE(11),
SERVER(12),
@@ -71,7 +71,7 @@ public enum MonitoredEnums {
private final int i;
private MonitoredEnums(int val) {
private MonitoredLockType(int val) {
this.i = val;
}

View File

@@ -41,7 +41,7 @@ import tools.FilePrinter;
public class MonitoredReadLock extends ReentrantReadWriteLock.ReadLock {
private ScheduledFuture<?> timeoutSchedule = null;
private StackTraceElement[] deadlockedState = null;
private final MonitoredEnums id;
private final MonitoredLockType id;
private final int hashcode;
private final Lock state = new ReentrantLock(true);
private final AtomicInteger reentrantCount = new AtomicInteger(0);
@@ -54,8 +54,6 @@ public class MonitoredReadLock extends ReentrantReadWriteLock.ReadLock {
@Override
public void lock() {
super.lock();
if(ServerConstants.USE_THREAD_TRACKER) {
if(deadlockedState != null) {
DateFormat dateFormat = new SimpleDateFormat("dd-MM-yyyy HH:mm:ss");
@@ -68,6 +66,8 @@ public class MonitoredReadLock extends ReentrantReadWriteLock.ReadLock {
registerLocking();
}
super.lock();
}
@Override
@@ -75,6 +75,7 @@ public class MonitoredReadLock extends ReentrantReadWriteLock.ReadLock {
if(ServerConstants.USE_THREAD_TRACKER) {
unregisterLocking();
}
super.unlock();
}

View File

@@ -39,18 +39,18 @@ import tools.FilePrinter;
public class MonitoredReentrantLock extends ReentrantLock {
private ScheduledFuture<?> timeoutSchedule = null;
private StackTraceElement[] deadlockedState = null;
private final MonitoredEnums id;
private final MonitoredLockType id;
private final int hashcode;
private final Lock state = new ReentrantLock(true);
private final AtomicInteger reentrantCount = new AtomicInteger(0);
public MonitoredReentrantLock(MonitoredEnums id) {
public MonitoredReentrantLock(MonitoredLockType id) {
super();
this.id = id;
hashcode = this.hashCode();
}
public MonitoredReentrantLock(MonitoredEnums id, boolean fair) {
public MonitoredReentrantLock(MonitoredLockType id, boolean fair) {
super(fair);
this.id = id;
hashcode = this.hashCode();
@@ -58,7 +58,6 @@ public class MonitoredReentrantLock extends ReentrantLock {
@Override
public void lock() {
super.lock();
if(ServerConstants.USE_THREAD_TRACKER) {
if(deadlockedState != null) {
DateFormat dateFormat = new SimpleDateFormat("dd-MM-yyyy HH:mm:ss");
@@ -71,6 +70,8 @@ public class MonitoredReentrantLock extends ReentrantLock {
registerLocking();
}
super.lock();
}
@Override
@@ -78,6 +79,7 @@ public class MonitoredReentrantLock extends ReentrantLock {
if(ServerConstants.USE_THREAD_TRACKER) {
unregisterLocking();
}
super.unlock();
}

View File

@@ -25,14 +25,14 @@ import java.util.concurrent.locks.ReentrantReadWriteLock;
* @author RonanLana
*/
public class MonitoredReentrantReadWriteLock extends ReentrantReadWriteLock {
public final MonitoredEnums id;
public final MonitoredLockType id;
public MonitoredReentrantReadWriteLock(MonitoredEnums id) {
public MonitoredReentrantReadWriteLock(MonitoredLockType id) {
super();
this.id = id;
}
public MonitoredReentrantReadWriteLock(MonitoredEnums id, boolean fair) {
public MonitoredReentrantReadWriteLock(MonitoredLockType id, boolean fair) {
super(fair);
this.id = id;
}

View File

@@ -40,7 +40,7 @@ import tools.FilePrinter;
public class MonitoredWriteLock extends ReentrantReadWriteLock.WriteLock {
private ScheduledFuture<?> timeoutSchedule = null;
private StackTraceElement[] deadlockedState = null;
private final MonitoredEnums id;
private final MonitoredLockType id;
private final int hashcode;
private final Lock state = new ReentrantLock(true);
private final AtomicInteger reentrantCount = new AtomicInteger(0);
@@ -53,7 +53,6 @@ public class MonitoredWriteLock extends ReentrantReadWriteLock.WriteLock {
@Override
public void lock() {
super.lock();
if(ServerConstants.USE_THREAD_TRACKER) {
if(deadlockedState != null) {
DateFormat dateFormat = new SimpleDateFormat("dd-MM-yyyy HH:mm:ss");
@@ -66,6 +65,8 @@ public class MonitoredWriteLock extends ReentrantReadWriteLock.WriteLock {
registerLocking();
}
super.lock();
}
@Override
@@ -73,6 +74,7 @@ public class MonitoredWriteLock extends ReentrantReadWriteLock.WriteLock {
if(ServerConstants.USE_THREAD_TRACKER) {
unregisterLocking();
}
super.unlock();
}