Files
Server/src/engine/objects/NPCRune.java
T
MagicBotandClaude Opus 5.5 658d52cf41 Remove the dead static_rune_baseeffect path
RuneBaseEffect, its handler, every effectsGranted field and getter (including
the PromotionClass promoID*10+2500..2503 lookups) and the empty
PlayerBonuses.grantEffect had no reader (2.10a). The GameObjectType constant
stays so later ordinals are unchanged. No value changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 12:40:12 -04:00

97 lines
2.8 KiB
Java

// • ▌ ▄ ·. ▄▄▄· ▄▄ • ▪ ▄▄· ▄▄▄▄· ▄▄▄· ▐▄▄▄ ▄▄▄ .
// ·██ ▐███▪▐█ ▀█ ▐█ ▀ ▪██ ▐█ ▌▪▐█ ▀█▪▐█ ▀█ •█▌ ▐█▐▌·
// ▐█ ▌▐▌▐█·▄█▀▀█ ▄█ ▀█▄▐█·██ ▄▄▐█▀▀█▄▄█▀▀█ ▐█▐ ▐▌▐▀▀▀
// ██ ██▌▐█▌▐█ ▪▐▌▐█▄▪▐█▐█▌▐███▌██▄▪▐█▐█ ▪▐▌██▐ █▌▐█▄▄▌
// ▀▀ █▪▀▀▀ ▀ ▀ ·▀▀▀▀ ▀▀▀·▀▀▀ ·▀▀▀▀ ▀ ▀ ▀▀ █▪ ▀▀▀
// Magicbane Emulator Project © 2013 - 2026
// https://www.magicbane.com
package engine.objects;
import org.pmw.tinylog.Logger;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
public class NPCRune extends AbstractGameObject {
private final RuneBase runeBase;
private final int player;
private final ArrayList<SkillReq> skillsGranted;
/**
* No Table ID Constructor
*/
public NPCRune(RuneBase runeBase, int characterID) {
super();
this.runeBase = runeBase;
this.player = characterID;
if (this.runeBase != null)
this.skillsGranted = SkillReq.getSkillReqsForRune(this.runeBase.getObjectUUID());
else
this.skillsGranted = new ArrayList<>();
}
/**
* Normal Constructor
*/
public NPCRune(RuneBase runeBase, int characterID, int newUUID) {
super(newUUID);
this.runeBase = runeBase;
this.player = characterID;
if (this.runeBase == null)
this.skillsGranted = SkillReq.getSkillReqsForRune(this.runeBase.getObjectUUID());
else
this.skillsGranted = new ArrayList<>();
}
/**
* ResultSet Constructor
*/
public NPCRune(ResultSet rs) throws SQLException {
super(rs);
this.runeBase = RuneBase.getRuneBase(rs.getInt("RuneBaseID"));
this.player = rs.getInt("NpcID");
if (this.runeBase != null) {
this.skillsGranted = SkillReq.getSkillReqsForRune(this.runeBase.getObjectUUID());
} else {
Logger.error("Failed to find RuneBase for NPCRune " + this.getObjectUUID());
this.skillsGranted = new ArrayList<>();
}
}
/*
* Getters
*/
public RuneBase getRuneBase() {
return this.runeBase;
}
public int getRuneBaseID() {
if (this.runeBase != null)
return this.runeBase.getObjectUUID();
return 0;
}
public int getPlayerID() {
return this.player;
}
public ArrayList<SkillReq> getSkillsGranted() {
return this.skillsGranted;
}
/*
* Serializing
*/
@Override
public void updateDatabase() {
}
}