Exemplo n.º 1
0
 public static void checkSlayerKill(Player p, Npc npc)
 {
     if (p.getSlayerTask() == null)
     {
         return;
     }
     SlayerTask task = p.getSlayerTask();
     object[][] data = getMasterData(task.getMasterIndex());
     for (int i = 1; i < data[task.getMonsterIndex()].Length; i++)
     {
         if (npc.getId() == (int)data[task.getMonsterIndex()][i])
         {
             if (npc.getKiller().Equals(p))
             {
                 p.getSkills().addXp(Skills.SKILL.SLAYER, npc.getMaxHp());//(double) data[task.getMonsterIndex()][1]);
                 checkIfCompleteTask(p, task);
                 break;
             }
         }
     }
 }