Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
| | |
| | | public int BasicsDefense;//基础防御
|
| | | public int BasicsScoreAHit;//基础命中
|
| | | public int BasicsDodge;//基础闪避
|
| | | public uint equipShowSwitch;//装备显隐开关
|
| | | public long treasurePotentialSp {
|
| | | get {
|
| | | return ExAttr8 * (long)100000000 + ExAttr7;
|
| | |
| | | HappyPoint = _serverInfo.HappyPoint;
|
| | | faction = _serverInfo.Faction;
|
| | | coinPointTotal = _serverInfo.ChangeCoinPointTotal;
|
| | | equipShowSwitch = _serverInfo.EquipShowSwitch;
|
| | | godWeaponLV_1 = (int)_serverInfo.ExAttr15;
|
| | | godWeaponLV_2 = (int)_serverInfo.ExAttr16;
|
| | | godWeaponLV_3 = (int)_serverInfo.ExAttr17;
|
| | |
| | | case PlayerDataRefresh.WarehouseLV:
|
| | | break;
|
| | | case PlayerDataRefresh.EquipShowSwitch:
|
| | | baseData.equipShowSwitch = value;
|
| | | break;
|
| | | case PlayerDataRefresh.LuckValue:
|
| | | break;
|
| | |
| | | realmImg.SetSprite(realmConfig.Img);
|
| | | }
|
| | | }
|
| | |
|
| | | realmImg.SetNativeSize();
|
| | | if (PlayerDatas.Instance.baseData.realmLevel >= itemAttrData.itemConfig.RealmLimit)
|
| | | {
|
| | | realmTitleText.color = conditionColor;
|
| | |
| | | m_ChatTime.text = _data.createTime.ToString("yyyy-MM-dd HH:mm"); |
| | | if (_data.vipLv > 0)
|
| | | {
|
| | | m_VipLevel.text = "Vip";//string.Format("V{0}", _data.vipLv);
|
| | | m_VipLevel.text = "VIP";//string.Format("V{0}", _data.vipLv);
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | | m_ChatTime.text = _data.createTime.ToString("yyyy-MM-dd HH:mm");
|
| | | if (_data.vipLv > 0)
|
| | | {
|
| | | m_VipLevel.text = "Vip";//string.Format("V{0}", _data.vipLv);
|
| | | m_VipLevel.text = "VIP";//string.Format("V{0}", _data.vipLv);
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | | m_ChatTime.text = data.createTime.ToString("yyyy-MM-dd HH:mm"); |
| | | if (chatUserData.vipLv > 0) |
| | | { |
| | | m_VipLv.text = "Vip";//string.Format("V{0}", chatUserData.vipLv); |
| | | m_VipLv.text = "VIP";//string.Format("V{0}", chatUserData.vipLv); |
| | | } |
| | | else |
| | | { |
| | |
| | | m_ChatTime.text = data.createTime.ToString("yyyy-MM-dd HH:mm");
|
| | | if (chatUserData.vipLv > 0)
|
| | | {
|
| | | m_VipLv.text = "Vip";//string.Format("V{0}", chatUserData.vipLv);
|
| | | m_VipLv.text = "VIP";//string.Format("V{0}", chatUserData.vipLv);
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | | chatName = chatUserData.name;
|
| | | if (chatUserData.vipLv > 0)
|
| | | {
|
| | | vipLv = "Vip";//StringUtility.Contact("V", chatUserData.vipLv);
|
| | | vipLv = "VIP";//StringUtility.Contact("V", chatUserData.vipLv);
|
| | | }
|
| | | break;
|
| | | }
|
| | |
| | | chatName = chatUserData.name;
|
| | | if (chatUserData.vipLv > 0)
|
| | | {
|
| | | vipLv = "Vip";// StringUtility.Contact("V", chatUserData.vipLv);
|
| | | vipLv = "VIP";// StringUtility.Contact("V", chatUserData.vipLv);
|
| | | }
|
| | | break;
|
| | | }
|
| | |
| | | chatName = chatUserData.name;
|
| | | if (chatUserData.vipLv > 0)
|
| | | {
|
| | | vipLv = "Vip";// StringUtility.Contact("V", chatUserData.vipLv);
|
| | | vipLv = "VIP";// StringUtility.Contact("V", chatUserData.vipLv);
|
| | | }
|
| | | break;
|
| | | }
|
| | |
| | | chatName = chatUserData.name;
|
| | | if (chatUserData.vipLv > 0)
|
| | | {
|
| | | vipLv = "Vip";// StringUtility.Contact("V", chatUserData.vipLv);
|
| | | vipLv = "VIP";// StringUtility.Contact("V", chatUserData.vipLv);
|
| | | }
|
| | | break;
|
| | | }
|
| | |
| | | chatName = chatUserData.name;
|
| | | if (chatUserData.vipLv > 0)
|
| | | {
|
| | | vipLv = "Vip";// StringUtility.Contact("V", chatUserData.vipLv);
|
| | | vipLv = "VIP";// StringUtility.Contact("V", chatUserData.vipLv);
|
| | | }
|
| | | break;
|
| | | }
|
| | |
| | | var fashionSecondary = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retFashionWeapon2);
|
| | | var fashionSecondaryId = fashionSecondary == null ? 0 : (int)fashionSecondary.itemInfo.ItemID;
|
| | |
|
| | | var magicianModel = ModelCenter.Instance.GetModel<MagicianModel>();
|
| | | var godWeapon1 = magicianModel.GetGodWeaponInfo(1);
|
| | | var godWeapon2 = magicianModel.GetGodWeaponInfo(2);
|
| | | var godWeapon3 = magicianModel.GetGodWeaponInfo(3);
|
| | | var godWeapon4 = magicianModel.GetGodWeaponInfo(4);
|
| | | var data = new UI3DPlayerExhibitionData
|
| | | {
|
| | | job = PlayerDatas.Instance.baseData.Job,
|
| | |
| | | fashionWeapon2 = itemData.ItemID;
|
| | | }
|
| | |
|
| | | var godWeapons = new Dictionary<int, int>();
|
| | | var magicianModel = ModelCenter.Instance.GetModel<MagicianModel>();
|
| | | for (int i = 0; i < magicianModel.godWeaponTypes.Count; i++)
|
| | | {
|
| | | var type = magicianModel.godWeaponTypes[i];
|
| | | if (_leaderData.rolePlusData != null)
|
| | | {
|
| | | var level = _leaderData.rolePlusData.GetGodWeaponLevel(type);
|
| | | godWeapons.Add(type, level);
|
| | | }
|
| | | }
|
| | | Dictionary<int, int> dict = null;
|
| | | EquipShowSwitch.IsGodWeaponEffectOn(_leaderData.rolePropData.EquipShowSwitch, out dict);
|
| | |
|
| | | var data = new UI3DPlayerExhibitionData
|
| | | {
|
| | |
| | | weaponId = weapon,
|
| | | wingsId = wing,
|
| | | secondaryId = weapon2,
|
| | | godWeapons = godWeapons,
|
| | | godWeapons = dict,
|
| | | isDialogue = false,
|
| | | };
|
| | |
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | Dictionary<int, int> dict = new Dictionary<int, int>();
|
| | | for (int i = 0; i < godWeaponModel.godWeaponTypes.Count; i++)
|
| | | {
|
| | | var type = godWeaponModel.godWeaponTypes[i];
|
| | | var godWeaponInfo = godWeaponModel.GetGodWeaponInfo(type);
|
| | | var equipedLevel = godWeaponInfo != null ? godWeaponInfo.level : 0;
|
| | | dict[type] = equipedLevel;
|
| | | }
|
| | | Dictionary<int, int> dict = null;
|
| | | EquipShowSwitch.IsGodWeaponEffectOn(PlayerDatas.Instance.baseData.equipShowSwitch, out dict);
|
| | |
|
| | | UI3DPlayerExhibitionData data = new UI3DPlayerExhibitionData()
|
| | | {
|
| | |
| | | realmImg.SetSprite(realmConfig.Img);
|
| | | }
|
| | | }
|
| | |
|
| | | realmImg.SetNativeSize();
|
| | | if (PlayerDatas.Instance.baseData.realmLevel >= itemTipsModel.curAttrData.itemConfig.RealmLimit)
|
| | | {
|
| | | realmTitleText.color = conditionColor;
|
| | |
| | | realmImg.SetSprite(realmConfig.Img);
|
| | | }
|
| | | }
|
| | |
|
| | | realmImg.SetNativeSize();
|
| | | if (PlayerDatas.Instance.baseData.realmLevel >= itemAttrData.itemConfig.RealmLimit)
|
| | | {
|
| | | realmTitleText.color = conditionColor;
|
| | |
| | | realmImg.SetSprite(realmConfig.Img);
|
| | | }
|
| | | }
|
| | |
|
| | | realmImg.SetNativeSize();
|
| | | if (PlayerDatas.Instance.baseData.realmLevel >= itemTipsModel.curAttrData.itemConfig.RealmLimit)
|
| | | {
|
| | | realmTitleText.color = conditionColor;
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | Dictionary<int, int> dict = new Dictionary<int, int>();
|
| | | for (int i = 0; i < godWeaponModel.godWeaponTypes.Count; i++)
|
| | | {
|
| | | var type = godWeaponModel.godWeaponTypes[i];
|
| | | var godWeaponInfo = godWeaponModel.GetGodWeaponInfo(type);
|
| | | var equipedLevel = godWeaponInfo != null ? godWeaponInfo.level : 0;
|
| | | dict[type] = equipedLevel;
|
| | | }
|
| | | Dictionary<int, int> dict = null;
|
| | | EquipShowSwitch.IsGodWeaponEffectOn(PlayerDatas.Instance.baseData.equipShowSwitch, out dict);
|
| | |
|
| | | UI3DPlayerExhibitionData data = new UI3DPlayerExhibitionData()
|
| | | {
|
| | |
| | | realmImg.SetSprite(realmConfig.Img);
|
| | | }
|
| | | }
|
| | |
|
| | | realmImg.SetNativeSize();
|
| | | if (PlayerDatas.Instance.baseData.realmLevel >= itemAttrData.itemConfig.RealmLimit)
|
| | | {
|
| | | realmTitleText.color = conditionColor;
|
| | |
| | | conditionValueText.gameObject.SetActive(false);
|
| | | }
|
| | | }
|
| | | conditionValueText.SetNativeSize();
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | Dictionary<int, int> dict = null;
|
| | | EquipShowSwitch.IsGodWeaponEffectOn(PlayerDatas.Instance.loginInfo.EquipShowSwitch, out dict);
|
| | | var data = new UI3DPlayerExhibitionData()
|
| | | {
|
| | | job = PlayerDatas.Instance.loginInfo.Job,
|
| | |
| | | wingsId = wingsItemId,
|
| | | fashionSecondaryId = fashionSecondary,
|
| | | secondaryId = secondaryItemId,
|
| | | godWeapons = new Dictionary<int, int>() {
|
| | | { 1, (int)PlayerDatas.Instance.loginInfo.ExAttr15 },
|
| | | { 2, (int)PlayerDatas.Instance.loginInfo.ExAttr16},
|
| | | { 3, (int)PlayerDatas.Instance.loginInfo.ExAttr17 },
|
| | | { 4, (int)PlayerDatas.Instance.loginInfo.ExAttr18 } }
|
| | | godWeapons = dict
|
| | | };
|
| | |
|
| | | var model = playerModel.Show(data, m_HeroPlatform.transform);
|
| | |
| | | public void OnPlayerLoginOk()
|
| | | {
|
| | | GlobalTimeEvent.Instance.secondEvent += UpdateSecond;
|
| | | UpdateFreeWishRedpoint();
|
| | | UpdateRedpoint();
|
| | | UpdateFreeWishRedpoint();
|
| | | }
|
| | |
|
| | | public override void UnInit()
|
| | |
| | | {
|
| | | if (type == Operation.WishingWellInfo && state == 0)
|
| | | {
|
| | | UpdateFreeWishRedpoint();
|
| | | UpdateRedpoint();
|
| | | UpdateFreeWishRedpoint();
|
| | | if (onStateUpate != null)
|
| | | {
|
| | | onStateUpate((int)OpenServerActivityCenter.OSActivityType.WishingPool);
|
| | |
| | | {
|
| | | if (type == Operation.WishingWellInfo && state == 0)
|
| | | {
|
| | | UpdateFreeWishRedpoint();
|
| | | |
| | | UpdateRedpoint();
|
| | | UpdateFreeWishRedpoint();
|
| | | if (onStateUpate != null)
|
| | | {
|
| | | onStateUpate((int)OpenServerActivityCenter.OSActivityType.WishingPool);
|
| | |
| | | if(!isCool)
|
| | | {
|
| | | UpdateFreeWishRedpoint();
|
| | | UpdateRedpoint();
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | SetWishingAwardData(i, wellItem);
|
| | | }
|
| | | }
|
| | | UpdateFreeWishRedpoint();
|
| | | UpdateRedpoint();
|
| | | UpdateFreeWishRedpoint();
|
| | | if(UpdateWishAwardEvent != null)
|
| | | {
|
| | | UpdateWishAwardEvent();
|
| | |
| | | }
|
| | | }
|
| | | UpdateRedpoint();
|
| | | UpdateFreeWishRedpoint();
|
| | | }
|
| | |
|
| | | public void SetWishingPoolData(int index, WishingWellItem wellItem)
|
| | |
| | | {
|
| | | freeWishRedpoint.state = RedPointState.None;
|
| | | if (!IsOpen) return;
|
| | | for (int i = 0; i < wishPointlist.Count; i++)
|
| | | {
|
| | | var wishPoint = wishPointlist[i];
|
| | | if(wishPoint.state != RedPointState.None)
|
| | | {
|
| | | return;
|
| | | }
|
| | | }
|
| | |
|
| | | int second = 0;
|
| | | bool isCool = TryGetFreeWishCoolTime(out second);
|
| | |
| | | wishPoint.state = RedPointState.None;
|
| | | }
|
| | |
|
| | | if (!IsOpen || freeWishRedpoint.state != RedPointState.None) return;
|
| | | if (!IsOpen) return;
|
| | |
|
| | | for (int i = 0; i < wishPointlist.Count; i++)
|
| | | {
|
| | |
| | |
|
| | | FunctionUnlockFlyObject flyObject;
|
| | |
|
| | | PlayerPackModel playerPack { get { return ModelCenter.Instance.GetModel<PlayerPackModel>(); } }
|
| | |
|
| | | DateTime openTime = DateTime.Now;
|
| | | #region Built-in
|
| | | protected override void BindController()
|
| | |
| | | switch (ActivateShow.activateType)
|
| | | {
|
| | | case ActivateShow.ActivateFunc.Realm:
|
| | | case ActivateShow.ActivateFunc.GodWeaponEffect:
|
| | | m_ModelRawImage.gameObject.SetActive(true);
|
| | | m_ModelRawImage.rectTransform.sizeDelta = new Vector2(680, 510);
|
| | | UI3DModelExhibition.Instance.ShowPlayer(m_ModelRawImage, PlayerDatas.Instance.baseData.Job, RoleEquipType.retWing);
|
| | | break;
|
| | | case ActivateShow.ActivateFunc.GodWeaponEffect:
|
| | | m_ModelRawImage.gameObject.SetActive(true);
|
| | | m_ModelRawImage.rectTransform.sizeDelta = new Vector2(680, 510);
|
| | |
|
| | | 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 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;
|
| | |
|
| | | var model = ModelCenter.Instance.GetModel<MagicianModel>();
|
| | | Dictionary<int, int> dict = new Dictionary<int, int>();
|
| | | for (int i = 0; i < model.godWeaponTypes.Count; i++)
|
| | | {
|
| | | var type = model.godWeaponTypes[i];
|
| | | var godWeaponInfo = model.GetGodWeaponInfo(type);
|
| | | if (type == ActivateShow.godWeaponType)
|
| | | {
|
| | | var level = model.GetGodWeaponStageRequireLevel(type, ActivateShow.godWeaponStage);
|
| | | dict.Add(type, level);
|
| | | }
|
| | | else
|
| | | {
|
| | | dict.Add(type, godWeaponInfo == null ? 0 : godWeaponInfo.level);
|
| | | }
|
| | | }
|
| | |
|
| | | UI3DPlayerExhibitionData data = new UI3DPlayerExhibitionData()
|
| | | {
|
| | | job = PlayerDatas.Instance.baseData.Job,
|
| | | fashionClothesId = fashionClothesId,
|
| | | clothesId = _clothesId,
|
| | | fashionWeaponId = fashionWeaponId,
|
| | | weaponId = _weaponId,
|
| | | fashionSecondaryId = fashionSecondaryId,
|
| | | secondaryId = _secondaryId,
|
| | | godWeapons = dict,
|
| | | };
|
| | |
|
| | |
|
| | | UI3DModelExhibition.Instance.ShowOtherPlayer(m_ModelRawImage, data);
|
| | | break;
|
| | | case ActivateShow.ActivateFunc.GodWeapon:
|
| | | m_ModelRawImage.gameObject.SetActive(true);
|
| | | m_ModelRawImage.rectTransform.sizeDelta = new Vector2(600, 600);
|
| New file |
| | |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | namespace Snxxz.UI
|
| | | {
|
| | | [XLua.Hotfix]
|
| | | public static class EquipShowSwitch
|
| | | {
|
| | | static MagicianModel godWeaponModel
|
| | | {
|
| | | get { return ModelCenter.Instance.GetModel<MagicianModel>(); }
|
| | | }
|
| | |
|
| | | const int GODWEAPON_EFFECT_STAGE = 3;
|
| | |
|
| | | public static bool IsGodWeaponEffectOn(uint value, out Dictionary<int, int> dict)
|
| | | {
|
| | | dict = new Dictionary<int, int>();
|
| | | foreach (var type in godWeaponModel.godWeaponEffectTypes)
|
| | | {
|
| | | var level = 0;
|
| | | if (IsGodWeaponEffectOn(value, type, out level))
|
| | | {
|
| | | dict.Add(type, level);
|
| | | }
|
| | | }
|
| | | return dict.Count > 0;
|
| | | }
|
| | |
|
| | | public static bool IsGodWeaponEffectOn(uint value, int type, out int level)
|
| | | {
|
| | | level = 0;
|
| | | for (int i = 0; i < GODWEAPON_EFFECT_STAGE; i++)
|
| | | {
|
| | | var stage = i + 1;
|
| | | var index = GetGodWeaponEquipShowIndex(type, stage);
|
| | | if (MathUtility.GetBitValue(value, index))
|
| | | {
|
| | | level = godWeaponModel.GetGodWeaponStageRequireLevel(type, stage);
|
| | | return true;
|
| | | }
|
| | | }
|
| | | return false;
|
| | | }
|
| | |
|
| | | public static byte GetGodWeaponEquipShowIndex(int type, int stage)
|
| | | {
|
| | | EquipShowSwitchType switchType = EquipShowSwitchType.GodWeapon_Life1;
|
| | | switch (type)
|
| | | {
|
| | | case 1:
|
| | | switchType = stage == 1 ? EquipShowSwitchType.GodWeapon_Life1 : stage == 2 ?
|
| | | EquipShowSwitchType.GodWeapon_Life2 : EquipShowSwitchType.GodWeapon_Life3;
|
| | | break;
|
| | | case 2:
|
| | | switchType = stage == 1 ? EquipShowSwitchType.GodWeapon_Atk1 : stage == 2 ?
|
| | | EquipShowSwitchType.GodWeapon_Atk2 : EquipShowSwitchType.GodWeapon_Atk3;
|
| | | break;
|
| | | case 4:
|
| | | switchType = stage == 1 ? EquipShowSwitchType.GodWeapon_Defend1 : stage == 2 ?
|
| | | EquipShowSwitchType.GodWeapon_Defend2 : EquipShowSwitchType.GodWeapon_Defend3;
|
| | | break;
|
| | | }
|
| | | return (byte)switchType;
|
| | | }
|
| | |
|
| | | public static void SendGodWeaponEffectOn(int type, int stage, bool isOn)
|
| | | {
|
| | | var level = 0;
|
| | | var value = PlayerDatas.Instance.baseData.equipShowSwitch;
|
| | | var requireLevel = godWeaponModel.GetGodWeaponStageRequireLevel(type, stage);
|
| | | if (isOn && IsGodWeaponEffectOn(value, type, out level)
|
| | | && level != requireLevel)
|
| | | {
|
| | | var _stage = 0;
|
| | | if (godWeaponModel.TryGetGodWeaponStage(type, level, out _stage))
|
| | | {
|
| | | var index = GetGodWeaponEquipShowIndex(type, _stage);
|
| | | value = (uint)MathUtility.SetBitValue((int)value, index, false);
|
| | | }
|
| | | }
|
| | |
|
| | | {
|
| | | var index = GetGodWeaponEquipShowIndex(type, stage);
|
| | | value = (uint)MathUtility.SetBitValue((int)value, index, isOn);
|
| | | }
|
| | |
|
| | | if (value != PlayerDatas.Instance.baseData.equipShowSwitch)
|
| | | {
|
| | | SendPackage(value);
|
| | | }
|
| | | }
|
| | |
|
| | | public static void SendPackage(uint value)
|
| | | {
|
| | | C032F_tagCRequestEquipShowHide pak = new C032F_tagCRequestEquipShowHide();
|
| | | pak.EquipShowSwitch = value;
|
| | | GameNetSystem.Instance.SendInfo(pak);
|
| | | }
|
| | |
|
| | | public enum EquipShowSwitchType : byte
|
| | | {
|
| | | GodWeapon_Life1,//生命
|
| | | GodWeapon_Life2,
|
| | | GodWeapon_Life3,
|
| | | GodWeapon_Atk1,//攻击
|
| | | GodWeapon_Atk2,
|
| | | GodWeapon_Atk3,
|
| | | GodWeapon_Defend1,//护盾
|
| | | GodWeapon_Defend2,
|
| | | GodWeapon_Defend3,
|
| | | max = 32,
|
| | | }
|
| | | }
|
| | | } |
| | | |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 01dcfe375cd5cf940bd33f6b2f4db077 |
| | | timeCreated: 1547125411 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| | |
| | | {
|
| | | Display();
|
| | | DisplayGodWeaponTypes();
|
| | |
|
| | | PlayerDatas.Instance.PlayerDataRefreshInfoEvent += PlayerDataRefreshInfoEvent;
|
| | | }
|
| | |
|
| | | protected override void OnAfterOpen()
|
| | |
| | |
|
| | | protected override void OnPreClose()
|
| | | {
|
| | | PlayerDatas.Instance.PlayerDataRefreshInfoEvent -= PlayerDataRefreshInfoEvent;
|
| | | UI3DModelExhibition.Instance.StopShow();
|
| | | UI3DModelExhibition.InstanceClone1.StopShow();
|
| | | }
|
| | |
| | | {
|
| | | }
|
| | | #endregion
|
| | |
|
| | | private void PlayerDataRefreshInfoEvent(PlayerDataRefresh refreshType)
|
| | | {
|
| | | if (refreshType == PlayerDataRefresh.EquipShowSwitch)
|
| | | {
|
| | | DisplayEquip();
|
| | | DisplayModel();
|
| | | }
|
| | | }
|
| | |
|
| | | void Display()
|
| | | {
|
| | |
| | | DisplayProperty();
|
| | | DisplayFightPower();
|
| | | DisplayGodWeaponEffect();
|
| | | DisplayEquip();
|
| | | }
|
| | |
|
| | | private void DisplayRequireLevel()
|
| | |
| | | void DisplayEquip()
|
| | | {
|
| | | var equipedLevel = 0;
|
| | | model.IsGodWeaponEffectEquip(selectGodWeaponType, out equipedLevel);
|
| | | EquipShowSwitch.IsGodWeaponEffectOn(PlayerDatas.Instance.baseData.equipShowSwitch, selectGodWeaponType, out equipedLevel);
|
| | | for (int i = 0; i < m_EquipSigns.Length; i++)
|
| | | {
|
| | | var stage = i + 1;
|
| | |
| | |
|
| | | private void Equip()
|
| | | {
|
| | |
|
| | | EquipShowSwitch.SendGodWeaponEffectOn(selectGodWeaponType, selectStage, true);
|
| | | }
|
| | |
|
| | | private void PutOff()
|
| | | {
|
| | |
|
| | | EquipShowSwitch.SendGodWeaponEffectOn(selectGodWeaponType, selectStage, false);
|
| | | }
|
| | |
|
| | | private void DisplayModel()
|
| | |
| | | {
|
| | | dict[type] = model.GetGodWeaponStageRequireLevel(selectGodWeaponType, selectStage);
|
| | | }
|
| | | else if (model.IsGodWeaponEffectEquip(type, out equipedLevel))
|
| | | else if (EquipShowSwitch.IsGodWeaponEffectOn(PlayerDatas.Instance.baseData.equipShowSwitch, type, out equipedLevel))
|
| | | {
|
| | | dict[type] = equipedLevel;
|
| | | }
|
| | |
| | | m_Effect.StopImediatly();
|
| | | if (config != null)
|
| | | {
|
| | | m_SkillIcon.SetSprite(config.icon);
|
| | | m_SkillIcon.SetSprite(model.GetEffectSkillIcon(config.type, config.level));
|
| | | var weaponInfo = model.GetGodWeaponInfo(config.type);
|
| | | bool active = weaponInfo != null && weaponInfo.level >= config.level;
|
| | | m_SkillCondition.gameObject.SetActive(!active);
|
| | |
| | | {
|
| | | serverInited = true;
|
| | | UpdateRedPoint();
|
| | | CheckGodWeaponEffectOn();
|
| | | }
|
| | |
|
| | | private Dictionary<int, int[]> godWeaponLevelUpCost = new Dictionary<int, int[]>();
|
| | |
| | | new Dictionary<int, List<GodWeaponEffectProperty>>();
|
| | | Dictionary<int, Dictionary<int, int>> effectFightPower = new Dictionary<int, Dictionary<int, int>>();
|
| | | Dictionary<int, int> godWeaponEffectEquipDict = new Dictionary<int, int>();
|
| | | Dictionary<int, List<GodWeaponEffectInfo>> godWeaponEffectInfos = new Dictionary<int, List<GodWeaponEffectInfo>>();
|
| | | int[] autoHammerExpArea { get; set; }
|
| | | int[] autoHammerCount { get; set; }
|
| | |
|
| | |
| | | {
|
| | | godWeaponEffectTypes.Add(config.type);
|
| | | }
|
| | |
|
| | | List<GodWeaponEffectInfo> effectInfos;
|
| | | if (!godWeaponEffectInfos.TryGetValue(config.type, out effectInfos))
|
| | | {
|
| | | effectInfos = new List<GodWeaponEffectInfo>();
|
| | | godWeaponEffectInfos.Add(config.type, effectInfos);
|
| | | }
|
| | | Dictionary<int, string> skillIconDict = new Dictionary<int, string>();
|
| | | var iconJson = LitJson.JsonMapper.ToObject(config.icon);
|
| | | foreach (var key in iconJson.Keys)
|
| | | {
|
| | | var job = int.Parse(key);
|
| | | skillIconDict.Add(job, iconJson[key].ToString());
|
| | | }
|
| | | effectInfos.Add(new GodWeaponEffectInfo()
|
| | | {
|
| | | level = config.level,
|
| | | skillIconDict = skillIconDict,
|
| | | });
|
| | | }
|
| | |
|
| | | funcConfig = Config.Instance.Get<FuncConfigConfig>("MagicExterior");
|
| | |
| | | var stage = 0;
|
| | | if (_beforeLv != _nowLv && TryGetUnlockStage(_type, _beforeLv, _nowLv, out stage))
|
| | | {
|
| | | EquipShowSwitch.SendGodWeaponEffectOn(_type, stage, true);
|
| | | if (WindowCenter.Instance.IsOpen<MagicianWin>()
|
| | | && !NewBieCenter.Instance.inGuiding)
|
| | | {
|
| | |
| | | return godWeaponSkillEffect.TryGetValue(skillId, out effect);
|
| | | }
|
| | |
|
| | | public bool IsGodWeaponEffectEquip(int type, out int level)
|
| | | {
|
| | | level = 0;
|
| | | if (godWeaponEffectEquipDict.ContainsKey(type))
|
| | | {
|
| | | level = godWeaponEffectEquipDict[type];
|
| | | return true;
|
| | | }
|
| | | return false;
|
| | | }
|
| | |
|
| | | public bool TryGetEffectProperty(int type, int level, out Dictionary<int, int> dict)
|
| | | {
|
| | | dict = null;
|
| | |
| | | displaySkillLevels.Sort();
|
| | | return displaySkillLevels;
|
| | | }
|
| | |
|
| | | public string GetEffectSkillIcon(int type, int level)
|
| | | {
|
| | | var job = PlayerDatas.Instance.baseData.Job;
|
| | | if (godWeaponEffectInfos.ContainsKey(type))
|
| | | {
|
| | | var list = godWeaponEffectInfos[type];
|
| | | var index = list.FindIndex((x) =>
|
| | | {
|
| | | return x.level == level;
|
| | | });
|
| | | if (index != -1)
|
| | | {
|
| | | if (list[index].skillIconDict.ContainsKey(job))
|
| | | {
|
| | | return list[index].skillIconDict[job];
|
| | | }
|
| | | }
|
| | | }
|
| | | return string.Empty;
|
| | | }
|
| | |
|
| | | void CheckGodWeaponEffectOn()
|
| | | {
|
| | | var value = PlayerDatas.Instance.baseData.equipShowSwitch;
|
| | | if (value == 7)
|
| | | {
|
| | | value = 0;
|
| | | foreach (var type in godWeaponEffectTypes)
|
| | | {
|
| | | var stage = GetGodWeaponStage(type);
|
| | | if (stage != 0 && stage <= 3)
|
| | | {
|
| | | var index = EquipShowSwitch.GetGodWeaponEquipShowIndex(type, stage);
|
| | | value = (uint)MathUtility.SetBitValue((int)value, index, true);
|
| | | }
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | foreach (var type in godWeaponEffectTypes)
|
| | | {
|
| | | var requireLevel = 0;
|
| | | var godWeapon = GetGodWeaponInfo(type);
|
| | | if (EquipShowSwitch.IsGodWeaponEffectOn(value, type, out requireLevel)
|
| | | && (godWeapon == null || godWeapon.level < requireLevel))
|
| | | {
|
| | | var stage = 0;
|
| | | if (TryGetGodWeaponStage(type, requireLevel, out stage))
|
| | | {
|
| | | var index = EquipShowSwitch.GetGodWeaponEquipShowIndex(type, stage);
|
| | | value = (uint)MathUtility.SetBitValue((int)value, index, false);
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | if (value != PlayerDatas.Instance.baseData.equipShowSwitch)
|
| | | {
|
| | | EquipShowSwitch.SendPackage(value);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | public class GodWeaponInfo
|
| | |
| | | public int level;
|
| | | public Dictionary<int, int> propertyDict;
|
| | | }
|
| | |
|
| | | public struct GodWeaponEffectInfo
|
| | | {
|
| | | public int level;
|
| | | public Dictionary<int, string> skillIconDict;
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | public int JobRank;
|
| | | public int FamilyID;
|
| | | public ulong FightPower;
|
| | | public uint EquipShowSwitch;
|
| | | }
|
| | |
|
| | | public class RolePlusData
|
| | |
| | | fashionWeapon2 = itemData.ItemID;
|
| | | }
|
| | |
|
| | | var godWeapons = new Dictionary<int, int>();
|
| | | var magicianModel = ModelCenter.Instance.GetModel<MagicianModel>();
|
| | | for (int i = 0; i < magicianModel.godWeaponTypes.Count; i++)
|
| | | {
|
| | | var type = magicianModel.godWeaponTypes[i];
|
| | | var level = viewPlayerData.rolePlusData.GetGodWeaponLevel(type);
|
| | | godWeapons.Add(type, level);
|
| | | }
|
| | | Dictionary<int, int> dict = null;
|
| | | EquipShowSwitch.IsGodWeaponEffectOn(viewPlayerData.rolePropData.EquipShowSwitch, out dict);
|
| | |
|
| | | var data = new UI3DPlayerExhibitionData
|
| | | {
|
| | |
| | | weaponId = weapon,
|
| | | wingsId = wing,
|
| | | secondaryId = weapon2,
|
| | | godWeapons = godWeapons,
|
| | | godWeapons = dict,
|
| | | isDialogue = false,
|
| | | };
|
| | | UI3DModelExhibition.Instance.ShowOtherPlayer(roleModel, data);
|
| | |
| | | public void DisplayGodWeaponEffect(GodWeaponEffectConfig config)
|
| | | {
|
| | | godWeaponEffectConfig = config;
|
| | | m_SkillIcon.SetSprite(config.icon);
|
| | | var _model = ModelCenter.Instance.GetModel<MagicianModel>();
|
| | | m_SkillIcon.SetSprite(_model.GetEffectSkillIcon(config.type, config.level));
|
| | | if (m_SkillName != null)
|
| | | {
|
| | | m_SkillName.text = config.skillName;
|
| | |
| | | realmImg.SetSprite(realmConfig.Img);
|
| | | }
|
| | | }
|
| | |
|
| | | realmImg.SetNativeSize();
|
| | | if (PlayerDatas.Instance.baseData.realmLevel >= itemTipsModel.curAttrData.itemConfig.RealmLimit)
|
| | | {
|
| | | realmTitleText.color = conditionColor;
|
| | |
| | | realmImg.SetSprite(realmConfig.Img);
|
| | | }
|
| | | }
|
| | |
|
| | | realmImg.SetNativeSize();
|
| | | if (PlayerDatas.Instance.baseData.realmLevel >= itemAttrData.itemConfig.RealmLimit)
|
| | | {
|
| | | realmTitleText.color = conditionColor;
|
| | |
| | | realmImg.SetSprite(realmConfig.Img);
|
| | | }
|
| | | }
|
| | | realmImg.SetNativeSize();
|
| | |
|
| | | if (PlayerDatas.Instance.baseData.realmLevel >= itemTipsModel.curAttrData.itemConfig.RealmLimit)
|
| | | {
|
| | |
| | | }
|
| | |
|
| | | }
|
| | | conditionValueText.SetNativeSize();
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | | var level = godWeaponModel.GetGodWeaponStageRequireLevel(SkillDetails.godWeaponType, SkillDetails.godWeaponEffectStage);
|
| | | var godWeaponEffectConfig = GodWeaponEffectConfig.Get(SkillDetails.godWeaponType, level);
|
| | | var config = GodWeaponConfig.GetConfig(SkillDetails.godWeaponType, 1);
|
| | | m_SkillIcon.SetSprite(godWeaponEffectConfig.icon);
|
| | | m_SkillIcon.SetSprite(godWeaponModel.GetEffectSkillIcon(godWeaponEffectConfig.type, godWeaponEffectConfig.level));
|
| | | m_SkillInfo1.text = Language.Get("GodWeaponEffectSource", config.Name);
|
| | | m_SkillInfo2.text = godWeaponEffectConfig.skillName;
|
| | |
|
| | |
| | | {
|
| | | m_UnLockType = FunctionUnlockType.GodWeaponEffect;
|
| | | m_Id = config.level;
|
| | | m_FunctionIcon.SetSprite(config.icon);
|
| | | var _model = ModelCenter.Instance.GetModel<MagicianModel>();
|
| | | m_FunctionIcon.SetSprite(_model.GetEffectSkillIcon(config.type, config.level));
|
| | | originalScale = 1f;
|
| | |
|
| | | this.transform.localScale = Vector3.one * originalScale;
|
| | |
| | | var secondaryItemId = 0;
|
| | | var suitLevel = 0;
|
| | | var equipInfos = PlayerDatas.Instance.loginInfo.EquipInfo;
|
| | | Dictionary<int, int> dict = null;
|
| | | EquipShowSwitch.IsGodWeaponEffectOn(PlayerDatas.Instance.loginInfo.EquipShowSwitch, out dict);
|
| | |
|
| | | for (int i = 0; i < equipInfos.Length; i++)
|
| | | {
|
| | |
| | | wingsId = wingsItemId,
|
| | | secondaryId = secondaryItemId,
|
| | | isDialogue = false,
|
| | | godWeapons = new Dictionary<int, int>() {
|
| | | { 1, (int)PlayerDatas.Instance.loginInfo.ExAttr15 },
|
| | | { 2, (int)PlayerDatas.Instance.loginInfo.ExAttr16},
|
| | | { 3, (int)PlayerDatas.Instance.loginInfo.ExAttr17 },
|
| | | { 4, (int)PlayerDatas.Instance.loginInfo.ExAttr18 } }
|
| | | godWeapons = dict
|
| | | };
|
| | |
|
| | | ShowPlayer(_rawImage, data);
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | var magicianModel = ModelCenter.Instance.GetModel<MagicianModel>();
|
| | | var godWeapon1 = magicianModel.GetGodWeaponInfo(1);
|
| | | var godWeapon2 = magicianModel.GetGodWeaponInfo(2);
|
| | | var godWeapon3 = magicianModel.GetGodWeaponInfo(3);
|
| | | var godWeapon4 = magicianModel.GetGodWeaponInfo(4);
|
| | | Dictionary<int, int> dict = null;
|
| | | EquipShowSwitch.IsGodWeaponEffectOn(PlayerDatas.Instance.baseData.equipShowSwitch, out dict);
|
| | | var data = new UI3DPlayerExhibitionData
|
| | | {
|
| | | job = _job,
|
| | |
| | | wingsId = wingsId,
|
| | | secondaryId = secondaryId,
|
| | | isDialogue = _isDialogue,
|
| | | godWeapons = new Dictionary<int, int>() {
|
| | | { 1, godWeapon1==null?0:godWeapon1.level },
|
| | | { 2, godWeapon2==null?0:godWeapon2.level },
|
| | | { 3, godWeapon3==null?0:godWeapon3.level },
|
| | | { 4, godWeapon4==null?0:godWeapon4.level }
|
| | | }
|
| | | godWeapons = dict
|
| | | };
|
| | |
|
| | | ShowPlayer(_rawImage, data);
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | var magicianModel = ModelCenter.Instance.GetModel<MagicianModel>();
|
| | | var godWeapon1 = magicianModel.GetGodWeaponInfo(1);
|
| | | var godWeapon2 = magicianModel.GetGodWeaponInfo(2);
|
| | | var godWeapon3 = magicianModel.GetGodWeaponInfo(3);
|
| | | var godWeapon4 = magicianModel.GetGodWeaponInfo(4);
|
| | | Dictionary<int, int> dict = null;
|
| | | EquipShowSwitch.IsGodWeaponEffectOn(PlayerDatas.Instance.baseData.equipShowSwitch, out dict);
|
| | | var data = new UI3DPlayerExhibitionData
|
| | | {
|
| | | job = job,
|
| | |
| | | fashionWeaponId = flashWeaponId,
|
| | | fashionSecondaryId = flashSecondaryId,
|
| | | isDialogue = false,
|
| | | godWeapons = new Dictionary<int, int>() {
|
| | | { 1, godWeapon1==null?0:godWeapon1.level },
|
| | | { 2, godWeapon2==null?0:godWeapon2.level },
|
| | | { 3, godWeapon3==null?0:godWeapon3.level },
|
| | | { 4, godWeapon4==null?0:godWeapon4.level }
|
| | | }
|
| | | godWeapons = dict
|
| | | };
|
| | |
|
| | | ShowPlayer(rawImage, data);
|