You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
353 lines
22 KiB
353 lines
22 KiB
namespace Battle
|
|
{
|
|
public static class ProtoHelper
|
|
{
|
|
|
|
public static ProtoCSClass.BattleInfoAll BattleInfoAllToClass(ref ProtoCSStruct.BattleInfoAll st)
|
|
{
|
|
var cls = new ProtoCSClass.BattleInfoAll();
|
|
cls.Type = (ProtoCSClass.CSBattleType)st.Type;
|
|
cls.BattleId = st.BattleId;
|
|
cls.MainlandId = st.MainlandId;
|
|
cls.MainlandLevel = st.MainlandLevel;
|
|
cls.RoleA.RoleBase.Uid = st.RoleA.RoleBase.Uid;
|
|
cls.RoleA.RoleBase.Nick = st.RoleA.RoleBase.Nick.GetString();
|
|
cls.RoleA.RoleBase.Gender = st.RoleA.RoleBase.Gender;
|
|
cls.RoleA.RoleBase.Icon = st.RoleA.RoleBase.Icon.GetString();
|
|
cls.RoleA.RoleBase.Exp = st.RoleA.RoleBase.Exp;
|
|
cls.RoleA.RoleBase.Level = st.RoleA.RoleBase.Level;
|
|
cls.RoleA.RoleBase.VipLevel = st.RoleA.RoleBase.VipLevel;
|
|
cls.RoleA.RoleBase.Chip = st.RoleA.RoleBase.Chip;
|
|
cls.RoleA.RoleBase.Diamond = st.RoleA.RoleBase.Diamond;
|
|
cls.RoleA.RoleBase.LastLoginTime = st.RoleA.RoleBase.LastLoginTime;
|
|
cls.RoleA.RoleBase.CreateTime = st.RoleA.RoleBase.CreateTime;
|
|
cls.RoleA.RoleBase.OnlineTime = st.RoleA.RoleBase.OnlineTime;
|
|
cls.RoleA.RoleBase.VipExp = st.RoleA.RoleBase.VipExp;
|
|
cls.RoleA.RoleBase.Lang = st.RoleA.RoleBase.Lang.GetString();
|
|
cls.RoleA.RoleBase.HeroExpPool = st.RoleA.RoleBase.HeroExpPool;
|
|
cls.RoleA.RoleBase.RoleCreateComplete = st.RoleA.RoleBase.RoleCreateComplete;
|
|
cls.RoleA.GameServerId = st.RoleA.GameServerId;
|
|
cls.RoleB.RoleBase.Uid = st.RoleB.RoleBase.Uid;
|
|
cls.RoleB.RoleBase.Nick = st.RoleB.RoleBase.Nick.GetString();
|
|
cls.RoleB.RoleBase.Gender = st.RoleB.RoleBase.Gender;
|
|
cls.RoleB.RoleBase.Icon = st.RoleB.RoleBase.Icon.GetString();
|
|
cls.RoleB.RoleBase.Exp = st.RoleB.RoleBase.Exp;
|
|
cls.RoleB.RoleBase.Level = st.RoleB.RoleBase.Level;
|
|
cls.RoleB.RoleBase.VipLevel = st.RoleB.RoleBase.VipLevel;
|
|
cls.RoleB.RoleBase.Chip = st.RoleB.RoleBase.Chip;
|
|
cls.RoleB.RoleBase.Diamond = st.RoleB.RoleBase.Diamond;
|
|
cls.RoleB.RoleBase.LastLoginTime = st.RoleB.RoleBase.LastLoginTime;
|
|
cls.RoleB.RoleBase.CreateTime = st.RoleB.RoleBase.CreateTime;
|
|
cls.RoleB.RoleBase.OnlineTime = st.RoleB.RoleBase.OnlineTime;
|
|
cls.RoleB.RoleBase.VipExp = st.RoleB.RoleBase.VipExp;
|
|
cls.RoleB.RoleBase.Lang = st.RoleB.RoleBase.Lang.GetString();
|
|
cls.RoleB.RoleBase.HeroExpPool = st.RoleB.RoleBase.HeroExpPool;
|
|
cls.RoleB.RoleBase.RoleCreateComplete = st.RoleB.RoleBase.RoleCreateComplete;
|
|
cls.RoleB.GameServerId = st.RoleB.GameServerId;
|
|
for (int i = 0; i < st.HerosA.List.Count; ++i)
|
|
{
|
|
cls.HerosA.List.Add(new ProtoCSClass.HeroInfo());
|
|
cls.HerosA.List[i].Dbhero.SerialNum = st.HerosA.List[i].Dbhero.SerialNum;
|
|
cls.HerosA.List[i].Dbhero.DescId = st.HerosA.List[i].Dbhero.DescId;
|
|
cls.HerosA.List[i].Dbhero.Level = st.HerosA.List[i].Dbhero.Level;
|
|
cls.HerosA.List[i].Dbhero.Star = st.HerosA.List[i].Dbhero.Star;
|
|
cls.HerosA.List[i].Dbhero.Exp = st.HerosA.List[i].Dbhero.Exp;
|
|
for (int j = 0; j < st.HerosA.List[i].Dbhero.SpellLv.Count; ++j)
|
|
{
|
|
cls.HerosA.List[i].Dbhero.SpellLv.Add(new ProtoCSClass.IDValue32());
|
|
cls.HerosA.List[i].Dbhero.SpellLv[j].Id = st.HerosA.List[i].Dbhero.SpellLv[j].Id;
|
|
cls.HerosA.List[i].Dbhero.SpellLv[j].Value = st.HerosA.List[i].Dbhero.SpellLv[j].Value;
|
|
}
|
|
cls.HerosA.List[i].Dbhero.HeroTalent = st.HerosA.List[i].Dbhero.HeroTalent;
|
|
cls.HerosA.List[i].Dbhero.TalentSteps = st.HerosA.List[i].Dbhero.TalentSteps;
|
|
cls.HerosA.List[i].Dbhero.ResonanceIndex = st.HerosA.List[i].Dbhero.ResonanceIndex;
|
|
cls.HerosA.List[i].Dbhero.IsJoinBattle = st.HerosA.List[i].Dbhero.IsJoinBattle;
|
|
cls.HerosA.List[i].Dbhero.RenownLv = st.HerosA.List[i].Dbhero.RenownLv;
|
|
cls.HerosA.List[i].Dbhero.RenownExp = st.HerosA.List[i].Dbhero.RenownExp;
|
|
cls.HerosA.List[i].Dbhero.RenownPosPassMainland = st.HerosA.List[i].Dbhero.RenownPosPassMainland;
|
|
cls.HerosA.List[i].Dbhero.RenownPosArenaTimes = st.HerosA.List[i].Dbhero.RenownPosArenaTimes;
|
|
cls.HerosA.List[i].Dbhero.AtlasGroupId = st.HerosA.List[i].Dbhero.AtlasGroupId;
|
|
cls.HerosA.List[i].Dbhero.HeroStarStage = st.HerosA.List[i].Dbhero.HeroStarStage;
|
|
for (int j = 0; j < st.HerosA.List[i].Dbhero.RenownPosLv.Count; ++j)
|
|
{
|
|
cls.HerosA.List[i].Dbhero.RenownPosLv.Add(new ProtoCSClass.IDValue32());
|
|
cls.HerosA.List[i].Dbhero.RenownPosLv[j].Id = st.HerosA.List[i].Dbhero.RenownPosLv[j].Id;
|
|
cls.HerosA.List[i].Dbhero.RenownPosLv[j].Value = st.HerosA.List[i].Dbhero.RenownPosLv[j].Value;
|
|
}
|
|
for (int j = 0; j < st.HerosA.List[i].Dbhero.Equipment.Count; ++j)
|
|
{
|
|
cls.HerosA.List[i].Dbhero.Equipment.Add(new ProtoCSClass.IDValue32());
|
|
cls.HerosA.List[i].Dbhero.Equipment[j].Id = st.HerosA.List[i].Dbhero.Equipment[j].Id;
|
|
cls.HerosA.List[i].Dbhero.Equipment[j].Value = st.HerosA.List[i].Dbhero.Equipment[j].Value;
|
|
}
|
|
for (int j = 0; j < st.HerosA.List[i].Dbhero.TalentSpell.Count; ++j)
|
|
{
|
|
cls.HerosA.List[i].Dbhero.TalentSpell.Add(new ProtoCSClass.IDValue32());
|
|
cls.HerosA.List[i].Dbhero.TalentSpell[j].Id = st.HerosA.List[i].Dbhero.TalentSpell[j].Id;
|
|
cls.HerosA.List[i].Dbhero.TalentSpell[j].Value = st.HerosA.List[i].Dbhero.TalentSpell[j].Value;
|
|
}
|
|
for (int j = 0; j < st.HerosA.List[i].Dbhero.HeroFetterInfo.Count; ++j)
|
|
{
|
|
cls.HerosA.List[i].Dbhero.HeroFetterInfo.Add(new ProtoCSClass.IDValue32());
|
|
cls.HerosA.List[i].Dbhero.HeroFetterInfo[j].Id = st.HerosA.List[i].Dbhero.HeroFetterInfo[j].Id;
|
|
cls.HerosA.List[i].Dbhero.HeroFetterInfo[j].Value = st.HerosA.List[i].Dbhero.HeroFetterInfo[j].Value;
|
|
}
|
|
for (int j = 0; j < st.HerosA.List[i].Dbhero.EquipmentSuit.Count; ++j)
|
|
{
|
|
cls.HerosA.List[i].Dbhero.EquipmentSuit.Add(new ProtoCSClass.IDValue32());
|
|
cls.HerosA.List[i].Dbhero.EquipmentSuit[j].Id = st.HerosA.List[i].Dbhero.EquipmentSuit[j].Id;
|
|
cls.HerosA.List[i].Dbhero.EquipmentSuit[j].Value = st.HerosA.List[i].Dbhero.EquipmentSuit[j].Value;
|
|
}
|
|
for (int j = 0; j < st.HerosA.List[i].Dbhero.CarrySpellId.Count; ++j)
|
|
{
|
|
cls.HerosA.List[i].Dbhero.CarrySpellId.Add(st.HerosA.List[i].Dbhero.CarrySpellId[j]);
|
|
}
|
|
cls.HerosA.List[i].Dbhero.GmTalentSteps = st.HerosA.List[i].Dbhero.GmTalentSteps;
|
|
cls.HerosA.List[i].Dbhero.ChoosenSchool = st.HerosA.List[i].Dbhero.ChoosenSchool;
|
|
cls.HerosA.List[i].Dbhero.WearArtifact = st.HerosA.List[i].Dbhero.WearArtifact;
|
|
for (int j = 0; j < st.HerosA.List[i].Equipment.Count; ++j)
|
|
{
|
|
cls.HerosA.List[i].Equipment.Add(new ProtoCSClass.DBEquipment());
|
|
cls.HerosA.List[i].Equipment[j].SerialNum = st.HerosA.List[i].Equipment[j].SerialNum;
|
|
cls.HerosA.List[i].Equipment[j].DescId = st.HerosA.List[i].Equipment[j].DescId;
|
|
cls.HerosA.List[i].Equipment[j].Level = st.HerosA.List[i].Equipment[j].Level;
|
|
cls.HerosA.List[i].Equipment[j].Exp = st.HerosA.List[i].Equipment[j].Exp;
|
|
cls.HerosA.List[i].Equipment[j].StarLv = st.HerosA.List[i].Equipment[j].StarLv;
|
|
cls.HerosA.List[i].Equipment[j].StarSpellLv = st.HerosA.List[i].Equipment[j].StarSpellLv;
|
|
cls.HerosA.List[i].Equipment[j].OwnerHero = st.HerosA.List[i].Equipment[j].OwnerHero;
|
|
for (int k = 0; k < st.HerosA.List[i].Equipment[j].AppendTypeValue.Count; ++k)
|
|
{
|
|
cls.HerosA.List[i].Equipment[j].AppendTypeValue.Add(new ProtoCSClass.IDValue32());
|
|
cls.HerosA.List[i].Equipment[j].AppendTypeValue[k].Id = st.HerosA.List[i].Equipment[j].AppendTypeValue[k].Id;
|
|
cls.HerosA.List[i].Equipment[j].AppendTypeValue[k].Value = st.HerosA.List[i].Equipment[j].AppendTypeValue[k].Value;
|
|
}
|
|
cls.HerosA.List[i].Equipment[j].ChangeSpellOld = st.HerosA.List[i].Equipment[j].ChangeSpellOld;
|
|
cls.HerosA.List[i].Equipment[j].ChangeSpellNew = st.HerosA.List[i].Equipment[j].ChangeSpellNew;
|
|
cls.HerosA.List[i].Equipment[j].EquipmentType = st.HerosA.List[i].Equipment[j].EquipmentType;
|
|
}
|
|
cls.HerosA.List[i].LineupPos = st.HerosA.List[i].LineupPos;
|
|
for (int j = 0; j < st.HerosA.List[i].HeroAtlasData.OneGroupList.Count; ++j)
|
|
{
|
|
cls.HerosA.List[i].HeroAtlasData.OneGroupList.Add(new ProtoCSClass.OneHeroAtlasGroup());
|
|
cls.HerosA.List[i].HeroAtlasData.OneGroupList[j].GroupId = st.HerosA.List[i].HeroAtlasData.OneGroupList[j].GroupId;
|
|
cls.HerosA.List[i].HeroAtlasData.OneGroupList[j].Lv = st.HerosA.List[i].HeroAtlasData.OneGroupList[j].Lv;
|
|
cls.HerosA.List[i].HeroAtlasData.OneGroupList[j].CurMaxGridNum = st.HerosA.List[i].HeroAtlasData.OneGroupList[j].CurMaxGridNum;
|
|
for (int k = 0; k < st.HerosA.List[i].HeroAtlasData.OneGroupList[j].HeroSerialNum.Count; ++k)
|
|
{
|
|
cls.HerosA.List[i].HeroAtlasData.OneGroupList[j].HeroSerialNum.Add(st.HerosA.List[i].HeroAtlasData.OneGroupList[j].HeroSerialNum[k]);
|
|
}
|
|
for (int k = 0; k < st.HerosA.List[i].HeroAtlasData.OneGroupList[j].HeroAtlasIndex.Count; ++k)
|
|
{
|
|
cls.HerosA.List[i].HeroAtlasData.OneGroupList[j].HeroAtlasIndex.Add(new ProtoCSClass.IDValue32());
|
|
cls.HerosA.List[i].HeroAtlasData.OneGroupList[j].HeroAtlasIndex[k].Id = st.HerosA.List[i].HeroAtlasData.OneGroupList[j].HeroAtlasIndex[k].Id;
|
|
cls.HerosA.List[i].HeroAtlasData.OneGroupList[j].HeroAtlasIndex[k].Value = st.HerosA.List[i].HeroAtlasData.OneGroupList[j].HeroAtlasIndex[k].Value;
|
|
}
|
|
}
|
|
cls.HerosA.List[i].PosX = st.HerosA.List[i].PosX;
|
|
cls.HerosA.List[i].PosZ = st.HerosA.List[i].PosZ;
|
|
cls.HerosA.List[i].Artifact.SerialNum = st.HerosA.List[i].Artifact.SerialNum;
|
|
cls.HerosA.List[i].Artifact.DescId = st.HerosA.List[i].Artifact.DescId;
|
|
cls.HerosA.List[i].Artifact.Level = st.HerosA.List[i].Artifact.Level;
|
|
cls.HerosA.List[i].Artifact.Exp = st.HerosA.List[i].Artifact.Exp;
|
|
cls.HerosA.List[i].Artifact.StarLv = st.HerosA.List[i].Artifact.StarLv;
|
|
cls.HerosA.List[i].Artifact.StarSpellLv = st.HerosA.List[i].Artifact.StarSpellLv;
|
|
cls.HerosA.List[i].Artifact.OwnerHero = st.HerosA.List[i].Artifact.OwnerHero;
|
|
for (int j = 0; j < st.HerosA.List[i].Artifact.AppendTypeValue.Count; ++j)
|
|
{
|
|
cls.HerosA.List[i].Artifact.AppendTypeValue.Add(new ProtoCSClass.IDValue32());
|
|
cls.HerosA.List[i].Artifact.AppendTypeValue[j].Id = st.HerosA.List[i].Artifact.AppendTypeValue[j].Id;
|
|
cls.HerosA.List[i].Artifact.AppendTypeValue[j].Value = st.HerosA.List[i].Artifact.AppendTypeValue[j].Value;
|
|
}
|
|
cls.HerosA.List[i].Artifact.ChangeSpellOld = st.HerosA.List[i].Artifact.ChangeSpellOld;
|
|
cls.HerosA.List[i].Artifact.ChangeSpellNew = st.HerosA.List[i].Artifact.ChangeSpellNew;
|
|
cls.HerosA.List[i].Artifact.EquipmentType = st.HerosA.List[i].Artifact.EquipmentType;
|
|
}
|
|
for (int i = 0; i < st.HerosB.List.Count; ++i)
|
|
{
|
|
cls.HerosB.List.Add(new ProtoCSClass.HeroInfo());
|
|
cls.HerosB.List[i].Dbhero.SerialNum = st.HerosB.List[i].Dbhero.SerialNum;
|
|
cls.HerosB.List[i].Dbhero.DescId = st.HerosB.List[i].Dbhero.DescId;
|
|
cls.HerosB.List[i].Dbhero.Level = st.HerosB.List[i].Dbhero.Level;
|
|
cls.HerosB.List[i].Dbhero.Star = st.HerosB.List[i].Dbhero.Star;
|
|
cls.HerosB.List[i].Dbhero.Exp = st.HerosB.List[i].Dbhero.Exp;
|
|
for (int j = 0; j < st.HerosB.List[i].Dbhero.SpellLv.Count; ++j)
|
|
{
|
|
cls.HerosB.List[i].Dbhero.SpellLv.Add(new ProtoCSClass.IDValue32());
|
|
cls.HerosB.List[i].Dbhero.SpellLv[j].Id = st.HerosB.List[i].Dbhero.SpellLv[j].Id;
|
|
cls.HerosB.List[i].Dbhero.SpellLv[j].Value = st.HerosB.List[i].Dbhero.SpellLv[j].Value;
|
|
}
|
|
cls.HerosB.List[i].Dbhero.HeroTalent = st.HerosB.List[i].Dbhero.HeroTalent;
|
|
cls.HerosB.List[i].Dbhero.TalentSteps = st.HerosB.List[i].Dbhero.TalentSteps;
|
|
cls.HerosB.List[i].Dbhero.ResonanceIndex = st.HerosB.List[i].Dbhero.ResonanceIndex;
|
|
cls.HerosB.List[i].Dbhero.IsJoinBattle = st.HerosB.List[i].Dbhero.IsJoinBattle;
|
|
cls.HerosB.List[i].Dbhero.RenownLv = st.HerosB.List[i].Dbhero.RenownLv;
|
|
cls.HerosB.List[i].Dbhero.RenownExp = st.HerosB.List[i].Dbhero.RenownExp;
|
|
cls.HerosB.List[i].Dbhero.RenownPosPassMainland = st.HerosB.List[i].Dbhero.RenownPosPassMainland;
|
|
cls.HerosB.List[i].Dbhero.RenownPosArenaTimes = st.HerosB.List[i].Dbhero.RenownPosArenaTimes;
|
|
cls.HerosB.List[i].Dbhero.AtlasGroupId = st.HerosB.List[i].Dbhero.AtlasGroupId;
|
|
cls.HerosB.List[i].Dbhero.HeroStarStage = st.HerosB.List[i].Dbhero.HeroStarStage;
|
|
for (int j = 0; j < st.HerosB.List[i].Dbhero.RenownPosLv.Count; ++j)
|
|
{
|
|
cls.HerosB.List[i].Dbhero.RenownPosLv.Add(new ProtoCSClass.IDValue32());
|
|
cls.HerosB.List[i].Dbhero.RenownPosLv[j].Id = st.HerosB.List[i].Dbhero.RenownPosLv[j].Id;
|
|
cls.HerosB.List[i].Dbhero.RenownPosLv[j].Value = st.HerosB.List[i].Dbhero.RenownPosLv[j].Value;
|
|
}
|
|
for (int j = 0; j < st.HerosB.List[i].Dbhero.Equipment.Count; ++j)
|
|
{
|
|
cls.HerosB.List[i].Dbhero.Equipment.Add(new ProtoCSClass.IDValue32());
|
|
cls.HerosB.List[i].Dbhero.Equipment[j].Id = st.HerosB.List[i].Dbhero.Equipment[j].Id;
|
|
cls.HerosB.List[i].Dbhero.Equipment[j].Value = st.HerosB.List[i].Dbhero.Equipment[j].Value;
|
|
}
|
|
for (int j = 0; j < st.HerosB.List[i].Dbhero.TalentSpell.Count; ++j)
|
|
{
|
|
cls.HerosB.List[i].Dbhero.TalentSpell.Add(new ProtoCSClass.IDValue32());
|
|
cls.HerosB.List[i].Dbhero.TalentSpell[j].Id = st.HerosB.List[i].Dbhero.TalentSpell[j].Id;
|
|
cls.HerosB.List[i].Dbhero.TalentSpell[j].Value = st.HerosB.List[i].Dbhero.TalentSpell[j].Value;
|
|
}
|
|
for (int j = 0; j < st.HerosB.List[i].Dbhero.HeroFetterInfo.Count; ++j)
|
|
{
|
|
cls.HerosB.List[i].Dbhero.HeroFetterInfo.Add(new ProtoCSClass.IDValue32());
|
|
cls.HerosB.List[i].Dbhero.HeroFetterInfo[j].Id = st.HerosB.List[i].Dbhero.HeroFetterInfo[j].Id;
|
|
cls.HerosB.List[i].Dbhero.HeroFetterInfo[j].Value = st.HerosB.List[i].Dbhero.HeroFetterInfo[j].Value;
|
|
}
|
|
for (int j = 0; j < st.HerosB.List[i].Dbhero.EquipmentSuit.Count; ++j)
|
|
{
|
|
cls.HerosB.List[i].Dbhero.EquipmentSuit.Add(new ProtoCSClass.IDValue32());
|
|
cls.HerosB.List[i].Dbhero.EquipmentSuit[j].Id = st.HerosB.List[i].Dbhero.EquipmentSuit[j].Id;
|
|
cls.HerosB.List[i].Dbhero.EquipmentSuit[j].Value = st.HerosB.List[i].Dbhero.EquipmentSuit[j].Value;
|
|
}
|
|
for (int j = 0; j < st.HerosB.List[i].Dbhero.CarrySpellId.Count; ++j)
|
|
{
|
|
cls.HerosB.List[i].Dbhero.CarrySpellId.Add(st.HerosB.List[i].Dbhero.CarrySpellId[j]);
|
|
}
|
|
cls.HerosB.List[i].Dbhero.GmTalentSteps = st.HerosB.List[i].Dbhero.GmTalentSteps;
|
|
cls.HerosB.List[i].Dbhero.ChoosenSchool = st.HerosB.List[i].Dbhero.ChoosenSchool;
|
|
cls.HerosB.List[i].Dbhero.WearArtifact = st.HerosB.List[i].Dbhero.WearArtifact;
|
|
for (int j = 0; j < st.HerosB.List[i].Equipment.Count; ++j)
|
|
{
|
|
cls.HerosB.List[i].Equipment.Add(new ProtoCSClass.DBEquipment());
|
|
cls.HerosB.List[i].Equipment[j].SerialNum = st.HerosB.List[i].Equipment[j].SerialNum;
|
|
cls.HerosB.List[i].Equipment[j].DescId = st.HerosB.List[i].Equipment[j].DescId;
|
|
cls.HerosB.List[i].Equipment[j].Level = st.HerosB.List[i].Equipment[j].Level;
|
|
cls.HerosB.List[i].Equipment[j].Exp = st.HerosB.List[i].Equipment[j].Exp;
|
|
cls.HerosB.List[i].Equipment[j].StarLv = st.HerosB.List[i].Equipment[j].StarLv;
|
|
cls.HerosB.List[i].Equipment[j].StarSpellLv = st.HerosB.List[i].Equipment[j].StarSpellLv;
|
|
cls.HerosB.List[i].Equipment[j].OwnerHero = st.HerosB.List[i].Equipment[j].OwnerHero;
|
|
for (int k = 0; k < st.HerosB.List[i].Equipment[j].AppendTypeValue.Count; ++k)
|
|
{
|
|
cls.HerosB.List[i].Equipment[j].AppendTypeValue.Add(new ProtoCSClass.IDValue32());
|
|
cls.HerosB.List[i].Equipment[j].AppendTypeValue[k].Id = st.HerosB.List[i].Equipment[j].AppendTypeValue[k].Id;
|
|
cls.HerosB.List[i].Equipment[j].AppendTypeValue[k].Value = st.HerosB.List[i].Equipment[j].AppendTypeValue[k].Value;
|
|
}
|
|
cls.HerosB.List[i].Equipment[j].ChangeSpellOld = st.HerosB.List[i].Equipment[j].ChangeSpellOld;
|
|
cls.HerosB.List[i].Equipment[j].ChangeSpellNew = st.HerosB.List[i].Equipment[j].ChangeSpellNew;
|
|
cls.HerosB.List[i].Equipment[j].EquipmentType = st.HerosB.List[i].Equipment[j].EquipmentType;
|
|
}
|
|
cls.HerosB.List[i].LineupPos = st.HerosB.List[i].LineupPos;
|
|
for (int j = 0; j < st.HerosB.List[i].HeroAtlasData.OneGroupList.Count; ++j)
|
|
{
|
|
cls.HerosB.List[i].HeroAtlasData.OneGroupList.Add(new ProtoCSClass.OneHeroAtlasGroup());
|
|
cls.HerosB.List[i].HeroAtlasData.OneGroupList[j].GroupId = st.HerosB.List[i].HeroAtlasData.OneGroupList[j].GroupId;
|
|
cls.HerosB.List[i].HeroAtlasData.OneGroupList[j].Lv = st.HerosB.List[i].HeroAtlasData.OneGroupList[j].Lv;
|
|
cls.HerosB.List[i].HeroAtlasData.OneGroupList[j].CurMaxGridNum = st.HerosB.List[i].HeroAtlasData.OneGroupList[j].CurMaxGridNum;
|
|
for (int k = 0; k < st.HerosB.List[i].HeroAtlasData.OneGroupList[j].HeroSerialNum.Count; ++k)
|
|
{
|
|
cls.HerosB.List[i].HeroAtlasData.OneGroupList[j].HeroSerialNum.Add(st.HerosB.List[i].HeroAtlasData.OneGroupList[j].HeroSerialNum[k]);
|
|
}
|
|
for (int k = 0; k < st.HerosB.List[i].HeroAtlasData.OneGroupList[j].HeroAtlasIndex.Count; ++k)
|
|
{
|
|
cls.HerosB.List[i].HeroAtlasData.OneGroupList[j].HeroAtlasIndex.Add(new ProtoCSClass.IDValue32());
|
|
cls.HerosB.List[i].HeroAtlasData.OneGroupList[j].HeroAtlasIndex[k].Id = st.HerosB.List[i].HeroAtlasData.OneGroupList[j].HeroAtlasIndex[k].Id;
|
|
cls.HerosB.List[i].HeroAtlasData.OneGroupList[j].HeroAtlasIndex[k].Value = st.HerosB.List[i].HeroAtlasData.OneGroupList[j].HeroAtlasIndex[k].Value;
|
|
}
|
|
}
|
|
cls.HerosB.List[i].PosX = st.HerosB.List[i].PosX;
|
|
cls.HerosB.List[i].PosZ = st.HerosB.List[i].PosZ;
|
|
cls.HerosB.List[i].Artifact.SerialNum = st.HerosB.List[i].Artifact.SerialNum;
|
|
cls.HerosB.List[i].Artifact.DescId = st.HerosB.List[i].Artifact.DescId;
|
|
cls.HerosB.List[i].Artifact.Level = st.HerosB.List[i].Artifact.Level;
|
|
cls.HerosB.List[i].Artifact.Exp = st.HerosB.List[i].Artifact.Exp;
|
|
cls.HerosB.List[i].Artifact.StarLv = st.HerosB.List[i].Artifact.StarLv;
|
|
cls.HerosB.List[i].Artifact.StarSpellLv = st.HerosB.List[i].Artifact.StarSpellLv;
|
|
cls.HerosB.List[i].Artifact.OwnerHero = st.HerosB.List[i].Artifact.OwnerHero;
|
|
for (int j = 0; j < st.HerosB.List[i].Artifact.AppendTypeValue.Count; ++j)
|
|
{
|
|
cls.HerosB.List[i].Artifact.AppendTypeValue.Add(new ProtoCSClass.IDValue32());
|
|
cls.HerosB.List[i].Artifact.AppendTypeValue[j].Id = st.HerosB.List[i].Artifact.AppendTypeValue[j].Id;
|
|
cls.HerosB.List[i].Artifact.AppendTypeValue[j].Value = st.HerosB.List[i].Artifact.AppendTypeValue[j].Value;
|
|
}
|
|
cls.HerosB.List[i].Artifact.ChangeSpellOld = st.HerosB.List[i].Artifact.ChangeSpellOld;
|
|
cls.HerosB.List[i].Artifact.ChangeSpellNew = st.HerosB.List[i].Artifact.ChangeSpellNew;
|
|
cls.HerosB.List[i].Artifact.EquipmentType = st.HerosB.List[i].Artifact.EquipmentType;
|
|
}
|
|
for (int i = 0; i < st.DungeonInfo.Employees.Count; ++i)
|
|
{
|
|
cls.DungeonInfo.Employees.Add(new ProtoCSClass.BattleEmployee());
|
|
cls.DungeonInfo.Employees[i].SerialNum = st.DungeonInfo.Employees[i].SerialNum;
|
|
cls.DungeonInfo.Employees[i].LineupPos = st.DungeonInfo.Employees[i].LineupPos;
|
|
cls.DungeonInfo.Employees[i].DescId = st.DungeonInfo.Employees[i].DescId;
|
|
cls.DungeonInfo.Employees[i].FeatureId = st.DungeonInfo.Employees[i].FeatureId;
|
|
cls.DungeonInfo.Employees[i].TalentCode = st.DungeonInfo.Employees[i].TalentCode;
|
|
}
|
|
for (int i = 0; i < st.DungeonInfo.DungeonHeroInfo.Count; ++i)
|
|
{
|
|
cls.DungeonInfo.DungeonHeroInfo.Add(new ProtoCSClass.DungeonHeroOne());
|
|
cls.DungeonInfo.DungeonHeroInfo[i].SerialNum = st.DungeonInfo.DungeonHeroInfo[i].SerialNum;
|
|
cls.DungeonInfo.DungeonHeroInfo[i].Type = st.DungeonInfo.DungeonHeroInfo[i].Type;
|
|
cls.DungeonInfo.DungeonHeroInfo[i].Hp = st.DungeonInfo.DungeonHeroInfo[i].Hp;
|
|
cls.DungeonInfo.DungeonHeroInfo[i].Energy = st.DungeonInfo.DungeonHeroInfo[i].Energy;
|
|
}
|
|
for (int i = 0; i < st.DungeonInfo.Relics.Count; ++i)
|
|
{
|
|
cls.DungeonInfo.Relics.Add(new ProtoCSClass.RelicInfo());
|
|
cls.DungeonInfo.Relics[i].RelicId = st.DungeonInfo.Relics[i].RelicId;
|
|
cls.DungeonInfo.Relics[i].RelicLevel = st.DungeonInfo.Relics[i].RelicLevel;
|
|
cls.DungeonInfo.Relics[i].RelicClass = st.DungeonInfo.Relics[i].RelicClass;
|
|
cls.DungeonInfo.Relics[i].RelicWinNum = st.DungeonInfo.Relics[i].RelicWinNum;
|
|
cls.DungeonInfo.Relics[i].OwnerHero = st.DungeonInfo.Relics[i].OwnerHero;
|
|
}
|
|
for (int i = 0; i < st.DungeonInfo.PropId.Count; ++i)
|
|
{
|
|
cls.DungeonInfo.PropId.Add(st.DungeonInfo.PropId[i]);
|
|
}
|
|
cls.DungeonInfo.Diffculty = st.DungeonInfo.Diffculty;
|
|
cls.DungeonInfo.DungeonEventId = st.DungeonInfo.DungeonEventId;
|
|
cls.DungeonInfo.EnemyInfo.EventId = st.DungeonInfo.EnemyInfo.EventId;
|
|
for (int i = 0; i < st.DungeonInfo.EnemyInfo.Enemys.Count; ++i)
|
|
{
|
|
cls.DungeonInfo.EnemyInfo.Enemys.Add(new ProtoCSClass.DungeonEnemyOne());
|
|
cls.DungeonInfo.EnemyInfo.Enemys[i].LineupPos = st.DungeonInfo.EnemyInfo.Enemys[i].LineupPos;
|
|
cls.DungeonInfo.EnemyInfo.Enemys[i].Hp = st.DungeonInfo.EnemyInfo.Enemys[i].Hp;
|
|
cls.DungeonInfo.EnemyInfo.Enemys[i].Energy = st.DungeonInfo.EnemyInfo.Enemys[i].Energy;
|
|
}
|
|
cls.DungeonInfo.EnemyInfo.RoomId = st.DungeonInfo.EnemyInfo.RoomId;
|
|
for (int i = 0; i < st.DungeonInfo.EnemyRelics.Count; ++i)
|
|
{
|
|
cls.DungeonInfo.EnemyRelics.Add(new ProtoCSClass.RelicInfo());
|
|
cls.DungeonInfo.EnemyRelics[i].RelicId = st.DungeonInfo.EnemyRelics[i].RelicId;
|
|
cls.DungeonInfo.EnemyRelics[i].RelicLevel = st.DungeonInfo.EnemyRelics[i].RelicLevel;
|
|
cls.DungeonInfo.EnemyRelics[i].RelicClass = st.DungeonInfo.EnemyRelics[i].RelicClass;
|
|
cls.DungeonInfo.EnemyRelics[i].RelicWinNum = st.DungeonInfo.EnemyRelics[i].RelicWinNum;
|
|
cls.DungeonInfo.EnemyRelics[i].OwnerHero = st.DungeonInfo.EnemyRelics[i].OwnerHero;
|
|
}
|
|
for (int i = 0; i < st.ViewMatrix.Count; ++i)
|
|
{
|
|
cls.ViewMatrix.Add(st.ViewMatrix[i]);
|
|
}
|
|
cls.IsGMCommand = st.IsGMCommand;
|
|
cls.RandomSeed = st.RandomSeed;
|
|
return cls;
|
|
}
|
|
public static ProtoCSClass.CSBattleJsonInput CSBattleJsonInputToClass(ref ProtoCSStruct.CSBattleJsonInput st)
|
|
{
|
|
var cls = new ProtoCSClass.CSBattleJsonInput();
|
|
cls.Frame = st.Frame;
|
|
cls.Type = st.Type;
|
|
for (int i = 0; i < st.Params.Count; ++i)
|
|
{
|
|
cls.Params.Add(st.Params[i]);
|
|
}
|
|
return cls;
|
|
}
|
|
}
|
|
}
|
|
|