public PlayerInfo(string token, IRoomId roomId, long playerId, string playerName, int roleModelId, long teamId, int num, int level, int backId, int titleId, int badgeId, int[] avatarIds, int[] weaponAvatarIds, int[] sprayLacquers, bool hasTestWeapon, int jobAttrbute, CampInfo campInfo) : this() { Token = token; RoomId = roomId; PlayerId = playerId; PlayerName = playerName; RoleModelId = roleModelId; TeamId = teamId; Num = num; Level = level; BackId = backId; TitleId = titleId; BadgeId = badgeId; if (avatarIds != null) { AvatarIds.AddRange(avatarIds); } if (weaponAvatarIds != null) { WeaponAvatarIds.AddRange(weaponAvatarIds); } if (sprayLacquers != null) { SprayLacquers.AddRange(sprayLacquers); } if (hasTestWeapon) { WeaponBags[1] = new PlayerWeaponBagData { BagIndex = 1, weaponList = new List <PlayerWeaponData> { new PlayerWeaponData { Index = 1, WeaponTplId = 1, WeaponAvatarTplId = 1, } } }; } JobAttribute = jobAttrbute; CampInfo = campInfo; }
private CampInfo CampInfoConvert(Com.Wooduan.Ssjj2.Common.Net.Proto.CampInfo campInfo) { CampInfo ci = new CampInfo { CurrCamp = 1, Preset = new List <Core.Room.Preset>() }; if (campInfo != null) { ci.CurrCamp = campInfo.CurrCamp; foreach (PresetInfo p in campInfo.Preset) { ci.Preset.Add(new Core.Room.Preset(p.Camp, p.RoleModelId, p.AvatarIds.ToList(), p.Pose)); } } return(ci); }