the area is correct

,int> ();
Code: Alles auswählen
public int Intern(string value)
{
return Intern(value, true);
}
public int Intern( string value, bool enforceUnique )
{
if (enforceUnique)
{
int indexOf = m_Strings.IndexOf(value);
if (indexOf >= 0)
{
return indexOf;
}
}
Invalidate();
m_Strings.Add(value);
return m_Strings.Count - 1;
}
Code: Alles auswählen
public void PrecompileStringTable()
{
// here's the order on OSI:
// first two strings are "old" unlocalized version:
Intern("Charges"); // 0
Intern("Max Charges"); // 1
// Next 16 entries are Location Values
for (int i = 0; i < 16; ++i)
{
string desc;
if (i < m_Book.Entries.Count)
desc = GetName(((RunebookEntry)m_Book.Entries[i]).Description);
else
desc = "Empty";
Intern(desc, false);
}
// Next 2 entries are charge / max charge
Intern(m_Book.CurCharges.ToString(), false);
Intern(m_Book.MaxCharges.ToString(), false);
// then old unused "drop rune" etc entries
Intern("Drop Rune");
Intern("Rename Book");
Intern("Set Default"); // 22
// then location values, one entry has two values
for (int i = 0; i < 16; ++i)
{
if (i < m_Book.Entries.Count)
{
RunebookEntry e = (RunebookEntry)m_Book.Entries[i];
// Location labels
int xLong = 0, yLat = 0;
int xMins = 0, yMins = 0;
bool xEast = false, ySouth = false;
if (Sextant.Format(e.Location, e.Map, ref xLong, ref yLat, ref xMins, ref yMins, ref xEast, ref ySouth))
{
Intern(String.Format("{0}?{1}'{2}", yLat, yMins, ySouth ? "S" : "N"), false);
Intern(String.Format("{0}?{1}'{2}", xLong, xMins, xEast ? "E" : "W"), false);
}
else
{
Intern("Nowhere", false);
}
}
else
{
Intern("Nowhere", false);
}
}
}
Code: Alles auswählen
public static void Initialize()
{
RegisterType(typeof(RunebookGump), 0x59);
}
I really do not recommend that you start modifying the program without knowing what each line does, and why they have to be there.Link_of_Hyrule hat geschrieben:ok i have a question after i make these modes will 2d gumps still work correctly?