Beispiel #1
0
        // Apply the standard processing to a given coordinate file (Worldspace or interior)
        static void ProcessSpatialFile(string fileName)
        {
            CSVFile file = GenericOpen(fileName);

            file = NpcSpawnHelper.AddMonsterClassColumn(file);
            GenericProcess(file);
            GenericClose(file);
        }
Beispiel #2
0
        // Process the location CSVFile and then use it to generate a new file for NPCSpawns
        static void GenerateNPCSpawnFile()
        {
            CSVFile locationFile = GenericOpen("SeventySix_Location.csv");

            GenericProcess(locationFile);

            CSVFile npcSpawns = NpcSpawnHelper.ProcessNPCSpawns(locationFile, NpcSpawnHelper.SumLocationSpawnChances(locationFile));

            locationFile.rows = null;

            GenericProcess(npcSpawns);
            GenericClose(npcSpawns);
        }
Beispiel #3
0
        public double GetOdds(string npcClass)
        {
            switch (NpcSpawnHelper.GetClassFromName(npcClass))
            {
            case "Main":
                return(oddsMain);

            case "Sub":
                return(oddsSub);

            default:
                throw new Exception("NPC Class " + npcClass + " is not recognised");
            }
        }
Beispiel #4
0
        // Increment the odds for a given spawn class at a given location
        public void AddOdds(string odds, string npcClass)
        {
            switch (NpcSpawnHelper.GetClassFromName(npcClass))
            {
            case "Main":
                oddsMain += double.Parse(odds);
                return;

            case "Sub":
                oddsSub += double.Parse(odds);
                return;

            default:
                return;                         // Do nothing - we're only interested in Main and Sub
            }
        }