本文整理汇总了C#中Player.getSkills方法的典型用法代码示例。如果您正苦于以下问题:C# Player.getSkills方法的具体用法?C# Player.getSkills怎么用?C# Player.getSkills使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Player
的用法示例。
在下文中一共展示了Player.getSkills方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: canUsePrayer
public static bool canUsePrayer(Player p, int id)
{
if (id < 5 || id > 57) {
return false;
}
if (p.getSkills().getCurLevel(Skills.SKILL.PRAYER) <= 0)
{
return false;
}
int j = 0;
for (int i = 5 ; i <= 57; i += 2) {
if (id == i) {
if (i == 53) {
p.getPackets().softCloseInterfaces();
p.getPackets().modifyText("This prayer is currently unavailable.", 210, 1);
p.getPackets().sendChatboxInterface(210);
p.getPackets().sendConfig(PRAYER_CONFIG[(int)Prayer.PROTECT_FROM_SUMMONING], 0);
continue;
}
if (p.getSkills().getGreaterLevel(Skills.SKILL.PRAYER) < PRAYER_LVL[j])
{
p.getPackets().softCloseInterfaces();
p.getPackets().modifyText("You need level " + PRAYER_LVL[j] + " Prayer to use " + PRAYER_NAME[j] + ".", 210, 1);
p.getPackets().sendChatboxInterface(210);
return false;
}
}
j++;
}
return true;
}
示例2: completePotion
public static void completePotion(Player p, int amount, bool newMix)
{
if (newMix && p.getTemporaryAttribute("completePotion") == null)
{
return;
}
if (!newMix && p.getTemporaryAttribute("herbloreItem") == null)
{
return;
}
if (newMix)
{
if (p.getTemporaryAttribute("completePotion") == null)
{
return;
}
int index = (int)p.getTemporaryAttribute("completePotion");
p.setTemporaryAttribute("herbloreItem", new Potion(END_POTION[index], UNFINISHED[index], SECONDARY[index], POTION_LEVEL[index], POTION_XP[index], amount));
}
Potion item = (Potion)p.getTemporaryAttribute("herbloreItem");
if (item == null || p == null || item.getAmount() <= 0)
{
resetAllHerbloreVariables(p);
return;
}
if (!p.getInventory().hasItem(item.getSecondary()) || !p.getInventory().hasItem(item.getUnfinished()))
{
resetAllHerbloreVariables(p);
return;
}
if (p.getSkills().getGreaterLevel(Skills.SKILL.HERBLORE) < item.getLevel())
{
p.getPackets().sendMessage("You need a Herblore level of " + item.getLevel() + " to make that potion.");
resetAllHerbloreVariables(p);
return;
}
string s = ItemData.forId(item.getFinished()).getName().Replace("(3)", "");
if (p.getInventory().deleteItem(item.getUnfinished()) && p.getInventory().deleteItem(item.getSecondary()))
{
if (p.getInventory().addItem(item.getFinished()))
{
item.decreaseAmount();
p.setLastAnimation(new Animation(MIX_ANIMATION));
p.getSkills().addXp(Skills.SKILL.HERBLORE, item.getXp());
p.getPackets().sendMessage("You add the ingredient into the murky vial, you have completed the potion.");
p.getPackets().closeInterfaces();
}
}
if (item.getAmount() >= 1)
{
Event completeMorePotionsEvent = new Event(750);
completeMorePotionsEvent.setAction(() =>
{
completePotion(p, item.getAmount(), false);
completeMorePotionsEvent.stop();
});
Server.registerEvent(completeMorePotionsEvent);
}
}
示例3: cutGem
public static void cutGem(Player p, int index, int amount, bool newCut)
{
index -= 50;
if (newCut)
{
p.setTemporaryAttribute("craftItem", new CraftItem(5, index, amount, (double)GEMS[index][3], (int)GEMS[index][1], (string)GEMS[index][4], (int)GEMS[index][2]));
}
CraftItem item = (CraftItem)p.getTemporaryAttribute("craftItem");
if (item == null || p == null || item.getAmount() <= 0 || item.getCraftType() != 5)
{
Crafting.resetCrafting(p);
return;
}
p.getPackets().closeInterfaces();
if (!p.getInventory().hasItem(CHISEL))
{
p.getPackets().sendMessage("You cannot cut gems without a chisel.");
Crafting.resetCrafting(p);
return;
}
if (!p.getInventory().hasItem((int)GEMS[item.getCraftItem()][0]))
{
if (newCut)
{
p.getPackets().sendMessage("You have no " + item.getMessage() + " to cut.");
}
else
{
p.getPackets().sendMessage("You have no more " + item.getMessage() + "'s to cut.");
}
Crafting.resetCrafting(p);
return;
}
if (p.getSkills().getGreaterLevel(Skills.SKILL.CRAFTING) < item.getLevel())
{
p.getPackets().sendMessage("You need a Crafting level of " + item.getLevel() + " to cut that gem.");
Crafting.resetCrafting(p);
return;
}
if (p.getInventory().deleteItem((int)GEMS[item.getCraftItem()][0]))
{
p.getInventory().addItem(item.getFinishedItem());
p.getSkills().addXp(Skills.SKILL.CRAFTING, item.getXp());
p.setLastAnimation(new Animation((int)GEMS[item.getCraftItem()][5]));
p.getPackets().sendMessage("You cut the " + item.getMessage() + ".");
}
item.decreaseAmount();
if (item.getAmount() >= 1)
{
Event cutMoreGemEvent = new Event(1500);
cutMoreGemEvent.setAction(() =>
{
cutGem(p, -1, -1, false);
cutMoreGemEvent.stop();
});
Server.registerEvent(cutMoreGemEvent);
}
}
示例4: craftClay
public static void craftClay(Player p, int amount, int craftType, int craftItem, bool newCraft)
{
if (newCraft)
{
if ((craftType != 1 && craftType != 2) || craftItem < 0 || craftItem > 4)
{
return;
}
int index = craftItem;
int endItem = craftType == 1 ? 0 : 1;
int xp = craftType == 1 ? 3 : 4;
p.setTemporaryAttribute("craftItem", new CraftItem(craftType, craftItem, amount, (double)CLAY_ITEMS[index][xp], (int)CLAY_ITEMS[index][endItem], (string)CLAY_ITEMS[index][5], (int)CLAY_ITEMS[index][2]));
}
CraftItem item = (CraftItem)p.getTemporaryAttribute("craftItem");
if (item == null || p == null || item.getAmount() <= 0)
{
Crafting.resetCrafting(p);
return;
}
int neededItem = item.getCraftType() == 1 ? CLAY : (int)CLAY_ITEMS[item.getCraftItem()][0];
string s = item.getCraftType() == 1 ? "You mould the clay into a " + item.getMessage() : "You bake the " + item.getMessage() + " in the oven";
string s1 = item.getCraftType() == 1 ? "You need some soft clay to mould a " + item.getMessage() : "You need a pre-made " + item.getMessage() + " to put in the oven";
int animation = item.getCraftType() == 1 ? 883 : 899;
if (p.getSkills().getGreaterLevel(Skills.SKILL.CRAFTING) < item.getLevel())
{
p.getPackets().sendMessage("You need a Crafting level of " + item.getLevel() + " to make a " + item.getMessage() + ".");
Crafting.resetCrafting(p);
return;
}
if (!p.getInventory().hasItem(neededItem))
{
p.getPackets().sendMessage(s1 + ".");
Crafting.resetCrafting(p);
return;
}
p.getPackets().closeInterfaces();
if (p.getInventory().deleteItem(neededItem))
{
if (p.getInventory().addItem(item.getFinishedItem()))
{
p.getSkills().addXp(Skills.SKILL.CRAFTING, item.getXp());
p.getPackets().sendMessage(s + ".");
p.setLastAnimation(new Animation(animation));
}
}
item.decreaseAmount();
if (item.getAmount() >= 1)
{
Event craftMoreClayEvent = new Event(1500);
craftMoreClayEvent.setAction(() =>
{
craftClay(p, -1, -1, -1, false);
craftMoreClayEvent.stop();
});
Server.registerEvent(craftMoreClayEvent);
}
}
示例5: cutLog
public static void cutLog(Player p, int amount, int logType, int itemType, bool isStringing, bool newFletch)
{
Bow item = null;
if (newFletch)
{
item = getBow(itemType, logType, amount, isStringing);
Fletching.setFletchItem(p, item);
}
item = (Bow)Fletching.getFletchItem(p);
if (item == null || p == null)
{
return;
}
bool stringing = item.isStringing();
if (!canFletch(p, item, stringing))
{
p.getPackets().closeInterfaces();
return;
}
int animation = getAnimation(item);
if (!stringing)
{
int amt = item.getItemType() == 2 ? ARROW_AMOUNT : 1;
if (p.getInventory().deleteItem(LOGS[item.getLogType()]))
{
p.getInventory().addItem(item.getFinishedItem(), amt);
p.getSkills().addXp(Skills.SKILL.FLETCHING, item.getXp());
item.decreaseAmount();
p.getPackets().sendMessage("You carefully cut the wood into " + MESSAGE[item.getItemType()] + ".");
p.setLastAnimation(new Animation(animation));
}
}
else
{
int[] bows = item.getItemType() == 0 ? UNSTRUNG_SHORTBOW : UNSTRUNG_LONGBOW;
if (p.getInventory().deleteItem(BOWSTRING) && p.getInventory().deleteItem(bows[item.getLogType()]))
{
p.getInventory().addItem(item.getFinishedItem());
p.getSkills().addXp(Skills.SKILL.FLETCHING, item.getXp());
item.decreaseAmount();
p.getPackets().sendMessage("You add a string to the bow.");
p.setLastAnimation(new Animation(animation));
}
}
p.getPackets().closeInterfaces();
if (item.getAmount() >= 1)
{
Event cutMoreLogsEvent = new Event(1500);
cutMoreLogsEvent.setAction(() =>
{
cutLog(p, -1, -1, -1, false, false);
cutMoreLogsEvent.stop();
});
Server.registerEvent(cutMoreLogsEvent);
}
}
示例6: craftDragonHide
public static void craftDragonHide(Player p, int amount, int itemIndex, int leatherType, bool newCraft)
{
if (newCraft) {
itemIndex = leatherType != 0 ? itemIndex += leatherType : itemIndex;
p.setTemporaryAttribute("craftItem", new CraftItem(leatherType, itemIndex, amount, (double) LEATHER_ITEMS[itemIndex][2], (int) LEATHER_ITEMS[itemIndex][0], (string) LEATHER_ITEMS[itemIndex][4], (int) LEATHER_ITEMS[itemIndex][1]));
}
CraftItem item = (CraftItem) p.getTemporaryAttribute("craftItem");
if (item == null || p == null || item.getAmount() <= 0) {
Crafting.resetCrafting(p);
return;
}
p.getPackets().closeInterfaces();
int index = item.getCraftItem();
if (p.getSkills().getGreaterLevel(Skills.SKILL.CRAFTING) < item.getLevel()) {
p.getPackets().sendMessage("You need a Crafting level of " + item.getLevel() + " to craft that item.");
Crafting.resetCrafting(p);
return;
}
if (!p.getInventory().hasItemAmount(TANNED_HIDE[item.getCraftType()], (int) LEATHER_ITEMS[index][3])) {
p.getPackets().sendMessage("You need " + (int) LEATHER_ITEMS[index][3] + " dragonhide to craft that.");
Crafting.resetCrafting(p);
return;
}
if (!p.getInventory().hasItem(NEEDLE)) {
p.getPackets().sendMessage("You need a needle if you wish to craft leather.");
Crafting.resetCrafting(p);
return;
}
if (!p.getInventory().hasItemAmount(THREAD, (int)LEATHER_ITEMS[index][3])) {
p.getPackets().sendMessage("You need " + (int)LEATHER_ITEMS[index][3] + " thread to craft that.");
Crafting.resetCrafting(p);
return;
}
string s = index < 4 ? "a" : "a pair of";
for (int j = 0; j < (int) LEATHER_ITEMS[index][3]; j++) {
if (!p.getInventory().deleteItem(TANNED_HIDE[item.getCraftType()])) {
return;
}
}
p.getInventory().deleteItem(THREAD, (int) LEATHER_ITEMS[index][3]);
p.getInventory().addItem(item.getFinishedItem());
p.getSkills().addXp(Skills.SKILL.CRAFTING, item.getXp());
p.setLastAnimation(new Animation(1249));
p.getPackets().sendMessage("You craft " + s + " " + item.getMessage() + ".");
item.decreaseAmount();
if (item.getAmount() >= 1) {
Event craftMoreDragonHide = new Event(1500);
craftMoreDragonHide.setAction(() => {
craftDragonHide(p, -1, -1, -1, false);
craftMoreDragonHide.stop();
});
Server.registerEvent(craftMoreDragonHide);
}
}
示例7: newSilverItem
public static void newSilverItem(Player p, int amount, int index, bool newCraft)
{
index -= 120;
if (newCraft)
{
p.setTemporaryAttribute("craftItem", new CraftItem(3, index, amount, (double)SILVER_ITEMS[index][3], (int)SILVER_ITEMS[index][0], (string)SILVER_ITEMS[index][4], (int)SILVER_ITEMS[index][2]));
}
CraftItem item = (CraftItem)p.getTemporaryAttribute("craftItem");
if (item == null || p == null || item.getAmount() <= 0 || item.getCraftType() != 3)
{
Crafting.resetCrafting(p);
return;
}
p.getPackets().closeInterfaces();
string s = item.getCraftItem() == 0 ? "an" : "a";
if (!p.getInventory().hasItem((int)SILVER_ITEMS[item.getCraftItem()][1]))
{
p.getPackets().sendMessage("You need " + s + " " + item.getMessage() + " mould to make that.");
Crafting.resetCrafting(p);
return;
}
if (!p.getInventory().hasItem(SILVER_BAR))
{
p.getPackets().sendMessage("You don't have a Silver bar.");
Crafting.resetCrafting(p);
return;
}
if (p.getSkills().getGreaterLevel(Skills.SKILL.CRAFTING) < item.getLevel())
{
p.getPackets().sendMessage("You need a Crafting level of " + item.getLevel() + " to smelt that.");
Crafting.resetCrafting(p);
return;
}
if (p.getInventory().deleteItem(SILVER_BAR))
{
p.getInventory().addItem(item.getFinishedItem());
p.getSkills().addXp(Skills.SKILL.CRAFTING, item.getXp());
p.setLastAnimation(new Animation(3243));
p.getPackets().sendMessage("You smelt the Silver bar in to " + s + " " + item.getMessage() + ".");
}
item.decreaseAmount();
if (item.getAmount() >= 1)
{
Event makeMoreSilverItemEvent = new Event(1500);
makeMoreSilverItemEvent.setAction(() =>
{
newSilverItem(p, -1, -1, false);
makeMoreSilverItemEvent.stop();
});
Server.registerEvent(makeMoreSilverItemEvent);
}
}
示例8: craftGlass
public static void craftGlass(Player p, int amount, int index, bool newCraft)
{
if (newCraft)
{
p.setTemporaryAttribute("craftItem", new CraftItem(3, index, amount, (double)GLASS_ITEMS[index][2], (int)GLASS_ITEMS[index][0], (string)GLASS_ITEMS[index][3], (int)GLASS_ITEMS[index][1]));
}
CraftItem item = (CraftItem)p.getTemporaryAttribute("craftItem");
if (item == null || p == null || item.getAmount() <= 0 || item.getCraftType() != 3)
{
Crafting.resetCrafting(p);
return;
}
p.getPackets().closeInterfaces();
if (!p.getInventory().hasItem(MOLTEN_GLASS))
{
p.getPackets().sendMessage("You have no molten glass.");
Crafting.resetCrafting(p);
return;
}
if (!p.getInventory().hasItem(GLASSBLOWING_PIPE))
{
p.getPackets().sendMessage("You need a glassblowing pipe if you wish to make a glass item.");
Crafting.resetCrafting(p);
return;
}
if (p.getSkills().getGreaterLevel(Skills.SKILL.CRAFTING) < item.getLevel())
{
p.getPackets().sendMessage("You need a Crafting level of " + item.getLevel() + " to craft that item.");
Crafting.resetCrafting(p);
return;
}
if (p.getInventory().deleteItem(MOLTEN_GLASS))
{
p.getInventory().addItem(item.getFinishedItem());
p.getSkills().addXp(Skills.SKILL.CRAFTING, item.getXp());
p.setLastAnimation(new Animation(884));
p.getPackets().sendMessage("You blow through the pipe, shaping the molten glass into a " + item.getMessage() + ".");
}
item.decreaseAmount();
if (item.getAmount() >= 1)
{
Event craftMoreGlassEvent = new Event(1500);
craftMoreGlassEvent.setAction(() =>
{
craftGlass(p, -1, -1, false);
craftMoreGlassEvent.stop();
});
Server.registerEvent(craftMoreGlassEvent);
}
}
示例9: getFishToAdd
protected static int getFishToAdd(Player p, Spot fishingSpot)
{
int fishingLevel = p.getSkills().getGreaterLevel(Skills.SKILL.FISHING);
int[] canCatch = new int[fishingSpot.getFish().Length];
int j = 0;
for (int i = 0; i < fishingSpot.getFish().Length; i++) {
if (fishingLevel >= fishingSpot.getLevel()[i]) {
canCatch[j] = fishingSpot.getFish()[i];
j++;
}
}
int[] canCatch2 = new int[j];
for (int i = 0; i < canCatch.Length; i++) {
if (canCatch[i] > 0) {
canCatch2[i] = canCatch[i];
}
}
int fish = misc.random(canCatch2.Length-1);
for (int i = 0; i < fishingSpot.getFish().Length; i++) {
if (fish == fishingSpot.getFish()[i]) {
return i;
}
}
return misc.random(canCatch2.Length-1);
}
示例10: createAmmo
public static void createAmmo(Player p, int sets, int type, bool bolt, bool newFletch)
{
Ammo item = null;
if (newFletch || Fletching.getFletchItem(p) == null) {
item = getAmmo(type, bolt, sets);
Fletching.setFletchItem(p, item);
}
item = (Ammo) Fletching.getFletchItem(p);
if (item == null || p == null) {
return;
}
if (!canFletch(p, item)) {
p.getPackets().closeInterfaces();
return;
}
int amt = getArrowAmount(p, item);
if (amt <= 0) {
return;
}
if (p.getInventory().deleteItem(item.getItemOne(), amt) && p.getInventory().deleteItem(item.getItemTwo(), amt)) {
p.getInventory().addItem(item.getFinishedItem(), amt);
p.getSkills().addXp(Skills.SKILL.FLETCHING, item.getXp() * amt);
p.getPackets().sendMessage(getMessage(item, amt));
item.decreaseAmount();
p.getPackets().closeInterfaces();
}
if (item.getAmount() >= 1) {
Event createMoreAmmoEvent = new Event(1500);
createMoreAmmoEvent.setAction(() => {
createAmmo(p, -1, -1, false, false);
createMoreAmmoEvent.stop();
});
Server.registerEvent(createMoreAmmoEvent);
}
}
示例11: craftSpinning
public static void craftSpinning(Player p, int amount, int index, bool newCraft)
{
if (newCraft)
{
p.setTemporaryAttribute("craftItem", new CraftItem(6, index, amount, (double)SPINNING_ITEMS[index][3], (int)SPINNING_ITEMS[index][0], (string)SPINNING_ITEMS[index][4], (int)SPINNING_ITEMS[index][2]));
}
CraftItem item = (CraftItem)p.getTemporaryAttribute("craftItem");
if (item == null || p == null || item.getAmount() <= 0 || item.getCraftType() != 6)
{
Crafting.resetCrafting(p);
return;
}
p.getPackets().closeInterfaces();
int i = item.getCraftItem();
if (!p.getInventory().hasItem((int)SPINNING_ITEMS[i][1]))
{
p.getPackets().sendMessage("You have no " + item.getMessage() + ".");
Crafting.resetCrafting(p);
return;
}
if (p.getSkills().getGreaterLevel(Skills.SKILL.CRAFTING) < item.getLevel())
{
p.getPackets().sendMessage("You need a Crafting level of " + item.getLevel() + " to spin that.");
Crafting.resetCrafting(p);
return;
}
if (p.getInventory().deleteItem((int)SPINNING_ITEMS[i][1]))
{
p.getInventory().addItem(item.getFinishedItem());
p.getSkills().addXp(Skills.SKILL.CRAFTING, item.getXp());
p.setLastAnimation(new Animation(894));
p.getPackets().sendMessage("You spin the " + item.getMessage() + " into a " + SPIN_FINISH[i] + ".");
}
item.decreaseAmount();
if (item.getAmount() >= 1)
{
Event craftMoreSpinningEvent = new Event(750);
craftMoreSpinningEvent.setAction(() =>
{
craftSpinning(p, -1, -1, false);
craftMoreSpinningEvent.stop();
});
Server.registerEvent(craftMoreSpinningEvent);
}
}
示例12: displaySmeltOptions
public static void displaySmeltOptions(Player p)
{
int gfxChild = 4;
int textChild = 16;
string s = "<br><br><br><br>";
for (int i = 0 ; i < BARS.Length; i++) {
bool enabled = p.getSkills().getGreaterLevel(Skills.SKILL.SMITHING) >= SMELT_LEVELS[i];
string colour = enabled ? "<col=000000>" : "<col=A00000>";
p.getPackets().itemOnInterface(311, gfxChild, 130, BARS[i]);
p.getPackets().modifyText(s + colour + BAR_NAMES[i], 311, textChild);
gfxChild++;
textChild += 4;
}
p.getPackets().sendChatboxInterface(311);
}
示例13: createXbow
public static void createXbow(Player p, int amount, int xbowType, bool isStringing, bool newFletch)
{
SkillItem item = null;
if (newFletch || Fletching.getFletchItem(p) == null)
{
item = getXbow(xbowType, isStringing, amount);
Fletching.setFletchItem(p, item);
}
item = (SkillItem)Fletching.getFletchItem(p);
if (item == null || p == null)
{
return;
}
bool stringing = item.getItemTwo() == XBOW_STRING ? true : false;
if (!canFletch(p, item))
{
p.getPackets().closeInterfaces();
return;
}
if (p.getInventory().deleteItem(item.getItemOne()) && p.getInventory().deleteItem(item.getItemTwo()))
{
p.getInventory().addItem(item.getFinishedItem());
p.getSkills().addXp(Skills.SKILL.FLETCHING, item.getXp());
item.decreaseAmount();
p.getPackets().closeInterfaces();
if (!stringing)
{
p.getPackets().sendMessage("You attach some limbs to the Crossbow.");
}
else
{
p.setLastAnimation(new Animation(6677));
p.getPackets().sendMessage("You add a Crossbow String to the Crossbow, you have completed the " + ItemData.forId(item.getFinishedItem()).getName() + ".");
}
}
if (item.getAmount() >= 1)
{
Event createMoreXBowEvent = new Event(1500);
createMoreXBowEvent.setAction(() =>
{
createXbow(p, -1, -1, false, false);
createMoreXBowEvent.stop();
});
Server.registerEvent(createMoreXBowEvent);
}
}
示例14: canFish
public static bool canFish(Player p, Spot fishingSpot, Spot fishingSpot2, int index)
{
if (p == null || fishingSpot == null)
{
return false;
}
if (!p.getLocation().withinDistance(fishingSpot.getSpotLocation(), 2))
{
return false;
}
if (fishingSpot2 != null)
{
if (!fishingSpot.Equals(fishingSpot2))
{
return false;
}
}
if (p.getSkills().getGreaterLevel(Skills.SKILL.FISHING) < fishingSpot.getLevel()[index])
{
p.getPackets().sendMessage("You need a fishing level of " + fishingSpot.getLevel()[index] + " to fish here.");
return false;
}
if (fishingSpot.getPrimaryItem() != -1)
{
if (!p.getInventory().hasItem(fishingSpot.getPrimaryItem()))
{
p.getPackets().sendMessage("You need " + fishingSpot.getPrimaryName() + " to fish here.");
return false;
}
}
if (fishingSpot.getSecondaryItem() != -1)
{
if (!p.getInventory().hasItem(fishingSpot.getSecondaryItem()))
{
p.getPackets().sendMessage("You need " + fishingSpot.getSecondaryName() + " to fish here.");
return false;
}
}
if (p.getInventory().findFreeSlot() == -1)
{
p.getPackets().sendChatboxInterface(210);
p.getPackets().modifyText("Your inventory is too full to catch any more fish.", 210, 1);
return false;
}
return true;
}
示例15: checkSlayerKill
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;
}
}
}
}