예제 #1
0
파일: NPCMgr.cs 프로젝트: uvbs/Asda2-Server
 /// <summary>
 /// Returns all NPCTypeHandlers for the given NPCPrototype
 /// </summary>
 public static NPCTypeHandler[] GetNPCTypeHandlers(NPCEntry entry)
 {
     NPCTypeHandler[] npcTypeHandlerArray = new NPCTypeHandler[entry.SetFlagIndices.Length];
     for (int index = 0; index < npcTypeHandlerArray.Length; ++index)
     {
         npcTypeHandlerArray[index] = NPCMgr.NPCTypeHandlers[entry.SetFlagIndices[index]];
     }
     return(npcTypeHandlerArray);
 }
예제 #2
0
        /// <summary>
        /// Returns all NPCTypeHandlers for the given NPCPrototype
        /// </summary>
        public static NPCTypeHandler[] GetNPCTypeHandlers(NPCEntry entry)
        {
            var handlers = new NPCTypeHandler[entry.SetFlagIndices.Length];

            for (var i = 0; i < handlers.Length; i++)
            {
                handlers[i] = NPCTypeHandlers[entry.SetFlagIndices[i]];
            }

            return(handlers);
        }