Compare commits
13 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b2bd3b7a92 | |||
| 461e4e1c3d | |||
| 0d1d00e2d1 | |||
| ec6825d651 | |||
| cb561c3b6b | |||
| cf0f0cf022 | |||
| f85673e661 | |||
| 84347f8290 | |||
| fd2fe92714 | |||
| 955b94eb08 | |||
| a9aa6e9660 | |||
| afc080074f | |||
| 1039fb1d0b |
@@ -58,6 +58,9 @@ public abstract class dbHandlerBase {
|
|||||||
|
|
||||||
int id = rs.getInt(1);
|
int id = rs.getInt(1);
|
||||||
|
|
||||||
|
if (id == 39052)
|
||||||
|
Logger.info(id);
|
||||||
|
|
||||||
if (DbManager.inCache(localObjectType, id)) {
|
if (DbManager.inCache(localObjectType, id)) {
|
||||||
objectList.add((T) DbManager.getFromCache(localObjectType, id));
|
objectList.add((T) DbManager.getFromCache(localObjectType, id));
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -462,11 +462,12 @@ public enum CombatManager {
|
|||||||
|
|
||||||
if (damage > 0) {
|
if (damage > 0) {
|
||||||
|
|
||||||
if (AbstractCharacter.IsAbstractCharacter(target))
|
if (AbstractCharacter.IsAbstractCharacter(target)) {
|
||||||
((AbstractCharacter) target).modifyHealth(-damage, attacker, true);
|
((AbstractCharacter) target).modifyHealth(-damage, attacker, true);
|
||||||
else
|
((AbstractCharacter) target).cancelOnTakeDamage();
|
||||||
|
}else {
|
||||||
((Building) target).modifyHealth(-damage, attacker);
|
((Building) target).modifyHealth(-damage, attacker);
|
||||||
|
}
|
||||||
int attackAnim = getSwingAnimation(null, null, slot);
|
int attackAnim = getSwingAnimation(null, null, slot);
|
||||||
if (attacker.charItemManager.getEquipped().get(slot) != null) {
|
if (attacker.charItemManager.getEquipped().get(slot) != null) {
|
||||||
if (attacker.getObjectType().equals(mbEnums.GameObjectType.PlayerCharacter)) {
|
if (attacker.getObjectType().equals(mbEnums.GameObjectType.PlayerCharacter)) {
|
||||||
|
|||||||
@@ -164,6 +164,15 @@ public enum ConfigManager {
|
|||||||
Logger.info("Compiling regex");
|
Logger.info("Compiling regex");
|
||||||
|
|
||||||
regex.put(MB_LOGIN_FNAME_REGEX, Pattern.compile(MB_LOGIN_FNAME_REGEX.getValue()));
|
regex.put(MB_LOGIN_FNAME_REGEX, Pattern.compile(MB_LOGIN_FNAME_REGEX.getValue()));
|
||||||
|
|
||||||
|
Logger.info("Loading WPAK data");
|
||||||
|
|
||||||
|
// *** Needs powermanager collection
|
||||||
|
// defined before activation.
|
||||||
|
// EffectsParser.parseWpakFile();
|
||||||
|
// PowersParser.parseWpakFile();
|
||||||
|
// PowerActionParser.parseWpakFile();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -49,8 +49,15 @@ public enum ForgeManager implements Runnable {
|
|||||||
public static final ConcurrentHashMap<NPC, ConcurrentHashMap.KeySetView<WorkOrder, Boolean>> vendorWorkOrderLookup = new ConcurrentHashMap<>();
|
public static final ConcurrentHashMap<NPC, ConcurrentHashMap.KeySetView<WorkOrder, Boolean>> vendorWorkOrderLookup = new ConcurrentHashMap<>();
|
||||||
public static final ConcurrentHashMap<Item, WorkOrder> itemWorkOrderLookup = new ConcurrentHashMap<>();
|
public static final ConcurrentHashMap<Item, WorkOrder> itemWorkOrderLookup = new ConcurrentHashMap<>();
|
||||||
|
|
||||||
@Override
|
public static void start() {
|
||||||
|
|
||||||
|
Thread forgeManager;
|
||||||
|
forgeManager = new Thread(FORGE_MANAGER);
|
||||||
|
forgeManager.setName("Forge Manager");
|
||||||
|
forgeManager.start();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
|
|
||||||
WorkOrder workOrder;
|
WorkOrder workOrder;
|
||||||
@@ -112,14 +119,6 @@ public enum ForgeManager implements Runnable {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void start() {
|
|
||||||
|
|
||||||
Thread forgeManager;
|
|
||||||
forgeManager = new Thread(FORGE_MANAGER);
|
|
||||||
forgeManager.setName("Forge Manager");
|
|
||||||
forgeManager.start();
|
|
||||||
}
|
|
||||||
|
|
||||||
public static int submit(WorkOrder workOrder) {
|
public static int submit(WorkOrder workOrder) {
|
||||||
|
|
||||||
// Must have a city to roll anything
|
// Must have a city to roll anything
|
||||||
|
|||||||
+95
-2
@@ -841,16 +841,28 @@ public class mbEnums {
|
|||||||
DRAIN;
|
DRAIN;
|
||||||
|
|
||||||
public static DamageType getDamageType(String modName) {
|
public static DamageType getDamageType(String modName) {
|
||||||
|
|
||||||
|
if (modName.isEmpty())
|
||||||
|
return DamageType.NONE;
|
||||||
|
|
||||||
if(modName.toLowerCase().equals("blind"))
|
if(modName.toLowerCase().equals("blind"))
|
||||||
modName = "BLINDNESS";
|
modName = "BLINDNESS";
|
||||||
|
|
||||||
if(modName.toLowerCase().equals("powerblock"))
|
if(modName.toLowerCase().equals("powerblock"))
|
||||||
modName = "POWERINHIBITOR";
|
modName = "POWERINHIBITOR";
|
||||||
|
|
||||||
DamageType damageType;
|
//validity check for not looking up damage type that doesn't exist
|
||||||
if (modName.isEmpty())
|
boolean valid = false;
|
||||||
|
for(DamageType type : DamageType.values()){
|
||||||
|
if(type.name().equals(modName))
|
||||||
|
valid = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!valid)
|
||||||
return DamageType.NONE;
|
return DamageType.NONE;
|
||||||
|
|
||||||
|
DamageType damageType;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
damageType = DamageType.valueOf(modName.replace(",", "").toUpperCase());
|
damageType = DamageType.valueOf(modName.replace(",", "").toUpperCase());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
@@ -3022,5 +3034,86 @@ public class mbEnums {
|
|||||||
PREFIX,
|
PREFIX,
|
||||||
SUFFIX;
|
SUFFIX;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public enum PowerType {
|
||||||
|
None,
|
||||||
|
SPELL,
|
||||||
|
SKILL
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum CostType {
|
||||||
|
NONE,
|
||||||
|
HEALTH,
|
||||||
|
MANA,
|
||||||
|
STAMINA
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum AreaType {
|
||||||
|
NONE,
|
||||||
|
SPHERE,
|
||||||
|
POINTBLANK,
|
||||||
|
LINE,
|
||||||
|
CONE,
|
||||||
|
WALL
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum ExcludeType {
|
||||||
|
NONE,
|
||||||
|
CASTER,
|
||||||
|
GROUP,
|
||||||
|
GUILD,
|
||||||
|
NATION,
|
||||||
|
PLAYERS,
|
||||||
|
ALLBUTGROUP,
|
||||||
|
ALLBUTPETS
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum CastingModeType {
|
||||||
|
NONE,
|
||||||
|
COMBAT,
|
||||||
|
NONCOMBAT,
|
||||||
|
BOTH
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum TargetSelectType {
|
||||||
|
NONE,
|
||||||
|
CLICK,
|
||||||
|
GROUP,
|
||||||
|
GUILD,
|
||||||
|
NEARBYMOBS,
|
||||||
|
NAME
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum CategoryToPowerType {
|
||||||
|
None,
|
||||||
|
GreaterThanOrEqualTo,
|
||||||
|
GreaterThan,
|
||||||
|
Always
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum ModificationType {
|
||||||
|
ADD,
|
||||||
|
MULTIPLY
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum ServerConfig {
|
||||||
|
MBDB_108("AERYNTH", "ARAC", "MOURNING", 300000),
|
||||||
|
MBDB_192("DALGOTH", "ARAC", "GOOK", 300001),
|
||||||
|
MBDB_162("VORGINA", "LORE", "SAEDRON", 300002),
|
||||||
|
MBDB_164("VORGINA", "ARAC", "THURIN", 300002);
|
||||||
|
|
||||||
|
public final String mapType;
|
||||||
|
public final String ruleType;
|
||||||
|
public final String serverName;
|
||||||
|
public final int realmMap;
|
||||||
|
|
||||||
|
ServerConfig(String mapType, String ruleType, String serverName, int realmMap) {
|
||||||
|
|
||||||
|
this.mapType = mapType;
|
||||||
|
this.ruleType = ruleType;
|
||||||
|
this.serverName = serverName;
|
||||||
|
this.realmMap = realmMap;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -959,7 +959,7 @@ public class Building extends AbstractWorldObject {
|
|||||||
// Altitude of this building is derived from the heightmap engine.
|
// Altitude of this building is derived from the heightmap engine.
|
||||||
|
|
||||||
Vector3fImmutable tempLoc = new Vector3fImmutable(this.statLat + this.parentZone.absX, 0, this.statLon + this.parentZone.absZ);
|
Vector3fImmutable tempLoc = new Vector3fImmutable(this.statLat + this.parentZone.absX, 0, this.statLon + this.parentZone.absZ);
|
||||||
tempLoc = new Vector3fImmutable(tempLoc.x, Terrain.getWorldHeight(tempLoc), tempLoc.z);
|
tempLoc = new Vector3fImmutable(tempLoc.x, Terrain.getWorldHeight(tempLoc) + this.statAlt, tempLoc.z);
|
||||||
this.setLoc(tempLoc);
|
this.setLoc(tempLoc);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -512,29 +512,6 @@ public class NPC extends AbstractCharacter {
|
|||||||
return MinionType.ContractToMinionMap.containsKey(contractID);
|
return MinionType.ContractToMinionMap.containsKey(contractID);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean UpdateEquipSetID(NPC npc, int equipSetID) {
|
|
||||||
|
|
||||||
if (!LootManager._bootySetMap.containsKey(equipSetID))
|
|
||||||
return false;
|
|
||||||
|
|
||||||
if (!DbManager.NPCQueries.UPDATE_EQUIPSET(npc, equipSetID))
|
|
||||||
return false;
|
|
||||||
|
|
||||||
npc.equipmentSetID = equipSetID;
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static boolean UpdateRaceID(NPC npc, int raceID) {
|
|
||||||
|
|
||||||
if (!DbManager.NPCQueries.UPDATE_MOBBASE(npc, raceID))
|
|
||||||
return false;
|
|
||||||
|
|
||||||
npc.loadID = raceID;
|
|
||||||
npc.mobBase = MobBase.getMobBase(npc.loadID);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static NPCProfits GetNPCProfits(NPC npc) {
|
public static NPCProfits GetNPCProfits(NPC npc) {
|
||||||
return NPCProfits.ProfitCache.get(npc.currentID);
|
return NPCProfits.ProfitCache.get(npc.currentID);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ import engine.mbEnums;
|
|||||||
import engine.wpak.data.ConditionEntry;
|
import engine.wpak.data.ConditionEntry;
|
||||||
import engine.wpak.data.Effect;
|
import engine.wpak.data.Effect;
|
||||||
import engine.wpak.data.ModifierEntry;
|
import engine.wpak.data.ModifierEntry;
|
||||||
import engine.wpakpowers.WpakPowerManager;
|
|
||||||
import org.pmw.tinylog.Logger;
|
import org.pmw.tinylog.Logger;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
@@ -56,7 +55,7 @@ public class EffectsParser {
|
|||||||
while (matcher.find()) {
|
while (matcher.find()) {
|
||||||
try {
|
try {
|
||||||
Effect effect = parseEffectEntry(matcher.group());
|
Effect effect = parseEffectEntry(matcher.group());
|
||||||
WpakPowerManager._effectsLookup.put(effect.effect_id, effect);
|
// WpakPowerManager._effectsLookup.put(effect.effect_id, effect);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Logger.error("EFFECT PARSE FAILED: " + e);
|
Logger.error("EFFECT PARSE FAILED: " + e);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,12 +10,10 @@ package engine.wpak;
|
|||||||
|
|
||||||
import engine.gameManager.ConfigManager;
|
import engine.gameManager.ConfigManager;
|
||||||
import engine.mbEnums;
|
import engine.mbEnums;
|
||||||
import engine.util.Hasher;
|
|
||||||
import engine.wpak.data.Effect;
|
import engine.wpak.data.Effect;
|
||||||
import engine.wpak.data.PowerAction;
|
import engine.wpak.data.PowerAction;
|
||||||
import engine.wpak.data.StatTransfer;
|
import engine.wpak.data.StatTransfer;
|
||||||
import engine.wpak.data.TrackEntry;
|
import engine.wpak.data.TrackEntry;
|
||||||
import engine.wpakpowers.WpakPowerManager;
|
|
||||||
import org.pmw.tinylog.Logger;
|
import org.pmw.tinylog.Logger;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
@@ -54,7 +52,7 @@ public class PowerActionParser {
|
|||||||
while (matcher.find()) {
|
while (matcher.find()) {
|
||||||
|
|
||||||
PowerAction powerAction = parsePowerActionEntry(matcher.group().trim());
|
PowerAction powerAction = parsePowerActionEntry(matcher.group().trim());
|
||||||
WpakPowerManager._powerActionLookup.put(Hasher.SBStringHash(powerAction.action_id), powerAction);
|
// WpakPowerManager._powerActionLookup.put(Hasher.SBStringHash(powerAction.action_id), powerAction);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -10,9 +10,7 @@ package engine.wpak;
|
|||||||
|
|
||||||
import engine.gameManager.ConfigManager;
|
import engine.gameManager.ConfigManager;
|
||||||
import engine.mbEnums;
|
import engine.mbEnums;
|
||||||
import engine.util.Hasher;
|
|
||||||
import engine.wpak.data.*;
|
import engine.wpak.data.*;
|
||||||
import engine.wpakpowers.WpakPowerManager;
|
|
||||||
import org.pmw.tinylog.Logger;
|
import org.pmw.tinylog.Logger;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
@@ -52,7 +50,7 @@ public class PowersParser {
|
|||||||
while (matcher.find()) {
|
while (matcher.find()) {
|
||||||
|
|
||||||
Power power = parsePowerEntry(matcher.group().trim());
|
Power power = parsePowerEntry(matcher.group().trim());
|
||||||
WpakPowerManager._powersLookup.put(Hasher.SBStringHash(power.power_id), power);
|
// @TODO WpakPowerManager._powersLookup.put(Hasher.SBStringHash(power.power_id), power);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user