Ejemplo n.º 1
0
        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));
        }
Ejemplo n.º 2
0
        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);
                }
            }
        }
Ejemplo n.º 3
0
 public bool Supply(ESupplyType type, PeEntity entity, CSAssembly assembly)
 {
     return(mCsSupplies[(int)type] != null ? mCsSupplies[(int)type].DoSupply(entity, assembly) : false);
 }
Ejemplo n.º 4
0
        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);
            }
        }