Browse Source

Fidelity > Fidality

master
MagicBot 2 years ago
parent
commit
f4da8544d3
  1. 43
      src/engine/objects/Mob.java

43
src/engine/objects/Mob.java

@ -214,7 +214,6 @@ public class Mob extends AbstractIntelligenceAgent {
super(rs); super(rs);
try {
this.dbID = rs.getInt(1); this.dbID = rs.getInt(1);
this.state = STATE.Idle; this.state = STATE.Idle;
this.loadID = rs.getInt("mob_mobbaseID"); this.loadID = rs.getInt("mob_mobbaseID");
@ -256,16 +255,10 @@ public class Mob extends AbstractIntelligenceAgent {
int guildID = rs.getInt("mob_guildUID"); int guildID = rs.getInt("mob_guildUID");
if (this.fidalityID != 0) {
if (this.building != null) if (this.building != null)
this.guild = this.building.getGuild(); this.guild = this.building.getGuild();
else else
this.guild = Guild.getGuild(guildID); this.guild = Guild.getGuild(guildID);
} else if (this.building != null)
this.guild = this.building.getGuild();
else
this.guild = Guild.getGuild(guildID);
if (this.guild == null) if (this.guild == null)
this.guild = Guild.getErrantGuild(); this.guild = Guild.getErrantGuild();
@ -294,7 +287,6 @@ public class Mob extends AbstractIntelligenceAgent {
this.setParentZone(ZoneManager.getZoneByUUID(this.parentZoneID)); this.setParentZone(ZoneManager.getZoneByUUID(this.parentZoneID));
this.fidalityID = rs.getInt("fidalityID"); this.fidalityID = rs.getInt("fidalityID");
this.equipmentSetID = rs.getInt("equipmentSet"); this.equipmentSetID = rs.getInt("equipmentSet");
@ -304,34 +296,7 @@ public class Mob extends AbstractIntelligenceAgent {
this.lootSet = (rs.getInt("lootSet")); this.lootSet = (rs.getInt("lootSet"));
if (this.fidalityID != 0)
this.nameOverride = rs.getString("mob_name"); this.nameOverride = rs.getString("mob_name");
if (this.fidalityID != 0) {
Zone parentZone = ZoneManager.getZoneByUUID(this.parentZoneID);
if (parentZone != null) {
this.fidelityRunes = WorldServer.ZoneFidelityMobRunes.get(parentZone.getLoadNum()).get(this.fidalityID);
if (this.fidelityRunes != null)
for (Integer runeID : this.fidelityRunes) {
if (runeID == 252623) {
this.isGuard = true;
this.noAggro = true;
}
}
}
}
} catch (Exception e) {
Logger.error(currentID + "");
}
try {
initializeMob(false, false, this.isPlayerGuard);
} catch (Exception e) {
Logger.error(e);
}
} }
public static void __serializeForClientMsg(Mob mob, ByteBufferWriter writer) throws SerializationException { public static void __serializeForClientMsg(Mob mob, ByteBufferWriter writer) throws SerializationException {
@ -821,7 +786,7 @@ public class Mob extends AbstractIntelligenceAgent {
Vector3fImmutable returnLoc = Vector3fImmutable.ZERO; Vector3fImmutable returnLoc = Vector3fImmutable.ZERO;
if (mob.fidalityID != 0 && mob.building != null) { if (mob.building != null) {
Vector3fImmutable spawnRadiusLoc = Vector3fImmutable.getRandomPointInCircle(mob.localLoc, mob.spawnRadius); Vector3fImmutable spawnRadiusLoc = Vector3fImmutable.getRandomPointInCircle(mob.localLoc, mob.spawnRadius);
@ -909,7 +874,7 @@ public class Mob extends AbstractIntelligenceAgent {
this.level = 1; this.level = 1;
//add this npc to building //add this npc to building
if (this.building != null && this.loadID != 0 && this.fidalityID == 0) { if (this.building != null && this.loadID != 0) {
int maxSlots; int maxSlots;
maxSlots = building.getBlueprint().getSlotsForRank(this.building.getRank()); maxSlots = building.getBlueprint().getSlotsForRank(this.building.getRank());
@ -2775,10 +2740,6 @@ public class Mob extends AbstractIntelligenceAgent {
this.lootSync = lootSync; this.lootSync = lootSync;
} }
public int getFidalityID() {
return fidalityID;
}
public HashMap<Integer, MobEquipment> getEquip() { public HashMap<Integer, MobEquipment> getEquip() {
return equip; return equip;
} }

Loading…
Cancel
Save