少年修仙传客户端代码仓库
client_Zxw
2019-01-11 40e4b97b2c193cd4e49e4d2cb7b8d59534ada5c1
Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
33个文件已修改
2个文件已添加
472 ■■■■ 已修改文件
Core/GameEngine/Model/Player/Character/PlayerBaseData.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/GameEngine/Model/Player/PlayerDatas.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/BlastFurnace/GetEquipPathTips.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Chat/ChatMineVoiceCell.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Chat/ChatOtherVoiceCell.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Chat/ChatPlayerMineCell.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Chat/ChatPlayerOtherCell.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Chat/ChatTip.cs 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/FairyAu/FairyFeastTransmitShow.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/FairyAu/KingTempleWin.cs 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/FashionDress/FashionDressWin.cs 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/KnapSack/Logic/BoxInfoWin.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/KnapSack/Logic/EquipTip.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/KnapSack/Logic/ItemInfoWin.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/KnapSack/Logic/ModelShowPerfab.cs 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/KnapSack/Logic/UnionWarehouseEquipTip.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/KnapSack/Logic/WingsTip.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Login/CreateRoleHeroShow.cs 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/OpenServerActivity/WishingPoolModel.cs 21 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Realm/RealmPropertyUpWin.cs 57 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Role/EquipShowSwitch.cs 116 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Role/EquipShowSwitch.cs.meta 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Role/GodWeaponPreviewWin.cs 21 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Role/GodWeaponSkillBehaviour.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Role/MagicianModel.cs 100 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/RoleParticulars/RoleParticularModel.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/RoleParticulars/RoleParticularsWin.cs 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Skill/SkillBehaviour.cs 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Store/Logic/BuyBoxInfoWin.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Store/Logic/BuyEquipTip.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Store/Logic/BuyItemInfoWin.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Store/Logic/BuyWingsTip.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Tip/SkillDetailsWin.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Treasure/FunctionUnlockFlyObject.cs 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI/Common/UI3DModelExhibition.cs 36 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/GameEngine/Model/Player/Character/PlayerBaseData.cs
@@ -63,6 +63,7 @@
    public int BasicsDefense;//基础防御
    public int BasicsScoreAHit;//基础命中
    public int BasicsDodge;//基础闪避
    public uint equipShowSwitch;//装备显隐开关
    public long treasurePotentialSp {
        get {
            return ExAttr8 * (long)100000000 + ExAttr7;
@@ -131,6 +132,7 @@
            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;
Core/GameEngine/Model/Player/PlayerDatas.cs
@@ -512,6 +512,7 @@
            case PlayerDataRefresh.WarehouseLV:
                break;
            case PlayerDataRefresh.EquipShowSwitch:
                baseData.equipShowSwitch = value;
                break;
            case PlayerDataRefresh.LuckValue:
                break;
System/BlastFurnace/GetEquipPathTips.cs
@@ -297,7 +297,7 @@
                                    realmImg.SetSprite(realmConfig.Img);
                                }
                            }
                            realmImg.SetNativeSize();
                            if (PlayerDatas.Instance.baseData.realmLevel >= itemAttrData.itemConfig.RealmLimit)
                            {
                                realmTitleText.color = conditionColor;
System/Chat/ChatMineVoiceCell.cs
@@ -40,7 +40,7 @@
            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
            {
System/Chat/ChatOtherVoiceCell.cs
@@ -45,7 +45,7 @@
            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
            {
System/Chat/ChatPlayerMineCell.cs
@@ -45,7 +45,7 @@
            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
            {
System/Chat/ChatPlayerOtherCell.cs
@@ -43,7 +43,7 @@
            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
            {
System/Chat/ChatTip.cs
@@ -273,7 +273,7 @@
                    chatName = chatUserData.name;
                    if (chatUserData.vipLv > 0)
                    {
                        vipLv = "Vip";//StringUtility.Contact("V", chatUserData.vipLv);
                        vipLv = "VIP";//StringUtility.Contact("V", chatUserData.vipLv);
                    }
                    break;
                }
@@ -283,7 +283,7 @@
                    chatName = chatUserData.name;
                    if (chatUserData.vipLv > 0)
                    {
                        vipLv = "Vip";// StringUtility.Contact("V", chatUserData.vipLv);
                        vipLv = "VIP";// StringUtility.Contact("V", chatUserData.vipLv);
                    }
                    break;
                }
@@ -293,7 +293,7 @@
                    chatName = chatUserData.name;
                    if (chatUserData.vipLv > 0)
                    {
                        vipLv = "Vip";// StringUtility.Contact("V", chatUserData.vipLv);
                        vipLv = "VIP";// StringUtility.Contact("V", chatUserData.vipLv);
                    }
                    break;
                }
@@ -303,7 +303,7 @@
                    chatName = chatUserData.name;
                    if (chatUserData.vipLv > 0)
                    {
                        vipLv = "Vip";// StringUtility.Contact("V", chatUserData.vipLv);
                        vipLv = "VIP";// StringUtility.Contact("V", chatUserData.vipLv);
                    }
                    break;
                }
@@ -313,7 +313,7 @@
                    chatName = chatUserData.name;
                    if (chatUserData.vipLv > 0)
                    {
                        vipLv = "Vip";// StringUtility.Contact("V", chatUserData.vipLv);
                        vipLv = "VIP";// StringUtility.Contact("V", chatUserData.vipLv);
                    }
                    break;
                }
