Event monster bug (#265)

* Fix the first tamming mob (monster not killed)

* add Java 8 Compability
This commit is contained in:
asafgb
2018-10-27 05:52:54 +03:00
committed by Ronan Lana
parent 8f8cd815aa
commit 589492572a

View File

@@ -616,7 +616,10 @@ public class EventInstanceManager {
sL.lock();
try {
inc = ((Double) em.getIv().invokeFunction("monsterValue", this, mob.getId())).intValue();
if(ServerConstants.JAVA_8)
inc = (int)em.getIv().invokeFunction("monsterValue", this, mob.getId());
else
inc = ((Double) em.getIv().invokeFunction("monsterValue", this, mob.getId())).intValue();
} finally {
sL.unlock();
}