- Joined
- Jun 12, 2008
- Messages
- 237
- Reaction score
- 0
OKi...so here we are... well the problem of guilds/friends in lotf source is the name of players in guild or u have in ur friends list.If that person have a name with the '~' in its name....the server will go crazy.To fix u can do 1 thing....XD
For GUILDS!
NOTE:BEFORE DO ANYTHING DELETE ALL GUILDS FROM DATABASE!
Go in database.cs
search for
u`ll see there something like
make them
now search for
u`ll see there....
make them
Now in guild.cs
search for
there u can see something like
make it....
now... in same statement before
add a
and after
add
Thats all for the guilds.
For FRIENDS now...
in database.cs
search for
there u`ll see
make them
now....
in character.cs
search for
you`ll see there
make it
and at
u`ll see there
make it
Hope you`ll enjoy...wont exist any problems with the guilds and friends after...
For GUILDS!
NOTE:BEFORE DO ANYTHING DELETE ALL GUILDS FROM DATABASE!
Go in database.cs
search for
Code:
public static void SaveGuild(Guild TheGuild)
Code:
PackedDLs += dl + "~";
PackedMembers += nm + "~";
PackedAllies += ally + "~";
PackedEnemies += enemy + "~";
Code:
PackedDLs += dl + ".";
PackedMembers += nm + ".";
PackedAllies += ally + ".";
PackedEnemies += enemy + ".";
now search for
Code:
public static void LoadGuilds()
Code:
string[] RDLS = DLs.Split('~');
string[] RNMs = NMs.Split('~');
Code:
string[] RDLS = DLs.Split('.');
string[] RNMs = NMs.Split('.');
Now in guild.cs
search for
Code:
public Guild(string guildname, ushort guildid, string creator, string[] dls, string[] members, uint fund, uint gwwins, byte holdingpole, uint membersc, string bulletin, string allies, string enemies)
Code:
string[] Splitter = allies.Split('~');
Splitter = allies.Split('~');
Code:
string[] Splitter = allies.Split('.');
Splitter = allies.Split('.');
Code:
GuildName = guildname;
GuildID = guildid;
MembersCount = membersc;
GWWins = gwwins;
Fund = fund;
Code:
try
{
Code:
if (members.Length > 0 && members[0] != "")
{
foreach (string mem in members)
{
if (mem != null && mem.Length > 0)
{
Splitter = mem.Split(':');
Members.Add(uint.Parse(Splitter[1]), mem);
}
}
}
Code:
}
catch (Exception Exc) { General.WriteLine(Convert.ToString(Exc)); }
Thats all for the guilds.
For FRIENDS now...
in database.cs
search for
Code:
public static void RemoveFromFriend(uint RemoverUID, uint RemovedUID)
Code:
string[] Friendss = Friends.Split('~');
NewFriends += friend + "~";
Code:
string[] Friendss = Friends.Split('.');
NewFriends += friend + ".";
now....
in character.cs
search for
Code:
public void UnPackFriends()
you`ll see there
Code:
string[] Friendss = PackedFriends.Split('~');
Code:
string[] Friendss = PackedFriends.Split('.');
and at
Code:
public void PackFriends()
Code:
PackedFriends += (string)DE.Value + ":" + (uint)DE.Key + "~";
Code:
PackedFriends += (string)DE.Value + ":" + (uint)DE.Key + ".";
Hope you`ll enjoy...wont exist any problems with the guilds and friends after...