public static bool AgentSupply(PeEntity npc, CSAssembly csAssembly, ESupplyType type) { if (m_Agent == null) { m_Agent = new NpcSupplyAgent(); } return(m_Agent.Supply(type, npc, csAssembly)); }
public static void CsStorageSupplyNpcs(List <PeEntity> npcs, ESupplyType type) { if (npcs == null) { return; } for (int i = 0; i < npcs.Count; i++) { if (npcs[i].NpcCmpt != null && npcs[i].NpcCmpt.Creater != null && npcs[i].NpcCmpt.Creater.Assembly != null) { AgentSupply(npcs[i], npcs[i].NpcCmpt.Creater.Assembly, type); } } }
public bool Supply(ESupplyType type, PeEntity entity, CSAssembly assembly) { return(mCsSupplies[(int)type] != null ? mCsSupplies[(int)type].DoSupply(entity, assembly) : false); }
public static void SupplyNpcsByCSAssembly(List <PeEntity> npcs, CSAssembly assembly, ESupplyType type) { if (npcs == null) { return; } for (int i = 0; i < npcs.Count; i++) { AgentSupply(npcs[i], assembly, type); } }