Beispiel #1
0
 //in Terraria.NPC rename AI to VanillaAI then make AI call NPCLoader.NPCAI(this)
 internal static void NPCAI(NPC npc)
 {
     if (PreAI(npc))
     {
         int type = npc.type;
         bool useAiType = IsModNPC(npc) && npc.modNPC.aiType > 0;
         if (useAiType)
         {
             npc.type = npc.modNPC.aiType;
         }
         npc.VanillaAI();
         if (useAiType)
         {
             npc.type = type;
         }
         AI(npc);
     }
     PostAI(npc);
 }
Beispiel #2
0
 //in Terraria.NPC rename AI to VanillaAI then make AI call NPCLoader.NPCAI(this)
 internal static void NPCAI(NPC npc)
 {
     if (PreAI(npc))
     {
         int type = npc.type;
         if (IsModNPC(npc) && npc.modNPC.aiType > 0)
         {
             npc.type = npc.modNPC.aiType;
         }
         npc.VanillaAI();
         npc.type = type;
         AI(npc);
     }
     PostAI(npc);
 }