System/FairyAu/FairyFeastTransmitShow.cs
@@ -216,11 +216,6 @@
            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,
System/FairyAu/KingTempleWin.cs
@@ -200,17 +200,8 @@
                    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
                {
@@ -223,7 +214,7 @@
                    weaponId =   weapon,
                    wingsId = wing,
                    secondaryId =  weapon2,
                    godWeapons = godWeapons,
                    godWeapons = dict,
                    isDialogue = false,
                };
System/FashionDress/FashionDressWin.cs
@@ -363,14 +363,8 @@
                }
            }
            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()
            {
System/KnapSack/Logic/BoxInfoWin.cs
@@ -229,7 +229,7 @@
                                realmImg.SetSprite(realmConfig.Img);
                            }
                        }
                        realmImg.SetNativeSize();
                        if (PlayerDatas.Instance.baseData.realmLevel >= itemTipsModel.curAttrData.itemConfig.RealmLimit)
                        {
                            realmTitleText.color = conditionColor;
System/KnapSack/Logic/EquipTip.cs
@@ -331,7 +331,7 @@
                                    realmImg.SetSprite(realmConfig.Img);
                                }
                            }
                            realmImg.SetNativeSize();
                            if (PlayerDatas.Instance.baseData.realmLevel >= itemAttrData.itemConfig.RealmLimit)
                            {
                                realmTitleText.color = conditionColor;
System/KnapSack/Logic/ItemInfoWin.cs
@@ -243,7 +243,7 @@
                                realmImg.SetSprite(realmConfig.Img);
                            }
                        }
                        realmImg.SetNativeSize();
                        if (PlayerDatas.Instance.baseData.realmLevel >= itemTipsModel.curAttrData.itemConfig.RealmLimit)
                        {
                            realmTitleText.color = conditionColor;
System/KnapSack/Logic/ModelShowPerfab.cs
@@ -122,14 +122,8 @@
                }
            }
            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()
            {
System/KnapSack/Logic/UnionWarehouseEquipTip.cs
@@ -297,7 +297,7 @@
                                    realmImg.SetSprite(realmConfig.Img);
                                }
                            }
                            realmImg.SetNativeSize();
                            if (PlayerDatas.Instance.baseData.realmLevel >= itemAttrData.itemConfig.RealmLimit)
                            {
                                realmTitleText.color = conditionColor;
System/KnapSack/Logic/WingsTip.cs
@@ -201,6 +201,7 @@
                        conditionValueText.gameObject.SetActive(false);
                    }
                }
                conditionValueText.SetNativeSize();
            }
            else
            {
System/Login/CreateRoleHeroShow.cs
@@ -125,6 +125,8 @@
            }
        }
        Dictionary<int, int> dict = null;
        EquipShowSwitch.IsGodWeaponEffectOn(PlayerDatas.Instance.loginInfo.EquipShowSwitch, out dict);
        var data = new UI3DPlayerExhibitionData()
        {
            job = PlayerDatas.Instance.loginInfo.Job,
@@ -136,11 +138,7 @@
            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);
