Ejemplo n.º 1
0
        private void OnRemoveUserParty(UserParty party)
        {
            var userPartyIndex = UserParties.ToList().FindIndex(x => x.Id == party.Id);

            if (userPartyIndex >= 0)
            {
                UserParties.RemoveAt(userPartyIndex);
            }
        }
Ejemplo n.º 2
0
        private void OnChangeUserParty(UserParty party)
        {
            var userPartyIndex = UserParties.ToList().FindIndex(x => x.Id == party.Id);

            if (userPartyIndex >= 0)
            {
                UserParties[userPartyIndex].UpdateParty(party);;
                var parties = UserParties.ToArray();
                UserParties.Clear();
                UserParties.AddRange(parties.OrderByDescending(x => x.Party.Value.CreateTime));
            }

            var attackRouteIndex = AttackParties.ToList().FindIndex(x => x.Id == party.Id);

            if (attackRouteIndex >= 0)
            {
                AttackParties[attackRouteIndex].UpdateParty(party);
                CheckDoubling();
            }
        }