/// <summary> /// Update a tribe marker and refresh the map /// </summary> public void UpdateMarker(Map map, Tribe tribe, MarkerSettings settings) { if (World.Default.You.HasTribe && tribe == World.Default.You.Tribe) { settings = MarkerSettings.ChangeName(settings, Marker.DefaultNames.YourTribe); YourTribeMarker = new Marker(settings); } else { _markers.RemoveAll(x => x.Tribe == tribe); _markers.Add(new Marker(tribe, settings)); } World.Default.InvalidateMarkers(); }
/// <summary> /// Update a player marker and refresh the map /// </summary> public void UpdateMarker(Map map, Player player, MarkerSettings settings) { if (player == World.Default.You) { settings = MarkerSettings.ChangeName(settings, Marker.DefaultNames.You); YourMarker = new Marker(settings); } else { _markers.RemoveAll(x => x.Player == player); _markers.Add(new Marker(player, settings)); } World.Default.InvalidateMarkers(); }