Beispiel #1
0
    public void HideInvaildMonster()
    {
        foreach (MonsterRole current in this.m_listMonster)
        {
            bool flag = BaseProxy <TeamProxy> .getInstance().MyTeamData == null;

            if (flag)
            {
                bool flag2 = current.ownerName != null && !current.ownerName.Equals(ModelBase <PlayerModel> .getInstance().name);
                if (flag2)
                {
                    current.m_curModel.parent.gameObject.SetActive(false);
                }
            }
            bool flag3 = BaseProxy <TeamProxy> .getInstance().MyTeamData != null;

            if (flag3)
            {
                bool flag4 = current.ownerName != null && !BaseProxy <TeamProxy> .getInstance().MyTeamData.IsInMyTeam(current.ownerName);

                if (flag4)
                {
                    current.m_curModel.parent.gameObject.SetActive(false);
                }
            }
        }
    }
Beispiel #2
0
    public void FrameMove(float fdt)
    {
        foreach (ProfessionRole current in this.m_mapOtherPlayer.Values)
        {
            current.FrameMove(fdt);
        }
        bool flag = this.VIEW_PLAYER_TYPE == 0;

        if (!flag)
        {
            bool loading = GRMap.loading;
            if (!loading)
            {
                using (Dictionary <uint, ProfessionRole> .ValueCollection.Enumerator enumerator2 = this.m_mapOtherPlayerUnsee.Values.GetEnumerator())
                {
                    if (enumerator2.MoveNext())
                    {
                        ProfessionRole current2 = enumerator2.Current;
                        this.m_mapOtherPlayerUnsee.Remove(current2.m_unIID);
                        this.m_mapOtherPlayerSee.Add(current2.m_unIID, current2);
                        BaseProxy <FriendProxy> .getInstance().addNearyByPeople(current2.m_unIID);

                        BaseProxy <PlayerInfoProxy> .getInstance().sendLoadPlayerDetailInfo(current2.m_unCID);
                    }
                }
            }
        }
    }
Beispiel #3
0
        public void DoGetTest6()
        {
            IPConvertRequestDTO iP = new IPConvertRequestDTO();

            iP.Coor = GlobalConstant.RETCOORDTYPEGCJ02;
            var response = BaseProxy.DoGet <IPConvertRequestDTO>(Resources.BaiduMapIPConvert, iP);
        }
Beispiel #4
0
        public ExternalBrowserListener(ITrafficDataAccessor source, BaseProxy proxy = null, bool hideControls = false)
        {
            InitializeComponent();

            if (hideControls)
            {
                _checkTrapReq.Visible = _checkTrapResp.Visible = _labelTrap.Visible = _textTrapMatch.Visible = _checkTrackReqContext.Visible = false;
                this.MinimumSize      = new Size(this.Width, this.Height / 2);
                this.Size             = this.MaximumSize = this.MinimumSize;
            }


            if (proxy != null)
            {
                _proxy = proxy;
            }
            else
            {
                _proxy = new AdvancedExploreProxy(TrafficViewer.Instance.Options.TrafficServerIp, TrafficViewer.Instance.Options.TrafficServerPort, source);
                if (TrafficViewerOptions.Instance.UseProxy)
                {
                    WebProxy webProxy = new WebProxy(TrafficViewerOptions.Instance.HttpProxyServer, TrafficViewerOptions.Instance.HttpProxyPort);
                    _proxy.NetworkSettings.WebProxy = webProxy;
                }

                _proxy.NetworkSettings.CertificateValidationCallback = new RemoteCertificateValidationCallback(SSLValidationCallback.ValidateRemoteCertificate);
            }
            StartProxy();
        }
        private void StartServer(object sender, EventArgs e)
        {
            try
            {
                if (_checkUserTrafficFromCurrentFile.Checked)
                {
                    _proxy = new TrafficStoreProxy(TrafficViewer.Instance.TrafficViewerFile,
                                                   TrafficViewer.Instance.TrafficViewerFile,
                                                   _textAttackHost.Text,
                                                   80,
                                                   int.Parse(_textAttackPort.Text));
                }
                else
                {
                    _proxy = new ReverseProxy(
                        _textAttackHost.Text,
                        80,
                        int.Parse(_textAttackPort.Text),
                        TrafficViewer.Instance.TrafficViewerFile);
                    _proxy.ExtraOptions[ReverseProxy.FORWARDING_HOST_OPT] = _textTargetHost.Text;
                    _proxy.ExtraOptions["ForwardingPort"] = _textHostPort.Text;

                    _proxy.NetworkSettings.CertificateValidationCallback = new RemoteCertificateValidationCallback(SSLValidationCallback.ValidateRemoteCertificate);
                }

                _proxy.Start();
            }
            catch (Exception ex)
            {
                ErrorBox.ShowDialog(ex.ToString());
            }
        }
