
Originally Posted by
Resource
Any more updates
Yes actually, no Habbo client updates but I've been working on recoding everything as I would like it to use less MySQL queries as possible.
If you would like to see the last one before this, can be found here (http://forum.ragezone.com/6399852-post388.html)
When you place furni down, you want the whole room to see it being placed or chatting, triggering items etc...
I've done recoding (as I'm not happy with it atm, but I compared the source now with the first Aleeda it is FAR improved) examples such as:
Code:
public void SendRoom(GameClient Session, ServerMessage Message)
{
uint RoomId = Session.GetHabbo().Flat;
using (DatabaseClient dbClient = AleedaEnvironment.GetDatabase().GetClient())
{
dbClient.AddParamWithValue("id", id);
foreach (DataRow row in dbClient.ReadDataTable("SELECT * FROM users WHERE flat = @id;").Rows)
{
uint mId = (uint)row["id"];
GameClient mClient = AleedaEnvironment.GetHabboHotel().GetClients().GetClientOfHabbo(mId);
mClient.GetConnection().SendMessage(Message);
}
}
}
Where as now it's
Code:
public void SendRoomMessage(ServerMessage Message)
{
uint RoomId = this.GetHabbo().Flat;
foreach (int mRoomId in ClientMessageHandler.mRoomList.Values)
{
if (mRoomId != 0 && mRoomId == RoomId)
{
AleedaEnvironment.GetHabboHotel().GetClients().GetClientsByFlat(RoomId).GetConnection().SendMessage(Message);
}
}
}
As you clearly see, the 2nd one uses NO queries whatsoever which speeds up stuff greatly.