[RELEASE] Swift Emulator - Fixes / Edits

Status
Not open for further replies.
Experienced Elementalist
Joined
Feb 21, 2012
Messages
207
Reaction score
24
Can you fix this bugs:
- HC Doesn't save
- Room event doesnt work
 
Divine Celestial
Loyal Member
Joined
Jun 26, 2011
Messages
819
Reaction score
338
Can you fix this bugs:
- HC Doesn't save
- Room event doesnt work
HC saves for me on localhost. Plus, I used several pieces of code from this Emulator for my own project; haven't come across any errors as of yet.
 
Initiate Mage
Joined
Jan 20, 2013
Messages
1
Reaction score
0
The emulator use 95% of CPU on my VPS , how fix this ?

Sorry for my english i'm french !
 
Newbie Spellweaver
Joined
Jan 19, 2012
Messages
47
Reaction score
1
You could add a query log of all processed by the server that we could find sql infections
 
Skilled Illusionist
Joined
Aug 16, 2007
Messages
343
Reaction score
263
You could add a query log of all processed by the server that we could find sql infections

I estimate 1 query per second for each user in normal conditions ( not furni spawning) . Its not a good idea.


About that CPU leak, I didn't ever get it in my live server. I need more information such How many users you do have online. Anyway,I have a guessonwhat could cause that And I'm already working on it.

Also, I've started ripping PlusEmu Encryption so I can update my revision for the latest swf release
 
Newbie Spellweaver
Joined
Jan 19, 2012
Messages
47
Reaction score
1

nice that such a system identifying sql injection
 
Skilled Illusionist
Joined
Aug 16, 2007
Messages
343
Reaction score
263
This should fix any CPU consume thing if my guess was right
 
Last edited:
Newbie Spellweaver
Joined
Jun 8, 2013
Messages
15
Reaction score
0

When Fixed Please Put It In English Much Appreciated W2GO !!! Keep Up The Gud Work !!! Don't Stop Now !!!
 
Newbie Spellweaver
Joined
Apr 27, 2009
Messages
54
Reaction score
2
I've inserted all fixes in my existing emulator, with own fixes/edits. Thanks AKllX! I used: WinMerge

And, AKllX if you read this please replace this in your thread:
Code:
dbClient.setQuery("UPDATE user_bots SET name = '@data' WHERE id = '" + BotId + "'");
dbClient.addParameter("data",Data);
dbClient.runQuery();
to
Code:
dbClient.setQuery("UPDATE user_bots SET name = @data WHERE id = '" + BotId + "'");
dbClient.addParameter("data",Data);
dbClient.runQuery();
 
Skilled Illusionist
Joined
Aug 16, 2007
Messages
343
Reaction score
263

At HabboFacrory.cs line 30 . Probably trying to cast something to (uint). Replace for Convert.ToUInt32()



About fastfood and snowstorm. Games are hard to code, specially SnowStorm. It was never correctly coded as far as remember and I run retros since 2007. I'm mad if I try to code that by myself. But I might do It on my next college vacancy.
 
Newbie Spellweaver
Joined
Apr 20, 2007
Messages
40
Reaction score
9
For Crystal cost in catalogue just search this in CatalogItem.cs
Code:
 internal void Serialize(ServerMessage Message)
        {
            try
            {
                if (this.PageID != 5)
                {
                    Message.AppendInt32(this.Id);
                    Message.AppendString(this.Name);
                    Message.AppendInt32(this.CreditsCost);
                    Message.AppendInt32(this.PixelsCost);
                    Message.AppendInt32(0);

And change for this

Code:
internal void Serialize(ServerMessage Message)
        {
            try
            {
                if (this.PageID != 5)
                {
                    Message.AppendInt32(this.Id);
                    Message.AppendString(this.Name);
                    Message.AppendInt32(this.CreditsCost);
                    if (CrystalCost > 0)
                    {
                        Message.AppendInt32(this.CrystalCost);
                        Message.AppendInt32(105);
                    }
                    else 
                    {
                        Message.AppendInt32(this.PixelsCost);
                        Message.AppendInt32(0);
                    }


Can anyone give me the CrystalBalance Header? i never learn use the novo packetlogger in my own client T-T

Cheers
 
ส็็็็็็็
Loyal Member
Joined
Sep 21, 2009
Messages
2,005
Reaction score
594
I've experienced Ghosting of some objects when moved, I've written a fix and I'm just testing it to make sure it actually fixes the problem (its hard to replicate object-ghosting)

(This works for me, I've been unable to replicate the issue since I added this)

Find in GameClientMessageHandler.cs
Code:
room.GetRoomItemHandler().SetFloorItem(this.Session, item, newX, newY, newRot, false, false, true);

Replace it with:
Code:
                    if (!room.GetRoomItemHandler().SetFloorItem(this.Session, item, newX, newY, newRot, false, false, true))
                    {
                        Response.Init(Outgoing.UpdateItemOnRoom);
                        item.Serialize(Response, room.OwnerId);
                        SendResponse();
                    }

Tell me if it works for you or not, it does for me.

EDIT: This does fix catalog-drag ghosting.
 
Last edited:
Newbie Spellweaver
Joined
Apr 27, 2009
Messages
54
Reaction score
2

Thanks, I added it, if it worked for me I'll get back to you
 
Divine Celestial
Loyal Member
Joined
Jun 26, 2011
Messages
819
Reaction score
338



Got this error.
 

Attachments

You must be registered for see attachments list
Status
Not open for further replies.