Skip to content

Commit

Permalink
Merge pull request #2615 from RaiderIO/development
Browse files Browse the repository at this point in the history
Release v11.7 - Fixed route synchronization, added various raid-wide buff support to SimulationCraft integration, along with many other bugfixes.
  • Loading branch information
Wotuu authored Nov 18, 2024
2 parents df36a7b + 64a17d4 commit 788eb5a
Show file tree
Hide file tree
Showing 148 changed files with 2,357 additions and 988 deletions.
1 change: 1 addition & 0 deletions .env.docker.example
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ REDIS_HOST=redis
REDIS_PASSWORD=null
REDIS_PORT=6380
REDIS_DB=0
REDIS_PREFIX=keystoneguru-local-cache:

MODEL_CACHE_ENABLED=false
MODEL_CACHE_STORE=redis_model_cache
Expand Down
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379
REDIS_DB=0
REDIS_PREFIX=keystoneguru-local-cache:

MODEL_CACHE_ENABLED=true
MODEL_CACHE_STORE=redis_model_cache
Expand Down
14 changes: 0 additions & 14 deletions app/Events/Model/ModelChangedEvent.php

This file was deleted.

49 changes: 49 additions & 0 deletions app/Events/Models/Brushline/BrushlineChangedEvent.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<?php

namespace App\Events\Models\Brushline;

use App\Events\Models\ModelChangedEvent;
use App\Models\Brushline;
use App\Models\MapIcon;
use App\Models\User;
use App\Service\Coordinates\CoordinatesServiceInterface;
use Illuminate\Database\Eloquent\Model;

/**
* @property MapIcon $model
*/
class BrushlineChangedEvent extends ModelChangedEvent
{
/**
* @param CoordinatesServiceInterface $coordinatesService
* @param Model $context
* @param User $user
* @param Brushline|Model $model
*/
public function __construct(
private readonly CoordinatesServiceInterface $coordinatesService,
Model $context,
User $user,
protected Brushline|Model $model
) {
parent::__construct($context, $user, $model);
}

public function broadcastAs(): string
{
return 'brushline-changed';
}

public function broadcastWith(): array
{
return array_merge(
parent::broadcastWith(), [
'model_data' => $this->model->polyline->getCoordinatesData(
$this->coordinatesService,
$this->model->dungeonRoute->mappingVersion,
$this->model->floor
),
]
);
}
}
13 changes: 13 additions & 0 deletions app/Events/Models/Brushline/BrushlineDeletedEvent.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

namespace App\Events\Models\Brushline;

use App\Events\Models\ModelDeletedEvent;

class BrushlineDeletedEvent extends ModelDeletedEvent
{
public function broadcastAs(): string
{
return 'brushline-deleted';
}
}
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
<?php

namespace App\Events\Model;
namespace App\Events\Models;

use App\Events\ContextEvent;
use App\Models\Interfaces\EventModelInterface;
use App\Models\User;
use Illuminate\Database\Eloquent\Model;

