some ge changes
This commit is contained in:
+1
-1
@@ -26,7 +26,7 @@ dependencies {
|
||||
implementation 'com.google.guava:guava:29.0-jre'
|
||||
implementation 'mysql:mysql-connector-java:8.0.21'
|
||||
implementation 'io.github.classgraph:classgraph:4.8.98'
|
||||
implementation 'org.jetbrains.kotlin:kotlin-reflect'
|
||||
implementation 'org.jetbrains.kotlin:kotlin-reflect:1.5.20'
|
||||
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.2'
|
||||
implementation files("libs/ConstLib-1.2.jar")
|
||||
implementation files("libs/PrimitiveExtensions-1.0.jar")
|
||||
|
||||
@@ -32,6 +32,11 @@ object GrandExchange : CallBack {
|
||||
while(true) {
|
||||
SystemLogger.logGE("Updating offers...")
|
||||
OfferManager.update()
|
||||
if(OfferManager.dumpDatabase){
|
||||
SystemLogger.logGE("Saving GE...")
|
||||
OfferManager.save()
|
||||
OfferManager.dumpDatabase = false
|
||||
}
|
||||
Thread.sleep(60_000) //sleep for 60 seconds
|
||||
}
|
||||
}.start()
|
||||
|
||||
@@ -382,7 +382,6 @@ object OfferManager {
|
||||
if (!offer.isActive) {
|
||||
return
|
||||
}
|
||||
GE_OFFER_LOCK.lock()
|
||||
for (o in OFFERS_BY_ITEMID[offer.itemID]!!) {
|
||||
if (o.sell != offer.sell && o.isActive) {
|
||||
exchange(offer, o)
|
||||
@@ -392,7 +391,6 @@ object OfferManager {
|
||||
}
|
||||
}
|
||||
buyFromBots(offer)
|
||||
GE_OFFER_LOCK.unlock()
|
||||
}
|
||||
|
||||
private fun getBuylimitAmount(offer: GrandExchangeOffer): Int {
|
||||
|
||||
@@ -18,7 +18,6 @@ import rs09.game.system.SystemLogger
|
||||
import rs09.game.system.command.Command
|
||||
import java.util.*
|
||||
import java.util.function.Consumer
|
||||
import kotlin.reflect.jvm.internal.impl.load.kotlin.JvmType
|
||||
|
||||
/**
|
||||
* Represents a class used to handle the loading of all plugins.
|
||||
@@ -62,7 +61,7 @@ object PluginManager {
|
||||
var result = ClassGraph().enableClassInfo().enableAnnotationInfo().scan()
|
||||
result.getClassesWithAnnotation("core.plugin.Initializable").forEach(Consumer { p: ClassInfo ->
|
||||
try {
|
||||
definePlugin(p.loadClass().newInstance() as Plugin<JvmType.Object>)
|
||||
definePlugin(p.loadClass().newInstance() as Plugin<Object>)
|
||||
} catch (e: InstantiationException) {
|
||||
e.printStackTrace()
|
||||
} catch (e: IllegalAccessException) {
|
||||
|
||||
Reference in New Issue
Block a user