Beispiel #6
0
    public void RemoveOtherPlayer(uint iid)
    {
        bool flag = !this.m_mapOtherPlayer.ContainsKey(iid);

        if (!flag)
        {
            ProfessionRole professionRole = this.m_mapOtherPlayer[iid];
            bool           flag2          = this.m_mapOtherPlayerUnsee.ContainsKey(iid);
            if (flag2)
            {
                this.m_mapOtherPlayerUnsee.Remove(iid);
            }
            bool flag3 = this.m_mapOtherPlayerSee.ContainsKey(iid);
            if (flag3)
            {
                this.m_mapOtherPlayerSee.Remove(iid);
            }
            BaseProxy <FriendProxy> .getInstance().removeNearyByLeave(professionRole.m_unCID);

            this.m_mapOtherPlayer.Remove(iid);
            bool flag4 = a3_liteMinimap.instance != null;
            if (flag4)
            {
                a3_liteMinimap.instance.removeRoleInMiniMap(professionRole.strIID);
            }
            professionRole.dispose();
            bool flag5 = SelfRole._inst.m_LockRole != null && SelfRole._inst.m_LockRole.m_unIID == iid;
            if (flag5)
            {
                SelfRole._inst.m_LockRole = null;
            }
        }
    }
Beispiel #7
0
 public static List <PlaceSearchResponseDTO> PlaceSearch(PlaceSearchRequestDTO placeSearchRequestDTO)
 {
     if (placeSearchRequestDTO.Query == null || placeSearchRequestDTO.Query.Trim() == "")
     {
         throw new System.Exception("Query必须不能为空值!");
     }
     return(BaseProxy.DoGetWithAutoDeserilize <PlaceSearchRequestDTO, List <PlaceSearchResponseDTO> >(Resources.BaiduMapPlaceSearch, placeSearchRequestDTO));
 }
Beispiel #8
0
 public static List <SharpPSResponseDTO> CirclePlaceSearch(PlaceSearchRequestDTO placeSearchRequestDTO)
 {
     if (placeSearchRequestDTO.Location == null)
     {
         throw new System.Exception("Location必须不能为空值!");
     }
     return(BaseProxy.DoGetWithAutoDeserilize <PlaceSearchRequestDTO, List <SharpPSResponseDTO> >(Resources.BaiduMapPlaceSearch, placeSearchRequestDTO));
 }
Beispiel #9
0
        public void DoGetTest4()
        {
            RGeocoderRequestDTO rGeocoderRequestDTO = new RGeocoderRequestDTO();

            rGeocoderRequestDTO.Location = "35.658651,139.745415";
            rGeocoderRequestDTO.Output   = "json";
            var response = BaseProxy.DoGet <RGeocoderRequestDTO>(Resources.BaiduMapGeocoder, rGeocoderRequestDTO);
        }
Beispiel #10
0
        public void DoGetTest1()
        {
            LGeocoderRequestDTO lGeocoderRequestDTO = new LGeocoderRequestDTO();

            lGeocoderRequestDTO.Address = "哈尔滨理工大学";
            lGeocoderRequestDTO.Output  = "json";
            var response = BaseProxy.DoGet <LGeocoderRequestDTO>(Resources.BaiduMapGeocoder, lGeocoderRequestDTO);
        }
Beispiel #11
0
        public void DoGetTest3()
        {
            PlaceSearchRequestDTO place = new PlaceSearchRequestDTO();

            place.Query  = "ATM机";
            place.Bounds = "39.915,116.404,39.975,116.414";
            place.Output = "json";
            var response = BaseProxy.DoGet <PlaceSearchRequestDTO>(Resources.BaiduMapPlaceSearch, place);
        }
