Пример #1
0
 internal void LoadArena(SnowStorm War)
 {
     ServerMessage StageStarting = new ServerMessage(Outgoing.Game2StageStartingMessageEvent);
     StageStarting.AppendInt32(0);
     StageStarting.AppendString("snowwar_arena_0");
     StageStarting.AppendInt32(5);
     this.CheckArenaStatic(StageStarting, War);
     int xyz = 0;
     foreach (Habbo habbo in War.WarUsers)
     {
         //habbo.SnowUserId = xyz;
         StageStarting.AppendInt32(5);
         //StageStarting.AppendInt32(0);
         StageStarting.AppendInt32(habbo.SnowUserId);
         StageStarting.AppendInt32(habbo.SnowX);
         StageStarting.AppendInt32(habbo.SnowY);
         StageStarting.AppendInt32((int)(habbo.SnowX / 0xc80));
         StageStarting.AppendInt32((int)(habbo.SnowY / 0xc80));
         StageStarting.AppendInt32(habbo.SnowRot);
         StageStarting.AppendInt32(5);
         StageStarting.AppendInt32(5);
         StageStarting.AppendInt32(0);
         StageStarting.AppendInt32(0);
         StageStarting.AppendInt32(0);
         StageStarting.AppendInt32((int)(habbo.SnowX / 0xc80));
         StageStarting.AppendInt32((int)(habbo.SnowY / 0xc80));
         StageStarting.AppendInt32(habbo.SnowX);
         StageStarting.AppendInt32(habbo.SnowY);
         StageStarting.AppendInt32(0);
         //StageStarting.AppendInt32(0);
         StageStarting.AppendInt32(habbo.SnowTeam);
         StageStarting.AppendInt32(habbo.Id);
         StageStarting.AppendString(habbo.Username);
         StageStarting.AppendString(habbo.Motto);
         StageStarting.AppendString(habbo.Figure);
         StageStarting.AppendString(habbo.Gender.ToLower());
         xyz++;
     }
     War.SendToStorm(StageStarting, false, 0);
     Thread.Sleep(5000);
     foreach (Habbo habbo in War.WarUsers)
     {
         ServerMessage PlayerExited = new ServerMessage(Outgoing.Game2PlayerExitedGameArenaMessageEvent);
         PlayerExited.AppendInt32(habbo.Id);
         PlayerExited.AppendInt32(20);
         habbo.GetClient().SendMessage(PlayerExited);
     }
     Thread thrd = new Thread(delegate()
     {
         int countdown = 120;
         while (countdown != 0)
         {
             ServerMessage StageRunning = new ServerMessage(Outgoing.Game2StageRunningMessageEvent);
             StageRunning.AppendInt32(countdown--);
             War.SendToStorm(StageRunning);
             ServerMessage Message5_0 = new ServerMessage(2352);//Game2FullGameStatusMessageEvent
             Message5_0.AppendInt32(1);
             Message5_0.AppendInt32(1);
             Message5_0.AppendInt32(1);
             Message5_0.AppendInt32(1);
             Message5_0.AppendInt32(1);
             Message5_0.AppendInt32(countdown);
             War.SendToStorm(Message5_0);
             Thread.Sleep(1000);
         }
     });
     thrd.Start();
     War.SnowStormStart();
 }
 internal void LoadArena(SnowStorm War)
 {
     this.GetResponse().Init(Outgoing.Game2StageStartingMessageEvent);
     this.GetResponse().AppendInt32(0);
     this.GetResponse().AppendString("snowwar_arena_0");
     this.GetResponse().AppendInt32(5);
     this.CheckArenaStatic(this.GetResponse(), War);
     foreach (Habbo habbo in War.WarUsers)
     {
         this.GetResponse().AppendInt32(5);
         this.GetResponse().AppendInt32(habbo.SnowUserId);
         this.GetResponse().AppendInt32(habbo.SnowX);
         this.GetResponse().AppendInt32(habbo.SnowY);
         this.GetResponse().AppendInt32((int)(habbo.SnowX / 0xc80));
         this.GetResponse().AppendInt32((int)(habbo.SnowY / 0xc80));
         this.GetResponse().AppendInt32(2);
         this.GetResponse().AppendInt32(5);
         this.GetResponse().AppendInt32(5);
         this.GetResponse().AppendInt32(0);
         this.GetResponse().AppendInt32(0);
         this.GetResponse().AppendInt32(0);
         this.GetResponse().AppendInt32((int)(habbo.SnowX / 0xc80));
         this.GetResponse().AppendInt32((int)(habbo.SnowY / 0xc80));
         this.GetResponse().AppendInt32(habbo.SnowX);
         this.GetResponse().AppendInt32(habbo.SnowY);
         this.GetResponse().AppendInt32(0);
         this.GetResponse().AppendInt32(habbo.SnowTeam);
         this.GetResponse().AppendInt32(habbo.Id);
         this.GetResponse().AppendString(habbo.Username);
         this.GetResponse().AppendString(habbo.Motto);
         this.GetResponse().AppendString(habbo.Figure);
         this.GetResponse().AppendString(habbo.Gender.ToLower());
     }
     War.SendToStorm(this.GetResponse(), false, 0);
     Thread.Sleep(5000);
     foreach (Habbo habbo in War.WarUsers)
     {
         this.GetResponse().Init(Outgoing.Game2PlayerExitedGameArenaMessageEvent);
         this.GetResponse().AppendInt32(habbo.Id);
         this.GetResponse().AppendInt32(20);
         habbo.GetClient().SendMessage(this.GetResponse());
     }
     this.GetResponse().Init(Outgoing.Game2StageRunningMessageEvent);
     this.GetResponse().AppendInt32(120);
     War.SendToStorm(this.GetResponse(), false, 0);
     War.SnowStormStart();
 }