public static void SendStartMessage(BattleGame game) { Game.Base.Packets.GSPacketIn pkg = new Game.Base.Packets.GSPacketIn((byte)ePackageType.GAME_CHAT); pkg.WriteInt(2); if (game.GameType == eGameType.Free) { foreach (Player p in game.GetAllFightPlayers()) { (p.PlayerDetail as ProxyPlayer).Rate = 1; GSPacketIn pkg1 = SendBufferList(p, (p.PlayerDetail as ProxyPlayer).Buffers); game.SendToAll(pkg1); } pkg.WriteString("撮合成功!您所在的小队开始了自由战"); } else { pkg.WriteString("撮合成功!您所在的小队开始了公会战"); } game.SendToAll(pkg, null); }
public static void SendStartMessage(BattleGame game) { Game.Base.Packets.GSPacketIn pkg = new Game.Base.Packets.GSPacketIn((byte)ePackageType.GAME_CHAT); pkg.WriteInt(2); if (game.GameType == eGameType.Free) { foreach (Player p in game.GetAllFightPlayers()) { (p.PlayerDetail as ProxyPlayer).Rate = 1; GSPacketIn pkg1 = SendBufferList(p, (p.PlayerDetail as ProxyPlayer).Buffers); game.SendToAll(pkg1); } pkg.WriteString("Bắt cặp thành công, Bắt đẩu chiến đấu!"); } else { pkg.WriteString("Kết nối thất bại!"); } game.SendToAll(pkg, null); }
public static void SendStartMessage(BattleGame game) { GSPacketIn gSPacketIn = new GSPacketIn(3); gSPacketIn.WriteInt(2); if (game.GameType == eGameType.Free) { foreach (Player current in game.GetAllFightPlayers()) { (current.PlayerDetail as ProxyPlayer).m_antiAddictionRate = 1.0; GSPacketIn pkg = GameMgr.SendBufferList(current, (current.PlayerDetail as ProxyPlayer).Buffers); game.SendToAll(pkg); } gSPacketIn.WriteString("Tham chiến thành công, chúc bạn may mắn!"); } else { gSPacketIn.WriteString("Kết nối thất bại!"); } game.SendToAll(gSPacketIn, null); }
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); }
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); } }