Beispiel #1
0
            public void GenerateBattleRainbowPacket(RainbowTeamBattleType value)
            {
                string rndm        = string.Empty;
                string rndm2       = string.Empty;
                var    RainbowTeam = ServerManager.Instance.RainbowBattleMembers.First(s => s.TeamEntity == value);

                if (RainbowTeam == null)
                {
                    return;
                }

                foreach (var bb in RainbowTeam.Session)
                {
                    if (RainbowBattleManager.AreNotInMap(bb))
                    {
                        continue;
                    }

                    rndm  += $"{bb.Character.CharacterId} ";
                    rndm2 +=
                        $"{bb.Character.Level}." +
                        $"{bb.Character.Morph}." +
                        $"{(byte)bb.Character.Class}." +
                        $"0." +
                        $"{bb.Character.Name}." +
                        $"{(byte)bb.Character.Gender}." +
                        $"{bb.Character.CharacterId}." +
                        $"{bb.Character.HeroLevel} ";
                }

                foreach (var bb in RainbowTeam.Session)
                {
                    if (RainbowBattleManager.AreNotInMap(bb))
                    {
                        continue;
                    }

                    bb.SendPacket("fbt 0 1");
                    bb.SendPacket($"fbt 1 {rndm}");
                    bb.SendPacket($"fblst {rndm2}");
                    bb.SendPacket($"fbt 5 1 600");
                    bb.SendPacket($"msg 0 you are the {value} team");
                    bb.SendPacket($"fbs {(byte)value} {RainbowTeam.Session.Count()} 0 0 0 0 0 {value}");
                }
                //fbs <Type> <TeamCount> <RedPts> <BluePts> <flag1> <flag2> <flag3> <TEAM>
            }
Beispiel #2
0
 public RainbowBattleTeam(IEnumerable <ClientSession> session, RainbowTeamBattleType RmbTeamType)
 {
     Session    = session;
     TeamEntity = RmbTeamType;
     TotalFlag  = new List <Tuple <int, RainbowNpcType> >();
 }