Beispiel #12
0
        public void DoGetTest()
        {
            PlaceSearchRequestDTO place = new PlaceSearchRequestDTO();

            place.Query  = "ATM机";
            place.Region = "北京";
            place.Output = "json";
            var response = BaseProxy.DoGet <PlaceSearchRequestDTO>(Resources.BaiduMapPlaceSearch, place);
        }
Beispiel #13
0
        public static IPConvertResponseDTO IPConvert(IPConvertRequestDTO iPConvertRequestDTO)
        {
            IPConvertResponseDTO obj = (IPConvertResponseDTO)BaseProxy.DoGetWithDeserilizeManual <IPConvertRequestDTO>(Resources.BaiduMapIPConvert, iPConvertRequestDTO, typeof(IPConvertResponseDTO));

            if (obj == null)
            {
                throw new System.Exception("IPConvertResponseDTO函数异常====>解析异常!,请求参数" + iPConvertRequestDTO.ToString());
            }
            return(obj);
        }
Beispiel #14
0
    public override void Init(string prefab_path, int layer, Vector3 pos, float roatate = 0f)
    {
        base.Init(prefab_path, layer, pos, roatate);
        M00000_Default_Event m00000_Default_Event = this.m_curModel.gameObject.AddComponent <M00000_Default_Event>();

        m00000_Default_Event.m_monRole = this;
        this.ani = this.m_curModel.gameObject.GetComponent <Animator>();
        AnimatorStateInfo currentAnimatorStateInfo = this.ani.GetCurrentAnimatorStateInfo(0);

        BaseProxy <a3_dartproxy> .getInstance().addEventListener(4u, new Action <GameEvent>(PlayerNameUIMgr.getInstance().carinfo));
    }
Beispiel #15
0
    public void RefreshVaildMonster()
    {
        bool flag = BaseProxy <TeamProxy> .getInstance().MyTeamData != null;

        if (flag)
        {
            foreach (MonsterRole current in this.m_listMonster)
            {
                bool flag2 = current.ownerName != null && BaseProxy <TeamProxy> .getInstance().MyTeamData.IsInMyTeam(current.ownerName);

                if (flag2)
                {
                    current.m_curModel.parent.gameObject.SetActive(true);
                }
            }
        }
    }
Beispiel #16
0
    private void Update()
    {
        bool flag = this.m_unListRoleHitted != null;

        if (flag)
        {
            PkmodelAdmin.RefreshList(this.m_unListRoleHitted, this.HittedisProfession);
            bool flag2 = this.m_unListRoleHitted != null;
            if (flag2)
            {
                int  lockid = -1;
                bool flag3  = SelfRole._inst.m_LockRole != null && this.m_unListRoleHitted.Contains(SelfRole._inst.m_LockRole.m_unIID);
                if (flag3)
                {
                    lockid = (int)SelfRole._inst.m_LockRole.m_unIID;
                }
                BaseProxy <BattleProxy> .getInstance().sendcast_target_skill(this.m_unSkillID, this.m_unListRoleHitted, this.m_nLastHit, lockid);

                this.m_unListRoleHitted = null;
                this.HittedisProfession = null;
            }
        }
    }
