Advertisement
Guest User

Refresh command

a guest
Sep 20th, 2014
204
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.06 KB | None | 0 0
  1.  class Refresh : IChatCommand
  2.     {
  3.         public void Invoke(Kernel.Network.Session session, params object[] arguments)
  4.         {
  5.             if (arguments.Length < 1)
  6.             {
  7.                 // Need more arguments
  8.             }
  9.             else
  10.             {
  11.                 switch (arguments[0].ToString())
  12.                 {
  13.                     case "catalogue":
  14.                         {
  15.                             HabboEnvironment.Habbo.ShopManager = new Shop.ShopManager();
  16.                             HabboEnvironment.Habbo.SetCacheComponent("ShopManager", HabboEnvironment.Habbo.ShopManager);
  17.                             HabboEnvironment.Habbo.GetCacheComponent("ShopManager").Cache();
  18.  
  19.                             ServerMessage message = new ServerMessage(1068);
  20.                             message.Append(true);
  21.                             HabboEnvironment.GameSocketServer.Sessions.ForEach(x => x.Value.SendResponse(message));
  22.  
  23.                             break;
  24.                         }
  25.                 }
  26.             }
  27.         }
  28.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement