예제 #1
0
 public static NPC getNPCFromObject(object o)
 {
     if (o == null)
     {
         return(null);
     }
     if (o is string)
     {
         return(ARareItemSwapJPANs.getNPCFromTag(o as string));
     }
     else if (o is NPC)
     {
         return(o as NPC);
     }
     else if (o is ModNPC)
     {
         return((o as ModNPC).npc);
     }
     else if (o is int)
     {
         NPC npc = new NPC();
         npc.SetDefaults((int)o);
         return(npc);
     }
     return(null);
 }