Пример #1
0
        public EntityTyping GetTypes()
        {
            ThreeType    threeType    = GetTypeInfo().ModifyType(GetTypeParameters());
            EntityTyping entityTyping = new EntityTyping(threeType.Primary, threeType.Secondary, threeType.Offensive);

            entityTyping = CheckBuffModifyType(entityTyping);
            return(entityTyping);
        }
Пример #2
0
 public EntityTyping CheckBuffModifyType(EntityTyping defTyping)
 {
     for (int i = 0; i < BuffLoader.BuffCount; i++)
     {
         if (NPC.HasBuff(i))
         {
             ModBuff modBuff = ModContent.GetModBuff(i);
             if (modBuff != null && modBuff is IUseModifiedType modifiedType)
             {
                 return(new EntityTyping(modifiedType.MyElement, Element.none, defTyping.offensiveElement));
             }
         }
     }
     return(defTyping);
 }