Skip to content

Commit

Permalink
#2681 Renamed CombatLogEventEventTypes
Browse files Browse the repository at this point in the history
  • Loading branch information
Wotuu committed Jan 30, 2025
1 parent 2853b63 commit 36b8d4d
Showing 7 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion app/Http/Controllers/Dungeon/DungeonExploreController.php
Original file line number Diff line number Diff line change
@@ -112,7 +112,7 @@ public function viewDungeonFloor(
$combatLogEventFilter = new CombatLogEventFilter(
$seasonService,
$dungeon,
CombatLogEventEventType::EnemyKilled,
CombatLogEventEventType::NpcDeath,
CombatLogEventDataType::PlayerPosition,
);

4 changes: 2 additions & 2 deletions app/Models/CombatLog/CombatLogEventEventType.php
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@

enum CombatLogEventEventType: string
{
case EnemyKilled = 'enemy_killed';
case NpcDeath = 'npc_death';
case PlayerDeath = 'player_death';
case SpellCast = 'spell_cast';
case PlayerSpell = 'player_spell';
}
Original file line number Diff line number Diff line change
@@ -94,7 +94,7 @@ public function getCombatLogEvents(): Collection
// Original event location
'pos_x' => round($npc->coord->x, 2),
'pos_y' => round($npc->coord->y, 2),
'event_type' => CombatLogEventEventType::EnemyKilled->value,
'event_type' => CombatLogEventEventType::NpcDeath->value,
'context' => json_encode([
'@timestamp' => $npc->getDiedAt(),
// Resolved enemy location
@@ -123,7 +123,7 @@ public function getCombatLogEvents(): Collection
// Original event location
'pos_x' => round($spell->coord->x, 2),
'pos_y' => round($spell->coord->y, 2),
'event_type' => CombatLogEventEventType::SpellCast->value,
'event_type' => CombatLogEventEventType::PlayerSpell->value,
'context' => json_encode([
'@timestamp' => $spell->getCastAt(),
'spell_id' => $spell->spellId,
4 changes: 2 additions & 2 deletions app/Service/RaiderIO/Dtos/HeatmapDataFilter.php
Original file line number Diff line number Diff line change
@@ -224,8 +224,8 @@ public static function fromArray(array $requestArray): HeatmapDataFilter
{
$heatmapDataFilter = new HeatmapDataFilter(
dungeon: Dungeon::firstWhere('id', $requestArray['dungeonId']),
eventType: CombatLogEventEventType::from($requestArray['type'] ?? 'enemy_killed'),
dataType: CombatLogEventDataType::from($requestArray['dataType'] ?? 'player_position')
eventType: CombatLogEventEventType::from($requestArray['type'] ?? CombatLogEventEventType::NpcDeath->value),
dataType: CombatLogEventDataType::from($requestArray['dataType'] ?? CombatLogEventDataType::PlayerPosition->value)
);

$heatmapDataFilter->setKeyLevelMin(isset($requestArray['minMythicLevel']) ? (int)$requestArray['minMythicLevel'] : null);
4 changes: 2 additions & 2 deletions lang/en_US/combatlogeventtypes.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

return [
'npc_death' => 'Enemy death',
'player_death' => 'Player death',
'enemy_killed' => 'Enemy killed',
'spell_cast' => 'Bloodlust casts',
'player_spell' => 'Bloodlust casts',
];
14 changes: 7 additions & 7 deletions resources/views/common/maps/controls/heatmapsearch.blade.php
Original file line number Diff line number Diff line change
@@ -83,7 +83,7 @@
'filterWeeklyAffixGroupsSelector' => '#filter_weekly_affix_groups',
'filterDurationSelector' => '#filter_duration',
'filterCollapseNames' => ['level', 'affixes', 'duration'],
'filterCollapseNames' => ['keyLevel', 'includeAffixIds', 'duration'],
'filterCookiePrefix' => $filterExpandedCookiePrefix,
'leafletHeatOptionsMinOpacitySelector' => '#heatmap_heat_option_min_opacity',
@@ -165,10 +165,10 @@ class="route_sidebar top right row no-gutters map_fade_out
data-toggle="buttons">
<label class="btn btn-secondary active">
<input type="radio" name="event_type"
class="{{ CombatLogEventEventType::EnemyKilled->value }}"
value="{{ CombatLogEventEventType::EnemyKilled->value }}"
class="{{ CombatLogEventEventType::NpcDeath->value }}"
value="{{ CombatLogEventEventType::NpcDeath->value }}"
checked>
<i class="fas fa-users"></i> {{ __('combatlogeventtypes.enemy_killed') }}
<i class="fas fa-users"></i> {{ __('combatlogeventtypes.npc_death') }}
</label>
<label class="btn btn-secondary">
<input type="radio" name="event_type"
@@ -178,11 +178,11 @@ class="{{ CombatLogEventEventType::PlayerDeath->value }}"
</label>
<label class="btn btn-secondary">
<input type="radio" name="event_type"
class="{{ CombatLogEventEventType::SpellCast->value }}"
value="{{ CombatLogEventEventType::SpellCast->value }}">
class="{{ CombatLogEventEventType::PlayerSpell->value }}"
value="{{ CombatLogEventEventType::PlayerSpell->value }}">
<img src="{{ url('images/heatmap/bloodlust_smaller.png') }}"
alt="{{ __('view_common.maps.controls.heatmapsearch.bloodlust_alt') }}">
{{ __('combatlogeventtypes.spell_cast') }}
{{ __('combatlogeventtypes.player_spell') }}
</label>
</div>
</div>
Original file line number Diff line number Diff line change
@@ -21,7 +21,7 @@ final class AjaxHeatmapControllerTest extends DungeonRouteTestBase
{
use CreatesCombatLogEvent;

const EVENT_TYPE = CombatLogEventEventType::EnemyKilled;
const EVENT_TYPE = CombatLogEventEventType::NpcDeath;
const DATA_TYPE = CombatLogEventDataType::PlayerPosition;

/**

0 comments on commit 36b8d4d

Please sign in to comment.