Browse Source

MonsterTypes loaded into Mob.

master
MagicBot 2 years ago
parent
commit
30175be56a
  1. 8
      src/engine/gameManager/NPCManager.java
  2. 12
      src/engine/objects/Mob.java
  3. 2
      src/engine/objects/MobBase.java

8
src/engine/gameManager/NPCManager.java

@ -38,12 +38,12 @@ public enum NPCManager { @@ -38,12 +38,12 @@ public enum NPCManager {
// Early exit
if (mob.runeSetID == 0)
if (mob.runeSet == 0)
return;
//Apply all rune effects.
if (NPCManager._runeSetMap.get(mob.runeSetID).contains(252623)) {
if (NPCManager._runeSetMap.get(mob.runeSet).contains(252623)) {
mob.isPlayerGuard = true;
mob.setNoAggro(true);
}
@ -56,8 +56,8 @@ public enum NPCManager { @@ -56,8 +56,8 @@ public enum NPCManager {
// Apply effects from RuneSet
if (mob.runeSetID != 0)
for (int runeID : _runeSetMap.get(mob.runeSetID))
if (mob.runeSet != 0)
for (int runeID : _runeSetMap.get(mob.runeSet))
applyEffectsForRune(mob, runeID);
// Not sure why but apply Warrior effects for some reason?

12
src/engine/objects/Mob.java

@ -9,6 +9,7 @@ @@ -9,6 +9,7 @@
package engine.objects;
import ch.claude_martin.enumbitset.EnumBitSet;
import engine.Enum;
import engine.Enum.*;
import engine.InterestManagement.WorldGrid;
@ -31,7 +32,6 @@ import engine.net.client.msg.ErrorPopupMsg; @@ -31,7 +32,6 @@ import engine.net.client.msg.ErrorPopupMsg;
import engine.net.client.msg.ManageCityAssetsMsg;
import engine.net.client.msg.PetMsg;
import engine.net.client.msg.PlaceAssetMsg;
import engine.net.client.msg.chat.ChatSystemMsg;
import engine.server.MBServerStatics;
import org.joda.time.DateTime;
import org.pmw.tinylog.Logger;
@ -105,9 +105,12 @@ public class Mob extends AbstractIntelligenceAgent { @@ -105,9 +105,12 @@ public class Mob extends AbstractIntelligenceAgent {
private DateTime upgradeDateTime = null;
private boolean lootSync = false;
public int equipmentSetID = 0;
public int runeSetID = 0;
public int runeSet = 0;
public int bootySet = 0;
public EnumBitSet<MonsterType> notEnemy = EnumBitSet.just(MonsterType.NONE);
public EnumBitSet<Enum.MonsterType> enemy = EnumBitSet.just(MonsterType.NONE);;
/**
* No Id Constructor
*/
@ -285,9 +288,12 @@ public class Mob extends AbstractIntelligenceAgent { @@ -285,9 +288,12 @@ public class Mob extends AbstractIntelligenceAgent {
this.setParentZone(ZoneManager.getZoneByUUID(this.parentZoneID));
this.equipmentSetID = rs.getInt("equipmentSet");
this.runeSetID = rs.getInt("runeSet");
this.runeSet = rs.getInt("runeSet");
this.bootySet = rs.getInt("bootySet");
this.notEnemy = EnumBitSet.asEnumBitSet(rs.getLong("notEnemy"), Enum.MonsterType.class);
this.enemy = EnumBitSet.asEnumBitSet(rs.getLong("enemy"), Enum.MonsterType.class);
if (this.contract != null)
this.equipmentSetID = this.contract.getEquipmentSet();

2
src/engine/objects/MobBase.java

@ -112,8 +112,6 @@ public class MobBase extends AbstractGameObject { @@ -112,8 +112,6 @@ public class MobBase extends AbstractGameObject {
this.flags = EnumBitSet.asEnumBitSet(rs.getLong("flags"), Enum.MobFlagType.class);
this.noAggro = EnumBitSet.asEnumBitSet(rs.getLong("noaggro"), Enum.AggroType.class);
// From cache data
this.notEnemy = EnumBitSet.asEnumBitSet(rs.getLong("notEnemy"), Enum.MonsterType.class);
this.enemy = EnumBitSet.asEnumBitSet(rs.getLong("enemy"), Enum.MonsterType.class);

Loading…
Cancel
Save