System/OpenServerActivity/WishingPoolModel.cs
@@ -36,8 +36,8 @@
        public void OnPlayerLoginOk()
        {
            GlobalTimeEvent.Instance.secondEvent += UpdateSecond;
            UpdateFreeWishRedpoint();
            UpdateRedpoint();
            UpdateFreeWishRedpoint();
        }
        public override void UnInit()
@@ -73,8 +73,8 @@
        {
            if (type == Operation.WishingWellInfo && state == 0)
            {
                UpdateFreeWishRedpoint();
                UpdateRedpoint();
                UpdateFreeWishRedpoint();
                if (onStateUpate != null)
                {
                    onStateUpate((int)OpenServerActivityCenter.OSActivityType.WishingPool);
@@ -97,8 +97,9 @@
        {
            if (type == Operation.WishingWellInfo && state == 0)
            {
                UpdateFreeWishRedpoint();
                UpdateRedpoint();
                UpdateFreeWishRedpoint();
                if (onStateUpate != null)
                {
                    onStateUpate((int)OpenServerActivityCenter.OSActivityType.WishingPool);
@@ -181,7 +182,6 @@
            if(!isCool)
            {
                UpdateFreeWishRedpoint();
                UpdateRedpoint();
            }
        }
@@ -241,8 +241,8 @@
                    SetWishingAwardData(i, wellItem);
                }
            }
            UpdateFreeWishRedpoint();
            UpdateRedpoint();
            UpdateFreeWishRedpoint();
            if(UpdateWishAwardEvent != null)
            {
                UpdateWishAwardEvent();
@@ -273,6 +273,7 @@
                }
            }
            UpdateRedpoint();
            UpdateFreeWishRedpoint();
        }
        public void SetWishingPoolData(int index, WishingWellItem wellItem)
@@ -412,6 +413,14 @@
        {
            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);
@@ -429,7 +438,7 @@
                wishPoint.state = RedPointState.None;
            }
            if (!IsOpen || freeWishRedpoint.state != RedPointState.None) return;
            if (!IsOpen) return;
            for (int i = 0; i < wishPointlist.Count; i++)
            {
System/Realm/RealmPropertyUpWin.cs
@@ -48,6 +48,8 @@
        FunctionUnlockFlyObject flyObject;
        PlayerPackModel playerPack { get { return ModelCenter.Instance.GetModel<PlayerPackModel>(); } }
        DateTime openTime = DateTime.Now;
        #region Built-in
        protected override void BindController()
@@ -290,11 +292,64 @@
            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);
System/Role/EquipShowSwitch.cs
New file
@@ -0,0 +1,116 @@
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,
        }
    }
}
System/Role/EquipShowSwitch.cs.meta
New file
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 01dcfe375cd5cf940bd33f6b2f4db077
timeCreated: 1547125411
licenseType: Pro
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:
System/Role/GodWeaponPreviewWin.cs
@@ -65,6 +65,8 @@
        {
            Display();
            DisplayGodWeaponTypes();
            PlayerDatas.Instance.PlayerDataRefreshInfoEvent += PlayerDataRefreshInfoEvent;
        }
        protected override void OnAfterOpen()
@@ -73,6 +75,7 @@
        protected override void OnPreClose()
        {
            PlayerDatas.Instance.PlayerDataRefreshInfoEvent -= PlayerDataRefreshInfoEvent;
            UI3DModelExhibition.Instance.StopShow();
            UI3DModelExhibition.InstanceClone1.StopShow();
        }
@@ -81,6 +84,15 @@
        {
        }
        #endregion
        private void PlayerDataRefreshInfoEvent(PlayerDataRefresh refreshType)
        {
            if (refreshType == PlayerDataRefresh.EquipShowSwitch)
            {
                DisplayEquip();
                DisplayModel();
            }
        }
        void Display()
        {
@@ -137,6 +149,7 @@
            DisplayProperty();
            DisplayFightPower();
            DisplayGodWeaponEffect();
            DisplayEquip();
        }
        private void DisplayRequireLevel()
