Remove the static_npc_mobbase_effects loader
Mob effects come from the race rune (2.10b builder) and necro pets get NECROPETSTATS in code, so GET_RUNEBASE_EFFECTS, the MobBaseEffects ResultSet constructor, its unused mobBaseID and the equals/hashCode used for the merge are gone. The table is now unread; drop it with sql/3.4-mobbase-effects-drop.sql. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
fb7e641d9c
commit
ad3e616cb7
3 files changed
+1
-74
No files matched your search
@@ -122,12 +122,7 @@ public class MobBase extends AbstractGameObject {
|
||||
this.mask += MBServerStatics.MASK_RAT;
|
||||
|
||||
this.mobBaseStats = (rune != null) ? new MobBaseStats(rune) : MobBaseStats.GetGenericStats();
|
||||
this.effectsList = new ArrayList<>(MobBaseEffects.getEffectsForRune(this.loadID));
|
||||
|
||||
// Server-made NECROPETSTATS on necro pets 12021/12022; NEC-018 and DRU-066 require it on the target
|
||||
for (MobBaseEffects serverEffect : DbManager.MobBaseQueries.GET_RUNEBASE_EFFECTS(this.loadID))
|
||||
if (!this.effectsList.contains(serverEffect))
|
||||
this.effectsList.add(serverEffect);
|
||||
this.effectsList = MobBaseEffects.getEffectsForRune(this.loadID);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -15,11 +15,8 @@ import engine.parsers.objects.wpak.PowerActionTemplate;
|
||||
import engine.server.MBServerStatics;
|
||||
import engine.util.Hasher;
|
||||
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
import java.util.Objects;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
|
||||
@@ -27,21 +24,10 @@ public class MobBaseEffects {
|
||||
|
||||
private static final ConcurrentHashMap<Integer, ArrayList<MobBaseEffects>> effectsByRune = new ConcurrentHashMap<>(MBServerStatics.CHM_INIT_CAP, MBServerStatics.CHM_LOAD, MBServerStatics.CHM_THREAD_LOW);
|
||||
|
||||
private int mobBaseID;
|
||||
private int token;
|
||||
private int rank;
|
||||
private int reqLvl;
|
||||
|
||||
|
||||
/**
|
||||
* ResultSet Constructor
|
||||
*/
|
||||
public MobBaseEffects(ResultSet rs) throws SQLException {
|
||||
this.token = rs.getInt("token");
|
||||
this.rank = rs.getInt("rank");
|
||||
this.reqLvl = rs.getInt("reqLvl");
|
||||
}
|
||||
|
||||
public MobBaseEffects(int token, int rank, int reqLvl) {
|
||||
this.token = token;
|
||||
this.rank = rank;
|
||||
@@ -89,19 +75,6 @@ public class MobBaseEffects {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return the mobBaseID
|
||||
*/
|
||||
public int getMobBaseID() {
|
||||
return mobBaseID;
|
||||
}
|
||||
|
||||
|
||||
public void setMobBaseID(int mobBaseID) {
|
||||
this.mobBaseID = mobBaseID;
|
||||
}
|
||||
|
||||
|
||||
public int getToken() {
|
||||
return token;
|
||||
}
|
||||
@@ -116,23 +89,5 @@ public class MobBaseEffects {
|
||||
return reqLvl;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object other) {
|
||||
|
||||
if (this == other)
|
||||
return true;
|
||||
|
||||
if (!(other instanceof MobBaseEffects))
|
||||
return false;
|
||||
|
||||
MobBaseEffects effect = (MobBaseEffects) other;
|
||||
return this.token == effect.token && this.rank == effect.rank && this.reqLvl == effect.reqLvl;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(this.token, this.rank, this.reqLvl);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user