Merge remote-tracking branch 'origin/magicbox1.5' into new-mob-behaviour

This commit is contained in:
2023-04-16 19:16:05 -05:00
6 changed files with 5 additions and 86 deletions
-29
View File
@@ -1,29 +0,0 @@
// • ▌ ▄ ·. ▄▄▄· ▄▄ • ▪ ▄▄· ▄▄▄▄· ▄▄▄· ▐▄▄▄ ▄▄▄ .
// ·██ ▐███▪▐█ ▀█ ▐█ ▀ ▪██ ▐█ ▌▪▐█ ▀█▪▐█ ▀█ •█▌ ▐█▐▌·
// ▐█ ▌▐▌▐█·▄█▀▀█ ▄█ ▀█▄▐█·██ ▄▄▐█▀▀█▄▄█▀▀█ ▐█▐ ▐▌▐▀▀▀
// ██ ██▌▐█▌▐█ ▪▐▌▐█▄▪▐█▐█▌▐███▌██▄▪▐█▐█ ▪▐▌██▐ █▌▐█▄▄▌
// ▀▀ █▪▀▀▀ ▀ ▀ ·▀▀▀▀ ▀▀▀·▀▀▀ ·▀▀▀▀ ▀ ▀ ▀▀ █▪ ▀▀▀
// Magicbane Emulator Project © 2013 - 2022
// www.magicbane.com
package engine.objects;
import java.sql.ResultSet;
import java.sql.SQLException;
public class EquipmentSetEntry {
public int itemID;
public float dropChance;
/**
* ResultSet Constructor
*/
public EquipmentSetEntry(ResultSet rs) throws SQLException {
this.itemID = (rs.getInt("itemID"));
this.dropChance = (rs.getFloat("dropChance"));
}
}
+4 -4
View File
@@ -146,20 +146,20 @@ public class MobBase extends AbstractGameObject {
public static HashMap<Integer, MobEquipment> loadEquipmentSet(int equipmentSetID){
ArrayList<EquipmentSetEntry> equipList;
ArrayList<BootySetEntry> equipList;
HashMap<Integer, MobEquipment> equip = new HashMap<>();
if (equipmentSetID == 0)
return equip;
equipList = NPCManager._equipmentSetMap.get(equipmentSetID);
equipList = NPCManager._bootySetMap.get(equipmentSetID);
if (equipList == null)
return equip;
for (EquipmentSetEntry equipmentSetEntry : equipList) {
for (BootySetEntry equipmentSetEntry : equipList) {
MobEquipment mobEquipment = new MobEquipment(equipmentSetEntry.itemID, equipmentSetEntry.dropChance);
MobEquipment mobEquipment = new MobEquipment(equipmentSetEntry.itemBase, equipmentSetEntry.dropChance);
ItemBase itemBase = mobEquipment.getItemBase();
if (itemBase != null) {
+1 -1
View File
@@ -1642,7 +1642,7 @@ public class NPC extends AbstractCharacter {
public static boolean UpdateEquipSetID(NPC npc, int equipSetID){
if (!NPCManager._equipmentSetMap.containsKey(equipSetID))
if (!NPCManager._bootySetMap.containsKey(equipSetID))
return false;
if (!DbManager.NPCQueries.UPDATE_EQUIPSET(npc, equipSetID))