public void ChangeData(PacketStructUnit unitData, GlobalDefine.PartyCharaIndex partyCharaIndex, PacketStructUnit[] partyUnits) { PartyMemberStatusListItemContext selectUnitStatus = UnitStatusParams.Find(value => value.PartyCharaIndex == partyCharaIndex); SetUnitData(ref selectUnitStatus, unitData, partyUnits); UpdateOtherMemberStatus(partyCharaIndex, partyUnits); SetStatusParam(); }
public void AddData(PacketStructUnit unitData, GlobalDefine.PartyCharaIndex partyCharaIndex, PacketStructUnit[] partyUnits) { PartyMemberStatusListItemContext unitStatus = new PartyMemberStatusListItemContext(); unitStatus.PartyCharaIndex = partyCharaIndex; SetUnitData(ref unitStatus, unitData, partyUnits); UnitStatusParams.Add(unitStatus); }
private void UpdateOtherMemberStatus(GlobalDefine.PartyCharaIndex changeCharaIndex, PacketStructUnit[] partyUnits) { for (var i = (int)GlobalDefine.PartyCharaIndex.LEADER; i < partyUnits.Length; i++) { var charaIndex = (GlobalDefine.PartyCharaIndex)i; if (changeCharaIndex == charaIndex) { continue; } var selectUnitStatus = UnitStatusParams.Find(value => value.PartyCharaIndex == charaIndex); SetUnitData(ref selectUnitStatus, partyUnits[i], partyUnits); } }