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 Tutorials
[TUT] Update cata after buying LTD
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="EKerik" data-source="post: 202227" data-attributes="member: 30765"><p>Today i ran into a problem, my catalogue was not updating after someone bought an LTD. So i started to find where the buying method for LTD's is located. I found it and then looked for the refresh cata command.</p><p>I simply added some code of the Refresh cata to the buy LTD part.</p><p> </p><p>Ok, so now i will be explain how to do this.</p><p>Look for <strong>catalog.cs</strong> in <strong>Butterfly > HabboHotel > Catalogs</strong>. Open the file and search for:</p><p>[code]adapter.runFastQuery(string.Concat(new object[] { "UPDATE catalog_items_copy SET limited_sells = ", item.LimitedSelled, " WHERE id = ", item.Id }));[/code]</p><p> </p><p>After that line of code add this:</p><p>[code]using (IQueryAdapter adaptr = ButterflyEnvironment.GetDatabaseManager().getQueryreactor())</p><p> {</p><p> ButterflyEnvironment.GetGame().GetCatalog().Initialize(adaptr);</p><p> }</p><p> ButterflyEnvironment.GetGame().GetCatalog().InitCache();[/code]</p><p> </p><p>Voila! Now it updates the catalogue when someone buys an LTD item. (it will not directly update for the current user, maybe someone else knows how to do this?)</p><p> </p><p>Hope this helped <img src="/styles/default/xenforo/smilies/emojione/smile.png" class="smilie" loading="lazy" alt=":)" title="Smile :)" data-shortname=":)" /></p></blockquote><p></p>
[QUOTE="EKerik, post: 202227, member: 30765"] Today i ran into a problem, my catalogue was not updating after someone bought an LTD. So i started to find where the buying method for LTD's is located. I found it and then looked for the refresh cata command. I simply added some code of the Refresh cata to the buy LTD part. Ok, so now i will be explain how to do this. Look for [B]catalog.cs[/B] in [B]Butterfly > HabboHotel > Catalogs[/B]. Open the file and search for: [code]adapter.runFastQuery(string.Concat(new object[] { "UPDATE catalog_items_copy SET limited_sells = ", item.LimitedSelled, " WHERE id = ", item.Id }));[/code] After that line of code add this: [code]using (IQueryAdapter adaptr = ButterflyEnvironment.GetDatabaseManager().getQueryreactor()) { ButterflyEnvironment.GetGame().GetCatalog().Initialize(adaptr); } ButterflyEnvironment.GetGame().GetCatalog().InitCache();[/code] Voila! Now it updates the catalogue when someone buys an LTD item. (it will not directly update for the current user, maybe someone else knows how to do this?) Hope this helped :) [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Tutorials
[TUT] Update cata after buying LTD
Top