Example #1
0
        internal void InitAfterLoad()
        {
            foreach (ArenaTeamMember arenaTeamMember in ArenaTeamMember.FindAll(this))
            {
                arenaTeamMember.Init(this);
                this.Members.Add(arenaTeamMember.Id, arenaTeamMember);
            }

            this.m_stats = ActiveRecordBase <ArenaTeamStats> .FindByPrimaryKey((object)this.Id);

            this.m_slot   = ArenaMgr.GetSlotByType(this.Type);
            this.m_leader = this[this.LeaderLowId];
            if (this.m_leader == null)
            {
                this.OnLeaderDeleted();
            }
            if (this.m_leader == null)
            {
                return;
            }
            this.Register();
        }
Example #2
0
        /// <summary>
        /// Load & initialize the Team
        /// </summary>
        internal void InitAfterLoad()
        {
            var members = ArenaTeamMember.FindAll(this);

            foreach (var atm in members)
            {
                atm.Init(this);
                Members.Add(atm.Id, atm);
            }
            m_stats = ArenaTeamStats.FindByPrimaryKey(this.Id);
            m_slot  = ArenaMgr.GetSlotByType(Type);

            m_leader = this[LeaderLowId];
            if (m_leader == null)
            {
                OnLeaderDeleted();
            }
            if (m_leader != null)
            {
                Register();
            }
        }