public static bool VIPRewardDrop(int level, ref List <ItemInfo> info) { int dropId = DropInventory.GetDropCondiction(eDropType.VIP, level.ToString(), "1"); bool result; if (dropId > 0) { List <DropItem> unFiltItems = DropMgr.FindDropItem(dropId); for (int i = 0; i < unFiltItems.Count; i++) { int itemCount = DropInventory.random.Next(unFiltItems[i].BeginData, unFiltItems[i].EndData); ItemTemplateInfo temp = ItemMgr.FindItemTemplate(unFiltItems[i].ItemId); ItemInfo item = ItemInfo.CreateFromTemplate(temp, itemCount, level); if (item != null) { item.IsBinds = unFiltItems[i].IsBind; item.ValidDate = unFiltItems[i].ValueDate; item.IsTips = unFiltItems[i].IsTips; item.IsLogs = unFiltItems[i].IsLogs; if (info == null) { info = new List <ItemInfo>(); } info.Add(item); } } result = true; } else { result = false; } return(result); }
public static bool AnswerDrop(int answerId, ref List <ItemInfo> info) { int dropCondiction = DropInventory.GetDropCondiction(eDropType.Answer, answerId.ToString(), "0"); if (dropCondiction > 0 && dropCondiction > 0) { List <ItemInfo> list = null; if (DropInventory.GetDropItems(eDropType.Answer, dropCondiction, ref list)) { info = ((list != null) ? list : null); return(true); } } return(false); }
public static bool PvEQuestsDrop(int npcId, ref List <ItemInfo> info) { int dropCondiction = DropInventory.GetDropCondiction(eDropType.PveQuests, npcId.ToString(), "0"); if (dropCondiction > 0) { List <ItemInfo> list = null; if (DropInventory.GetDropItems(eDropType.PveQuests, dropCondiction, ref list)) { info = ((list != null) ? list : null); return(true); } } return(false); }
public static bool SpecialDrop(int missionId, int boxType, ref List <ItemInfo> info) { int dropCondiction = DropInventory.GetDropCondiction(eDropType.Special, missionId.ToString(), boxType.ToString()); if (dropCondiction > 0) { List <ItemInfo> list = null; if (DropInventory.GetDropItems(eDropType.Special, dropCondiction, ref list)) { info = ((list != null) ? list : null); return(true); } } return(false); }
public static bool CopyDrop(int copyId, int user, ref List <ItemInfo> info) { int dropCondiction = DropInventory.GetDropCondiction(eDropType.Copy, copyId.ToString(), user.ToString()); if (dropCondiction > 0) { List <ItemInfo> list = null; if (DropInventory.GetDropItems(eDropType.Copy, dropCondiction, ref list)) { info = ((list != null) ? list : null); return(true); } } return(false); }
public static List <ItemInfo> CopySystemDrop(int copyId, int OpenCount) { int num = Convert.ToInt32((double)OpenCount * 0.1); int num2 = Convert.ToInt32((double)OpenCount * 0.3); int num3 = OpenCount - num - num2; List <ItemInfo> list = new List <ItemInfo>(); List <ItemInfo> list2 = null; int dropCondiction = DropInventory.GetDropCondiction(eDropType.Copy, copyId.ToString(), "2"); if (dropCondiction > 0) { for (int i = 0; i < num; i++) { if (DropInventory.GetDropItems(eDropType.Copy, dropCondiction, ref list2)) { list.Add(list2[0]); list2 = null; } } } int dropCondiction2 = DropInventory.GetDropCondiction(eDropType.Copy, copyId.ToString(), "3"); if (dropCondiction2 > 0) { for (int i = 0; i < num2; i++) { if (DropInventory.GetDropItems(eDropType.Copy, dropCondiction2, ref list2)) { list.Add(list2[0]); list2 = null; } } } int dropCondiction3 = DropInventory.GetDropCondiction(eDropType.Copy, copyId.ToString(), "4"); if (dropCondiction3 > 0) { for (int i = 0; i < num3; i++) { if (DropInventory.GetDropItems(eDropType.Copy, dropCondiction3, ref list2)) { list.Add(list2[0]); list2 = null; } } } return(DropInventory.RandomSortList(list)); }
public static List <ItemInfo> CopySystemDrop(int copyId, int OpenCount) { int goodData = Convert.ToInt32((double)OpenCount * 0.1); int normalData = Convert.ToInt32((double)OpenCount * 0.3); int lowData = OpenCount - goodData - normalData; List <ItemInfo> resultInfo = new List <ItemInfo>(); List <ItemInfo> tempInfo = null; int goodDropId = DropInventory.GetDropCondiction(eDropType.Copy, copyId.ToString(), "2"); if (goodDropId > 0) { for (int i = 0; i < goodData; i++) { if (DropInventory.GetDropItems(eDropType.Copy, goodDropId, ref tempInfo)) { resultInfo.Add(tempInfo[0]); tempInfo = null; } } } int normalDropId = DropInventory.GetDropCondiction(eDropType.Copy, copyId.ToString(), "3"); if (normalDropId > 0) { for (int i = 0; i < normalData; i++) { if (DropInventory.GetDropItems(eDropType.Copy, normalDropId, ref tempInfo)) { resultInfo.Add(tempInfo[0]); tempInfo = null; } } } int lowDropId = DropInventory.GetDropCondiction(eDropType.Copy, copyId.ToString(), "4"); if (lowDropId > 0) { for (int i = 0; i < lowData; i++) { if (DropInventory.GetDropItems(eDropType.Copy, lowDropId, ref tempInfo)) { resultInfo.Add(tempInfo[0]); tempInfo = null; } } } return(DropInventory.RandomSortList(resultInfo)); }
public static bool BoxDrop(eRoomType e, ref List <ItemInfo> info) { eDropType arg_0F_0 = eDropType.Box; int num = (int)e; int dropCondiction = DropInventory.GetDropCondiction(arg_0F_0, num.ToString(), "0"); if (dropCondiction > 0) { List <ItemInfo> list = null; if (DropInventory.GetDropItems(eDropType.Box, dropCondiction, ref list)) { info = ((list != null) ? list : null); return(true); } } return(false); }
public static bool PvPQuestsDrop(eRoomType e, bool playResult, ref List <ItemInfo> info) { eDropType arg_18_0 = eDropType.PvpQuests; int num = (int)e; int dropCondiction = DropInventory.GetDropCondiction(arg_18_0, num.ToString(), Convert.ToInt16(playResult).ToString()); if (dropCondiction > 0) { List <ItemInfo> list = null; if (DropInventory.GetDropItems(eDropType.PvpQuests, dropCondiction, ref list)) { info = ((list != null) ? list : null); return(true); } } return(false); }
public static bool CopyUserDrop(int copyId, ref List <ItemInfo> info) { int dropId = DropInventory.GetDropCondiction(eDropType.Copy, copyId.ToString(), "1"); bool result; if (dropId > 0) { List <ItemInfo> infos = null; if (DropInventory.GetDropItems(eDropType.Copy, dropId, ref infos)) { info = ((infos != null) ? infos : null); result = true; return(result); } } result = false; return(result); }
public static bool BossDrop(int missionId, ref List <ItemInfo> info) { int dropId = DropInventory.GetDropCondiction(eDropType.Boss, missionId.ToString(), "0"); bool result; if (dropId > 0) { List <ItemInfo> infos = null; if (DropInventory.GetDropItems(eDropType.Boss, dropId, ref infos)) { info = ((infos != null) ? infos : null); result = true; return(result); } } result = false; return(result); }
public static bool PvEQuestsDrop(int npcId, int tempId, ref List <ItemInfo> info) { int dropId = DropInventory.GetDropCondiction(eDropType.PveQuests, npcId.ToString(), tempId.ToString()); bool result; if (dropId > 0) { List <ItemInfo> infos = null; if (DropInventory.GetDropItems(eDropType.PveQuests, dropId, ref infos)) { info = ((infos != null) ? infos : null); result = true; return(result); } } result = false; return(result); }
public static bool PvPQuestsDrop(int tempId, bool playResult, ref List <ItemInfo> info) { int dropId = DropInventory.GetDropCondiction(eDropType.PvpQuests, tempId.ToString(), Convert.ToInt16(playResult).ToString()); bool result; if (dropId > 0) { List <ItemInfo> infos = null; if (DropInventory.GetDropItems(eDropType.PvpQuests, dropId, ref infos)) { info = ((infos != null) ? infos : null); result = true; return(result); } } result = false; return(result); }
public static bool BoxDrop(eRoomType e, ref List <ItemInfo> info) { eDropType arg_10_0 = eDropType.Box; int num = (int)e; int dropId = DropInventory.GetDropCondiction(arg_10_0, num.ToString(), "0"); bool result; if (dropId > 0) { List <ItemInfo> infos = null; if (DropInventory.GetDropItems(eDropType.Box, dropId, ref infos)) { info = ((infos != null) ? infos : null); result = true; return(result); } } result = false; return(result); }