From b5c4db7359ef92000a5969651e68e71e044625e4 Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期五, 27 二月 2026 17:23:00 +0800
Subject: [PATCH] 501 【武将】武将时装 - 同步封包
---
/dev/null | 20 ------
Main/System/HeroUI/HeroCollectionLvUpWin.cs | 6 -
Main/Core/NetworkPackage/ClientPack/CB2_NewFunction/CB236_tagCSHeroSkinOP.cs.meta | 2
Main/System/HeroUI/HeroCollectionCardCell.cs | 18 -----
Main/Core/NetworkPackage/ClientPack/CB2_NewFunction/CB236_tagCSHeroSkinOP.cs | 24 ++++++++
Main/System/Main/FightPowerManager.cs | 13 ++++
Main/Core/NetworkPackage/ServerPack/HB1_Role/HB122_tagSCHeroInfo.cs | 32 ++++++----
Main/System/Main/FightPowerFormula.cs | 15 +++-
Main/System/HeroUI/HeroUIManager.Collect.cs | 14 ----
9 files changed, 72 insertions(+), 72 deletions(-)
diff --git a/Main/Core/NetworkPackage/ClientPack/CB2_NewFunction/CB236_tagCSHeroSkinOP.cs b/Main/Core/NetworkPackage/ClientPack/CB2_NewFunction/CB236_tagCSHeroSkinOP.cs
new file mode 100644
index 0000000..ea71b53
--- /dev/null
+++ b/Main/Core/NetworkPackage/ClientPack/CB2_NewFunction/CB236_tagCSHeroSkinOP.cs
@@ -0,0 +1,24 @@
+using UnityEngine;
+using System.Collections;
+
+// B2 36 姝﹀皢鐨偆鎿嶄綔 #tagCSHeroSkinOP
+
+public class CB236_tagCSHeroSkinOP : GameNetPackBasic {
+ public uint HeroID; //姝﹀皢ID
+ public uint SkinID; //鏃惰ID
+ public byte OPType; //鎿嶄綔 1-婵�娲伙紱2-浣╂埓锛�3-鍗囨槦
+ public ushort ItemIndex; //姝﹀皢鐗╁搧鎵�鍦ㄦ灏嗚儗鍖呬綅缃储寮曪紝浠呬僵鎴存椂鏈夋晥
+
+ public CB236_tagCSHeroSkinOP () {
+ combineCmd = (ushort)0x03FE;
+ _cmd = (ushort)0xB236;
+ }
+
+ public override void WriteToBytes () {
+ WriteBytes (HeroID, NetDataType.DWORD);
+ WriteBytes (SkinID, NetDataType.DWORD);
+ WriteBytes (OPType, NetDataType.BYTE);
+ WriteBytes (ItemIndex, NetDataType.WORD);
+ }
+
+}
diff --git a/Main/Core/NetworkPackage/ClientPack/CB2_NewFunction/CB236_tagCSHeroWearSkin.cs.meta b/Main/Core/NetworkPackage/ClientPack/CB2_NewFunction/CB236_tagCSHeroSkinOP.cs.meta
similarity index 83%
rename from Main/Core/NetworkPackage/ClientPack/CB2_NewFunction/CB236_tagCSHeroWearSkin.cs.meta
rename to Main/Core/NetworkPackage/ClientPack/CB2_NewFunction/CB236_tagCSHeroSkinOP.cs.meta
index f41b819..4c60ceb 100644
--- a/Main/Core/NetworkPackage/ClientPack/CB2_NewFunction/CB236_tagCSHeroWearSkin.cs.meta
+++ b/Main/Core/NetworkPackage/ClientPack/CB2_NewFunction/CB236_tagCSHeroSkinOP.cs.meta
@@ -1,5 +1,5 @@
fileFormatVersion: 2
-guid: d05540ed30efe1e45bcf656bf5fb9518
+guid: 2dd991d5ee1914b4ca233ca3b7809e04
MonoImporter:
externalObjects: {}
serializedVersion: 2
diff --git a/Main/Core/NetworkPackage/ClientPack/CB2_NewFunction/CB236_tagCSHeroWearSkin.cs b/Main/Core/NetworkPackage/ClientPack/CB2_NewFunction/CB236_tagCSHeroWearSkin.cs
deleted file mode 100644
index fd9e278..0000000
--- a/Main/Core/NetworkPackage/ClientPack/CB2_NewFunction/CB236_tagCSHeroWearSkin.cs
+++ /dev/null
@@ -1,20 +0,0 @@
-using UnityEngine;
-using System.Collections;
-
-// B2 36 姝﹀皢鎹㈣偆 #tagCSHeroWearSkin
-
-public class CB236_tagCSHeroWearSkin : GameNetPackBasic {
- public ushort ItemIndex; //姝﹀皢鐗╁搧鎵�鍦ㄦ灏嗚儗鍖呬綅缃储寮�
- public byte SkinIndex; //鐨偆绱㈠紩
-
- public CB236_tagCSHeroWearSkin () {
- combineCmd = (ushort)0x03FE;
- _cmd = (ushort)0xB236;
- }
-
- public override void WriteToBytes () {
- WriteBytes (ItemIndex, NetDataType.WORD);
- WriteBytes (SkinIndex, NetDataType.BYTE);
- }
-
-}
diff --git a/Main/Core/NetworkPackage/ServerPack/HB1_Role/HB122_tagSCHeroInfo.cs b/Main/Core/NetworkPackage/ServerPack/HB1_Role/HB122_tagSCHeroInfo.cs
index d375f2d..be774d9 100644
--- a/Main/Core/NetworkPackage/ServerPack/HB1_Role/HB122_tagSCHeroInfo.cs
+++ b/Main/Core/NetworkPackage/ServerPack/HB1_Role/HB122_tagSCHeroInfo.cs
@@ -1,6 +1,6 @@
-using UnityEngine;
-using System.Collections;
-
+using UnityEngine;
+using System.Collections;
+
// B1 22 姝﹀皢淇℃伅 #tagSCHeroInfo
public class HB122_tagSCHeroInfo : GameNetPackBasic {
@@ -17,23 +17,29 @@
for (int i = 0; i < HeroCnt; i ++) {
HeroInfoList[i] = new tagSCHero();
TransBytes (out HeroInfoList[i].HeroID, vBytes, NetDataType.DWORD);
- TransBytes (out HeroInfoList[i].SkinState, vBytes, NetDataType.DWORD);
TransBytes (out HeroInfoList[i].BookInitState, vBytes, NetDataType.BYTE);
- TransBytes (out HeroInfoList[i].BookStarLV, vBytes, NetDataType.WORD);
- TransBytes (out HeroInfoList[i].BookBreakLV, vBytes, NetDataType.WORD);
- TransBytes (out HeroInfoList[i].BookStarLVH, vBytes, NetDataType.WORD);
- TransBytes (out HeroInfoList[i].BookBreakLVH, vBytes, NetDataType.WORD);
+ TransBytes (out HeroInfoList[i].SkinCnt, vBytes, NetDataType.BYTE);
+ HeroInfoList[i].SkinList = new tagSCHeroSkin[HeroInfoList[i].SkinCnt];
+ for (int j = 0; j < HeroInfoList[i].SkinCnt; j ++) {
+ HeroInfoList[i].SkinList[j] = new tagSCHeroSkin();
+ TransBytes (out HeroInfoList[i].SkinList[j].SkinID, vBytes, NetDataType.DWORD);
+ TransBytes (out HeroInfoList[i].SkinList[j].State, vBytes, NetDataType.BYTE);
+ TransBytes (out HeroInfoList[i].SkinList[j].Star, vBytes, NetDataType.BYTE);
+ }
}
}
public class tagSCHero {
public uint HeroID; // 姝﹀皢ID
- public uint SkinState; // 姝﹀皢鐨偆宸茶В閿佺姸鎬佷俊鎭紝鎸夌毊鑲ゆ墍鍦ㄧ储寮曚簩杩涘埗浣嶈繍绠楀垽鏂槸鍚﹁В閿侊紝0绱㈠紩浣嶉粯璁ょ毊鑲わ紝涓嶇敤楠岃瘉
public byte BookInitState; // 鍥鹃壌婵�娲荤姸鎬侊細0-鏈縺娲伙紱1-鍙縺娲伙紱2-宸叉縺娲�
- public ushort BookStarLV; // 鍥鹃壌鏄熺骇绛夌骇
- public ushort BookBreakLV; // 鍥鹃壌绐佺牬绛夌骇
- public ushort BookStarLVH; // 鍥鹃壌鏄熺骇鍘嗗彶鏈�楂樼瓑绾�
- public ushort BookBreakLVH; // 鍥鹃壌绐佺牬鍘嗗彶鏈�楂樼瓑绾�
+ public byte SkinCnt;
+ public tagSCHeroSkin[] SkinList; // 闈為粯璁ょ毊鑲や俊鎭垪琛�
+ }
+
+ public class tagSCHeroSkin {
+ public uint SkinID; //鐨偆ID锛屽彧閫氱煡闈為粯璁ょ毊鑲�
+ public byte State; //鏄惁宸叉縺娲�
+ public byte Star; //鏄熺骇
}
}
diff --git a/Main/System/HeroUI/HeroCollectionCardCell.cs b/Main/System/HeroUI/HeroCollectionCardCell.cs
index 28de4b4..5392f42 100644
--- a/Main/System/HeroUI/HeroCollectionCardCell.cs
+++ b/Main/System/HeroUI/HeroCollectionCardCell.cs
@@ -50,25 +50,11 @@
{
trainStateImg.SetActive(false);
}
- nameText.text = colData.BookBreakLV == 0 ? heroConfig.Name : Language.Get("herocardbreaklv", heroConfig.Name, colData.BookBreakLV);
+ nameText.text = heroConfig.Name;
for (int i = 0; i < starImgList.Count; i++)
{
- if (colData.BookStarLV == 0 && i == 0)
- {
- // 鏃犳槦绾� 鐗规畩澶勭悊
- starImgList[i].SetActive(true);
- starImgList[i].SetSprite("herostar" + colData.BookStarLV);
- }
- else if ((colData.BookStarLV - 1) % starImgList.Count >= i)
- {
- starImgList[i].SetActive(true);
- starImgList[i].SetSprite("herostar" + (((colData.BookStarLV - 1) / starImgList.Count) + 1) * starImgList.Count);
- }
- else
- {
- starImgList[i].SetActive(false);
- }
+ starImgList[i].SetActive(false);
}
heroCardBtn.AddListener(() =>
diff --git a/Main/System/HeroUI/HeroCollectionLvUpWin.cs b/Main/System/HeroUI/HeroCollectionLvUpWin.cs
index cf71fb2..776d987 100644
--- a/Main/System/HeroUI/HeroCollectionLvUpWin.cs
+++ b/Main/System/HeroUI/HeroCollectionLvUpWin.cs
@@ -95,8 +95,8 @@
{
// fullPanel.SetActive(true);
lvupPanel.SetActive(state == 1);
- fullHeadCell.Init(HeroUIManager.Instance.selectCollectHeroID, config.SkinIDList[0], colData.BookStarLV);
- name3.text = colData.BookBreakLV == 0 ? config.Name : Language.Get("herocardbreaklv", config.Name, colData.BookBreakLV);
+ fullHeadCell.Init(HeroUIManager.Instance.selectCollectHeroID, config.SkinIDList[0]);
+ name3.text = config.Name;
btn.SetActive(true);
@@ -109,8 +109,6 @@
awardInfo.text = string.Empty;
unActiveGo.SetActive(false);
// titleText.text = Language.Get("HeroAwake12");
- int afterBreakLV = colData.BookBreakLV;
- int afterStarLV = colData.BookStarLV;
if (state == 1)
{
lvupPanel.SetActive(true);
diff --git a/Main/System/HeroUI/HeroUIManager.Collect.cs b/Main/System/HeroUI/HeroUIManager.Collect.cs
index 03caf26..d9abae3 100644
--- a/Main/System/HeroUI/HeroUIManager.Collect.cs
+++ b/Main/System/HeroUI/HeroUIManager.Collect.cs
@@ -139,20 +139,6 @@
}
}
- //鍥鹃壌鎬讳笂闄愮瓑绾� = 鍥鹃壌鏄熺骇涓婇檺 + 鍥鹃壌绐佺牬涓婇檺
- public int GetHeroBookMaxLevel(int heroID, int quality)
- {
- return GetMaxStarCount(heroID, quality) + HeroBreakConfig.GetMaxBreakLv(heroID);
- }
-
- public int GetHeroBookLevel(int heroID)
- {
- if (heroCollectInfoDic.ContainsKey(heroID))
- {
- return heroCollectInfoDic[heroID].BookStarLV + heroCollectInfoDic[heroID].BookBreakLV;
- }
- return 0;
- }
//鍒嗕负0鏈幏寰椼��1鍙縺娲汇��2甯歌銆�3绐佺牬鍗囩骇銆�4銆佹槦鍗囩骇銆�5宸叉弧绾�
public int GetHeroBookState(int heroID, int quality)
diff --git a/Main/System/Main/FightPowerFormula.cs b/Main/System/Main/FightPowerFormula.cs
index fa2e92e..4d22fb5 100644
--- a/Main/System/Main/FightPowerFormula.cs
+++ b/Main/System/Main/FightPowerFormula.cs
@@ -13,6 +13,7 @@
private const string HORSEVALUE_VALUE = "horseValue";
private const string BEAUTYVALUE_VALUE = "beautyValue";
private const string FATESVALUE_VALUE = "fatesValue";
+ private const string SKINVALUE_VALUE = "skinValue";
private const string DINGJUNGEVALUE_VALUE = "dingjungeValue";
private const string MINGGEVALUE_VALUE = "minggeValue";
private const string LINEUPHALOPER_VALUE = "lineupHaloPer";
@@ -22,6 +23,7 @@
private const string HORSEPER_VALUE = "horsePer";
private const string BEAUTYPER_VALUE = "beautyPer";
private const string FATESPER_VALUE = "fatesPer";
+ private const string SKINPER_VALUE = "skinPer";
private const string CARDPER_VALUE = "cardPer";
private const string MINGGEPER_VALUE = "minggePer";
private const string INHERITPER_VALUE = "inheritPer";
@@ -32,6 +34,7 @@
private const string DINGJUNGEPER_VALUE = "dingjungePer";
private const string HEROSELFVALUE_VALUE = "heroSelfValue";
private const string HEROLVVALUE_VALUE = "heroLVValue";
+ private const string HEROSKINVALUE_VALUE = "heroSkinValue";
private const string LINEUPHALOVALUE_VALUE = "lineupHaloValue";
private const string STARTALENTVALUE_VALUE = "starTalentValue";
private const string BREAKLVVALUE_VALUE = "breakLVValue";
@@ -137,9 +140,9 @@
private const string OFFICIALLV_VALUE = "OfficialLV";
// 鍩虹灞炴�у叕寮�
- // (lvValue+equipValue+realmValue+gubaoValue+hjgValue+horseValue+beautyValue+fatesValue+dingjungeValue+minggeValue)*(1+lineupHaloPer+realmPer+gubaoPer+hjgPer+horsePer+beautyPer+fatesPer+cardPer+minggePer)*(inheritPer+fetterPer+starTalentPer+breakLVPer+awakeTalentPer)*(1+dingjungePer)+heroSelfValue+heroLVValue
+ // (lvValue+equipValue+realmValue+gubaoValue+hjgValue+horseValue+beautyValue+fatesValue+skinValue+dingjungeValue+minggeValue)*(1+lineupHaloPer+realmPer+gubaoPer+hjgPer+horsePer+beautyPer+fatesPer+skinPer+cardPer+minggePer)*(inheritPer+fetterPer+starTalentPer+breakLVPer+awakeTalentPer)*(1+dingjungePer)+heroSelfValue+heroLVValue+heroSkinValue
// 鎴樻枟灞炴�у叕寮�
- // (lvValue+equipValue+realmValue+gubaoValue+hjgValue+horseValue+beautyValue+fatesValue+dingjungeValue+minggeValue)+(heroSelfValue+lineupHaloValue+starTalentValue+breakLVValue+awakeTalentValue)+fetterValue
+ // (lvValue+equipValue+realmValue+gubaoValue+hjgValue+horseValue+beautyValue+fatesValue+dingjungeValue+minggeValue)+(heroSelfValue+heroSkinValue+lineupHaloValue+starTalentValue+breakLVValue+awakeTalentValue)+fetterValue
// 鎴樻枟鍔涘叕寮�
// long(Atk*AtkRatio+MaxHP*MaxHPRatio+Def*DefRatio+AtkSpeed*AtkSpeedRatio+(StunRate*StunRateRatio+SuperHitRate*SuperHitRateRatio+ComboRate*ComboRateRatio+MissRate*MissRateRatio+ParryRate*ParryRateRatio+SuckHPPer*SuckHPPerRatio+StunRateDef*StunRateDefRatio+SuperHitRateDef*SuperHitRateDefRatio+ComboRateDef*ComboRateDefRatio+MissRateDef*MissRateDefRatio+ParryRateDef*ParryRateDefRatio+SuckHPPerDef*SuckHPPerDefRatio+FinalDamPer*FinalDamPerRatio+FinalDamPerDef*FinalDamPerDefRatio+PhyDamPer*PhyDamPerRatio+PhyDamPerDef*PhyDamPerDefRatio+MagDamPer*MagDamPerRatio+MagDamPerDef*MagDamPerDefRatio+NormalSkillPer*NormalSkillPerRatio+NormalSkillPerDef*NormalSkillPerDefRatio+AngerSkillPer*AngerSkillPerRatio+AngerSkillPerDef*AngerSkillPerDefRatio+SuperDamPer*SuperDamPerRatio+SuperDamPerDef*SuperDamPerDefRatio+CurePer*CurePerRatio+CurePerDef*CurePerDefRatio+ShieldPer*ShieldPerRatio+ShieldPerDef*ShieldPerDefRatio+DOTPer*DOTPerRatio+DOTPerDef*DOTPerDefRatio+WeiFinalDamPer*WeiFinalDamPerRatio+WeiFinalDamPerDef*WeiFinalDamPerDefRatio+ShuFinalDamPer*ShuFinalDamPerRatio+ShuFinalDamPerDef*ShuFinalDamPerDefRatio+WuFinalDamPer*WuFinalDamPerRatio+WuFinalDamPerDef*WuFinalDamPerDefRatio+QunFinalDamPer*QunFinalDamPerRatio+QunFinalDamPerDef*QunFinalDamPerDefRatio+PVPDamPer*PVPDamPerRatio+PVPDamPerDef*PVPDamPerDefRatio+Guanchuan*GuanchuanRatio+GuanchuanDef*GuanchuanDefRatio+Zhaojia*ZhaojiaRatio+ZhaojiaDef*ZhaojiaDefRatio)/100.0-55000)
// 鎶�鑳芥垬鏂楀姏鍏紡
@@ -155,6 +158,7 @@
double horseValue = variables[HORSEVALUE_VALUE];
double beautyValue = variables[BEAUTYVALUE_VALUE];
double fatesValue = variables[FATESVALUE_VALUE];
+ double skinValue = variables[SKINVALUE_VALUE];
double dingjungeValue = variables[DINGJUNGEVALUE_VALUE];
double minggeValue = variables[MINGGEVALUE_VALUE];
double lineupHaloPer = variables[LINEUPHALOPER_VALUE];
@@ -164,6 +168,7 @@
double horsePer = variables[HORSEPER_VALUE];
double beautyPer = variables[BEAUTYPER_VALUE];
double fatesPer = variables[FATESPER_VALUE];
+ double skinPer = variables[SKINPER_VALUE];
double cardPer = variables[CARDPER_VALUE];
double minggePer = variables[MINGGEPER_VALUE];
double inheritPer = variables[INHERITPER_VALUE];
@@ -174,8 +179,9 @@
double dingjungePer = variables[DINGJUNGEPER_VALUE];
double heroSelfValue = variables[HEROSELFVALUE_VALUE];
double heroLVValue = variables[HEROLVVALUE_VALUE];
+ double heroSkinValue = variables[HEROSKINVALUE_VALUE];
- return (lvValue+equipValue+realmValue+gubaoValue+hjgValue+horseValue+beautyValue+fatesValue+dingjungeValue+minggeValue)*(1+lineupHaloPer+realmPer+gubaoPer+hjgPer+horsePer+beautyPer+fatesPer+cardPer+minggePer)*(inheritPer+fetterPer+starTalentPer+breakLVPer+awakeTalentPer)*(1+dingjungePer)+heroSelfValue+heroLVValue;
+ return (lvValue+equipValue+realmValue+gubaoValue+hjgValue+horseValue+beautyValue+fatesValue+skinValue+dingjungeValue+minggeValue)*(1+lineupHaloPer+realmPer+gubaoPer+hjgPer+horsePer+beautyPer+fatesPer+skinPer+cardPer+minggePer)*(inheritPer+fetterPer+starTalentPer+breakLVPer+awakeTalentPer)*(1+dingjungePer)+heroSelfValue+heroLVValue+heroSkinValue;
}
public static double GetFightAttr(Dictionary<string, double> variables)
@@ -191,13 +197,14 @@
double dingjungeValue = variables[DINGJUNGEVALUE_VALUE];
double minggeValue = variables[MINGGEVALUE_VALUE];
double heroSelfValue = variables[HEROSELFVALUE_VALUE];
+ double heroSkinValue = variables[HEROSKINVALUE_VALUE];
double lineupHaloValue = variables[LINEUPHALOVALUE_VALUE];
double starTalentValue = variables[STARTALENTVALUE_VALUE];
double breakLVValue = variables[BREAKLVVALUE_VALUE];
double awakeTalentValue = variables[AWAKETALENTVALUE_VALUE];
double fetterValue = variables[FETTERVALUE_VALUE];
- return (lvValue+equipValue+realmValue+gubaoValue+hjgValue+horseValue+beautyValue+fatesValue+dingjungeValue+minggeValue)+(heroSelfValue+lineupHaloValue+starTalentValue+breakLVValue+awakeTalentValue)+fetterValue;
+ return (lvValue+equipValue+realmValue+gubaoValue+hjgValue+horseValue+beautyValue+fatesValue+dingjungeValue+minggeValue)+(heroSelfValue+heroSkinValue+lineupHaloValue+starTalentValue+breakLVValue+awakeTalentValue)+fetterValue;
}
public static double GetFightPower(Dictionary<string, double> variables)
diff --git a/Main/System/Main/FightPowerManager.cs b/Main/System/Main/FightPowerManager.cs
index b376955..848e3df 100644
--- a/Main/System/Main/FightPowerManager.cs
+++ b/Main/System/Main/FightPowerManager.cs
@@ -363,6 +363,13 @@
var awakeTalentPer = hero.GetAwakeAttrPer(attrType) / 10000.0;
var fetterPer = hero.GetFetterAttrPer(attrType) / 10000.0;
var heroLVValue = hero.GetHeroLVValue(attrType);
+
+ //姝﹀皢鐨偆
+ var skinValue = 0;
+ var skinPer = 0;
+ var heroSkinValue = 0;
+ var heroSkinPer = 0;
+
double value = (lvValue+equipValue+realmValue+gubaoValue+hjgValue+horseValue+beautyValue+fatesValue+dingjungeValue+minggeValue)*(1+lineupHaloPer+realmPer+gubaoPer+hjgPer+horsePer+beautyPer+fatesPer+cardPer+minggePer)*(inheritPer+fetterPer+starTalentPer+breakLVPer+awakeTalentPer)*(1+dingjungePer)+heroSelfValue+heroLVValue;
@@ -404,6 +411,12 @@
var awakeTalentValue = hero.GetAwakeAttrValue(attrType);
var fetterValue = hero.GetFetterAttrValue(attrType);
+ //姝﹀皢鐨偆
+ var skinValue = 0;
+ var skinPer = 0;
+ var heroSkinValue = 0;
+ var heroSkinPer = 0;
+
double value = (lvValue + equipValue + realmValue + gubaoValue + hjgValue + horseValue + beautyValue + fatesValue + dingjungeValue + minggeValue) + (heroSelfValue + lineupHaloValue + starTalentValue + breakLVValue + awakeTalentValue) + fetterValue;
//淇濈暀2浣嶅皬鏁�
--
Gitblit v1.8.0