From 0752e780f28d7a445f6ec74d1da21082c2bd2a32 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Sun, 3 Sep 2023 19:19:18 -0500 Subject: [PATCH] mobs load skills --- src/engine/objects/Mob.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/engine/objects/Mob.java b/src/engine/objects/Mob.java index a002ca8e..9f55bcbb 100644 --- a/src/engine/objects/Mob.java +++ b/src/engine/objects/Mob.java @@ -26,6 +26,7 @@ import engine.net.Dispatch; import engine.net.DispatchMessage; import engine.net.client.msg.PetMsg; import engine.net.client.msg.PlaceAssetMsg; +import engine.powers.RuneSkillAdjustEntry; import engine.server.MBServerStatics; import org.joda.time.DateTime; import org.pmw.tinylog.Logger; @@ -1704,7 +1705,13 @@ public class Mob extends AbstractIntelligenceAgent { } this.deathTime = 0; - + if(PowersManager._allRuneSkillAdjusts.containsKey(this.getMobBaseID())) + for(RuneSkillAdjustEntry entry : PowersManager._allRuneSkillAdjusts.get(this.getMobBaseID())) + if(entry.level <= this.level) + if(this.skills.containsKey(entry.name) == false) + this.skills.put(entry.name,new CharacterSkill(SkillsBase.getFromCache(entry.token),this,entry.rank)); + else + this.skills.put(entry.name,new CharacterSkill(SkillsBase.getFromCache(entry.token),this,entry.rank + this.skills.get(entry.name).getNumTrains())); } @Override