public static void NotifyItemPickup(Player player, Item item, int customStack) { if (AchievementsHelper.OnItemPickup != null) { AchievementsHelper.OnItemPickup(player, (short)item.netID, customStack); } }
private static void OnPlayerEnteredWorld(Player player) { if (AchievementsHelper.OnItemPickup != null) { for (int i = 0; i < 58; i++) { AchievementsHelper.OnItemPickup(player, (short)player.inventory[i].type, player.inventory[i].stack); } for (int j = 0; j < player.armor.Length; j++) { AchievementsHelper.OnItemPickup(player, (short)player.armor[j].type, player.armor[j].stack); } for (int k = 0; k < player.dye.Length; k++) { AchievementsHelper.OnItemPickup(player, (short)player.dye[k].type, player.dye[k].stack); } for (int l = 0; l < player.miscEquips.Length; l++) { AchievementsHelper.OnItemPickup(player, (short)player.miscEquips[l].type, player.miscEquips[l].stack); } for (int m = 0; m < player.miscDyes.Length; m++) { AchievementsHelper.OnItemPickup(player, (short)player.miscDyes[m].type, player.miscDyes[m].stack); } for (int n = 0; n < player.bank.item.Length; n++) { AchievementsHelper.OnItemPickup(player, (short)player.bank.item[n].type, player.bank.item[n].stack); } for (int num = 0; num < player.bank2.item.Length; num++) { AchievementsHelper.OnItemPickup(player, (short)player.bank2.item[num].type, player.bank2.item[num].stack); } } if (player.statManaMax > 20) { Main.Achievements.GetCondition("STAR_POWER", "Use").Complete(); } if (player.statLifeMax == 500 && player.statManaMax == 200) { Main.Achievements.GetCondition("TOPPED_OFF", "Use").Complete(); } if (player.miscEquips[4].type > 0) { Main.Achievements.GetCondition("HOLD_ON_TIGHT", "Equip").Complete(); } if (player.miscEquips[3].type > 0) { Main.Achievements.GetCondition("THE_CAVALRY", "Equip").Complete(); } for (int num2 = 0; num2 < player.armor.Length; num2++) { if (player.armor[num2].wingSlot > 0) { Main.Achievements.GetCondition("HEAD_IN_THE_CLOUDS", "Equip").Complete(); break; } } if (player.armor[0].stack > 0 && player.armor[1].stack > 0 && player.armor[2].stack > 0) { Main.Achievements.GetCondition("MATCHING_ATTIRE", "Equip").Complete(); } if (player.armor[10].stack > 0 && player.armor[11].stack > 0 && player.armor[12].stack > 0) { Main.Achievements.GetCondition("FASHION_STATEMENT", "Equip").Complete(); } bool flag = true; for (int num3 = 0; num3 < player.extraAccessorySlots + 3 + 5; num3++) { if (player.dye[num3].type < 1 || player.dye[num3].stack < 1) { flag = false; } } if (flag) { Main.Achievements.GetCondition("DYE_HARD", "Equip").Complete(); } }