Beispiel #17
0
    public override void refreshViewData(Variant v)
    {
        bool flag = !this.m_isMain && this.m_moveAgent != null && this.m_moveAgent.enabled;

        if (flag)
        {
            this.m_moveAgent.avoidancePriority = 48;
        }
        this.detailInfo = v;
        int  num   = v["carr"];
        bool flag2 = v.ContainsKey("activate_count");

        if (flag2)
        {
            this.m_roleDta.add_eff = false;
            bool flag3 = v["activate_count"] >= 10;
            if (flag3)
            {
                this.m_roleDta.add_eff = true;
            }
        }
        bool flag4 = v.ContainsKey("show_eqp");

        if (flag4)
        {
            this.m_roleDta.m_BodyID       = 0;
            this.m_roleDta.m_BodyFXID     = 0;
            this.m_roleDta.m_EquipColorID = 0u;
            this.m_roleDta.m_Weapon_LID   = 0;
            this.m_roleDta.m_Weapon_LFXID = 0;
            this.m_roleDta.m_Weapon_RID   = 0;
            this.m_roleDta.m_Weapon_RFXID = 0;
            foreach (Variant current in v["show_eqp"]._arr)
            {
                a3_ItemData itemDataById = ModelBase <a3_BagModel> .getInstance().getItemDataById(current["tpid"]);

                bool flag5 = itemDataById.equip_type == 3;
                if (flag5)
                {
                    int tpid     = (int)itemDataById.tpid;
                    int bodyFXID = current["stage"];
                    this.m_roleDta.m_BodyID   = tpid;
                    this.m_roleDta.m_BodyFXID = bodyFXID;
                    uint equipColorID = 0u;
                    bool flag6        = current.ContainsKey("colour");
                    if (flag6)
                    {
                        equipColorID = current["colour"];
                    }
                    this.m_roleDta.m_EquipColorID = equipColorID;
                }
                bool flag7 = itemDataById.equip_type == 6;
                if (flag7)
                {
                    int tpid2 = (int)itemDataById.tpid;
                    int num2  = current["stage"];
                    switch (num)
                    {
                    case 2:
                        this.m_roleDta.m_Weapon_RID   = tpid2;
                        this.m_roleDta.m_Weapon_RFXID = num2;
                        break;

                    case 3:
                        this.m_roleDta.m_Weapon_LID   = tpid2;
                        this.m_roleDta.m_Weapon_LFXID = num2;
                        break;

                    case 5:
                        this.m_roleDta.m_Weapon_LID   = tpid2;
                        this.m_roleDta.m_Weapon_LFXID = num2;
                        this.m_roleDta.m_Weapon_RID   = tpid2;
                        this.m_roleDta.m_Weapon_RFXID = num2;
                        break;
                    }
                }
            }
        }
        bool flag8 = v.ContainsKey("wing");

        if (flag8)
        {
            this.m_roleDta.m_WindID = v["wing"]["show_stage"];
        }
        bool flag9 = v.ContainsKey("ach_title");

        if (flag9)
        {
            base.title_id = v["ach_title"];
            base.isactive = v["title_display"]._bool;
            PlayerNameUIMgr.getInstance().refreshTitlelv(this, base.title_id);
        }
        bool flag10 = v.ContainsKey("serial_kp");

        if (flag10)
        {
            PlayerNameUIMgr.getInstance().refreserialCount(this, v["serial_kp"]);
        }
        bool flag11 = v.ContainsKey("rednm");

        if (flag11)
        {
            base.rednm = v["rednm"];
            PlayerNameUIMgr.getInstance().refreshNameColor(this, base.rednm);
            bool flag12 = SelfRole._inst != null && SelfRole._inst.m_LockRole != null && SelfRole._inst.m_LockRole.m_unIID == v["iid"];
            if (flag12)
            {
                PkmodelAdmin.RefreshShow(SelfRole._inst.m_LockRole, false, true);
            }
        }
        bool flag13 = v.ContainsKey("strike_back_tm");

        if (flag13)
        {
            base.hidbacktime = v["strike_back_tm"];
            PlayerNameUIMgr.getInstance().refresHitback(this, (int)(base.hidbacktime - (uint)NetClient.instance.CurServerTimeStamp), false);
        }
        bool flag14 = v.ContainsKey("lvl");

        if (flag14)
        {
            this.lvl = v["lvl"];
        }
        bool flag15 = v.ContainsKey("combpt");

        if (flag15)
        {
            this.combpt = v["combpt"];
        }
        bool flag16 = v.ContainsKey("clname");

        if (flag16)
        {
            this.clanName = v["clname"];
        }
        ArrayList arrayList = new ArrayList();

        arrayList.Add(this.m_unCID);
        arrayList.Add(this.combpt);
        bool flag17 = BaseProxy <FriendProxy> .getInstance() != null;

        if (flag17)
        {
            BaseProxy <FriendProxy> .getInstance().reFreshProfessionInfo(arrayList);
        }
        bool flag18 = OtherPlayerMgr._inst.VIEW_PLAYER_TYPE == 1 || this.m_isMain;

        if (flag18)
        {
            base.refreshViewType(BaseRole.VIEW_TYPE_ALL);
        }
    }
Beispiel #18
0
 public void DoGetTest5()
 {
     var response = BaseProxy.DoGet(Resources.BaiduMapIPConvert);
 }