abstract class ContextModelEvent extends ContextEvent
{
public function __construct(Model $context, User $user, protected EventModelInterface $model)
public function __construct(Model $context, User $user, protected Model $model)
{
parent::__construct($context, $user);
}
Expand All @@ -19,7 +18,6 @@ public function broadcastWith(): array
return array_merge(parent::broadcastWith(), [
'model' => $this->model,
'model_class' => $this->model::class,
'model_data' => $this->model->getEventData(),
]);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php

namespace App\Events\Models\DungeonFloorSwitchMarker;

use App\Events\Models\ModelChangedEvent;
use App\Models\DungeonFloorSwitchMarker;

/**
* @property DungeonFloorSwitchMarker $model
*/
class DungeonFloorSwitchMarkerChangedEvent extends ModelChangedEvent
{
public function broadcastAs(): string
{
return 'dungeonfloorswitchmarker-changed';
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

namespace App\Events\Models\DungeonFloorSwitchMarker;

use App\Events\Models\ModelDeletedEvent;

class DungeonFloorSwitchMarkerDeletedEvent extends ModelDeletedEvent
{
public function broadcastAs(): string
{
return 'dungeonfloorswitchmarker-deleted';
}
}
44 changes: 44 additions & 0 deletions app/Events/Models/Enemy/EnemyChangedEvent.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<?php

namespace App\Events\Models\Enemy;

use App\Events\Models\ModelChangedEvent;
use App\Models\Enemy;
use App\Models\User;
use App\Service\Coordinates\CoordinatesServiceInterface;
use Illuminate\Database\Eloquent\Model;

/**
* @property Enemy $model
*/
class EnemyChangedEvent extends ModelChangedEvent
{
/**
* @param CoordinatesServiceInterface $coordinatesService
* @param Model $context
* @param User $user
* @param Enemy|Model $model
*/
public function __construct(
private readonly CoordinatesServiceInterface $coordinatesService,
Model $context,
User $user,
protected Enemy|Model $model
) {
parent::__construct($context, $user, $model);
}

public function broadcastAs(): string
{
return 'enemy-changed';
}

public function broadcastWith(): array
{
return array_merge(
parent::broadcastWith(), [
'model_data' => $this->model->getCoordinatesData($this->coordinatesService),
]
);
}
}
13 changes: 13 additions & 0 deletions app/Events/Models/Enemy/EnemyDeletedEvent.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

namespace App\Events\Models\Enemy;

use App\Events\Models\ModelDeletedEvent;

class EnemyDeletedEvent extends ModelDeletedEvent
{
public function broadcastAs(): string
{
return 'enemy-deleted';
}
}
17 changes: 17 additions & 0 deletions app/Events/Models/EnemyPack/EnemyPackChangedEvent.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php

namespace App\Events\Models\EnemyPack;

use App\Events\Models\ModelChangedEvent;
use App\Models\EnemyPack;

/**
* @property EnemyPack $model
*/
class EnemyPackChangedEvent extends ModelChangedEvent
{
public function broadcastAs(): string
{
return 'enemypack-changed';
}
}
13 changes: 13 additions & 0 deletions app/Events/Models/EnemyPack/EnemyPackDeletedEvent.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

namespace App\Events\Models\EnemyPack;

use App\Events\Models\ModelDeletedEvent;

class EnemyPackDeletedEvent extends ModelDeletedEvent
{
public function broadcastAs(): string
{
return 'enemypack-deleted';
}
}
17 changes: 17 additions & 0 deletions app/Events/Models/EnemyPatrol/EnemyPatrolChangedEvent.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php

namespace App\Events\Models\EnemyPatrol;

use App\Events\Models\ModelChangedEvent;
use App\Models\EnemyPatrol;

/**
* @property EnemyPatrol $model
*/
class EnemyPatrolChangedEvent extends ModelChangedEvent
{
public function broadcastAs(): string
{
return 'enemypatrol-changed';
}
}
13 changes: 13 additions & 0 deletions app/Events/Models/EnemyPatrol/EnemyPatrolDeletedEvent.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

namespace App\Events\Models\EnemyPatrol;

use App\Events\Models\ModelDeletedEvent;

class EnemyPatrolDeletedEvent extends ModelDeletedEvent
{
public function broadcastAs(): string
{
return 'enemypatrol-deleted';
}
}
17 changes: 17 additions & 0 deletions app/Events/Models/FloorUnion/FloorUnionChangedEvent.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php

namespace App\Events\Models\FloorUnion;

use App\Events\Models\ModelChangedEvent;
use App\Models\Floor\FloorUnion;

/**
* @property FloorUnion $model
*/
class FloorUnionChangedEvent extends ModelChangedEvent
{
public function broadcastAs(): string
{
return 'floorunion-changed';
}
}
13 changes: 13 additions & 0 deletions app/Events/Models/FloorUnion/FloorUnionDeletedEvent.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

namespace App\Events\Models\FloorUnion;

use App\Events\Models\ModelDeletedEvent;

class FloorUnionDeletedEvent extends ModelDeletedEvent
{
public function broadcastAs(): string
{
return 'floorunion-deleted';
}
}
17 changes: 17 additions & 0 deletions app/Events/Models/FloorUnionArea/FloorUnionAreaChangedEvent.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php

namespace App\Events\Models\FloorUnionArea;

use App\Events\Models\ModelChangedEvent;
use App\Models\Floor\FloorUnionArea;

/**
* @property FloorUnionArea $model
*/
class FloorUnionAreaChangedEvent extends ModelChangedEvent
{
public function broadcastAs(): string
{
return 'floorunionarea-changed';
}
}
13 changes: 13 additions & 0 deletions app/Events/Models/FloorUnionArea/FloorUnionAreaDeletedEvent.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

namespace App\Events\Models\FloorUnionArea;

use App\Events\Models\ModelDeletedEvent;

class FloorUnionAreaDeletedEvent extends ModelDeletedEvent
{
public function broadcastAs(): string
{
return 'floorunionarea-deleted';
}
}
47 changes: 47 additions & 0 deletions app/Events/Models/KillZone/KillZoneChangedEvent.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<?php

namespace App\Events\Models\KillZone;

use App\Events\Models\ModelChangedEvent;
use App\Models\KillZone\KillZone;
use App\Models\User;
use App\Service\Coordinates\CoordinatesServiceInterface;
use Illuminate\Database\Eloquent\Model;

class KillZoneChangedEvent extends ModelChangedEvent
{
/**
* @param CoordinatesServiceInterface $coordinatesService
* @param Model $context
* @param User $user
* @param KillZone|Model $model
*/
public function __construct(
private readonly CoordinatesServiceInterface $coordinatesService,
Model $context,
User $user,
protected KillZone|Model $model
) {
parent::__construct($context, $user, $model);
}


public function broadcastAs(): string
{
return 'killzone-changed';
}

public function broadcastWith(): array
{
$parentResult = parent::broadcastWith();
if ($this->model->floor_id === null) {
return $parentResult;
}

return array_merge(
$parentResult, [
'model_data' => $this->model->getCoordinatesData($this->coordinatesService),
]
);
}
}
Loading

0 comments on commit 788eb5a

Please sign in to comment.