Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Server Development
Habbo Retros
Habbo Q&A
PlusEmulator - System login error
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="zMagenta" data-source="post: 233564" data-attributes="member: 4512"><p>For added information, here is the void of 'LoadFurniture':</p><p>[PHP]internal void LoadFurniture()</p><p> {</p><p> this.mFloorItems.Clear();</p><p> this.mWallItems.Clear();</p><p> using (IQueryAdapter adapter = PlusEnvironment.GetDatabaseManager().getQueryreactor())</p><p> {</p><p> GameClient clientByUserID;</p><p> adapter.setQuery("SELECT `items`.* , COALESCE(`items_groups`.`group_id`, 0) AS group_id FROM `items` LEFT OUTER JOIN `items_groups` ON `items`.`id` = `items_groups`.`id` WHERE items.room_id=@roomid LIMIT 2000");</p><p> adapter.addParameter("roomid", this.room.RoomId);</p><p> DataTable table = adapter.getTable();</p><p> if (table.Rows.Count == 0x7d0)</p><p> {</p><p> clientByUserID = PlusEnvironment.GetGame().GetClientManager().GetClientByUserID((uint) this.room.OwnerId);</p><p> if (clientByUserID != null)</p><p> {</p><p> clientByUserID.SendNotif("Your room has more than 2000 items in it. The current limit of items per room is 2000.\nTo view the rest, pick some of these items up!");</p><p> }</p><p> }</p><p> foreach (DataRow row in table.Rows)</p><p> {</p><p> try</p><p> {</p><p> string str;</p><p> string str2;</p><p> RoomItem item;</p><p> uint query = Convert.ToUInt32(row[0]);</p><p> int x = Convert.ToInt32(row[5]);</p><p> int y = Convert.ToInt32(row[6]);</p><p> double z = Convert.ToDouble(row[7]);</p><p> sbyte rot = Convert.ToSByte(row[8]);</p><p> uint userid = Convert.ToUInt32(row[1]);</p><p> if (userid == 0)</p><p> {</p><p> adapter.setQuery("UPDATE items SET user_id=@userid WHERE id=@itemID LIMIT 1");</p><p> adapter.addParameter("itemID", query);</p><p> adapter.addParameter("userid", this.room.OwnerId);</p><p> adapter.runQuery();</p><p> }</p><p> if (string.IsNullOrWhiteSpace(row[9].ToString()))</p><p> {</p><p> adapter.setQuery("SELECT type FROM furniture WHERE id=" + row[3] + " LIMIT 1");</p><p> if (adapter.getString() == "i")</p><p> {</p><p> str2 = ":w=0,2 l=11,53 l";</p><p> adapter.runFastQuery(string.Concat(new object[] { "UPDATE items SET wall_pos='", str2, "' WHERE id=", query, " LIMIT 1" }));</p><p> }</p><p> }</p><p> str2 = Convert.ToString(row[9]);</p><p> uint baseItem = Convert.ToUInt32(row[3]);</p><p> if (DBNull.Value.Equals(row[4]))</p><p> {</p><p> str = string.Empty;</p><p> }</p><p> else</p><p> {</p><p> str = (string) row[4];</p><p> }</p><p> uint group = Convert.ToUInt32(row[10]);</p><p> if (!string.IsNullOrWhiteSpace(str2))</p><p> {</p><p> string wallCoord = this.WallPositionCheck(":" + str2.Split(new char[] { ':' })[1]);</p><p> item = new RoomItem(query, this.room.RoomId, baseItem, str, wallCoord, this.room, userid, group);</p><p> if (!this.mWallItems.ContainsKey(query))</p><p> {</p><p> this.mWallItems.Inner.Add(query, item);</p><p> }</p><p> }</p><p> else</p><p> {</p><p> item = new RoomItem(query, this.room.RoomId, baseItem, str, x, y, z, rot, this.room, userid, group);</p><p> if (!this.room.GetGameMap().ValidTile(x, y))</p><p> {</p><p> clientByUserID = PlusEnvironment.GetGame().GetClientManager().GetClientByUserID(userid);</p><p> if (clientByUserID != null)</p><p> {</p><p> clientByUserID.GetHabbo().GetInventoryComponent().AddNewItem(item.Id, item.BaseItem, item.ExtraData, group, true, true, 0, 0, 0);</p><p> adapter.runFastQuery("UPDATE items SET room_id='' WHERE id='" + item.Id + "' LIMIT 1");</p><p> clientByUserID.GetHabbo().GetInventoryComponent().UpdateItems(true);</p><p> }</p><p> else</p><p> {</p><p> adapter.runFastQuery("UPDATE items SET room_id='' WHERE id='" + item.Id + "' LIMIT 1");</p><p> }</p><p> }</p><p> else</p><p> {</p><p> if ((item.GetBaseItem().InteractionType == InteractionType.onewaygate) || (item.GetBaseItem().InteractionType == InteractionType.teleport))</p><p> {</p><p> adapter.setQuery("SELECT toll_price FROM item_tolls WHERE item_id='" + item.Id + "' LIMIT 1");</p><p> item.TollPrice = adapter.getInteger();</p><p> }</p><p> if (item.GetBaseItem().InteractionType == InteractionType.hopper)</p><p> {</p><p> this.HopperCount++;</p><p> }</p><p> if (!this.mFloorItems.ContainsKey(query))</p><p> {</p><p> this.mFloorItems.Inner.Add(query, item);</p><p> }</p><p> if (item.IsWired)</p><p> {</p><p> this.room.GetWiredHandler().LoadWired(this.room.GetWiredHandler().GenerateNewItem(item));</p><p> }</p><p> }</p><p> }</p><p> }</p><p> catch (Exception exception)</p><p> {</p><p> Console.WriteLine(exception);</p><p> }</p><p> }</p><p> foreach (RoomItem item2 in this.mFloorItems.Values)</p><p> {</p><p> if (item2.IsRoller)</p><p> {</p><p> this.mGotRollers = true;</p><p> }</p><p> else if (item2.GetBaseItem().InteractionType == InteractionType.dimmer)</p><p> {</p><p> if (this.room.MoodlightData == null)</p><p> {</p><p> this.room.MoodlightData = new MoodlightData(item2.Id);</p><p> }</p><p> }</p><p> else if ((item2.GetBaseItem().InteractionType == InteractionType.roombg) && (this.room.TonerData == null))</p><p> {</p><p> this.room.TonerData = new TonerData(item2.Id);</p><p> }</p><p> }</p><p> }</p><p> }</p><p>[/PHP]</p></blockquote><p></p>
[QUOTE="zMagenta, post: 233564, member: 4512"] For added information, here is the void of 'LoadFurniture': [PHP]internal void LoadFurniture() { this.mFloorItems.Clear(); this.mWallItems.Clear(); using (IQueryAdapter adapter = PlusEnvironment.GetDatabaseManager().getQueryreactor()) { GameClient clientByUserID; adapter.setQuery("SELECT `items`.* , COALESCE(`items_groups`.`group_id`, 0) AS group_id FROM `items` LEFT OUTER JOIN `items_groups` ON `items`.`id` = `items_groups`.`id` WHERE items.room_id=@roomid LIMIT 2000"); adapter.addParameter("roomid", this.room.RoomId); DataTable table = adapter.getTable(); if (table.Rows.Count == 0x7d0) { clientByUserID = PlusEnvironment.GetGame().GetClientManager().GetClientByUserID((uint) this.room.OwnerId); if (clientByUserID != null) { clientByUserID.SendNotif("Your room has more than 2000 items in it. The current limit of items per room is 2000.\nTo view the rest, pick some of these items up!"); } } foreach (DataRow row in table.Rows) { try { string str; string str2; RoomItem item; uint query = Convert.ToUInt32(row[0]); int x = Convert.ToInt32(row[5]); int y = Convert.ToInt32(row[6]); double z = Convert.ToDouble(row[7]); sbyte rot = Convert.ToSByte(row[8]); uint userid = Convert.ToUInt32(row[1]); if (userid == 0) { adapter.setQuery("UPDATE items SET user_id=@userid WHERE id=@itemID LIMIT 1"); adapter.addParameter("itemID", query); adapter.addParameter("userid", this.room.OwnerId); adapter.runQuery(); } if (string.IsNullOrWhiteSpace(row[9].ToString())) { adapter.setQuery("SELECT type FROM furniture WHERE id=" + row[3] + " LIMIT 1"); if (adapter.getString() == "i") { str2 = ":w=0,2 l=11,53 l"; adapter.runFastQuery(string.Concat(new object[] { "UPDATE items SET wall_pos='", str2, "' WHERE id=", query, " LIMIT 1" })); } } str2 = Convert.ToString(row[9]); uint baseItem = Convert.ToUInt32(row[3]); if (DBNull.Value.Equals(row[4])) { str = string.Empty; } else { str = (string) row[4]; } uint group = Convert.ToUInt32(row[10]); if (!string.IsNullOrWhiteSpace(str2)) { string wallCoord = this.WallPositionCheck(":" + str2.Split(new char[] { ':' })[1]); item = new RoomItem(query, this.room.RoomId, baseItem, str, wallCoord, this.room, userid, group); if (!this.mWallItems.ContainsKey(query)) { this.mWallItems.Inner.Add(query, item); } } else { item = new RoomItem(query, this.room.RoomId, baseItem, str, x, y, z, rot, this.room, userid, group); if (!this.room.GetGameMap().ValidTile(x, y)) { clientByUserID = PlusEnvironment.GetGame().GetClientManager().GetClientByUserID(userid); if (clientByUserID != null) { clientByUserID.GetHabbo().GetInventoryComponent().AddNewItem(item.Id, item.BaseItem, item.ExtraData, group, true, true, 0, 0, 0); adapter.runFastQuery("UPDATE items SET room_id='' WHERE id='" + item.Id + "' LIMIT 1"); clientByUserID.GetHabbo().GetInventoryComponent().UpdateItems(true); } else { adapter.runFastQuery("UPDATE items SET room_id='' WHERE id='" + item.Id + "' LIMIT 1"); } } else { if ((item.GetBaseItem().InteractionType == InteractionType.onewaygate) || (item.GetBaseItem().InteractionType == InteractionType.teleport)) { adapter.setQuery("SELECT toll_price FROM item_tolls WHERE item_id='" + item.Id + "' LIMIT 1"); item.TollPrice = adapter.getInteger(); } if (item.GetBaseItem().InteractionType == InteractionType.hopper) { this.HopperCount++; } if (!this.mFloorItems.ContainsKey(query)) { this.mFloorItems.Inner.Add(query, item); } if (item.IsWired) { this.room.GetWiredHandler().LoadWired(this.room.GetWiredHandler().GenerateNewItem(item)); } } } } catch (Exception exception) { Console.WriteLine(exception); } } foreach (RoomItem item2 in this.mFloorItems.Values) { if (item2.IsRoller) { this.mGotRollers = true; } else if (item2.GetBaseItem().InteractionType == InteractionType.dimmer) { if (this.room.MoodlightData == null) { this.room.MoodlightData = new MoodlightData(item2.Id); } } else if ((item2.GetBaseItem().InteractionType == InteractionType.roombg) && (this.room.TonerData == null)) { this.room.TonerData = new TonerData(item2.Id); } } } } [/PHP] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Q&A
PlusEmulator - System login error
Top