mirror of
https://github.com/wanderer-industries/wanderer
synced 2025-12-07 00:05:34 +00:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4af12c21b2 | ||
|
|
497da1e5f7 |
@@ -2,6 +2,15 @@
|
||||
|
||||
<!-- changelog -->
|
||||
|
||||
## [v1.44.3](https://github.com/wanderer-industries/wanderer/compare/v1.44.2...v1.44.3) (2025-02-02)
|
||||
|
||||
|
||||
|
||||
|
||||
### Bug Fixes:
|
||||
|
||||
* restored kills lightning bolt functionality (#143)
|
||||
|
||||
## [v1.44.2](https://github.com/wanderer-industries/wanderer/compare/v1.44.1...v1.44.2) (2025-02-02)
|
||||
|
||||
|
||||
|
||||
@@ -160,26 +160,17 @@ defmodule WandererApp.Map.ZkbDataFetcher do
|
||||
defp maybe_broadcast_map_kills(new_kills_map, map_id) do
|
||||
{:ok, old_kills_map} = WandererApp.Cache.lookup("map_#{map_id}:zkb_kills", %{})
|
||||
|
||||
updated_kills_system_ids =
|
||||
old_kills_map
|
||||
|> Map.keys()
|
||||
|> Enum.filter(fn system_id ->
|
||||
# Use the union of keys from both the new and old maps
|
||||
all_system_ids = Map.keys(Map.merge(new_kills_map, old_kills_map))
|
||||
|
||||
changed_system_ids =
|
||||
Enum.filter(all_system_ids, fn system_id ->
|
||||
new_kills_count = Map.get(new_kills_map, system_id, 0)
|
||||
old_kills_count = Map.get(old_kills_map, system_id, 0)
|
||||
new_kills_count != old_kills_count and new_kills_count > 0
|
||||
new_kills_count != old_kills_count and
|
||||
(new_kills_count > 0 or (old_kills_count > 0 and new_kills_count == 0))
|
||||
end)
|
||||
|
||||
removed_kills_system_ids =
|
||||
old_kills_map
|
||||
|> Map.keys()
|
||||
|> Enum.filter(fn system_id ->
|
||||
old_kills_count = Map.get(old_kills_map, system_id, 0)
|
||||
new_kills_count = Map.get(new_kills_map, system_id, 0)
|
||||
old_kills_count > 0 and new_kills_count == 0
|
||||
end)
|
||||
|
||||
changed_system_ids = updated_kills_system_ids ++ removed_kills_system_ids
|
||||
|
||||
if changed_system_ids == [] do
|
||||
:ok
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user