Esempio n. 1
0
    /// <summary>
    /// 是否当前职阶拥有权限right
    /// </summary>
    /// <param name="duty"></param>
    /// <param name="right"></param>
    /// <returns></returns>
    public static bool IsClanDutyHaveRight(GameCmd.enumClanDuty duty, ClanDutyRight right)
    {
        bool have = false;

        table.ClanDutyPermDataBase db
            = GameTableManager.Instance.GetTableItem <table.ClanDutyPermDataBase>((uint)duty);
        if (null != db)
        {
            switch (right)
            {
            case ClanDutyRight.AgreeApply:
                have = (db.agreeApply == 1);
                break;

            case ClanDutyRight.Appointment:
                have = (db.appointment == 1);
                break;

            case ClanDutyRight.BroadCaseGG:
                have = (db.broadcastGG == 1);
                break;

            case ClanDutyRight.BroadCastMsg:
                have = (db.broadcastMsg == 1);
                break;

            case ClanDutyRight.Expel:
                have = (db.expel == 1);
                break;
            }
        }
        return(have);
    }
Esempio n. 2
0
 /// <summary>
 /// 获取该职位的人数限制
 /// </summary>
 /// <param name="duty"></param>
 /// <returns></returns>
 public uint GetMemberCountOfDuty(GameCmd.enumClanDuty duty)
 {
     return(m_dic_clanDutyMembers.ContainsKey(duty) ? m_dic_clanDutyMembers[duty] : 0);
 }