private void AddFellowLandscape(NetworkMessageEventArgs e) { try { int fellow = (int)e.Message.Struct("fellow")["fellow"]; if(fellow != Core.CharacterFilter.Id) { if(!FellowMemberList.Any(x => x.Id == fellow)) { FellowMember fella = new FellowMember(); fella.Id = fellow; fella.Name = (string)e.Message.Struct("fellow")["name"]; FellowMemberList.Add(fella); } } }catch(Exception ex) {LogError(ex);} }
private void CreateorJoinFellowLandscape(NetworkMessageEventArgs e) { try { FellowMemberList.Clear(); var fellowmembers = e.Message.Struct("fellows"); int fellowcount = (int)e.Message.Value<int>("fellowCount"); for(int i = 0; i < fellowcount; i++) { var fellow = fellowmembers.Struct(i).Struct("fellow"); if((string)fellow.Value<string>("name") != Core.CharacterFilter.Name) { FellowMember fella = new FellowMember(); fella.Name = (string)fellow.Value<string>("name"); fella.Id = (int)fellow.Value<int>("fellow"); if((int)fellow.Value<int>("shareLoot") == 1) {fella.Looting = true;} FellowMemberList.Add(fella); } } }catch(Exception ex) {LogError(ex);} }