| | |
| | |
|
| | | // A5 C4 神兽装备强化 #tagCMDogzEquipPlus
|
| | |
|
| | |
|
| | |
|
| | | public class CA5C4_tagCMDogzEquipPlus : GameNetPackBasic {
|
| | |
|
| | | public byte EquipIndex; //神兽装备背包中索引
|
| | |
|
| | | public byte IndexCount; //材料所在神兽物品背包索引的数量
|
| | |
|
| | | public byte[] IndexList; //材料所在神兽物品背包索引列表
|
| | |
|
| | | public uint[] IndexUseCountList; //材料所在神兽物品背包索引对应使用个数列表
|
| | | public byte IsDouble; //是否双倍强化
|
| | |
|
| | |
|
| | |
|
| | | public CA5C4_tagCMDogzEquipPlus () {
|
| | |
|
| | | combineCmd = (ushort)0x03FE;
|
| | |
|
| | | _cmd = (ushort)0xA5C4;
|
| | |
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | | public override void WriteToBytes () {
|
| | |
|
| | | WriteBytes (EquipIndex, NetDataType.BYTE);
|
| | |
|
| | | WriteBytes (IndexCount, NetDataType.BYTE);
|
| | |
|
| | | WriteBytes (IndexList, NetDataType.BYTE, IndexCount);
|
| | |
|
| | | WriteBytes (IndexUseCountList, NetDataType.DWORD, IndexCount);
|
| | | WriteBytes (IsDouble, NetDataType.BYTE);
|
| | |
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | | }
|
| | |
|
| | |
| | | GameNetSystem.Instance.SendInfo(buyCnt);
|
| | | }
|
| | |
|
| | | public void SendDogzEquipStrength(int index,List<int>indexlist,int isDouble)
|
| | | public void SendDogzEquipStrength(int index,List<int>indexlist,List<int> IndexUseCountList, int isDouble)
|
| | | {
|
| | | CA5C4_tagCMDogzEquipPlus dogzStren = new CA5C4_tagCMDogzEquipPlus();
|
| | | dogzStren.EquipIndex = (byte)index;
|
| | | dogzStren.IndexCount = (byte)indexlist.Count;
|
| | | byte[] indexByte = new byte[indexlist.Count];
|
| | | uint[] indexUseCountList = new uint[indexlist.Count];
|
| | | for(int i = 0; i < indexByte.Length; i++)
|
| | | {
|
| | | indexByte[i] = (byte)indexlist[i];
|
| | | }
|
| | | for (int i = 0; i < indexUseCountList.Length; i++)
|
| | | {
|
| | | indexUseCountList[i] = (uint)IndexUseCountList[i];
|
| | | }
|
| | | dogzStren.IndexUseCountList = indexUseCountList;
|
| | | dogzStren.IndexList = indexByte;
|
| | | dogzStren.IsDouble = (byte)isDouble;
|
| | | GameNetSystem.Instance.SendInfo(dogzStren);
|
| | |
| | | private void OnClickStrengthBtn()
|
| | | {
|
| | | Dictionary<int, int> DicAb = godBeastModel.Absorption_Dic;
|
| | | List<int> List = new List<int>();
|
| | | List<int> ListIndex = new List<int>();
|
| | | List<int> ListCount = new List<int>();
|
| | | foreach (var key in DicAb.Keys)
|
| | | {
|
| | | List.Add(key);
|
| | | ListIndex.Add(key);
|
| | | ListCount.Add(DicAb[key]);
|
| | | }
|
| | | if (m_DoubleToggle.isOn)
|
| | | {
|
| | | dogz_model.SendDogzEquipStrength(m_DogZItemModel.itemInfo.ItemPlace, List,1);
|
| | | dogz_model.SendDogzEquipStrength(m_DogZItemModel.itemInfo.ItemPlace, ListIndex, ListCount, 1);
|
| | | }
|
| | | else
|
| | | {
|
| | | dogz_model.SendDogzEquipStrength(m_DogZItemModel.itemInfo.ItemPlace, List, 0);
|
| | | dogz_model.SendDogzEquipStrength(m_DogZItemModel.itemInfo.ItemPlace, ListIndex, ListCount, 0);
|
| | | }
|
| | | }
|
| | | private void ChooseToModify(int locationMarker)
|
| | |
| | | m_Item_Text.color = UIHelper.GetUIColor(itemConfig.ItemColor);
|
| | | if (IudetDogzEquipPlus != null && IudetDogzEquipPlus[0] > 0)
|
| | | {
|
| | | m_Item_Text.text = itemConfig.ItemName+" +"+ IudetDogzEquipPlus[0];
|
| | | string str= itemConfig.ItemName + " +" + IudetDogzEquipPlus[0];
|
| | | m_Item_Text.text = UIHelper.GetTextColorByItemColor(itemConfig.ItemColor, str, true);
|
| | | }
|
| | | else
|
| | | {
|
| | | m_Item_Text.text = itemConfig.ItemName;
|
| | | string str = itemConfig.ItemName;
|
| | | m_Item_Text.text = UIHelper.GetTextColorByItemColor(itemConfig.ItemColor, str, true);
|
| | | }
|
| | | if (locationMarker == currentlySelected)
|
| | | {
|