Ejemplo n.º 1
0
        /// <summary>
        /// Called before the given member is removed to clean up everything related to the given member
        /// </summary>
        protected void OnRemoveMember(ArenaTeamMember member)
        {
            ArenaMgr.UnregisterArenaTeamMember(member);
            Character character = member.Character;

            if (character == null)
            {
                return;
            }
            character.ArenaTeamMember[(int)this.Slot] = (ArenaTeamMember)null;
            character.SetArenaTeamInfoField(this.Slot, ArenaTeamInfoType.ARENA_TEAM_ID, 0U);
            character.SetArenaTeamInfoField(this.Slot, ArenaTeamInfoType.ARENA_TEAM_TYPE, 0U);
            character.SetArenaTeamInfoField(this.Slot, ArenaTeamInfoType.ARENA_TEAM_MEMBER, 0U);
            character.SetArenaTeamInfoField(this.Slot, ArenaTeamInfoType.ARENA_TEAM_GAMES_WEEK, 0U);
            character.SetArenaTeamInfoField(this.Slot, ArenaTeamInfoType.ARENA_TEAM_GAMES_SEASON, 0U);
            character.SetArenaTeamInfoField(this.Slot, ArenaTeamInfoType.ARENA_TEAM_WINS_SEASON, 0U);
            character.SetArenaTeamInfoField(this.Slot, ArenaTeamInfoType.ARENA_TEAM_PERSONAL_RATING, 0U);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Called before the given member is removed to clean up everything related to the given member
        /// </summary>
        protected void OnRemoveMember(ArenaTeamMember member)
        {
            ArenaMgr.UnregisterArenaTeamMember(member);

            var chr = member.Character;

            if (chr != null)
            {
                chr.ArenaTeamMember[(int)Slot] = null;
                chr.SetArenaTeamInfoField(Slot, ArenaTeamInfoType.ARENA_TEAM_ID, 0);
                chr.SetArenaTeamInfoField(Slot, ArenaTeamInfoType.ARENA_TEAM_TYPE, 0);
                chr.SetArenaTeamInfoField(Slot, ArenaTeamInfoType.ARENA_TEAM_MEMBER, 0);
                chr.SetArenaTeamInfoField(Slot, ArenaTeamInfoType.ARENA_TEAM_GAMES_WEEK, 0);
                chr.SetArenaTeamInfoField(Slot, ArenaTeamInfoType.ARENA_TEAM_GAMES_SEASON, 0);
                chr.SetArenaTeamInfoField(Slot, ArenaTeamInfoType.ARENA_TEAM_WINS_SEASON, 0);
                chr.SetArenaTeamInfoField(Slot, ArenaTeamInfoType.ARENA_TEAM_PERSONAL_RATING, 0);
            }
        }