Beispiel #1
0
    //-------------------------------------------------------------------------
    public override void init()
    {
        Init            = false;
        CacheDesktopKey = "CacheDesktopData_" + Entity.Guid;

        DesktopConfigData = new Ps.DesktopConfigData();
        DesktopConfigData.desktop_etguid       = Entity.Guid;
        DesktopConfigData.seat_num             = 6;
        DesktopConfigData.is_vip               = false;
        DesktopConfigData.desktop_waitwhile_tm = 60;
        MapAllPlayer1 = new Dictionary <uint, Entity>();
        MapAllPlayer  = new Dictionary <string, Entity>();

        byte index = 0;

        AllSeat = new SeatInfo[DesktopConfigData.seat_num];
        foreach (var i in AllSeat)
        {
            SeatInfo seat_info = new SeatInfo();
            seat_info.index           = index;
            seat_info.et_player_rpcid = 0;
            seat_info.et_playermirror = null;
            AllSeat[index]            = seat_info;
            index++;
        }

        DesktopInfo = new DesktopInfo();
        DesktopInfo.desktop_etguid   = Entity.Guid;
        DesktopInfo.seat_num         = 6;
        DesktopInfo.desktop_tableid  = 1;
        DesktopInfo.is_vip           = false;
        DesktopInfo.list_seat_player = new List <DesktopPlayerInfo>();
        DesktopInfo.all_player_num   = 0;
        DesktopInfo.seat_player_num  = 0;

        QueAoIEvent = new Queue <_tAoIEvent>();
        QuePlayerId = new Queue <byte>();
        MaxPlayerId = 0;
        for (int i = 0; i < 50; i++)
        {
            QuePlayerId.Enqueue(++MaxPlayerId);
        }

        TbDataRoom._eRoomType room_type = TbDataRoom._eRoomType.RT_Tenfold;
        bool           fish_mustdie     = true;
        bool           is_single        = false;
        float          pumping_rate     = 1f;
        string         path_fishlord    = Path.Combine(ServerPath.getPathMediaRoot(), "Fishing\\FishLord\\");
        string         path_route       = Path.Combine(ServerPath.getPathMediaRoot(), "Fishing\\Route\\");
        ILogicListener listener         = new LogicListener(this);

        LogicScene = new CLogicScene();
        LogicScene.create(1, 1.0f, is_single, fish_mustdie, listener, pumping_rate, _getRateList(room_type),
                          CellApp.Instance.jsonCfg.json_packet_list,
                          CellApp.Instance.jsonCfg.route_json_packet_list);
    }
Beispiel #2
0
    //-------------------------------------------------------------------------
    List <int> _getRateList(TbDataRoom._eRoomType room_type)
    {
        List <int> list_rate = new List <int>();

        switch (room_type)
        {
        case TbDataRoom._eRoomType.RT_Tenfold:
            return(_getFixedRateList(10, 30, 50, 70, 100));

        case TbDataRoom._eRoomType.RT_Hundredfold:
            return(_getFixedRateList(100, 200, 300, 400, 500));

        case TbDataRoom._eRoomType.RT_Thousandfold:
            return(_getFixedRateList(500, 1000, 1500, 2000, 2500));

        case TbDataRoom._eRoomType.RT_Times:
            return(_getFixedRateList(2500, 3000, 3500, 4000, 5000));
        }

        return(list_rate);
    }