0312 战力计算增加竞技增减伤系数,装备拾取改存guid避免检测过于频繁用索引容易混乱
| | |
| | | //--------------------------------------------------------
|
| | | // [Author]: YYL
|
| | | // [ Date ]: Friday, August 22, 2025
|
| | | // [ Date ]: 2025年11月17日
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System.Collections.Generic;
|
| | |
| | | public float WuFinalDamPerDefRatio;
|
| | | public float QunFinalDamPerRatio;
|
| | | public float QunFinalDamPerDefRatio;
|
| | | public float ArenaDamPerRatio;
|
| | | public float ArenaDamPerDefRatio;
|
| | |
|
| | | public override int LoadKey(string _key)
|
| | | {
|
| | |
| | | float.TryParse(tables[40],out QunFinalDamPerRatio);
|
| | |
|
| | | float.TryParse(tables[41],out QunFinalDamPerDefRatio);
|
| | |
|
| | | float.TryParse(tables[42],out ArenaDamPerRatio); |
| | |
|
| | | float.TryParse(tables[43],out ArenaDamPerDefRatio); |
| | | }
|
| | | catch (Exception exception)
|
| | | {
|
| | |
| | |
|
| | | public class CB203_tagCSHorseSkinOP : GameNetPackBasic {
|
| | | public byte OPType; // 操作 1-激活;2-佩戴;3-升星
|
| | | public byte SkinID; // 外观ID,佩戴时发0即为卸下
|
| | | public ushort SkinID; // 外观ID,佩戴时发0即为卸下
|
| | |
|
| | | public CB203_tagCSHorseSkinOP () {
|
| | | combineCmd = (ushort)0x03FE;
|
| | |
| | |
|
| | | public override void WriteToBytes () {
|
| | | WriteBytes (OPType, NetDataType.BYTE);
|
| | | WriteBytes (SkinID, NetDataType.BYTE);
|
| | | WriteBytes (SkinID, NetDataType.WORD);
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | HorseSkinList = new tagSCHorseSkin[Count];
|
| | | for (int i = 0; i < Count; i ++) {
|
| | | HorseSkinList[i] = new tagSCHorseSkin();
|
| | | TransBytes (out HorseSkinList[i].HorseSkinID, vBytes, NetDataType.BYTE);
|
| | | TransBytes (out HorseSkinList[i].HorseSkinID, vBytes, NetDataType.WORD);
|
| | | TransBytes (out HorseSkinList[i].State, vBytes, NetDataType.BYTE);
|
| | | TransBytes (out HorseSkinList[i].EndTime, vBytes, NetDataType.DWORD);
|
| | | TransBytes (out HorseSkinList[i].Star, vBytes, NetDataType.BYTE);
|
| | |
| | | }
|
| | |
|
| | | public class tagSCHorseSkin {
|
| | | public byte HorseSkinID; //坐骑外观ID
|
| | | public ushort HorseSkinID; //坐骑外观ID
|
| | | public byte State; //是否已激活
|
| | | public uint EndTime; //到期时间戳,0为永久
|
| | | public byte Star; //星级
|
| | |
| | | public int[] equipUIGirdEffects; //装备格子特效 |
| | | public ItemModel selectFloorEquip; //选中的地板装备 |
| | | public int lastShowEquipIndex = -1; //上一次界面显示装备的索引,拾取后物品消失需记录下做表现 |
| | | public Queue<int> waitEquipOP = new Queue<int>(); //等待操作的装备,需要和UI交互确认 不含分解 |
| | | public Queue<string> waitEquipOP = new Queue<string>(); //等待操作的装备,需要和UI交互确认 不含分解 |
| | | |
| | | public List<int> lastDropIndexs = new List<int>(); //上一次掉落物品索引 |
| | | |
| | |
| | | } |
| | | |
| | | // 好几件装备需要处理的情况存起来 |
| | | waitEquipOP.Enqueue(equip.gridIndex); |
| | | if (waitEquipOP.Contains(equip.guid)) |
| | | { |
| | | //检测时机频繁,导致重复推送,需要检测过滤,对应Dequeue 也做一次检测 |
| | | Debug.LogWarning("OpenEquipExchangeWin: 重复推送"); |
| | | return false; |
| | | } |
| | | waitEquipOP.Enqueue(equip.guid); |
| | | //未回复装备操作结果,否则会显示旧装备 |
| | | if (waitEquipOPPack) |
| | | { |
| | |
| | | return null; |
| | | } |
| | | |
| | | |
| | | return PackManager.Instance.GetItemByIndex(PackType.DropItem, waitEquipOP.Dequeue()); |
| | | var item = PackManager.Instance.GetItemByGuid(waitEquipOP.Dequeue()); |
| | | if (item != null && item.packType == PackType.DropItem) |
| | | { |
| | | return item; |
| | | } |
| | | Debug.LogError("GetSelectFloorEquip: 没有找到可选装备, 该装备已经转移"); |
| | | return null; |
| | | } |
| | | |
| | | |
| | |
| | | fightPowerVariables["MagDamPerDefRatio"] = fightPowerRatioConfig.MagDamPerDefRatio; |
| | | fightPowerVariables["CurePerRatio"] = fightPowerRatioConfig.CurePerRatio; |
| | | fightPowerVariables["CurePerDefRatio"] = fightPowerRatioConfig.CurePerDefRatio; |
| | | fightPowerVariables["ArenaDamPerRatio"] = fightPowerRatioConfig.ArenaDamPerRatio; |
| | | fightPowerVariables["ArenaDamPerDefRatio"] = fightPowerRatioConfig.ArenaDamPerDefRatio; |
| | | |
| | | long fightPower; |
| | | if (useFormulaType == 0) |