The error that says the file is in use by another process...
The process is your server.
The server is trying to write to the file while it's still writing to the file.
This cannot be fixed, I tried... And tried... Thread sleeps don't work... It can't be fixed.
the reason why being people can do this...
- John opens client #1 and logs in
- Jane opens client #2 and logs in
- John opens client #3
- John logs in to the same account logged in on client #1
When someone does this the server simply can't keep up.
No matter how awesome your computer is.
The logout-login is so fast...
When you see that error on your console the .chr file that is linked to that character is stuck open, putting it simply.
It puts the character into a rollback.
Allowing the player to dupe cps, items... anything in trade.
And no putting a save after trade for both sides won't work either, since the character is already in a rollback :)
This is why so many people on your server have massive amounts of cps.
Seriously.... Do you really think 'fredilo' really hunted 13 million cps?
This is an ongoing issue with EVERY 'NewestCOServer', excluding those who have switched to MySQL/MSSQL
The only solution is switching the server to MySQL.
You could just about copy the way Co Emu uses MySQL and port it to NCS.
But then you have the login freezes, which can be fixed with a... Ahem
System :)
And as for your error with line 600 in the packet handler...
Try replacing your entire case 35 with this
Code:
case 35:
{
uint UID1 = BitConverter.ToUInt32(Data, 8);
uint UID2 = BitConverter.ToUInt32(Data, 4);
Game.Item UsedItem = GC.MyChar.FindInvItem(UID1);
byte Slot = GC.MyChar.Equips.GetSlot(UID2);
Game.Item Talisman = GC.MyChar.Equips.Get(Slot);
if (UsedItem.UID == UID1 && Talisman.UID == UID2 && UsedItem.ID != 0 && Talisman.ID != 0)
{
ushort Points = 0;
Game.ItemIDManipulation I = new NewestCOServer.Game.ItemIDManipulation(UsedItem.ID);
if (I.Quality == NewestCOServer.Game.Item.ItemQuality.Refined)
Points += 5;
else if (I.Quality == NewestCOServer.Game.Item.ItemQuality.Unique)
Points += 10;
else if (I.Quality == NewestCOServer.Game.Item.ItemQuality.Elite)
Points += 40;
else if (I.Quality == NewestCOServer.Game.Item.ItemQuality.Super)
Points += 1000;
if (UsedItem.Plus > 0)
Points += Database.SocPlusExtra[UsedItem.Plus - 1];
if (UsedItem.FreeItem)
break;
if (UsedItem.ID / 1000 == Talisman.ID / 1000)
break;
string Type = UsedItem.ID.ToString().Remove(2, UsedItem.ID.ToString().Length - 2);
uint WeirdThing = Convert.ToUInt32(Type);
if (WeirdThing <= 61 && WeirdThing >= 40)
{
if (I.Quality == NewestCOServer.Game.Item.ItemQuality.Elite || I.Quality == NewestCOServer.Game.Item.ItemQuality.Super)
{
if ((byte)UsedItem.Soc1 != 0 && (byte)UsedItem.Soc2 == 0)
Points += 160;
if ((byte)UsedItem.Soc1 != 0 && (byte)UsedItem.Soc2 != 0)
Points += 960;
}
}
else
{
if (I.Quality == NewestCOServer.Game.Item.ItemQuality.Elite || I.Quality == NewestCOServer.Game.Item.ItemQuality.Super)
{
if ((byte)UsedItem.Soc1 != 0 && (byte)UsedItem.Soc2 == 0)
Points += 2000;
if ((byte)UsedItem.Soc1 != 0 && (byte)UsedItem.Soc2 != 0)
Points += 8000;
}
}
Talisman.TalismanProgress += Points;
if (Talisman.Soc1 == NewestCOServer.Game.Item.Gem.NoSocket && Talisman.TalismanProgress >= 8000)
{
Talisman.Soc1 = NewestCOServer.Game.Item.Gem.EmptySocket;
Talisman.TalismanProgress -= 8000;
}
if (Talisman.Soc1 != NewestCOServer.Game.Item.Gem.NoSocket && Talisman.Soc2 == NewestCOServer.Game.Item.Gem.NoSocket && Talisman.TalismanProgress >= 20000)
{
Talisman.Soc2 = NewestCOServer.Game.Item.Gem.EmptySocket;
Talisman.TalismanProgress = 0;
}
GC.MyChar.Equips.Replace(Slot, Talisman, GC.MyChar);
GC.MyChar.RemoveItem(UsedItem);
}
break;
}
It's the packets dealing with talisman upgrades...
Not quite sure why that would be giving errors, unless someone is trying to use foreign objects in their talismans x)
I'm going to assume your Wuxing oven dupes +12 gears after a logout aswell?