少年修仙传客户端代码仓库
client_linchunjie
2018-11-22 359715707a6ac0a8c8ada462711d7ab14c1f3709
4736 【1.3】神兵系统界面逻辑修改(添加仙玉自动锤炼)
1个文件已修改
2个文件已添加
67 ■■■■ 已修改文件
Core/NetworkPackage/ClientPack/ClientToMapServer/CA5_Function/CA556_tagCMGodWeaponActivate.cs 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/NetworkPackage/ClientPack/ClientToMapServer/CA5_Function/CA556_tagCMGodWeaponActivate.cs.meta 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Role/MagicianWin.cs 37 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/NetworkPackage/ClientPack/ClientToMapServer/CA5_Function/CA556_tagCMGodWeaponActivate.cs
New file
@@ -0,0 +1,18 @@
using UnityEngine;
using System.Collections;
// A5 56 神兵激活 #tagCMGodWeaponActivate
public class CA556_tagCMGodWeaponActivate : GameNetPackBasic {
    public uint WeaponType;    // 神兵类型
    public CA556_tagCMGodWeaponActivate () {
        combineCmd = (ushort)0x03FE;
        _cmd = (ushort)0xA556;
    }
    public override void WriteToBytes () {
        WriteBytes (WeaponType, NetDataType.DWORD);
    }
}
Core/NetworkPackage/ClientPack/ClientToMapServer/CA5_Function/CA556_tagCMGodWeaponActivate.cs.meta
New file
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: a664938d5594bf644b46e1442e048052
timeCreated: 1542874175
licenseType: Pro
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:
System/Role/MagicianWin.cs
@@ -759,6 +759,12 @@
            {
                autoHammerState = AutoHammerState.None;
            }
            if (!model.IsGodWeaponUnlock(model.selectType) && model.ContainsCondition(model.selectType))
            {
                return;
            }
            if (selectItemCount <= 0)
            {
                CheckSelectItemCounts();
@@ -791,6 +797,21 @@
            {
                autoHammerState = AutoHammerState.None;
            }
            if (!model.IsGodWeaponUnlock(model.selectType))
            {
                if (model.ContainsCondition(model.selectType))
                {
                    if (model.SatisfyUnlockCondition(model.selectType))
                    {
                        CA556_tagCMGodWeaponActivate pak = new CA556_tagCMGodWeaponActivate();
                        pak.WeaponType = (uint)model.selectType;
                        GameNetSystem.Instance.SendInfo(pak);
                    }
                    return;
                }
            }
            var godWeaponInfo = model.GetGodWeaponInfo(model.selectType);
            bool requireSwitchItem = false;
            if (godWeaponInfo != null)
@@ -880,8 +901,6 @@
            }
            else
            {
                autoHammerState = AutoHammerState.None;
                return;
                var godWeaponInfo = model.GetGodWeaponInfo(model.selectType);
                if (godWeaponInfo != null && godWeaponInfo.level >= model.autoHammerLevel)
                {
@@ -911,18 +930,20 @@
                    count = Mathf.CeilToInt((float)requireExp / autoHammerCost.exp);
                }
                count = Mathf.Max(1, count);
                count = Mathf.Min(byte.MaxValue, count);
                var cost = count * autoHammerCost.cost;
                if (PlayerDatas.Instance.baseData.Gold < cost)
                {
                    autoHammerState = AutoHammerState.None;
                    return;
                }
                //CA555_tagCMGodWeaponPlus pak = new CA555_tagCMGodWeaponPlus();
                //pak.ItemID = (uint)items[index];
                //pak.WeaponType = (uint)model.selectType;
                //pak.IsAutoBuy = 1;
                //pak.ItemCount = 1;
                //GameNetSystem.Instance.SendInfo(pak);
                var items = model.GetLevelUpItemByType(model.selectType);
                CA555_tagCMGodWeaponPlus pak = new CA555_tagCMGodWeaponPlus();
                pak.ItemID = (uint)items[0];
                pak.WeaponType = (uint)model.selectType;
                pak.IsAutoBuy = 1;
                pak.ItemCount = (byte)count;
                GameNetSystem.Instance.SendInfo(pak);
            }
            lockGodWeaponUpdate = true;
            lockItemUpdate = true;