Не нашли подходящий метод для переопределения
Итак, я делаю мод Terraria, и у меня есть проблема. Там написано:
c:\Users\Павел\Documents\My Games\Terraria\ModLoader\Mod Sources\Megalia\Items\E-core.cs(38,30) : error CS0115: 'Megalia.NPCs.Boss.Ecore.Boss(ref string, ref string)': no suitable method found to override- Я не знаю, что делать. Итак, вот этот код:
using System; using System.IO; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; using Terraria.ModLoader; namespace Megalia.NPCs.Boss { public class Ecore : ModNPC { public override void SetDefaults() { npc.name = "E-core"; npc.displayName = "E-core"; npc.aiStyle = 5; //5 is the flying AI npc.lifeMax = 100; //boss life npc.damage = 20; //boss damage npc.defense = 10; //boss defense npc.knockBackResist = 0f; npc.width = 100; npc.height = 100; animationType = NPCID.DemonEye; //this boss will behavior like the DemonEye Main.npcFrameCount[npc.type] = 2; //boss frame/animation npc.value = Item.buyPrice(0, 40, 75, 45); npc.npcSlots = 1f; npc.boss = true; npc.lavaImmune = true; npc.noGravity = true; npc.noTileCollide = true; npc.soundHit = 8; npc.soundKilled = 14; npc.buffImmune[24] = true; music = MusicID.Boss2; npc.netAlways = true; } public override void headTexture(ref string headTexture, ref string EcoreMapIcon) { EcorePapIcon = "Megalia/NPCs/Boss/E-coreMapIcon"; //the boss head texture } public override void bossLifeScale(ref string name, ref int potionType) { potionType = ItemID.LesserHealingPotion; //boss drops Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, mod.ItemType("YourSword")); } public override void ScaleExpertStats(int numPlayers, float bossLifeScale) { npc.lifeMax = (int)(npc.lifeMax * 0.579f * bossLifeScale); //boss life scale in expertmode npc.damage = (int)(npc.damage * 0.6f); //boss damage increase in expermode } } }
Что я уже пробовал:
Я пытался изменить метод, но у меня ничего не получилось, я пытался исправить это в течение 3 часов. Пожалуйста, помогите!
David Passenger
Пожалуйста, поделитесь своим кодом базового класса (ModNPC).