Script references patch

Cleared issue in a few scripts which would be trying to access Java Math library methods with unexpected parameter types.
Fixed EllinPQ rewarder NPC handing out an unexpected itemid to the player.
Cleared SQL foreign key constraint statement no longer supposed to be used.
This commit is contained in:
ronancpl
2019-10-30 23:31:15 -03:00
parent 7d8d4691da
commit d9f87f18a1
31 changed files with 39 additions and 34 deletions

View File

@@ -217,7 +217,7 @@ function action(mode, type, selection) {
complete = false;
}
if(java.lang.Math.random() >= 0.9) //A lucky find! Scroll 60%
if(Math.random() >= 0.9) //A lucky find! Scroll 60%
item += 1;
if (!complete || !cm.canHold(item, 1))
@@ -251,7 +251,7 @@ function action(mode, type, selection) {
var reward;
if (rewdSet[selectedItem] instanceof Array) {
var length = rewdSet[selectedItem][1] - rewdSet[selectedItem][0];
reward = rewdSet[selectedItem][0] + java.lang.Math.round(java.lang.Math.random() * length);
reward = rewdSet[selectedItem][0] + Math.round(Math.random() * length);
}
else reward = rewdSet[selectedItem];