private void Start() { Init(); m_handItemDef = Items.GetItemDef(m_handItemType); m_bodyItemDef = Items.GetItemDef(m_bodyItemType); try { m_jobAi = (JobAI)m_job; } catch { } m_agent = GetComponent <NavMeshAgent>(); m_npc = GetComponent <ServerNpc>(); m_server = (LidServer)Object.FindObjectOfType(typeof(LidServer)); if (!(null != m_npc)) { return; } int num = 0; int a_chance = (int)(100f * m_dropMultiplier); if (m_npc.m_npcType == eCharType.eGasmaskGuy) { m_containerType = 120; if (m_handItemType != 0) { m_itemDrops.Add(new DropItem(m_handItemType, m_handItemType, (int)(15f * m_dropMultiplier), 1, 50)); } if (0 < m_handItemDef.ammoItemType) { m_itemDrops.Add(new DropItem(m_handItemDef.ammoItemType, m_handItemDef.ammoItemType, (int)(80f * m_dropMultiplier), 1, 10)); } if (0 < m_bodyItemType) { m_itemDrops.Add(new DropItem(m_bodyItemType, m_bodyItemType, (int)(5f * m_dropMultiplier), 1, 60)); } m_itemDrops.Add(new DropItem(1, 12, 67)); m_itemDrops.Add(new DropItem(15, 19, 67)); m_itemDrops.Add(new DropItem(254, 254, 20, 1, 5)); num = 12; } else if (m_npc.m_npcType == eCharType.eChicken || m_npc.m_npcType == eCharType.eRaven || m_npc.m_npcType == eCharType.eEagle) { m_itemDrops.Add(new DropItem(4, 4, a_chance)); num = 1; } else if (m_npc.m_npcType == eCharType.eBull || m_npc.m_npcType == eCharType.eCow) { m_itemDrops.Add(new DropItem(4, 4, a_chance, 3, 4)); m_itemDrops.Add(new DropItem(133, 133, a_chance, 3, 6)); num = 2; } else if (m_npc.m_npcType == eCharType.eMutant || m_npc.m_npcType == eCharType.eSurvivorMutant) { m_itemDrops.Add(new DropItem(104, 104, 15, 10, 90)); m_itemDrops.Add(new DropItem(254, 254, 15, 1, 3)); num = ((m_npc.m_npcType != eCharType.eMutant) ? 30 : 15); } else if (m_npc.m_npcType == eCharType.eSpider || m_npc.m_npcType == eCharType.eSpiderPoison) { m_itemDrops.Add(new DropItem(254, 254, 10, 1, 3)); num = ((m_npc.m_npcType != eCharType.eSpider) ? 15 : 3); } else { m_itemDrops.Add(new DropItem(4, 4, a_chance, 1, 3)); m_itemDrops.Add(new DropItem(133, 133, a_chance, 1, 3)); num = 1; } if (0 < num) { int randomType = Items.GetRandomType(150f); int a_max = (!Items.HasCondition(randomType)) ? 1 : Random.Range(1, 30); m_itemDrops.Add(new DropItem(randomType, randomType, num, 1, a_max)); } }
private void Start() { Init(); m_handItemDef = Items.GetItemDef(m_handItemType); m_bodyItemDef = Items.GetItemDef(m_bodyItemType); try { m_jobAi = (JobAI)m_job; } catch { } m_agent = GetComponent <NavMeshAgent>(); m_npc = GetComponent <ServerNpc>(); m_server = (LidServer)Object.FindObjectOfType(typeof(LidServer)); if (!(null != m_npc)) { return; } int num = 0; int a_chance = (int)(100f * m_dropMultiplier); if (m_npc.m_npcType == eCharType.eGasmaskGuy) // Type of enemy/mob/npc { m_containerType = 120; // container used for items dropped if (m_handItemType != 0) { m_itemDrops.Add(new DropItem(m_handItemType, m_handItemType, (int)(15f * m_dropMultiplier), 1, 50)); } if (0 < m_handItemDef.ammoItemType) { m_itemDrops.Add(new DropItem(m_handItemDef.ammoItemType, m_handItemDef.ammoItemType, (int)(80f * m_dropMultiplier), 1, 10)); } if (0 < m_bodyItemType) { m_itemDrops.Add(new DropItem(m_bodyItemType, m_bodyItemType, (int)(5f * m_dropMultiplier), 1, 60)); } m_itemDrops.Add(new DropItem(1, 12, 67)); //Items <--- Really stupid setup imo, Should be using strings globally not numbered id's m_itemDrops.Add(new DropItem(15, 19, 67)); m_itemDrops.Add(new DropItem(254, 254, 20, 1, 5)); num = 12; } else if (m_npc.m_npcType == eCharType.eChicken || m_npc.m_npcType == eCharType.eRaven || m_npc.m_npcType == eCharType.eEagle) // else if for other types { m_itemDrops.Add(new DropItem(4, 4, a_chance)); num = 1; } else if (m_npc.m_npcType == eCharType.eBull || m_npc.m_npcType == eCharType.eCow) { m_itemDrops.Add(new DropItem(4, 4, a_chance, 3, 4)); m_itemDrops.Add(new DropItem(133, 133, a_chance, 3, 6)); num = 2; } else if (m_npc.m_npcType == eCharType.eMutant || m_npc.m_npcType == eCharType.eSurvivorMutant) { m_itemDrops.Add(new DropItem(104, 104, 15, 10, 90)); // first id, second id, chance, min_quality, max_quality <--- Really stupid setup imo, Should be using strings globally not numbered id's m_itemDrops.Add(new DropItem(254, 254, 15, 1, 3)); num = ((m_npc.m_npcType != eCharType.eMutant) ? 30 : 15); } else if (m_npc.m_npcType == eCharType.eSpider || m_npc.m_npcType == eCharType.eSpiderPoison) { m_itemDrops.Add(new DropItem(254, 254, 10, 1, 3)); num = ((m_npc.m_npcType != eCharType.eSpider) ? 15 : 3); } else { m_itemDrops.Add(new DropItem(4, 4, a_chance, 1, 3)); m_itemDrops.Add(new DropItem(133, 133, a_chance, 1, 3)); num = 1; } if (0 < num) { int randomType = Items.GetRandomType(150f); int a_max = (!Items.HasCondition(randomType)) ? 1 : Random.Range(1, 30); m_itemDrops.Add(new DropItem(randomType, randomType, num, 1, a_max)); } }