Beispiel #19
0
    public static void FrameMove(float fdt)
    {
        List <uint> list = new List <uint>();

        foreach (OneFollowBlt current in FollowBullet_Mgr.m_mapFollowBullet.Values)
        {
            try
            {
                float num = current.costtime / current.maxtime;
                current.costtime += fdt;
                bool flag = num > 1f;
                if (flag)
                {
                    bool flag2 = current.aniTrack != null;
                    if (flag2)
                    {
                        current.aniTrack.speed = 0f;
                    }
                    bool flag3 = current.aniFx != null;
                    if (flag3)
                    {
                        current.aniFx.SetTrigger(EnumAni.ANI_T_FXDEAD);
                    }
                    UnityEngine.Object.Destroy(current.blt_hd.m_hdRootObj, 1f);
                    list.Add(current.id);
                    bool flag4 = current.locker is MonsterRole;
                    if (flag4)
                    {
                        MonsterRole monsterRole = current.locker as MonsterRole;
                        bool        isfake      = monsterRole.isfake;
                        if (isfake)
                        {
                            monsterRole.onHurt(current.blt_hd);
                        }
                        else
                        {
                            bool flag5 = current.blt_hd.m_CastRole == SelfRole._inst;
                            if (flag5)
                            {
                                List <uint> list2 = new List <uint>();
                                list2.Add(monsterRole.m_unIID);
                                int  lockid = -1;
                                bool flag6  = SelfRole._inst.m_LockRole != null && SelfRole._inst.m_LockRole.m_unIID == monsterRole.m_unIID;
                                if (flag6)
                                {
                                    lockid = (int)SelfRole._inst.m_LockRole.m_unIID;
                                }
                                BaseProxy <BattleProxy> .getInstance().sendcast_target_skill(current.blt_hd.m_unSkillID, list2, 0, lockid);
                            }
                        }
                    }
                }
                else
                {
                    Vector3 position = current.locker.m_curModel.position;
                    position.y += 1.5f;
                    Vector3 position2 = current.beginpos + (position - current.beginpos) * num;
                    current.blt_hd.m_hdRootObj.transform.position = position2;
                }
            }
            catch (Exception var_16_1FB)
            {
                list.Add(current.id);
                break;
            }
        }
        for (int i = 0; i < list.Count; i++)
        {
            FollowBullet_Mgr.m_mapFollowBullet.Remove(list[i]);
        }
    }
Beispiel #20
0
        private static void Proxy_OnRequestAccepted(object sender, EventArgs e)
        {
            BaseProxy proxy = (BaseProxy)sender;

            proxy.Disconnect();
        }
Beispiel #21
0
    public MonsterRole FindNearestSummon(Vector3 pos)
    {
        MonsterRole result = null;
        float       num    = 3.40282347E+38f;

        foreach (MonsterRole current in this.m_mapMonster.Values)
        {
            int  ownerCid = 0;
            bool flag     = current is MS0000;
            if (flag)
            {
                ownerCid = ((MS0000)current).owner_cid;
            }
            bool isMarked = current.m_isMarked;
            if (!isMarked)
            {
                bool flag2 = ownerCid == 0;
                if (!flag2)
                {
                    bool flag3 = ModelBase <PlayerModel> .getInstance().pk_state > PK_TYPE.PK_PEACE;

                    if (flag3)
                    {
                        bool flag4 = (long)ownerCid == (long)((ulong)ModelBase <PlayerModel> .getInstance().cid);
                        if (flag4)
                        {
                            continue;
                        }
                        bool flag5 = ModelBase <PlayerModel> .getInstance().pk_state == PK_TYPE.PK_TEAM;

                        if (flag5)
                        {
                            bool arg_102_0;
                            if (BaseProxy <TeamProxy> .getInstance().MyTeamData != null)
                            {
                                List <ItemTeamData> expr_E6 = BaseProxy <TeamProxy> .getInstance().MyTeamData.itemTeamDataList;

                                arg_102_0 = (expr_E6 != null && expr_E6.Exists((ItemTeamData member) => (ulong)member.cid == (ulong)((long)ownerCid)));
                            }
                            else
                            {
                                arg_102_0 = false;
                            }
                            bool flag6 = arg_102_0;
                            if (flag6)
                            {
                                continue;
                            }
                            bool flag7 = (long)ownerCid == (long)((ulong)ModelBase <PlayerModel> .getInstance().cid);
                            if (flag7)
                            {
                                continue;
                            }
                        }
                    }
                    float magnitude = (current.m_curPhy.position - pos).magnitude;
                    bool  flag8     = magnitude < (SelfRole.fsm.Autofighting ? Mathf.Min(SelfRole._inst.m_LockDis, StateInit.Instance.Distance) : SelfRole._inst.m_LockDis) && magnitude < num;
                    if (flag8)
                    {
                        num    = magnitude;
                        result = current;
                    }
                }
            }
        }
        return(result);
    }
