Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
| | |
| | | public PlayerRankData rank { get { return m_Rank; } }
|
| | |
|
| | | StoreModel m_StoreModel;
|
| | | StoreModel StoreModel {
|
| | | StoreModel StoreModel
|
| | | {
|
| | | get { return m_StoreModel ?? (m_StoreModel = ModelCenter.Instance.GetModel<StoreModel>()); }
|
| | | }
|
| | |
|
| | |
| | | break;
|
| | | case PlayerDataRefresh.EquipShowSwitch:
|
| | | baseData.equipShowSwitch = value;
|
| | | if (hero != null)
|
| | | {
|
| | | int _level = baseData.godWeaponLV_4;
|
| | | if (EquipShowSwitch.IsGodWeaponEffectOn(value, 4, out _level))
|
| | | {
|
| | | hero.SwitchGodWeapon(4, _level);
|
| | | }
|
| | | else
|
| | | {
|
| | | hero.SwitchGodWeapon(4, 0);
|
| | | }
|
| | | _level = baseData.godWeaponLV_1;
|
| | | if (EquipShowSwitch.IsGodWeaponEffectOn(value, 1, out _level))
|
| | | {
|
| | | hero.SwitchGodWeapon(1, _level);
|
| | | }
|
| | | else
|
| | | {
|
| | | hero.SwitchGodWeapon(1, 0);
|
| | | }
|
| | | _level = baseData.godWeaponLV_2;
|
| | | if (EquipShowSwitch.IsGodWeaponEffectOn(value, 2, out _level))
|
| | | {
|
| | | hero.SwitchGodWeapon(2, _level);
|
| | | }
|
| | | else
|
| | | {
|
| | | hero.SwitchGodWeapon(2, 0);
|
| | | }
|
| | | }
|
| | | break;
|
| | | case PlayerDataRefresh.LuckValue:
|
| | | break;
|
| | |
| | | baseData.godWeaponLV_1 = (int)value;
|
| | | if (hero != null)
|
| | | {
|
| | | hero.SwitchGodWeapon(1, baseData.godWeaponLV_1);
|
| | | int _level = (int)value;
|
| | | if (EquipShowSwitch.IsGodWeaponEffectOn(baseData.equipShowSwitch, 1, out _level))
|
| | | {
|
| | | hero.SwitchGodWeapon(1, _level);
|
| | | }
|
| | | else
|
| | | {
|
| | | hero.SwitchGodWeapon(1, 0);
|
| | | }
|
| | | }
|
| | | break;
|
| | | case PlayerDataRefresh.CDBPlayerRefresh_GodWeaponLV_2:
|
| | | baseData.godWeaponLV_2 = (int)value;
|
| | | if (hero != null)
|
| | | {
|
| | | hero.SwitchGodWeapon(2, baseData.godWeaponLV_2);
|
| | | int _level = (int)value;
|
| | | if (EquipShowSwitch.IsGodWeaponEffectOn(baseData.equipShowSwitch, 2, out _level))
|
| | | {
|
| | | hero.SwitchGodWeapon(2, _level);
|
| | | }
|
| | | else
|
| | | {
|
| | | hero.SwitchGodWeapon(2, 0);
|
| | | }
|
| | | }
|
| | | break;
|
| | | case PlayerDataRefresh.CDBPlayerRefresh_GodWeaponLV_3:
|
| | | baseData.godWeaponLV_3 = (int)value;
|
| | | if (hero != null)
|
| | | {
|
| | | hero.SwitchGodWeapon(3, baseData.godWeaponLV_3);
|
| | | int _level = (int)value;
|
| | | if (EquipShowSwitch.IsGodWeaponEffectOn(baseData.equipShowSwitch, 3, out _level))
|
| | | {
|
| | | hero.SwitchGodWeapon(3, _level);
|
| | | }
|
| | | else
|
| | | {
|
| | | hero.SwitchGodWeapon(3, 0);
|
| | | }
|
| | | }
|
| | | break;
|
| | | case PlayerDataRefresh.CDBPlayerRefresh_GodWeaponLV_4:
|
| | | baseData.godWeaponLV_4 = (int)value;
|
| | | if (hero != null)
|
| | | {
|
| | | hero.SwitchGodWeapon(4, baseData.godWeaponLV_4);
|
| | | int _level = (int)value;
|
| | | if (EquipShowSwitch.IsGodWeaponEffectOn(baseData.equipShowSwitch, 4, out _level))
|
| | | {
|
| | | hero.SwitchGodWeapon(4, _level);
|
| | | }
|
| | | else
|
| | | {
|
| | | hero.SwitchGodWeapon(4, 0);
|
| | | }
|
| | | }
|
| | | break;
|
| | | case PlayerDataRefresh.CDBPlayerRefresh_SoulDust:
|
| | |
| | | return; |
| | | } |
| | | |
| | | _player.UpdateData(vNetData); |
| | | |
| | | switch ((PlayerDataRefresh)vNetData.RefreshType) |
| | | { |
| | | case PlayerDataRefresh.SpeedValue: |
| | |
| | | break; |
| | | case PlayerDataRefresh.OfficialRank: |
| | | _player.ActorInfo.realm = vNetData.Value; |
| | | break; |
| | | case PlayerDataRefresh.CDBPlayerRefresh_GodWeaponLV_1: |
| | | _player.SwitchGodWeapon(1, (int)vNetData.Value); |
| | | break; |
| | | case PlayerDataRefresh.CDBPlayerRefresh_GodWeaponLV_2: |
| | | _player.SwitchGodWeapon(2, (int)vNetData.Value); |
| | | break; |
| | | case PlayerDataRefresh.CDBPlayerRefresh_GodWeaponLV_3: |
| | | _player.SwitchGodWeapon(3, (int)vNetData.Value); |
| | | break; |
| | | case PlayerDataRefresh.CDBPlayerRefresh_GodWeaponLV_4: |
| | | _player.SwitchGodWeapon(4, (int)vNetData.Value); |
| | | break; |
| | | } |
| | | |
| | |
| | |
|
| | | Behaviour.StopKillUntilDieAI();
|
| | |
|
| | | SwitchGodWeapon(4, PlayerDatas.Instance.baseData.godWeaponLV_4);
|
| | | int _level = PlayerDatas.Instance.baseData.godWeaponLV_4;
|
| | | if (EquipShowSwitch.IsGodWeaponEffectOn(PlayerDatas.Instance.baseData.equipShowSwitch, 4, out _level))
|
| | | {
|
| | | SwitchGodWeapon(4, _level);
|
| | | }
|
| | | else
|
| | | {
|
| | | SwitchGodWeapon(4, 0);
|
| | | }
|
| | | }
|
| | |
|
| | | protected sealed override void OnPutonSecondary(uint secondaryItemID, GameObject secondary)
|
| | |
| | | MaterialUtility.SwitchXrayShader(m_SecondaryMaterial, true);
|
| | | }
|
| | | GameObjectPoolManager.Instance.AddDontDestroyGoInstID(secondary.GetInstanceID());
|
| | | SwitchGodWeapon(1, PlayerDatas.Instance.baseData.godWeaponLV_1);
|
| | |
|
| | | int _level = PlayerDatas.Instance.baseData.godWeaponLV_1;
|
| | | if (EquipShowSwitch.IsGodWeaponEffectOn(PlayerDatas.Instance.baseData.equipShowSwitch, 1, out _level))
|
| | | {
|
| | | SwitchGodWeapon(1, _level);
|
| | | }
|
| | | else
|
| | | {
|
| | | SwitchGodWeapon(1, 0);
|
| | | }
|
| | | }
|
| | |
|
| | | protected sealed override void OnPutonWeapon(uint weaponItemID, GameObject weapon)
|
| | |
| | | MaterialUtility.SwitchXrayShader(m_WeaponMaterial, true);
|
| | | }
|
| | | GameObjectPoolManager.Instance.AddDontDestroyGoInstID(weapon.GetInstanceID());
|
| | | SwitchGodWeapon(2, PlayerDatas.Instance.baseData.godWeaponLV_2);
|
| | |
|
| | | int _level = PlayerDatas.Instance.baseData.godWeaponLV_2;
|
| | | if (EquipShowSwitch.IsGodWeaponEffectOn(PlayerDatas.Instance.baseData.equipShowSwitch, 2, out _level))
|
| | | {
|
| | | SwitchGodWeapon(2, _level);
|
| | | }
|
| | | else
|
| | | {
|
| | | SwitchGodWeapon(2, 0);
|
| | | }
|
| | | }
|
| | |
|
| | | protected sealed override void OnPutonWing(uint wingItemID, GameObject wing)
|
| | |
| | | base.OnFixedUpdate();
|
| | | }
|
| | |
|
| | | public void UpdateData(H0418_tagObjInfoRefresh data)
|
| | | {
|
| | | int _level = 0;
|
| | | switch ((PlayerDataRefresh)data.RefreshType)
|
| | | {
|
| | | case PlayerDataRefresh.EquipShowSwitch:
|
| | | m_H0434.EquipShowSwitch = data.Value;
|
| | | _level = (int)m_H0434.ExAttr18;
|
| | | if (EquipShowSwitch.IsGodWeaponEffectOn(m_H0434.EquipShowSwitch, 4, out _level))
|
| | | {
|
| | | SwitchGodWeapon(4, _level);
|
| | | }
|
| | | else
|
| | | {
|
| | | SwitchGodWeapon(4, 0);
|
| | | }
|
| | | _level = (int)m_H0434.ExAttr15;
|
| | | if (EquipShowSwitch.IsGodWeaponEffectOn(m_H0434.EquipShowSwitch, 1, out _level))
|
| | | {
|
| | | SwitchGodWeapon(1, _level);
|
| | | }
|
| | | else
|
| | | {
|
| | | SwitchGodWeapon(1, 0);
|
| | | }
|
| | | _level = (int)m_H0434.ExAttr16;
|
| | | if (EquipShowSwitch.IsGodWeaponEffectOn(m_H0434.EquipShowSwitch, 2, out _level))
|
| | | {
|
| | | SwitchGodWeapon(2, _level);
|
| | | }
|
| | | else
|
| | | {
|
| | | SwitchGodWeapon(2, 0);
|
| | | }
|
| | | break;
|
| | |
|
| | | case PlayerDataRefresh.CDBPlayerRefresh_GodWeaponLV_1:
|
| | | _level = (int)data.Value;
|
| | | m_H0434.ExAttr15 = data.Value;
|
| | | if (EquipShowSwitch.IsGodWeaponEffectOn(m_H0434.EquipShowSwitch, 1, out _level))
|
| | | {
|
| | | SwitchGodWeapon(1, _level);
|
| | | }
|
| | | else
|
| | | {
|
| | | SwitchGodWeapon(1, 0);
|
| | | }
|
| | | break;
|
| | | case PlayerDataRefresh.CDBPlayerRefresh_GodWeaponLV_2:
|
| | | _level = (int)data.Value;
|
| | | m_H0434.ExAttr16 = data.Value;
|
| | | if (EquipShowSwitch.IsGodWeaponEffectOn(m_H0434.EquipShowSwitch, 2, out _level))
|
| | | {
|
| | | SwitchGodWeapon(2, _level);
|
| | | }
|
| | | else
|
| | | {
|
| | | SwitchGodWeapon(2, 0);
|
| | | }
|
| | | break;
|
| | | case PlayerDataRefresh.CDBPlayerRefresh_GodWeaponLV_3:
|
| | | _level = (int)data.Value;
|
| | | m_H0434.ExAttr17 = data.Value;
|
| | | if (EquipShowSwitch.IsGodWeaponEffectOn(m_H0434.EquipShowSwitch, 3, out _level))
|
| | | {
|
| | | SwitchGodWeapon(3, _level);
|
| | | }
|
| | | else
|
| | | {
|
| | | SwitchGodWeapon(3, 0);
|
| | | }
|
| | | break;
|
| | | case PlayerDataRefresh.CDBPlayerRefresh_GodWeaponLV_4:
|
| | | _level = (int)data.Value;
|
| | | m_H0434.ExAttr18 = data.Value;
|
| | | if (EquipShowSwitch.IsGodWeaponEffectOn(m_H0434.EquipShowSwitch, 4, out _level))
|
| | | {
|
| | | SwitchGodWeapon(4, _level);
|
| | | }
|
| | | else
|
| | | {
|
| | | SwitchGodWeapon(4, 0);
|
| | | }
|
| | | break;
|
| | | }
|
| | | }
|
| | |
|
| | | protected sealed override void OnPutonClothes(uint clothesItemID, GameObject clothed)
|
| | | {
|
| | | clothed.layer = LayerUtility.Player;
|
| | |
| | | _renderer.gameObject.SetLayer(LayerUtility.Player, false);
|
| | | MaterialUtility.SwitchXrayShader(m_Material, false);
|
| | |
|
| | | SwitchGodWeapon(4, (int)m_H0434.ExAttr18);
|
| | | int _level = (int)m_H0434.ExAttr18;
|
| | | if (EquipShowSwitch.IsGodWeaponEffectOn(m_H0434.EquipShowSwitch, 4, out _level))
|
| | | {
|
| | | SwitchGodWeapon(4, _level);
|
| | | }
|
| | | else
|
| | | {
|
| | | SwitchGodWeapon(4, 0);
|
| | | }
|
| | | }
|
| | |
|
| | | protected sealed override void OnPutonSecondary(uint secondaryItemID, GameObject secondary)
|
| | |
| | | _renderer.gameObject.SetLayer(LayerUtility.Player, false);
|
| | | MaterialUtility.SwitchXrayShader(m_SecondaryMaterial, false);
|
| | | }
|
| | | SwitchGodWeapon(1, (int)m_H0434.ExAttr15);
|
| | |
|
| | | int _level = (int)m_H0434.ExAttr15;
|
| | | if (EquipShowSwitch.IsGodWeaponEffectOn(m_H0434.EquipShowSwitch, 1, out _level))
|
| | | {
|
| | | SwitchGodWeapon(1, (int)m_H0434.ExAttr15);
|
| | | }
|
| | | else
|
| | | {
|
| | | SwitchGodWeapon(1, 0);
|
| | | }
|
| | | }
|
| | |
|
| | | protected sealed override void OnPutonWeapon(uint weaponItemID, GameObject weapon)
|
| | |
| | | _renderer.gameObject.SetLayer(LayerUtility.Player, false);
|
| | | MaterialUtility.SwitchXrayShader(m_WeaponMaterial, false);
|
| | | }
|
| | | SwitchGodWeapon(2, (int)m_H0434.ExAttr16);
|
| | |
|
| | | int _level = (int)m_H0434.ExAttr16;
|
| | | if (EquipShowSwitch.IsGodWeaponEffectOn(m_H0434.EquipShowSwitch, 2, out _level))
|
| | | {
|
| | | SwitchGodWeapon(2, (int)m_H0434.ExAttr16);
|
| | | }
|
| | | else
|
| | | {
|
| | | SwitchGodWeapon(2, 0);
|
| | | }
|
| | | }
|
| | |
|
| | | protected sealed override void OnPutonWing(uint wingItemID, GameObject wing)
|
| | |
| | | var data = new UI3DPlayerExhibitionData
|
| | | {
|
| | | job = PlayerDatas.Instance.baseData.Job,
|
| | | clothesId = fashionClothesId > 0 ? fashionClothesId : clothesId,
|
| | | suitLevel = 0,
|
| | | weaponId = 0,
|
| | | clothesId = clothesId,
|
| | | wingsId = wingsId,
|
| | | secondaryId = fashionSecondaryId > 0 ? fashionSecondaryId : secondaryId,
|
| | | secondaryId = secondaryId,
|
| | | fashionClothesId = fashionClothesId,
|
| | | fashionSecondaryId = fashionSecondaryId,
|
| | | isDialogue = false,
|
| | | godWeapons = null
|
| | | };
|
| | |
| | | {
|
| | | clothesId = itemData.ItemID;
|
| | | }
|
| | | fashionClothesId = 0;
|
| | | itemData = roleParticularModel.GetItemData(RoleEquipType.retFashionClothes);
|
| | | if (itemData != null)
|
| | | {
|
| | | clothesId = itemData.ItemID;
|
| | | fashionClothesId = itemData.ItemID;
|
| | | }
|
| | | wingsId = 0;
|
| | | itemData = roleParticularModel.GetItemData(RoleEquipType.retWing);
|
| | |
| | | {
|
| | | secondaryId = itemData.ItemID;
|
| | | }
|
| | | fashionSecondaryId = 0;
|
| | | itemData = roleParticularModel.GetItemData(RoleEquipType.retFashionWeapon2);
|
| | | if (itemData != null)
|
| | | {
|
| | | secondaryId = itemData.ItemID;
|
| | | fashionSecondaryId = itemData.ItemID;
|
| | | }
|
| | |
|
| | | data = new UI3DPlayerExhibitionData
|
| | | {
|
| | | job = viewPlayerData.rolePropData.Job,
|
| | | clothesId = clothesId,
|
| | | suitLevel = 0,
|
| | | weaponId = 0,
|
| | | wingsId = wingsId,
|
| | | secondaryId = secondaryId,
|
| | | godWeapons = null,
|
| | | isDialogue = false,
|
| | | fashionClothesId = fashionClothesId,
|
| | | fashionSecondaryId = fashionSecondaryId,
|
| | | };
|
| | |
|
| | | if (m_Player != null)
|
| | |
| | | GameObject clothesModel;
|
| | | Animator clothesAnimator;
|
| | | GameObject secondaryModel;
|
| | | GameObject extraSecondaryModel;
|
| | | GameObject wingsModel;
|
| | | Animator wingsAnimator;
|
| | |
|
| | |
| | | this.showPoint = showPoint;
|
| | | this.job = data.job;
|
| | |
|
| | | var clothes = data.clothesId;
|
| | | var clothes = data.fashionClothesId > 0 ? data.fashionClothesId : data.clothesId;
|
| | | var wingsId = data.wingsId;
|
| | | var secondaryId = data.secondaryId;
|
| | | var godWeapons = data.godWeapons;
|
| | | var secondaryId = data.fashionSecondaryId > 0 ? data.fashionSecondaryId : data.secondaryId;
|
| | |
|
| | | var jobConfig = Config.Instance.Get<JobSetupConfig>(job);
|
| | |
|
| | |
| | | var secondaryResId = 0;
|
| | | if (secondaryId == 0)
|
| | | {
|
| | | if (this.job == 1)
|
| | | if (data.fashionClothesId <= 0)
|
| | | {
|
| | | secondaryResId = clothes + 2900;
|
| | | }
|
| | | else
|
| | | {
|
| | | secondaryResId = jobConfig.BaseEquip[2];
|
| | | if (this.job == 1)
|
| | | {
|
| | | secondaryResId = clothes + 2900;
|
| | | }
|
| | | else
|
| | | {
|
| | | secondaryResId = jobConfig.BaseEquip[2];
|
| | | }
|
| | | }
|
| | | }
|
| | | else
|
| | |
| | | secondaryResId = item == null ? jobConfig.BaseEquip[2] : item.ChangeOrd;
|
| | | }
|
| | | PutOnSecondary(secondaryResId);
|
| | |
|
| | | var extraSecondaryId = 0;
|
| | | if (data.job == 1 && data.fashionSecondaryId > 0 && data.fashionClothesId == 0)
|
| | | {
|
| | | if (data.clothesId == 0)
|
| | | {
|
| | | extraSecondaryId = jobConfig.BaseEquip[0] + 2900;
|
| | | }
|
| | | else
|
| | | {
|
| | | var item = Config.Instance.Get<ItemConfig>(data.clothesId);
|
| | | var defaultClothesResId = item == null ? jobConfig.BaseEquip[0] : item.ChangeOrd;
|
| | | extraSecondaryId = defaultClothesResId + 2900;
|
| | | }
|
| | | }
|
| | |
|
| | | PutOnExtraSecondary(job, extraSecondaryId);
|
| | |
|
| | | var wingsResId = 0;
|
| | | if (wingsId != 0)
|
| | |
| | |
|
| | | private void PutOnSecondary(int secondaryResId)
|
| | | {
|
| | | if (this.job == 2)
|
| | | {
|
| | | return;
|
| | | }
|
| | | if (secondaryResId != 0)
|
| | | {
|
| | | var prefab = InstanceResourcesLoader.LoadModelRes(secondaryResId);
|
| | |
| | | secondaryModel.layer = LayerUtility.BossShow;
|
| | | var parent = clothesModel.transform.GetChildTransformDeeply(GAStaticDefine.SecondaryBindBoneName[job - 1]);
|
| | | secondaryModel.transform.SetParentEx(parent, Vector3.zero, Quaternion.identity, Vector3.one);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | private void PutOnExtraSecondary(int job, int extraSecondaryId)
|
| | | {
|
| | | if (this.job == 2)
|
| | | {
|
| | | return;
|
| | | }
|
| | | if (extraSecondaryId != 0)
|
| | | {
|
| | | var prefab = InstanceResourcesLoader.LoadModelRes(extraSecondaryId);
|
| | | if (!prefab)
|
| | | {
|
| | | var config = Config.Instance.Get<JobSetupConfig>(job);
|
| | | extraSecondaryId = config.BaseEquip[2];
|
| | | prefab = InstanceResourcesLoader.LoadModelRes(extraSecondaryId);
|
| | | }
|
| | |
|
| | | if (prefab)
|
| | | {
|
| | | extraSecondaryModel = GameObject.Instantiate(prefab);
|
| | | extraSecondaryModel.layer = LayerUtility.BossShow;
|
| | | var parent = clothesModel.transform.GetChildTransformDeeply(GAStaticDefine.SecondaryBindBoneName[job - 1]);
|
| | | extraSecondaryModel.transform.SetParentEx(parent, Vector3.zero, Quaternion.identity, Vector3.one);
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | {
|
| | | Destroy(secondaryModel);
|
| | | }
|
| | | if (extraSecondaryModel != null)
|
| | | {
|
| | | Destroy(extraSecondaryModel);
|
| | | }
|
| | | if (wingsModel != null)
|
| | | {
|
| | | Destroy(wingsModel);
|
| | |
| | | private int _SelectedNow = 0;
|
| | | private int ResetType = 0;// 重置类型,0-0点重置;1-5点重置
|
| | | public event Action IsOpenEvent;
|
| | | private int _JumpIndex = -1;//跳转选中值
|
| | | public int JumpIndex
|
| | | {
|
| | | get { return _JumpIndex; }
|
| | | set { _JumpIndex = value; }
|
| | | }
|
| | |
|
| | |
|
| | | public int SelectedNow//选中天
|
| | | {
|
| | | get { return _SelectedNow; }
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | public bool IsJumpOpen()
|
| | | {
|
| | | bool Isbool = false;
|
| | | if (LimitLV == 0)//活动未开启
|
| | | {
|
| | | SysNotifyMgr.Instance.ShowTip("OutofActivityTime");
|
| | | return false;
|
| | | }
|
| | | else
|
| | | {
|
| | | if (PlayerDatas.Instance.baseData.LV < LimitLV)//等级未到达
|
| | | {
|
| | | SysNotifyMgr.Instance.ShowTip("NotEenoughGrade");
|
| | | return Isbool;
|
| | | }
|
| | | }
|
| | | if (_IsOpen)
|
| | | {
|
| | | Isbool = true;
|
| | | }
|
| | | return Isbool;
|
| | | }
|
| | | } |
| | | |
| | | |
| | |
| | | |
| | | namespace Snxxz.UI
|
| | | {
|
| | | //开服成就
|
| | | //开服成就(8-14天)
|
| | | [XLua.Hotfix] |
| | | public class OpenServiceAchievementWin : Window |
| | | { |
| | |
| | | |
| | | protected override void OnPreOpen() |
| | | {
|
| | | model.SelectedNow = model.DayNow;
|
| | | ChooseDay();
|
| | | SetTextIntegral();
|
| | | OnCreateGridLineCell1(m_ScrollerController1);
|
| | | OnCreateGridLineCell2(m_ScrollerController2); |
| | |
| | | |
| | | protected override void OnPreClose() |
| | | {
|
| | | model.JumpIndex = -1;
|
| | | model.WeekPartyDayInfoUpdate -= WeekPartyDayInfoUpdate; |
| | | }
|
| | |
|
| | |
| | |
|
| | | GameObject IsNotGary = cell.transform.Find("Obj1").gameObject;
|
| | | Text IsNotGary_text = IsNotGary.transform.Find("DayText").GetComponent<Text>();
|
| | | GameObject Gary= cell.transform.Find("Obj2").gameObject;
|
| | | GameObject Gary = cell.transform.Find("Obj2").gameObject;
|
| | | Text Gary_text = Gary.transform.Find("DayText").GetComponent<Text>();
|
| | |
|
| | | RedpointBehaviour redPoint = cell.transform.Find("RedPoint").GetComponent<RedpointBehaviour>();//红点
|
| | |
| | | SelectedObj.SetActive(true);
|
| | | SelectedObj1.SetActive(true);
|
| | | Unselected.SetActive(false);
|
| | | |
| | |
|
| | | IsNotGary_text.text = (Index + 1).ToString();
|
| | | }
|
| | | Btn.SetListener(() =>
|
| | |
| | | dailyIdlist.Add(_list[i]);
|
| | | }
|
| | | }
|
| | | |
| | |
|
| | | foreach (var key in model.WeekPartyDayDic.Keys)
|
| | | {
|
| | | if (key == model.SelectedNow)
|
| | |
| | | {
|
| | | SortList.Add(TemplateId);
|
| | | }
|
| | | // var Dailyquse = Config.Instance.Get<DailyQuestConfig>(TemplateId);
|
| | | // var Dailyquse = Config.Instance.Get<DailyQuestConfig>(TemplateId);
|
| | | }
|
| | | else
|
| | | {
|
| | | SortList.Add(TemplateId);
|
| | | }
|
| | | |
| | |
|
| | | |
| | |
|
| | |
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | {
|
| | | m_One.SetActive(false);
|
| | | m_Two.SetActive(true);
|
| | | m_OpenServiceItemA1.SetReward(model.SelectedNow, ItemDayList[0],0,2);
|
| | | m_OpenServiceItemB1.SetReward(model.SelectedNow, ItemDayList[1],1,2);
|
| | | m_OpenServiceItemA1.SetReward(model.SelectedNow, ItemDayList[0], 0, 2);
|
| | | m_OpenServiceItemB1.SetReward(model.SelectedNow, ItemDayList[1], 1, 2);
|
| | | }
|
| | | else
|
| | | {
|
| | | m_One.SetActive(true);
|
| | | m_Two.SetActive(false);
|
| | | m_OpenServiceItemA.SetReward(model.SelectedNow, ItemDayList[0], 0,2);
|
| | | m_OpenServiceItemA.SetReward(model.SelectedNow, ItemDayList[0], 0, 2);
|
| | | }
|
| | | } |
| | | |
| | | private void ChooseDay()//选择天
|
| | | {
|
| | | if (model.JumpIndex != -1)//跳转选择的天
|
| | | {
|
| | | model.SelectedNow = model.JumpIndex;
|
| | | return;
|
| | | }
|
| | | foreach (var key in model.RedPointDic.Keys)//红点选择可领取的天
|
| | | {
|
| | | if (model.RedPointDic[key].state == RedPointState.Simple)
|
| | | {
|
| | | model.SelectedNow = key;
|
| | | return;
|
| | | }
|
| | | }
|
| | | model.SelectedNow = model.DayNow;
|
| | | } |
| | | } |
| | | |
| | | } |
| | |
| | |
|
| | | GameObject clothesModel;
|
| | | GameObject secondaryModel;
|
| | | GameObject extraSecondaryModel;
|
| | | Animator clothesAnimator;
|
| | |
|
| | | Transform showPoint;
|
| | |
| | | var clothes = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retClothes);
|
| | | var _clothesId = clothes == null ? 0 : (int)clothes.itemInfo.ItemID;
|
| | |
|
| | | var weapon = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retWeapon);
|
| | | var _weaponId = weapon == null ? 0 : (int)weapon.itemInfo.ItemID;
|
| | |
|
| | | var wings = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retWing);
|
| | | var _wingsId = wings == null ? 0 : (int)wings.itemInfo.ItemID;
|
| | |
|
| | | var secondary = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retWeapon2);
|
| | | var _secondaryId = secondary == null ? 0 : (int)secondary.itemInfo.ItemID;
|
| | |
|
| | | var fashionClothes = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retFashionClothes);
|
| | | var fashionClothesId = fashionClothes == null ? 0 : (int)fashionClothes.itemInfo.ItemID;
|
| | |
|
| | | var fashionWeapon = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retFashionWeapon);
|
| | | var fashionWeaponId = fashionWeapon == null ? 0 : (int)fashionWeapon.itemInfo.ItemID;
|
| | |
|
| | | var fashionSecondary = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retFashionWeapon2);
|
| | | var fashionSecondaryId = fashionSecondary == null ? 0 : (int)fashionSecondary.itemInfo.ItemID;
|
| | | #endregion
|
| | |
|
| | | showPoint = m_HeroStage;
|
| | | var _hero = ShowHero(_job, fashionClothesId > 0 ? fashionClothesId : _clothesId,
|
| | | fashionWeaponId > 0 ? fashionWeaponId : _weaponId, _wingsId,
|
| | | fashionSecondaryId > 0 ? fashionSecondaryId : _secondaryId);
|
| | | var _hero = ShowHero(_job, _clothesId, _secondaryId, fashionClothesId, fashionSecondaryId);
|
| | | if (_hero != null)
|
| | | {
|
| | | SitDown();
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | GameObject ShowHero(int _job, int _clothes, int _weaponId, int _wingsId, int _secondaryId)
|
| | | GameObject ShowHero(int job, int clothesId, int secondaryId, int fashionClothesId, int fashionSecondaryId)
|
| | | {
|
| | | PutOnClothes(_job, _clothes);
|
| | |
|
| | | var jobConfig = Config.Instance.Get<JobSetupConfig>(_job);
|
| | | var secondaryResId = 0;
|
| | | if (_secondaryId == 0)
|
| | | clothesId = fashionClothesId > 0 ? fashionClothesId : clothesId;
|
| | | secondaryId = fashionSecondaryId > 0 ? fashionSecondaryId : secondaryId;
|
| | | var jobConfig = Config.Instance.Get<JobSetupConfig>(job);
|
| | | var clothesResId = 0;
|
| | | if (clothesId == 0)
|
| | | {
|
| | | if (_job == 1)
|
| | | clothesResId = jobConfig.BaseEquip[0];
|
| | | }
|
| | | else
|
| | | {
|
| | | var item = Config.Instance.Get<ItemConfig>(clothesId);
|
| | | clothesResId = item == null ? clothesResId = jobConfig.BaseEquip[0] : item.ChangeOrd;
|
| | | }
|
| | |
|
| | | PutOnClothes(job, clothesResId);
|
| | |
|
| | | var secondaryResId = 0;
|
| | | if (secondaryId == 0)
|
| | | {
|
| | | if (fashionClothesId <= 0)
|
| | | {
|
| | | secondaryResId = _clothes + 2900;
|
| | | }
|
| | | else
|
| | | {
|
| | | secondaryResId = jobConfig.BaseEquip[2];
|
| | | if (job == 1)
|
| | | {
|
| | | secondaryResId = clothesId + 2900;
|
| | | }
|
| | | else
|
| | | {
|
| | | secondaryResId = jobConfig.BaseEquip[2];
|
| | | }
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | var item = Config.Instance.Get<ItemConfig>(_secondaryId);
|
| | | var item = Config.Instance.Get<ItemConfig>(secondaryId);
|
| | | secondaryResId = item == null ? jobConfig.BaseEquip[2] : item.ChangeOrd;
|
| | | }
|
| | | PutOnSecondary(_job, secondaryResId);
|
| | | PutOnSecondary(job, secondaryResId);
|
| | |
|
| | | var extraSecondaryId = 0;
|
| | | if (job == 1 && fashionSecondaryId > 0 && fashionClothesId == 0)
|
| | | {
|
| | | if (clothesId == 0)
|
| | | {
|
| | | extraSecondaryId = jobConfig.BaseEquip[0] + 2900;
|
| | | }
|
| | | else
|
| | | {
|
| | | var item = Config.Instance.Get<ItemConfig>(clothesId);
|
| | | var defaultClothesResId = item == null ? jobConfig.BaseEquip[0] : item.ChangeOrd;
|
| | | extraSecondaryId = defaultClothesResId + 2900;
|
| | | }
|
| | | }
|
| | |
|
| | | PutOnExtraSecondary(job, extraSecondaryId);
|
| | |
|
| | | return clothesModel;
|
| | | }
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | public void PutOnClothes(int _job, int itemID)
|
| | | public void PutOnClothes(int _job, int clothesResId)
|
| | | {
|
| | | var newClothes = 0;
|
| | | var config = Config.Instance.Get<JobSetupConfig>(_job);
|
| | |
|
| | | if (itemID == 0)
|
| | | {
|
| | | newClothes = config.BaseEquip[0];
|
| | | }
|
| | | else
|
| | | {
|
| | | var item = Config.Instance.Get<ItemConfig>(itemID);
|
| | | newClothes = item == null ? newClothes = config.BaseEquip[0] : item.ChangeOrd;
|
| | | }
|
| | |
|
| | | var _prefab = InstanceResourcesLoader.LoadModelRes(newClothes,true);
|
| | | var _prefab = InstanceResourcesLoader.LoadModelRes(clothesResId, true);
|
| | | if (!_prefab)
|
| | | {
|
| | | newClothes = config.BaseEquip[0];
|
| | | clothesResId = config.BaseEquip[0];
|
| | | }
|
| | |
|
| | | LoadClothes(newClothes, _job);
|
| | | LoadClothes(clothesResId, _job);
|
| | | }
|
| | |
|
| | | private void PutOnSecondary(int _job, int secondaryResId)
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | private void LoadClothes(int resID,int job)
|
| | | private void PutOnExtraSecondary(int job, int extraSecondaryId)
|
| | | {
|
| | | var prefab = InstanceResourcesLoader.LoadModelRes(resID,true);
|
| | | if (job == 2)
|
| | | {
|
| | | return;
|
| | | }
|
| | |
|
| | | if (extraSecondaryId != 0)
|
| | | {
|
| | | var prefab = InstanceResourcesLoader.LoadModelRes(extraSecondaryId);
|
| | | if (!prefab)
|
| | | {
|
| | | var config = Config.Instance.Get<JobSetupConfig>(job);
|
| | | extraSecondaryId = config.BaseEquip[2];
|
| | | prefab = InstanceResourcesLoader.LoadModelRes(extraSecondaryId);
|
| | | }
|
| | |
|
| | | if (prefab)
|
| | | {
|
| | | if (extraSecondaryModel == null)
|
| | | {
|
| | | extraSecondaryModel = Instantiate(prefab, Constants.Special_Hide_Position, Quaternion.identity);
|
| | | var parent = clothesModel.transform.GetChildTransformDeeply(GAStaticDefine.SecondaryBindBoneName[job - 1]);
|
| | | extraSecondaryModel.transform.SetParentEx(parent, Vector3.zero, Quaternion.identity, Vector3.one);
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | private void LoadClothes(int resID, int job)
|
| | | {
|
| | | var prefab = InstanceResourcesLoader.LoadModelRes(resID, true);
|
| | | if (clothesModel == null)
|
| | | {
|
| | | clothesModel = Instantiate(prefab, Constants.Special_Hide_Position, Quaternion.identity);
|
| | |
| | | LayerUtility.SetLayer(clothesModel, LayerUtility.Player, false);
|
| | | var skinnedMeshRenderer = clothesModel.GetComponentInChildren<SkinnedMeshRenderer>(true);
|
| | |
|
| | | var mat = MaterialLoader.LoadClothesMaterial(resID, false, IsSuit(job, resID));
|
| | | var mat = MaterialLoader.LoadClothesMaterial(resID, false, false);
|
| | | if (mat)
|
| | | {
|
| | | skinnedMeshRenderer.material = mat;
|
| | |
| | | clothesAnimator.runtimeAnimatorController = _controller;
|
| | | clothesAnimator.enabled = true;
|
| | | }
|
| | | }
|
| | |
|
| | | public bool IsSuit(int job, int clothedID)
|
| | | {
|
| | | var _equipModel = ModelCenter.Instance.GetModel<PlayerPackModel>().GetSinglePackModel(PackType.rptEquip);
|
| | | if (_equipModel == null)
|
| | | {
|
| | | return false;
|
| | | }
|
| | |
|
| | | int _suitCount = 0;
|
| | |
|
| | | int _start = (int)RoleEquipType.retHat;
|
| | | int _end = (int)RoleEquipType.retShoes;
|
| | |
|
| | | ItemModel _itemModel = null;
|
| | |
|
| | | _itemModel = _equipModel.GetItemModelByIndex((int)RoleEquipType.retClothes);
|
| | |
|
| | | if (_itemModel == null)
|
| | | {
|
| | | return false;
|
| | | }
|
| | |
|
| | | int _rank = _itemModel.chinItemModel.LV;
|
| | |
|
| | | for (int i = _start; i <= _end; ++i)
|
| | | {
|
| | | _itemModel = _equipModel.GetItemModelByIndex(i);
|
| | |
|
| | | if (_itemModel == null)
|
| | | {
|
| | | continue;
|
| | | }
|
| | |
|
| | | if (_itemModel.chinItemModel.SuiteiD <= 0)
|
| | | {
|
| | | continue;
|
| | | }
|
| | |
|
| | | if (i == (int)RoleEquipType.retClothes)
|
| | | {
|
| | | _rank = _itemModel.chinItemModel.LV;
|
| | | }
|
| | |
|
| | | var suitModel = ModelCenter.Instance.GetModel<PlayerSuitModel>();
|
| | | if (suitModel.suitModelDict.ContainsKey(i))
|
| | | {
|
| | | if (suitModel.suitModelDict[i].ContainsKey(1)
|
| | | || suitModel.suitModelDict[i].ContainsKey(2))
|
| | | {
|
| | | if (_itemModel.chinItemModel.LV >= _rank)
|
| | | {
|
| | | _suitCount += 1;
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | return _suitCount >= 5;
|
| | | }
|
| | | }
|
| | | }
|