Esempio n. 1
0
        public static void ConvertV4ToV5(int num)
        {
            DataConverter.Npcs.V5.Npc npcV5 = new Server.DataConverter.Npcs.V5.Npc();

            DataConverter.Npcs.V4.Npc npcV4 = Server.DataConverter.Npcs.V4.NpcManager.LoadNpc(num);
            npcV5.Name = npcV4.Name;
            npcV5.AttackSay = npcV4.AttackSay;

            npcV5.Sprite = npcV4.Sprite;
            npcV5.SpawnRate = npcV4.SpawnSecs;
            npcV5.Behaviour = npcV4.Behavior;
            npcV5.Range = npcV4.Range;
            npcV5.Species = npcV4.Species;
            npcV5.BigSprite = npcV4.Big;
            npcV5.SpawnTime = npcV4.SpawnTime;

            for (int z = 0; z < Constants.MAX_NPC_DROPS; z++) {
                npcV5.Drops[z].ItemNum = npcV4.Drops[z].ItemNum;
                npcV5.Drops[z].ItemValue = npcV4.Drops[z].ItemValue;
                npcV5.Drops[z].Chance = npcV4.Drops[z].Chance;
            }

            npcV5.RecruitRate = npcV4.RecruitRate;
            npcV5.RecruitLevel = npcV4.RecruitLevel;

            npcV5.Moves[0] = npcV4.Spell;

            npcV5.AIScript = npcV4.AIScript;

            Npcs.V5.NpcManager.SaveNpc(npcV5, num);
        }
Esempio n. 2
0
        public static void ConvertV4ToV5(int num)
        {
            DataConverter.Npcs.V5.Npc npcV5 = new Server.DataConverter.Npcs.V5.Npc();

            DataConverter.Npcs.V4.Npc npcV4 = Server.DataConverter.Npcs.V4.NpcManager.LoadNpc(num);
            npcV5.Name      = npcV4.Name;
            npcV5.AttackSay = npcV4.AttackSay;

            npcV5.Sprite    = npcV4.Sprite;
            npcV5.SpawnRate = npcV4.SpawnSecs;
            npcV5.Behaviour = npcV4.Behavior;
            npcV5.Range     = npcV4.Range;
            npcV5.Species   = npcV4.Species;
            npcV5.BigSprite = npcV4.Big;
            npcV5.SpawnTime = npcV4.SpawnTime;

            for (int z = 0; z < Constants.MAX_NPC_DROPS; z++)
            {
                npcV5.Drops[z].ItemNum   = npcV4.Drops[z].ItemNum;
                npcV5.Drops[z].ItemValue = npcV4.Drops[z].ItemValue;
                npcV5.Drops[z].Chance    = npcV4.Drops[z].Chance;
            }

            npcV5.RecruitRate  = npcV4.RecruitRate;
            npcV5.RecruitLevel = npcV4.RecruitLevel;

            npcV5.Moves[0] = npcV4.Spell;

            npcV5.AIScript = npcV4.AIScript;

            Npcs.V5.NpcManager.SaveNpc(npcV5, num);
        }