[TUT] Update cata after buying LTD

EKerik

Member
Apr 7, 2013
38
2
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 catalog.cs in Butterfly > HabboHotel > Catalogs. 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 }));

After that line of code add this:
Code:
using (IQueryAdapter adaptr = ButterflyEnvironment.GetDatabaseManager().getQueryreactor())
                                {
                                    ButterflyEnvironment.GetGame().GetCatalog().Initialize(adaptr);
                                }
                                ButterflyEnvironment.GetGame().GetCatalog().InitCache();

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 :)
 

nguyenhauq

New Member
Feb 16, 2014
26
0
you can give me source Butterfly ??
i can't find
adapter.runFastQuery(string.Concat(new object[] { "UPDATE catalog_items_copy SET limited_sells = ", item.LimitedSelled, " WHERE id = ", item.Id }));

in catalog.cs
 

Users who are viewing this thread

Top