right, so my old login got borked somehow...
Having pulled and studied the 1.20 beta, found a minor thing, not sure if you are aware or not.
It was, in it's current state, not reading map files properly.
here goes, correct me if I'm wrong...
old code:
in spawn.cs
Code:
public bool ReadMapFile(string filename)
{
// REMOVE THIS, never used:
IFormatProvider NumFormat = new CultureInfo("en-US");
/* snip */
new code:
in MapReader.cs
Code:
ADD :
using System.Globalization;
// snip
public static class MapReader
{
public static MapFileLine WorkingLine = new MapFileLine();
public static MapFileLabel WorkingLabel = new MapFileLabel();
public static MapFileLineType ParseLine(string line)
{
// ADD:
IFormatProvider NumFormat = new CultureInfo("en-US");
/* snip */
switch
{
case 'L': //and case 'P'
// call Cultureinfo for map coordinates x,y,z...
// REPLACE :
WorkingLine.from.x = (int)float.Parse(tokens[0]);
//with :
WorkingLine.from.x = (int)float.Parse(tokens[0], NumFormat);
// ++ all the other lines down to, but not including r, g, b tokens.
Tossing in a small "tweak"...
Code:
// In spawns.cs, line 34 : Change from :
public string mapName = "";
// to :
public string mapName = "no-map";
//spawns.cs, line 612+ :
public void SaveMobs()
{
string mobDumpFilename;
if (mobsHashTable.Count == 0)
return;
mobDumpFilename = String.Format("Spawns-{0}-{1}.txt", mapName, DateTime.Now.ToString("g").Replace("/","-").Replace(":","_"));
// adds Zone Name to dumpfile
mobDumpFilename = Path.Combine(Settings.logDir, mobDumpFilename);
using (StreamWriter sw = File.CreateText(mobDumpFilename))
{
sw.AutoFlush = true;
sw.WriteLine("Name\tLevel\tClass\tRace\tLastname\tType\tInvis\tRun Speed\tSpawnID\tX\tY\tZ\tHeading");
// changed from sw.Write to sw.WriteLine to keep with rest of code, removed /n
foreach (SpawnInfo si in mobsHashTable.Values)
{
sw.WriteLine("{0}\t{1}\t{2}\t{3}\t{4}\t{5}\t{6}\t{7}\t{8}\t{9}\t{10}\t{11}\t{12}", si.Name, si.valLevel, PrettyNames.GetClass(si.valClass), PrettyNames.GetRace(si.Race), si.Lastname,
PrettyNames.GetSpawn(si.valType), PrettyNames.GetVis(si.valHide), si.SpeedRun, si.SpawnID, si.Y, si.X, si.Z, si.MapHeading);
// added spacing to X, removed /n
}
sw.Close();
}
}
looks like solid code btw, I'm gonna enjoy this one. Unable to test this up against a running EQ instance atm though.
One thing I've wanted to try out is "remembering" each spawnpoint across zones.
Figured I'll do this by having client experience the spawnpoints, then pull the x, y, z data and insert into the Filter.Zone.cfg files, or the custom filter.
thus, next time I zone in, the client will pull spawnpoints from the filter, and add as as empty mapPoint.
In that regard, I could use a quick little hint on which hashfile be best to pull info from., Haven't looked much, but would the "X" Settings.c12w (etc) be best to use in this regard ?
One last thing...
I never looked much into the mqconsole thing, or crosschecked with 1.19.x
but I belive "bodytypes.txt", "Lookup.ini" and "weapons.txt" are obsolete now, and can be removed from the release build.
Seems they were used last around release of 1.9b / 1.10.
Better bobster