Skip to content

Commit 583d1bf

Browse files
committed
#2925 Added release v13.8.2
1 parent ede52c7 commit 583d1bf

File tree

7 files changed

+409
-76
lines changed

7 files changed

+409
-76
lines changed

app/Service/CombatLog/DataExtractors/SpellDataExtractor.php

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ public function extractData(ExtractedDataResult $result, DataExtractionCurrentDu
113113

114114
$this->assignDungeonToSpell($result, $currentDungeon, $parsedEvent, $prefix);
115115

116-
$this->assignSpellToNpc($result, $parsedEvent, $sourceGuid, $prefix);
116+
$this->assignSpellToNpc($result, $currentDungeon, $parsedEvent, $sourceGuid, $prefix);
117117
}
118118
}
119119
}
@@ -223,10 +223,11 @@ private function assignDungeonToSpell(
223223
}
224224

225225
private function assignSpellToNpc(
226-
ExtractedDataResult $result,
227-
CombatLogEvent $parsedEvent,
228-
Creature $sourceGuid,
229-
Spell $prefix
226+
ExtractedDataResult $result,
227+
DataExtractionCurrentDungeon $currentDungeon,
228+
CombatLogEvent $parsedEvent,
229+
Creature $sourceGuid,
230+
Spell $prefix
230231
): void {
231232
// Check if the spell can be assigned
232233
$spell = $this->allSpells->get($prefix->getSpellId());
@@ -259,6 +260,17 @@ private function assignSpellToNpc(
259260
'spell_id' => $prefix->getSpellId(),
260261
]);
261262

263+
// Assign the spell to the dungeon as well
264+
if (
265+
!SpellDungeon::where('spell_id', $prefix->getSpellId())
266+
->where('dungeon_id', $currentDungeon->dungeon->id)->exists()
267+
) {
268+
SpellDungeon::create([
269+
'spell_id' => $prefix->getSpellId(),
270+
'dungeon_id' => $currentDungeon->dungeon->id,
271+
]);
272+
}
273+
262274
CombatLogNpcSpellAssignment::create([
263275
'npc_id' => $npc->id,
264276
'spell_id' => $prefix->getSpellId(),
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<?php
2+
3+
use Illuminate\Database\Migrations\Migration;
4+
use Illuminate\Database\Schema\Blueprint;
5+
use Illuminate\Support\Facades\Schema;
6+
7+
return new class extends Migration
8+
{
9+
/**
10+
* Run the migrations.
11+
*/
12+
public function up(): void
13+
{
14+
Schema::table('dungeons', function (Blueprint $table) {
15+
$table->string('name')->change();
16+
});
17+
Schema::table('expansions', function (Blueprint $table) {
18+
$table->string('name')->change();
19+
});
20+
Schema::table('npcs', function (Blueprint $table) {
21+
$table->string('name')->change();
22+
});
23+
}
24+
25+
/**
26+
* Reverse the migrations.
27+
*/
28+
public function down(): void
29+
{
30+
Schema::table('dungeons', function (Blueprint $table) {
31+
$table->text('name')->change();
32+
});
33+
Schema::table('expansions', function (Blueprint $table) {
34+
$table->text('name')->change();
35+
});
36+
Schema::table('npcs', function (Blueprint $table) {
37+
$table->text('name')->change();
38+
});
39+
}
40+
};
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?php
2+
3+
use Illuminate\Database\Migrations\Migration;
4+
use Illuminate\Database\Schema\Blueprint;
5+
use Illuminate\Support\Facades\Schema;
6+
7+
return new class extends Migration
8+
{
9+
/**
10+
* Run the migrations.
11+
*/
12+
public function up(): void
13+
{
14+
}
15+
16+
/**
17+
* Reverse the migrations.
18+
*/
19+
public function down(): void
20+
{
21+
Schema::table('expansions', function (Blueprint $table) {
22+
$table->text('name')->change();
23+
});
24+
}
25+
};
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
<?php
2+
3+
use Illuminate\Database\Migrations\Migration;
4+
use Illuminate\Database\Schema\Blueprint;
5+
use Illuminate\Support\Facades\Schema;
6+
7+
return new class extends Migration
8+
{
9+
/**
10+
* Run the migrations.
11+
*/
12+
public function up(): void
13+
{
14+
Schema::table('dungeons', function (Blueprint $table) {
15+
$table->index('name');
16+
});
17+
Schema::table('expansions', function (Blueprint $table) {
18+
$table->index('name');
19+
});
20+
Schema::table('npcs', function (Blueprint $table) {
21+
$table->index('name');
22+
});
23+
Schema::table('spells', function (Blueprint $table) {
24+
$table->index('name');
25+
});
26+
}
27+
28+
/**
29+
* Reverse the migrations.
30+
*/
31+
public function down(): void
32+
{
33+
Schema::table('dungeons', function (Blueprint $table) {
34+
$table->dropIndex(['name']);
35+
});
36+
Schema::table('expansions', function (Blueprint $table) {
37+
$table->dropIndex(['name']);
38+
});
39+
Schema::table('npcs', function (Blueprint $table) {
40+
$table->dropIndex(['name']);
41+
});
42+
Schema::table('spells', function (Blueprint $table) {
43+
$table->dropIndex(['name']);
44+
});
45+
}
46+
};

database/seeders/dungeondata/mapping_commit_logs.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3052,5 +3052,11 @@
30523052
"merged": 0,
30533053
"created_at": "2025-08-02T09:25:12.000000Z",
30543054
"updated_at": "2025-08-02T09:25:12.000000Z"
3055+
},
3056+
{
3057+
"id": 510,
3058+
"merged": 0,
3059+
"created_at": "2025-08-11T08:30:12.000000Z",
3060+
"updated_at": "2025-08-11T08:30:12.000000Z"
30553061
}
30563062
]

0 commit comments

Comments
 (0)