@ -10,6 +10,7 @@ import engine.net.DispatchMessage;
@@ -10,6 +10,7 @@ import engine.net.DispatchMessage;
import engine.net.client.msg.PetMsg ;
import engine.objects.* ;
import engine.powers.EffectsBase ;
import engine.powers.RuneSkillAdjustEntry ;
import org.pmw.tinylog.Logger ;
import java.util.ArrayList ;
@ -405,4 +406,21 @@ public enum NPCManager {
@@ -405,4 +406,21 @@ public enum NPCManager {
if ( baseSkill ! = null )
mob . getSkills ( ) . put ( baseSkill . getName ( ) , new CharacterSkill ( baseSkill , mob , mob . mobBase . getMobBaseStats ( ) . getBaseSkillAmount ( ) ) ) ;
}
public static void applyRuneSkills ( AbstractCharacter character , int runeID ) {
//load mob skill adjustments from mobbase rune
if ( PowersManager . _allRuneSkillAdjusts . containsKey ( runeID ) )
for ( RuneSkillAdjustEntry entry : PowersManager . _allRuneSkillAdjusts . get ( runeID ) ) {
if ( SkillsBase . getFromCache ( entry . skill_type ) = = null )
SkillsBase . putInCache ( DbManager . SkillsBaseQueries . GET_BASE_BY_NAME ( entry . skill_type ) ) ;
SkillsBase skillBase = SkillsBase . getFromCache ( entry . skill_type ) ;
if ( skillBase = = null )
continue ;
if ( entry . level < = character . level )
if ( character . skills . containsKey ( entry . name ) = = false )
character . skills . put ( entry . skill_type , new CharacterSkill ( skillBase , character , entry . rank ) ) ;
else
character . skills . put ( entry . skill_type , new CharacterSkill ( skillBase , character , entry . rank + character . skills . get ( entry . skill_type ) . getNumTrains ( ) ) ) ;
}
}
}