示例#1
0
        private static void SendStartMessage(BattleGame game)
        {
            GSPacketIn pkg = new GSPacketIn(3);

            pkg.WriteInt(2);
            if (game.GameType == eGameType.Free)
            {
                pkg.WriteString(LanguageMgr.GetTranslation("StartMessage.free", new object[0]));
            }
            else
            {
                pkg.WriteString(LanguageMgr.GetTranslation("StartMessage.Consortia", new object[0]));
            }
            game.SendToAll(pkg, null);
        }
示例#2
0
 private static void SendBufferList(BattleGame game)
 {
     foreach (Player p in game.GetAllFightPlayers())
     {
         List <BufferInfo> infos = (p.PlayerDetail as ProxyPlayer).Buffers;
         GSPacketIn        pkg   = new GSPacketIn(186, p.PlayerDetail.PlayerCharacter.ID);
         pkg.Parameter1 = p.Id;
         pkg.WriteInt(infos.Count);
         foreach (BufferInfo info in infos)
         {
             pkg.WriteInt(info.Type);
             pkg.WriteBoolean(info.IsExist);
             pkg.WriteDateTime(info.BeginDate);
             pkg.WriteInt(info.ValidDate);
             pkg.WriteInt(info.Value);
         }
         game.SendToAll(pkg);
     }
 }