@@ -194,7 +207,7 @@
        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;
@@ -208,12 +221,12 @@
        private void Equip()
        {
            EquipShowSwitch.SendGodWeaponEffectOn(selectGodWeaponType, selectStage, true);
        }
        private void PutOff()
        {
            EquipShowSwitch.SendGodWeaponEffectOn(selectGodWeaponType, selectStage, false);
        }
        private void DisplayModel()
@@ -268,7 +281,7 @@
                {
                    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;
                }
System/Role/GodWeaponSkillBehaviour.cs
@@ -54,7 +54,7 @@
            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);
System/Role/MagicianModel.cs
@@ -74,6 +74,7 @@
        {
            serverInited = true;
            UpdateRedPoint();
            CheckGodWeaponEffectOn();
        }
        private Dictionary<int, int[]> godWeaponLevelUpCost = new Dictionary<int, int[]>();
@@ -93,6 +94,7 @@
            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; }
@@ -261,6 +263,25 @@
                {
                    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");
@@ -428,6 +449,7 @@
                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)
                    {
@@ -742,17 +764,6 @@
            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;
@@ -837,6 +848,67 @@
            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
@@ -863,5 +935,11 @@
        public int level;
        public Dictionary<int, int> propertyDict;
    }
    public struct GodWeaponEffectInfo
    {
        public int level;
        public Dictionary<int, string> skillIconDict;
    }
}
System/RoleParticulars/RoleParticularModel.cs
@@ -785,6 +785,7 @@
            public int JobRank;
            public int FamilyID;
            public ulong FightPower;
            public uint EquipShowSwitch;
        }
        public class RolePlusData
System/RoleParticulars/RoleParticularsWin.cs
@@ -257,14 +257,8 @@
                    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
                {
@@ -277,7 +271,7 @@
                    weaponId = weapon,
                    wingsId = wing,
                    secondaryId = weapon2,
                    godWeapons = godWeapons,
                    godWeapons = dict,
                    isDialogue = false,
                };
                UI3DModelExhibition.Instance.ShowOtherPlayer(roleModel, data);
System/Skill/SkillBehaviour.cs
@@ -40,7 +40,8 @@
        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;
System/Store/Logic/BuyBoxInfoWin.cs
@@ -237,7 +237,7 @@
                                realmImg.SetSprite(realmConfig.Img);
                            }
                        }
                        realmImg.SetNativeSize();
                        if (PlayerDatas.Instance.baseData.realmLevel >= itemTipsModel.curAttrData.itemConfig.RealmLimit)
                        {
                            realmTitleText.color = conditionColor;
System/Store/Logic/BuyEquipTip.cs
@@ -330,7 +330,7 @@
                                    realmImg.SetSprite(realmConfig.Img);
                                }
                            }
                            realmImg.SetNativeSize();
                            if (PlayerDatas.Instance.baseData.realmLevel >= itemAttrData.itemConfig.RealmLimit)
                            {
                                realmTitleText.color = conditionColor;
System/Store/Logic/BuyItemInfoWin.cs
@@ -231,6 +231,7 @@
                                realmImg.SetSprite(realmConfig.Img);
                            }
                        }
                        realmImg.SetNativeSize();
                        if (PlayerDatas.Instance.baseData.realmLevel >= itemTipsModel.curAttrData.itemConfig.RealmLimit)
                        {
System/Store/Logic/BuyWingsTip.cs
@@ -236,6 +236,7 @@
                    }
                   
                }
                conditionValueText.SetNativeSize();
            }
            else
            {
System/Tip/SkillDetailsWin.cs
@@ -138,7 +138,7 @@
            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;
System/Treasure/FunctionUnlockFlyObject.cs
@@ -110,7 +110,8 @@
        {
            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;
UI/Common/UI3DModelExhibition.cs
@@ -120,6 +120,8 @@
            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++)
            {
@@ -171,11 +173,7 @@
                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);
@@ -213,11 +211,8 @@
                }
            }
            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,
@@ -230,12 +225,7 @@
                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);
@@ -295,11 +285,8 @@
                }
            }
            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,
@@ -312,12 +299,7 @@
                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);