Beispiel #22
0
        public static RGeocoderResponseDTO RGeocoder(RGeocoderRequestDTO rGeocoderRequestDTO)
        {
            SingleResponseDTO <RGeocoderResponseDTO> obj = (SingleResponseDTO <RGeocoderResponseDTO>)BaseProxy.DoGetWithDeserilizeManual(Resources.BaiduMapGeocoder, rGeocoderRequestDTO, typeof(SingleResponseDTO <RGeocoderResponseDTO>));

            if (obj == null || obj.Result == null)
            {
                throw new System.Exception("RGeocoderResponseDTO函数====>解析异常!,请求参数" + rGeocoderRequestDTO.ToString());
            }
            return(obj.Result);
        }
Beispiel #23
0
    public MonsterRole FindNearestMonster(Vector3 pos, Func <MonsterRole, bool> handle = null, bool useMark = false, PK_TYPE pkState = PK_TYPE.PK_PEACE, bool onTask = false)
    {
        float       num         = 9999999f;
        MonsterRole monsterRole = null;

        RoleMgr.ClearMark(!useMark, pkState, (BaseRole m) => (m.m_curPhy.position - pos).magnitude < (SelfRole.fsm.Autofighting ? StateInit.Instance.Distance : SelfRole._inst.m_LockDis));
        foreach (MonsterRole current in this.m_mapMonster.Values)
        {
            bool flag = current.isDead || current is CollectRole || (current is MS0000 && (long)((MS0000)current).owner_cid == (long)((ulong)ModelBase <PlayerModel> .getInstance().cid)) || (current is MDC000 && ((MDC000)current).escort_name == ModelBase <A3_LegionModel> .getInstance().myLegion.clname);
            if (!flag)
            {
                bool flag2 = current is MDC000 && (int)((float)((MDC000)current).curhp / (float)((MDC000)current).maxHp * 100f) <= 20;
                if (!flag2)
                {
                    TaskMonId expr_104 = this.taskMonId;
                    bool      flag3    = expr_104 != null && expr_104.applied && this.taskMonId.value != current.monsterid;
                    if (!flag3)
                    {
                        bool flag4 = handle != null && handle(current);
                        if (!flag4)
                        {
                            bool flag5 = onTask && ModelBase <PlayerModel> .getInstance().task_monsterIdOnAttack.ContainsKey(ModelBase <A3_TaskModel> .getInstance().main_task_id) && current.monsterid != ModelBase <PlayerModel> .getInstance().task_monsterIdOnAttack[ModelBase <A3_TaskModel> .getInstance().main_task_id];

                            if (!flag5)
                            {
                                bool flag6 = BaseProxy <TeamProxy> .getInstance().MyTeamData != null;

                                if (flag6)
                                {
                                    bool mwlr_on = ModelBase <A3_ActiveModel> .getInstance().mwlr_on;

                                    if (mwlr_on)
                                    {
                                        bool flag7 = ModelBase <A3_ActiveModel> .getInstance().mwlr_target_monId != current.monsterid;

                                        if (flag7)
                                        {
                                            continue;
                                        }
                                    }
                                    bool flag8 = current.ownerName != null && !BaseProxy <TeamProxy> .getInstance().MyTeamData.IsInMyTeam(current.ownerName);

                                    if (flag8)
                                    {
                                        continue;
                                    }
                                }
                                else
                                {
                                    bool flag9 = current.ownerName != null && current.ownerName != ModelBase <PlayerModel> .getInstance().name;

                                    if (flag9)
                                    {
                                        continue;
                                    }
                                }
                                bool flag10 = SelfRole.fsm.Autofighting && (current.m_curPhy.position - StateInit.Instance.Origin).magnitude > StateInit.Instance.Distance;
                                if (!flag10)
                                {
                                    bool flag11 = pkState != PK_TYPE.PK_PKALL && current is MS0000 && ((MS0000)current).owner_cid != 0;
                                    if (!flag11)
                                    {
                                        float magnitude = (current.m_curPhy.position - pos).magnitude;
                                        bool  flag12    = magnitude < (SelfRole.fsm.Autofighting ? Mathf.Min(SelfRole._inst.m_LockDis, StateInit.Instance.Distance) : SelfRole._inst.m_LockDis) && magnitude < num;
                                        if (flag12)
                                        {
                                            num         = magnitude;
                                            monsterRole = current;
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
        bool flag13 = monsterRole != null & useMark;

        if (flag13)
        {
            monsterRole.m_isMarked = true;
        }
        return(monsterRole);
    }
Beispiel #24
0
    public void refreshViewData1(Variant v)
    {
        int  num  = v["carr"];
        bool flag = v.ContainsKey("eqp");

        if (flag)
        {
            this.m_roleDta.m_BodyID       = 0;
            this.m_roleDta.m_BodyFXID     = 0;
            this.m_roleDta.m_EquipColorID = 0u;
            this.m_roleDta.m_Weapon_LID   = 0;
            this.m_roleDta.m_Weapon_LFXID = 0;
            this.m_roleDta.m_Weapon_RID   = 0;
            this.m_roleDta.m_Weapon_RFXID = 0;
            foreach (Variant current in v["eqp"]._arr)
            {
                a3_ItemData itemDataById = ModelBase <a3_BagModel> .getInstance().getItemDataById(current["tpid"]);

                bool flag2 = itemDataById.equip_type == 3;
                if (flag2)
                {
                    int tpid     = (int)itemDataById.tpid;
                    int bodyFXID = current["intensify"];
                    this.m_roleDta.m_BodyID   = tpid;
                    this.m_roleDta.m_BodyFXID = bodyFXID;
                    uint equipColorID = 0u;
                    bool flag3        = current.ContainsKey("colour");
                    if (flag3)
                    {
                        equipColorID = current["colour"];
                    }
                    this.m_roleDta.m_EquipColorID = equipColorID;
                }
                bool flag4 = itemDataById.equip_type == 6;
                if (flag4)
                {
                    int tpid2 = (int)itemDataById.tpid;
                    int num2  = current["intensify"];
                    switch (num)
                    {
                    case 2:
                        this.m_roleDta.m_Weapon_RID   = tpid2;
                        this.m_roleDta.m_Weapon_RFXID = num2;
                        break;

                    case 3:
                        this.m_roleDta.m_Weapon_LID   = tpid2;
                        this.m_roleDta.m_Weapon_LFXID = num2;
                        break;

                    case 5:
                        this.m_roleDta.m_Weapon_LID   = tpid2;
                        this.m_roleDta.m_Weapon_LFXID = num2;
                        this.m_roleDta.m_Weapon_RID   = tpid2;
                        this.m_roleDta.m_Weapon_RFXID = num2;
                        break;
                    }
                }
            }
        }
        bool flag5 = v.ContainsKey("wing");

        if (flag5)
        {
            this.m_roleDta.m_WindID = v["wing"];
        }
        bool flag6 = v.ContainsKey("ach_title");

        if (flag6)
        {
            base.title_id = v["ach_title"];
            base.isactive = v["title_display"]._bool;
            PlayerNameUIMgr.getInstance().refreshTitlelv(this, base.title_id);
        }
        bool flag7 = v.ContainsKey("lvl");

        if (flag7)
        {
            this.lvl = v["lvl"];
        }
        bool flag8 = v.ContainsKey("combpt");

        if (flag8)
        {
            this.combpt = v["combpt"];
        }
        bool flag9 = v.ContainsKey("clname");

        if (flag9)
        {
            this.clanName = v["clname"];
        }
        ArrayList arrayList = new ArrayList();

        arrayList.Add(this.m_unCID);
        arrayList.Add(this.combpt);
        bool flag10 = BaseProxy <FriendProxy> .getInstance() != null;

        if (flag10)
        {
            BaseProxy <FriendProxy> .getInstance().reFreshProfessionInfo(arrayList);
        }
        bool flag11 = OtherPlayerMgr._inst.VIEW_PLAYER_TYPE == 1 || this.m_isMain;

        if (flag11)
        {
            base.refreshViewType(BaseRole.VIEW_TYPE_ALL);
        }
    }
Beispiel #25
0
 internal void <onClick> b__1_2()
 {
     BaseProxy <MapProxy> .getInstance().sendStopCollectBox(true);
 }
Beispiel #26
0
    public BaseRole FindNearestEnemyOne(Vector3 pos, bool isredname = false, Func <ProfessionRole, bool> selector = null, bool useMark = false, PK_TYPE pkState = PK_TYPE.PK_PEACE)
    {
        float    num      = 9999999f;
        BaseRole baseRole = null;

        switch (pkState)
        {
        case PK_TYPE.PK_PEACE:
        case PK_TYPE.PK_PKALL:
        {
IL_2F:
            Func <BaseRole, bool> filterHandle = (BaseRole p) => !p.isDead && (p.m_curPhy.position - pos).magnitude < (SelfRole.fsm.Autofighting ? StateInit.Instance.Distance : SelfRole._inst.m_LockDis);
            goto IL_4D;
        }

        case PK_TYPE.PK_TEAM:
        {
            Func <BaseRole, bool> filterHandle = delegate(BaseRole p)
            {
                bool arg_C1_0;
                if (!p.isDead && (p.m_curPhy.position - pos).magnitude < (SelfRole.fsm.Autofighting ? StateInit.Instance.Distance : SelfRole._inst.m_LockDis))
                {
                    ItemTeamMemberData expr_6E = BaseProxy <TeamProxy> .getInstance().MyTeamData;

                    bool?arg_AA_0;
                    if (expr_6E == null)
                    {
                        arg_AA_0 = null;
                    }
                    else
                    {
                        List <ItemTeamData> expr_82 = expr_6E.itemTeamDataList;
                        arg_AA_0 = ((expr_82 != null) ? new bool?(!expr_82.Exists((ItemTeamData m) => m.cid == p.m_unCID)) : null);
                    }
                    arg_C1_0 = (arg_AA_0 ?? true);
                }
                else
                {
                    arg_C1_0 = false;
                }
                return(arg_C1_0);
            };
            goto IL_4D;
        }
        }
        goto IL_2F;
IL_4D:
        bool flag = false;

        while (true)
        {
            foreach (ProfessionRole current in this.m_mapOtherPlayer.Values)
            {
                bool flag2 = OtherPlayerMgr._inst.m_mapOtherPlayer[current.m_unIID].zhuan >= 1;
                if (flag2)
                {
                    bool flag3 = current.isDead || current.invisible;
                    if (!flag3)
                    {
                        bool isMarked = current.m_isMarked;
                        if (!isMarked)
                        {
                            if (isredname)
                            {
                                bool flag4 = current.rednm <= 0;
                                if (flag4)
                                {
                                    continue;
                                }
                            }
                            bool flag5 = selector != null && selector(current);
                            if (!flag5)
                            {
                                float magnitude = (current.m_curModel.position - pos).magnitude;
                                bool  flag6     = magnitude < (SelfRole.fsm.Autofighting ? StateInit.Instance.Distance : SelfRole._inst.m_LockDis) && magnitude < num;
                                if (flag6)
                                {
                                    num      = magnitude;
                                    baseRole = current;
                                }
                            }
                        }
                    }
                }
            }
            bool flag7 = baseRole == null;
            if (!flag7)
            {
                break;
            }
            baseRole = MonsterMgr._inst.FindNearestSummon(pos);
            bool flag8 = baseRole == null;
            if (!flag8)
            {
                goto IL_1C9;
            }
            Func <BaseRole, bool> filterHandle;
            RoleMgr.ClearMark(!useMark, pkState, filterHandle);
            bool flag9 = !flag;
            if (!flag9)
            {
                break;
            }
            flag = true;
        }
        goto IL_1D9;
IL_1C9:
        if (useMark)
        {
            baseRole.m_isMarked = true;
        }
IL_1D9:
        bool flag10 = baseRole != null & useMark;

        if (flag10)
        {
            baseRole.m_isMarked = true;
        }
        return(baseRole);
    }