|
@@ -16,6 +16,7 @@ import java.util.HashMap;
|
|
|
|
|
|
public class RankUtils {
|
|
|
private static HashMap<String, HashMap<Integer, Integer>> subSkillRanks;
|
|
|
+ private static int count = 0;
|
|
|
|
|
|
/**
|
|
|
*
|
|
@@ -26,8 +27,6 @@ public class RankUtils {
|
|
|
*/
|
|
|
public static void executeSkillUnlockNotifications(Plugin plugin, McMMOPlayer mcMMOPlayer, PrimarySkillType primarySkillType, int newLevel)
|
|
|
{
|
|
|
- int count = 0;
|
|
|
-
|
|
|
for(SubSkillType subSkillType : primarySkillType.getSkillAbilities())
|
|
|
{
|
|
|
int playerRankInSkill = getRank(mcMMOPlayer.getPlayer(), subSkillType);
|
|
@@ -36,20 +35,25 @@ public class RankUtils {
|
|
|
|
|
|
//If the skill doesn't have registered ranks gtfo
|
|
|
if(innerMap == null || innerMap.get(playerRankInSkill) == null)
|
|
|
- return;
|
|
|
+ continue;
|
|
|
|
|
|
//The players level is the exact level requirement for this skill
|
|
|
if(newLevel == innerMap.get(playerRankInSkill))
|
|
|
{
|
|
|
SkillUnlockNotificationTask skillUnlockNotificationTask = new SkillUnlockNotificationTask(mcMMOPlayer, subSkillType, newLevel);
|
|
|
|
|
|
- skillUnlockNotificationTask.runTaskLater(plugin, ((count * 4) + 1) * 20);
|
|
|
+ skillUnlockNotificationTask.runTaskLater(plugin, (count * 100));
|
|
|
|
|
|
count++;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ public static void resetUnlockDelayTimer()
|
|
|
+ {
|
|
|
+ count = 0;
|
|
|
+ }
|
|
|
+
|
|
|
/* NEW SYSTEM */
|
|
|
private static void addRanks(AbstractSubSkill abstractSubSkill)
|
|
|
{
|