Revert "Merge remote-tracking branch 'upstream/master'"

This reverts commit 369ece8ecc, reversing
changes made to ddffe98299.
This commit is contained in:
RisTanA
2020-06-07 02:15:55 -07:00
parent 369ece8ecc
commit 9058eae8db
70 changed files with 1124 additions and 1274 deletions
@@ -329,7 +329,11 @@ public class beast_lib extends script.base_script
{
return false;
}
return hasScript(beast, "ai.beast");
if (hasScript(beast, "ai.beast"))
{
return true;
}
return false;
}
public static boolean isBeastMaster(obj_id player) throws InterruptedException
{
@@ -362,7 +366,11 @@ public class beast_lib extends script.base_script
{
return false;
}
return hasObjVar(bcd, OBJVAR_BEAST_TYPE);
if (!hasObjVar(bcd, OBJVAR_BEAST_TYPE))
{
return false;
}
return true;
}
public static boolean isValidPlayer(obj_id player) throws InterruptedException
{
@@ -528,7 +536,11 @@ public class beast_lib extends script.base_script
}
public static boolean hasBCDBeastName(obj_id bcd) throws InterruptedException
{
return hasObjVar(bcd, "beast.beastName");
if (hasObjVar(bcd, "beast.beastName"))
{
return true;
}
return false;
}
public static String getBCDBeastName(obj_id bcd) throws InterruptedException
{
@@ -620,7 +632,7 @@ public class beast_lib extends script.base_script
return "";
}
String template = getTemplateName(beast);
String[] templateSplit = template.split("/");
String[] templateSplit = split(template, '/');
template = templateSplit[templateSplit.length - 1];
int row = dataTableSearchColumnForString(template, "template", BEASTS_TABLE);
dictionary dict = dataTableGetRow(BEASTS_TABLE, row);
@@ -978,7 +990,11 @@ public class beast_lib extends script.base_script
{
return false;
}
return hasObjVar(bcd, OBJVAR_BEAST_HAPPINESS);
if (hasObjVar(bcd, OBJVAR_BEAST_HAPPINESS))
{
return true;
}
return false;
}
public static int getBeastHappiness(obj_id beast) throws InterruptedException
{
@@ -1023,7 +1039,11 @@ public class beast_lib extends script.base_script
{
return false;
}
return hasObjVar(bcd, PET_LOYALTY_OBJVAR);
if (hasObjVar(bcd, PET_LOYALTY_OBJVAR))
{
return true;
}
return false;
}
public static float getBeastLoyalty(obj_id beast) throws InterruptedException
{
@@ -1186,7 +1206,11 @@ public class beast_lib extends script.base_script
{
return false;
}
return hasObjVar(bcd, PET_LOYALTY_LEVEL_OBJVAR);
if (hasObjVar(bcd, PET_LOYALTY_LEVEL_OBJVAR))
{
return true;
}
return false;
}
public static int getBeastLoyaltyLevel(obj_id beast) throws InterruptedException
{
@@ -1284,7 +1308,11 @@ public class beast_lib extends script.base_script
{
return false;
}
return hasObjVar(bcd, OBJVAR_BEAST_FOOD);
if (hasObjVar(bcd, OBJVAR_BEAST_FOOD))
{
return true;
}
return false;
}
public static int[] getBeastFood(obj_id beast) throws InterruptedException
{
@@ -1984,7 +2012,11 @@ public class beast_lib extends script.base_script
return false;
}
int experience = (int)beastStatsDict.getInt("XP");
return experience > 0 && getBeastExperience(beast) >= experience;
if (experience > 0 && getBeastExperience(beast) >= experience)
{
return true;
}
return false;
}
public static void grantBeastExperience(obj_id beast) throws InterruptedException
{
@@ -2112,6 +2144,7 @@ public class beast_lib extends script.base_script
messageTo(beast, "checkMovementSpeed", params, 1, false);
return;
}
return;
}
public static void doConfusedEmote(obj_id beast) throws InterruptedException
{
@@ -2248,6 +2281,7 @@ public class beast_lib extends script.base_script
{
doAnimationAction(beast, "trick_" + trickNumber);
}
return;
}
public static void setupHappinessLoyalty(obj_id beastBCD) throws InterruptedException
{
@@ -3181,7 +3215,11 @@ public class beast_lib extends script.base_script
{
return false;
}
return isValidBeastSkillForCreature(getBeastOnPlayer(player), actionName);
if (!isValidBeastSkillForCreature(getBeastOnPlayer(player), actionName))
{
return false;
}
return true;
}
public static void doBmProvokeCommand(obj_id self, obj_id target, int provokeLevel) throws InterruptedException
{
@@ -3235,6 +3273,7 @@ public class beast_lib extends script.base_script
return;
}
initializeBeastStats(BCD, beast);
return;
}
public static void removeAttentionPenaltyDebuff(obj_id player) throws InterruptedException
{
@@ -3381,6 +3420,7 @@ public class beast_lib extends script.base_script
if (currentHappiness >= 0)
{
buff.applyBuff(beast, "bm_happiness_content");
return;
}
}
public static string_id convertLoyaltyString(obj_id beastBCD) throws InterruptedException
@@ -3596,7 +3636,14 @@ public class beast_lib extends script.base_script
}
public static boolean isChargeAttack(String actionName) throws InterruptedException
{
return actionName.startsWith("bm_charge") || actionName.startsWith("bm_trample");
if (actionName.startsWith("bm_charge") || actionName.startsWith("bm_trample"))
{
return true;
}
else
{
return false;
}
}
public static boolean setBCDBeastHueFromEgg(obj_id bcd, obj_id egg) throws InterruptedException
{
@@ -3893,19 +3940,19 @@ public class beast_lib extends script.base_script
dictionary creatureDict = dataTableGetRow("datatables/mob/creatures.iff", creatureName);
if (ck_skill > -1)
{
if (!creatureDict.getString("hideType").equalsIgnoreCase("none"))
if (creatureDict.getString("hideType") != "none")
{
names[idx] = "creature_resource_hide";
attribs[idx] = utils.packStringId(new string_id("obj_attr_n", creatureDict.getString("hideType")));
idx++;
}
if (!creatureDict.getString("meatType").equalsIgnoreCase("none"))
if (creatureDict.getString("meatType") != "none")
{
names[idx] = "creature_resource_meat";
attribs[idx] = utils.packStringId(new string_id("obj_attr_n", creatureDict.getString("meatType")));
idx++;
}
if (!creatureDict.getString("boneType").equalsIgnoreCase("none"))
if (creatureDict.getString("boneType") != "none")
{
names[idx] = "creature_resource_bone";
attribs[idx] = utils.packStringId(new string_id("obj_attr_n", creatureDict.getString("boneType")));
@@ -3915,10 +3962,10 @@ public class beast_lib extends script.base_script
if (ck_skill > 0)
{
names[idx] = "aggro";
attribs[idx] = Float.toString(creatureDict.getFloat("aggressive"));
attribs[idx] = "" + creatureDict.getFloat("aggressive");
idx++;
names[idx] = "assist_range";
attribs[idx] = Float.toString(creatureDict.getFloat("assist"));
attribs[idx] = "" + creatureDict.getFloat("assist");
idx++;
names[idx] = "deathblow";
boolean deathBlow = (creatureDict.getInt("death_blow") > 0);
@@ -3946,22 +3993,22 @@ public class beast_lib extends script.base_script
int minDamage = Math.round((dps * attackSpeed) * 0.5f);
int maxDamage = Math.round((dps * attackSpeed) * 1.5f);
names[idx] = "damage_min";
attribs[idx] = Integer.toString(minDamage);
attribs[idx] = "" + minDamage;
idx++;
names[idx] = "damage_max";
attribs[idx] = Integer.toString(maxDamage);
attribs[idx] = "" + maxDamage;
idx++;
names[idx] = "attackspeed";
attribs[idx] = Float.toString(attackSpeed);
attribs[idx] = "" + attackSpeed;
idx++;
names[idx] = "damage_dps";
attribs[idx] = Float.toString(dps);
attribs[idx] = "" + dps;
idx++;
}
if (ck_skill > 5)
{
names[idx] = "armor_rating";
attribs[idx] = Integer.toString(statDict.getInt(prefix + "Armor"));
attribs[idx] = "" + statDict.getInt(prefix + "Armor");
idx++;
}
if (ck_skill > 7)
@@ -4629,7 +4676,14 @@ public class beast_lib extends script.base_script
exp = 1;
}
}
return exp > 1;
if (exp > 1)
{
return true;
}
else
{
return false;
}
}
public static int useBeastInjector(obj_id player, obj_id injector, obj_id beast, String beastFamily, String[] injectorFamilies, int mark) throws InterruptedException
{