Esempio n. 1
0
 /// <summary>
 /// ソートパラメータ設定(ユニット)
 /// </summary>
 public virtual void setSortParamUnit(UnitGridParam unit_param)
 {
     unit_param.element_int  = SortUtil.GetSortNumElement(unit_param.element);
     unit_param.kind_int     = SortUtil.GetSortNumKind(unit_param.kind);
     unit_param.sub_kind_int = SortUtil.GetSortNumKind(unit_param.sub_kind);
     UnitParam = unit_param;
 }
Esempio n. 2
0
    /// <summary>
    /// 属性のソート順補正
    /// </summary>
    /// <param name="filters"></param>
    /// <returns></returns>
    public static int[] GetFilterNumElements(int[] filters)
    {
        List <int> datalist = new List <int>();

        for (int i = 0; i < filters.Length; i++)
        {
            if (filters[i] > 0)
            {
                datalist.Add(SortUtil.GetSortNumElement((MasterDataDefineLabel.ElementType)filters[i]));
            }
        }

        return(datalist.ToArray());
    }
Esempio n. 3
0
    /// <summary>
    /// ソートパラメータ設定(フレンド)
    /// </summary>
    /// <param name="_friend"></param>
    public void setSortParamFriend(
        PacketStructFriend _friend,
        CharaOnce _baseChara,
        MasterDataParamChara _master
        )
    {
        PacketStructUnit _sub = null;

        if (_friend.unit.link_info == (uint)ServerDataDefine.CHARALINK_TYPE.CHARALINK_TYPE_BASE)
        {
            _sub = _friend.unit_link;
        }
        int _cost = _master.party_cost;

        if (_sub != null)
        {
            _cost += CharaLinkUtil.GetLinkUnitCost(_sub.id);
        }
        UnitParam              = new UnitGridParam();
        UnitParam.draw_id      = (int)_master.draw_id;
        UnitParam.level        = (int)_friend.unit.level;
        UnitParam.hp           = _baseChara.m_CharaHP;
        UnitParam.pow          = _baseChara.m_CharaPow;
        UnitParam.plus         = _baseChara.m_CharaPlusHP + _baseChara.m_CharaPlusPow;
        UnitParam.cost         = _cost;
        UnitParam.rare         = (int)_master.rare;
        UnitParam.element_int  = SortUtil.GetSortNumElement(_master.element);
        UnitParam.kind_int     = SortUtil.GetSortNumKind(_master.kind);
        UnitParam.sub_kind_int = SortUtil.GetSortNumKind(_master.sub_kind);
        UnitParam.limitover_lv = (int)_friend.unit.limitover_lv;
        UnitParam.charm        = _baseChara.m_CharaCharm;
        UnitParam.rank         = (int)_friend.user_rank;
        UnitParam.login_time   = SortUtil.GetSortNumLoginTime(_friend.last_play);
        UnitParam.favorite     = MainMenuUtil.ChkFavoridFriend(_friend.user_id);
        UnitParam.friend_state = (int)_friend.friend_state;
    }