Example #1
0
 private void m_prcClient_MapListMapInserted(FrostbiteClient sender, MaplistEntry mapEntry) {
     // int mapIndex, string mapFileName, int rounds) {
     InvokeOnAllEnabled("OnMaplistMapInserted", mapEntry.Index, mapEntry.MapFileName, mapEntry.Rounds);
 }
Example #2
0
 private void m_prcClient_MapListMapAppended(FrostbiteClient sender, MaplistEntry mapEntry) {
     InvokeOnAllEnabled("OnMaplistMapAppended", mapEntry.MapFileName);
 }
Example #3
0
 public virtual void SendMapListInsertPacket(MaplistEntry map) {
     if (IsLoggedIn == true) {
         BuildSendPacket("mapList.insert", map.Index.ToString(CultureInfo.InvariantCulture), map.MapFileName, map.Rounds.ToString(CultureInfo.InvariantCulture));
     }
 }
Example #4
0
        protected virtual void DispatchMapListAppendResponse(FrostbiteConnection sender, Packet cpRecievedPacket, Packet cpRequestPacket) {
            if (cpRequestPacket.Words.Count >= 2) {
                MaplistEntry mapEntry = null;

                int iRounds = 0;

                if (cpRequestPacket.Words.Count == 2) {
                    mapEntry = new MaplistEntry(cpRequestPacket.Words[1]);
                }
                else if (cpRequestPacket.Words.Count >= 3 && int.TryParse(cpRequestPacket.Words[2], out iRounds) == true) {
                    mapEntry = new MaplistEntry(cpRequestPacket.Words[1], iRounds);
                }

                if (MapListMapAppended != null) {
                    this.MapListMapAppended(this, mapEntry);
                }
            }
        }
Example #5
0
        protected override void DispatchMapListAppendResponse(FrostbiteConnection sender, Packet cpRecievedPacket, Packet cpRequestPacket) {
            if (cpRequestPacket.Words.Count >= 4) {
                MaplistEntry mapEntry = null;

                int rounds = 0;
                int index = -1;

                if (int.TryParse(cpRequestPacket.Words[3], out rounds) == true) {
                    mapEntry = new MaplistEntry(cpRequestPacket.Words[2], cpRequestPacket.Words[1], rounds);
                }

                if (cpRequestPacket.Words.Count >= 5 && int.TryParse(cpRequestPacket.Words[4], out index) == true) {
                    mapEntry = new MaplistEntry(cpRequestPacket.Words[2], cpRequestPacket.Words[1], rounds, index);
                }

                if (MapListMapAppended != null) {
                    FrostbiteConnection.RaiseEvent(index == -1 ? MapListMapAppended.GetInvocationList() : MapListMapInserted.GetInvocationList(), this, mapEntry);
                }
            }
        }
Example #6
0
 public override void SendMapListInsertPacket(MaplistEntry map) {
     if (IsLoggedIn == true) {
         BuildSendPacket("mapList.add", map.MapFileName, map.Gamemode, (map.Rounds > 0 ? map.Rounds : 2).ToString(CultureInfo.InvariantCulture), map.Index.ToString(CultureInfo.InvariantCulture));
     }
 }