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
[FluxEmu] How to fix items owner
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="Kashi" data-source="post: 461944" data-attributes="member: 47548"><p>[CODE=cpp] public static RoomItem PlaceItemToRoomReturn(uint BaseId, int X, int Y, double Z, int Rot, bool FromInventory, uint roomid, bool ToDB = true)</p><p> {</p><p></p><p> using (IQueryAdapter dbClient = Plus.GetDatabaseManager().GetQueryReactor())</p><p> {</p><p> Room Room = GenerateRoom(roomid);</p><p> int ItDemId = 0;</p><p> uint ItemId = 0;</p><p></p><p> if (ToDB)</p><p> {</p><p> dbClient.SetQuery("INSERT INTO items_rooms (user_id,base_item) VALUES (1, " + BaseId + ")");</p><p> dbClient.RunQuery();</p><p> dbClient.SetQuery("SELECT id FROM items_rooms WHERE user_id = '1' AND room_id = 0 AND base_item = '" + BaseId + "' ORDER BY id DESC LIMIT 1");</p><p> ItDemId = dbClient.GetInteger();</p><p> ItemId = Convert.ToUInt32(ItDemId);</p><p> }</p><p> else</p><p> {</p><p> dbClient.SetQuery("SELECT id FROM items_rooms WHERE user_id = '1' AND room_id = 0 ORDER BY id DESC LIMIT 1");</p><p> ItDemId = dbClient.GetInteger();</p><p> ItemId = Convert.ToUInt32(ItDemId) + 1;</p><p> }</p><p> </p><p></p><p> RoomItem RoomItem = new RoomItem(ItemId, Room.RoomId, BaseId, "", X, Y, Z, Rot, Room, Convert.ToUInt32(Room.RoomData.OwnerId), 0, 3537, "", false);</p><p></p><p></p><p> Room.GetRoomItemHandler().SetRockItem(RoomItem, X, Y, Rot, true, false, true, false, false);</p><p></p><p> return RoomItem;</p><p> }</p><p></p><p> }</p><p>[/CODE]</p><p></p><p>Here was the snippet for PlaceItemToRoom found in RoleplayManager.cs</p></blockquote><p></p>
[QUOTE="Kashi, post: 461944, member: 47548"] [CODE=cpp] public static RoomItem PlaceItemToRoomReturn(uint BaseId, int X, int Y, double Z, int Rot, bool FromInventory, uint roomid, bool ToDB = true) { using (IQueryAdapter dbClient = Plus.GetDatabaseManager().GetQueryReactor()) { Room Room = GenerateRoom(roomid); int ItDemId = 0; uint ItemId = 0; if (ToDB) { dbClient.SetQuery("INSERT INTO items_rooms (user_id,base_item) VALUES (1, " + BaseId + ")"); dbClient.RunQuery(); dbClient.SetQuery("SELECT id FROM items_rooms WHERE user_id = '1' AND room_id = 0 AND base_item = '" + BaseId + "' ORDER BY id DESC LIMIT 1"); ItDemId = dbClient.GetInteger(); ItemId = Convert.ToUInt32(ItDemId); } else { dbClient.SetQuery("SELECT id FROM items_rooms WHERE user_id = '1' AND room_id = 0 ORDER BY id DESC LIMIT 1"); ItDemId = dbClient.GetInteger(); ItemId = Convert.ToUInt32(ItDemId) + 1; } RoomItem RoomItem = new RoomItem(ItemId, Room.RoomId, BaseId, "", X, Y, Z, Rot, Room, Convert.ToUInt32(Room.RoomData.OwnerId), 0, 3537, "", false); Room.GetRoomItemHandler().SetRockItem(RoomItem, X, Y, Rot, true, false, true, false, false); return RoomItem; } } [/CODE] Here was the snippet for PlaceItemToRoom found in RoleplayManager.cs [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Q&A
[FluxEmu] How to fix items owner
Top