| | |
| | | {
|
| | | autoHammerState = AutoHammerState.None;
|
| | | }
|
| | |
|
| | | if (!model.IsGodWeaponUnlock(model.selectType) && model.ContainsCondition(model.selectType))
|
| | | {
|
| | | return;
|
| | | }
|
| | |
|
| | | if (selectItemCount <= 0)
|
| | | {
|
| | | CheckSelectItemCounts();
|
| | |
| | | {
|
| | | 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)
|
| | |
| | | }
|
| | | else
|
| | | {
|
| | | autoHammerState = AutoHammerState.None;
|
| | | return;
|
| | | var godWeaponInfo = model.GetGodWeaponInfo(model.selectType);
|
| | | if (godWeaponInfo != null && godWeaponInfo.level >= model.autoHammerLevel)
|
| | | {
|
| | |
| | | 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;
|