Skip to content

Commit

Permalink
Merge pull request #2491 from RaiderIO/development
Browse files Browse the repository at this point in the history
Release v11.3 - TWW affix update - mapping updates
  • Loading branch information
Wotuu authored Sep 18, 2024
2 parents 188f2bb + 624aef3 commit 8dd8115
Show file tree
Hide file tree
Showing 137 changed files with 33,786 additions and 2,676 deletions.
4 changes: 2 additions & 2 deletions app/Console/Commands/Mapping/Save.php
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ private function saveDungeonDungeonRoutes(Dungeon $dungeon, string $rootDirPath)
'expires_at', 'views', 'views_embed', 'popularity', 'pageviews', 'dungeon', 'mappingVersion',
'season']);
$demoRoute->load(['playerspecializations', 'playerraces', 'playerclasses',
'routeattributesraw', 'affixgroups', 'brushlines', 'paths', 'killZones', 'enemyRaidMarkers',
'routeattributesraw', 'affixGroups', 'brushlines', 'paths', 'killZones', 'enemyRaidMarkers',
'pridefulEnemies', 'mapicons']);

// Routes and killzone IDs (and dungeonRouteIDs) are not determined by me, users will be adding routes and killzones.
Expand All @@ -298,7 +298,7 @@ private function saveDungeonDungeonRoutes(Dungeon $dungeon, string $rootDirPath)
$toHide->add($item);
}

foreach ($demoRoute->affixgroups as $item) {
foreach ($demoRoute->affixGroups as $item) {
$toHide->add($item);
}

Expand Down
179 changes: 91 additions & 88 deletions app/Models/Affix.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,17 @@
use App\Models\Traits\SeederModel;
use Eloquent;
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
use Illuminate\Support\Collection;

/**
* @property int $id The ID of this Affix.
* @property int $icon_file_id The file ID of the icon associated with this Affix.
* @property int $affix_id The ID of the affix in-game.
* @property string $key The identifying key of the Affix.
* @property string $name The name of the Affix.
* @property string $description The description of this Affix.
* @property int $id The ID of this Affix.
* @property int $icon_file_id The file ID of the icon associated with this Affix.
* @property int $affix_id The ID of the affix in-game.
* @property string $key The identifying key of the Affix.
* @property string $name The name of the Affix.
* @property string $description The description of this Affix.
*
* @property Collection<AffixGroup> $affixGroups
*
* @mixin Eloquent
*/
Expand All @@ -29,85 +32,85 @@ class Affix extends CacheModel

protected $fillable = ['id', 'icon_file_id', 'affix_id', 'key', 'name', 'description'];

public const AFFIX_BOLSTERING = 'Bolstering';
public const AFFIX_BURSTING = 'Bursting';
public const AFFIX_EXPLOSIVE = 'Explosive';
public const AFFIX_FORTIFIED = 'Fortified';
public const AFFIX_GRIEVOUS = 'Grievous';
public const AFFIX_INFESTED = 'Infested';
public const AFFIX_NECROTIC = 'Necrotic';
public const AFFIX_QUAKING = 'Quaking';
public const AFFIX_RAGING = 'Raging';
public const AFFIX_RELENTLESS = 'Relentless';
public const AFFIX_SANGUINE = 'Sanguine';
public const AFFIX_SKITTISH = 'Skittish';
public const AFFIX_TEEMING = 'Teeming';
public const AFFIX_TYRANNICAL = 'Tyrannical';
public const AFFIX_VOLCANIC = 'Volcanic';
public const AFFIX_REAPING = 'Reaping';
public const AFFIX_BEGUILING = 'Beguiling';
public const AFFIX_AWAKENED = 'Awakened';
public const AFFIX_INSPIRING = 'Inspiring';
public const AFFIX_SPITEFUL = 'Spiteful';
public const AFFIX_STORMING = 'Storming';
public const AFFIX_PRIDEFUL = 'Prideful';
public const AFFIX_TORMENTED = 'Tormented';
public const AFFIX_UNKNOWN = 'Unknown';
public const AFFIX_INFERNAL = 'Infernal';
public const AFFIX_ENCRYPTED = 'Encrypted';
public const AFFIX_SHROUDED = 'Shrouded';
public const AFFIX_THUNDERING = 'Thundering';
public const AFFIX_AFFLICTED = 'Afflicted';
public const AFFIX_ENTANGLING = 'Entangling';
public const AFFIX_INCORPOREAL = 'Incorporeal';
public const AFFIX_XAL_ATATHS_BARGAIN_ASCENDANT = 'Xal\'atath\'s Bargain: Ascendant';
public const AFFIX_XAL_ATATHS_BARGAIN_DEVOUR = 'Xal\'atath\'s Bargain: Devour';
public const AFFIX_XAL_ATATHS_BARGAIN_VOIDBOUND = 'Xal\'atath\'s Bargain: Voidbound';
public const AFFIX_XAL_ATATHS_BARGAIN_OBLIVION = 'Xal\'atath\'s Bargain: Oblivion';
public const AFFIX_XAL_ATATHS_BARGAIN_FRENZIED = 'Xal\'atath\'s Bargain: Frenzied';
public const AFFIX_XAL_ATATHS_GUILE = 'Xal\'atath\'s Guile';
public const AFFIX_CHALLENGERS_PERIL = 'Challenger\'s Peril';
public const AFFIX_BOLSTERING = 'Bolstering';
public const AFFIX_BURSTING = 'Bursting';
public const AFFIX_EXPLOSIVE = 'Explosive';
public const AFFIX_FORTIFIED = 'Fortified';
public const AFFIX_GRIEVOUS = 'Grievous';
public const AFFIX_INFESTED = 'Infested';
public const AFFIX_NECROTIC = 'Necrotic';
public const AFFIX_QUAKING = 'Quaking';
public const AFFIX_RAGING = 'Raging';
public const AFFIX_RELENTLESS = 'Relentless';
public const AFFIX_SANGUINE = 'Sanguine';
public const AFFIX_SKITTISH = 'Skittish';
public const AFFIX_TEEMING = 'Teeming';
public const AFFIX_TYRANNICAL = 'Tyrannical';
public const AFFIX_VOLCANIC = 'Volcanic';
public const AFFIX_REAPING = 'Reaping';
public const AFFIX_BEGUILING = 'Beguiling';
public const AFFIX_AWAKENED = 'Awakened';
public const AFFIX_INSPIRING = 'Inspiring';
public const AFFIX_SPITEFUL = 'Spiteful';
public const AFFIX_STORMING = 'Storming';
public const AFFIX_PRIDEFUL = 'Prideful';
public const AFFIX_TORMENTED = 'Tormented';
public const AFFIX_UNKNOWN = 'Unknown';
public const AFFIX_INFERNAL = 'Infernal';
public const AFFIX_ENCRYPTED = 'Encrypted';
public const AFFIX_SHROUDED = 'Shrouded';
public const AFFIX_THUNDERING = 'Thundering';
public const AFFIX_AFFLICTED = 'Afflicted';
public const AFFIX_ENTANGLING = 'Entangling';
public const AFFIX_INCORPOREAL = 'Incorporeal';
public const AFFIX_XALATATHS_BARGAIN_ASCENDANT = 'Xal\'atath\'s Bargain: Ascendant';
public const AFFIX_XALATATHS_BARGAIN_DEVOUR = 'Xal\'atath\'s Bargain: Devour';
public const AFFIX_XALATATHS_BARGAIN_VOIDBOUND = 'Xal\'atath\'s Bargain: Voidbound';
public const AFFIX_XALATATHS_BARGAIN_OBLIVION = 'Xal\'atath\'s Bargain: Oblivion';
public const AFFIX_XALATATHS_BARGAIN_FRENZIED = 'Xal\'atath\'s Bargain: Frenzied';
public const AFFIX_XALATATHS_GUILE = 'Xal\'atath\'s Guile';
public const AFFIX_CHALLENGERS_PERIL = 'Challenger\'s Peril';


public const ALL = [
self::AFFIX_BOLSTERING => 1,
self::AFFIX_BURSTING => 2,
self::AFFIX_EXPLOSIVE => 3,
self::AFFIX_FORTIFIED => 4,
self::AFFIX_GRIEVOUS => 5,
self::AFFIX_INFESTED => 6,
self::AFFIX_NECROTIC => 7,
self::AFFIX_QUAKING => 8,
self::AFFIX_RAGING => 9,
self::AFFIX_RELENTLESS => 10,
self::AFFIX_SANGUINE => 11,
self::AFFIX_SKITTISH => 12,
self::AFFIX_TEEMING => 13,
self::AFFIX_TYRANNICAL => 14,
self::AFFIX_VOLCANIC => 15,
self::AFFIX_REAPING => 16,
self::AFFIX_BEGUILING => 17,
self::AFFIX_AWAKENED => 18,
self::AFFIX_INSPIRING => 19,
self::AFFIX_SPITEFUL => 20,
self::AFFIX_STORMING => 21,
self::AFFIX_PRIDEFUL => 22,
self::AFFIX_TORMENTED => 23,
self::AFFIX_UNKNOWN => 24,
self::AFFIX_INFERNAL => 25,
self::AFFIX_ENCRYPTED => 26,
self::AFFIX_SHROUDED => 27,
self::AFFIX_THUNDERING => 28,
self::AFFIX_AFFLICTED => 29,
self::AFFIX_ENTANGLING => 30,
self::AFFIX_INCORPOREAL => 31,
self::AFFIX_XAL_ATATHS_BARGAIN_ASCENDANT => 32,
self::AFFIX_XAL_ATATHS_BARGAIN_DEVOUR => 33,
self::AFFIX_XAL_ATATHS_BARGAIN_VOIDBOUND => 34,
self::AFFIX_XAL_ATATHS_BARGAIN_OBLIVION => 35,
self::AFFIX_XAL_ATATHS_BARGAIN_FRENZIED => 36,
self::AFFIX_XAL_ATATHS_GUILE => 37,
self::AFFIX_CHALLENGERS_PERIL => 38,
self::AFFIX_BOLSTERING => 1,
self::AFFIX_BURSTING => 2,
self::AFFIX_EXPLOSIVE => 3,
self::AFFIX_FORTIFIED => 4,
self::AFFIX_GRIEVOUS => 5,
self::AFFIX_INFESTED => 6,
self::AFFIX_NECROTIC => 7,
self::AFFIX_QUAKING => 8,
self::AFFIX_RAGING => 9,
self::AFFIX_RELENTLESS => 10,
self::AFFIX_SANGUINE => 11,
self::AFFIX_SKITTISH => 12,
self::AFFIX_TEEMING => 13,
self::AFFIX_TYRANNICAL => 14,
self::AFFIX_VOLCANIC => 15,
self::AFFIX_REAPING => 16,
self::AFFIX_BEGUILING => 17,
self::AFFIX_AWAKENED => 18,
self::AFFIX_INSPIRING => 19,
self::AFFIX_SPITEFUL => 20,
self::AFFIX_STORMING => 21,
self::AFFIX_PRIDEFUL => 22,
self::AFFIX_TORMENTED => 23,
self::AFFIX_UNKNOWN => 24,
self::AFFIX_INFERNAL => 25,
self::AFFIX_ENCRYPTED => 26,
self::AFFIX_SHROUDED => 27,
self::AFFIX_THUNDERING => 28,
self::AFFIX_AFFLICTED => 29,
self::AFFIX_ENTANGLING => 30,
self::AFFIX_INCORPOREAL => 31,
self::AFFIX_XALATATHS_BARGAIN_ASCENDANT => 32,
self::AFFIX_XALATATHS_BARGAIN_DEVOUR => 33,
self::AFFIX_XALATATHS_BARGAIN_VOIDBOUND => 34,
self::AFFIX_XALATATHS_BARGAIN_OBLIVION => 35,
self::AFFIX_XALATATHS_BARGAIN_FRENZIED => 36,
self::AFFIX_XALATATHS_GUILE => 37,
self::AFFIX_CHALLENGERS_PERIL => 38,
];

public const SEASONAL_AFFIXES = [
Expand All @@ -120,12 +123,12 @@ class Affix extends CacheModel
self::AFFIX_ENCRYPTED,
self::AFFIX_SHROUDED,
self::AFFIX_THUNDERING,
self::AFFIX_XAL_ATATHS_BARGAIN_ASCENDANT,
self::AFFIX_XAL_ATATHS_BARGAIN_DEVOUR,
self::AFFIX_XAL_ATATHS_BARGAIN_VOIDBOUND,
self::AFFIX_XAL_ATATHS_BARGAIN_OBLIVION,
self::AFFIX_XAL_ATATHS_BARGAIN_FRENZIED,
self::AFFIX_XAL_ATATHS_GUILE,
self::AFFIX_XALATATHS_BARGAIN_ASCENDANT,
self::AFFIX_XALATATHS_BARGAIN_DEVOUR,
self::AFFIX_XALATATHS_BARGAIN_VOIDBOUND,
self::AFFIX_XALATATHS_BARGAIN_OBLIVION,
self::AFFIX_XALATATHS_BARGAIN_FRENZIED,
self::AFFIX_XALATATHS_GUILE,
];

private const SEASONAL_TYPE_AFFIX_MAPPING = [
Expand Down
1 change: 1 addition & 0 deletions app/Models/AffixGroup/AffixGroup.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
* @property int $expansion_id
* @property int|null $seasonal_index
* @property bool $confirmed
*
* @property Season $season
* @property Expansion $expansion
* @property Collection<AffixGroupEaseTier> $easetiers
Expand Down
20 changes: 14 additions & 6 deletions app/Models/AffixGroup/AffixGroupBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,17 @@
use Eloquent;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
use Illuminate\Database\Eloquent\Relations\HasMany;

/**
* @property int $id The ID of this Affix.
* @property int $season_id
* @property int $seasonal_index
* @property int $seasonal_index_in_season Only set in rare case - not a database column! See KeystoneGuruServiceProvider.php
* @property string $text To string of the affix group
* @property Collection<Affix> $affixes
* @property int $id The ID of this Affix.
* @property int $season_id
* @property int $seasonal_index
* @property int $seasonal_index_in_season Only set in rare case - not a database column! See KeystoneGuruServiceProvider.php
* @property string $text To string of the affix group
*
* @property Collection<Affix> $affixes
* @property Collection<AffixGroupCoupling> $affixGroupCouplings
*
* @mixin Eloquent
*/
Expand All @@ -39,6 +42,11 @@ public function affixes(): BelongsToMany
->orderBy(sprintf('%s.id', $this->getAffixGroupCouplingsTableName()), 'asc');
}

public function affixGroupCouplings(): HasMany
{
return $this->hasMany(AffixGroupCoupling::class);
}

/**
* @return string The text representation of this affix group.
*/
Expand Down
12 changes: 7 additions & 5 deletions app/Models/AffixGroup/AffixGroupCoupling.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@
use Illuminate\Database\Eloquent\Relations\HasOne;

/**
* @property int $id The ID of this Affix.
* @property int $affix_id
* @property int $id
* @property int $affix_id Blizzard's affix ID
* @property int $affix_group_id
* @property int $key_level
*
* @property Affix $affix
* @property AffixGroup $affixgroup
* @property AffixGroup $affixGroup
*
* @mixin Eloquent
*/
Expand All @@ -23,14 +25,14 @@ class AffixGroupCoupling extends CacheModel

public $timestamps = false;

protected $fillable = ['affix_id', 'affix_group_id'];
protected $fillable = ['affix_id', 'affix_group_id', 'key_level'];

public function affix(): HasOne
{
return $this->hasOne(Affix::class);
}

public function affixgroup(): HasOne
public function affixGroup(): HasOne
{
return $this->hasOne(AffixGroup::class);
}
Expand Down
8 changes: 4 additions & 4 deletions app/Models/DungeonRoute/DungeonRoute.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@
* @property Collection $playerclasses
* @property Collection $playerraces
* @property Collection<AffixGroup> $affixes
* @property Collection<DungeonRouteAffixGroup> $affixgroups
* @property Collection<DungeonRouteAffixGroup> $affixGroups
* @property Collection<DungeonRouteRating> $ratings
* @property Collection<DungeonRouteFavorite> $favorites
* @property Collection<LiveSession> $livesessions
Expand Down Expand Up @@ -325,7 +325,7 @@ public function playerraces(): HasMany
return $this->hasMany(DungeonRoutePlayerRace::class);
}

public function affixgroups(): HasMany
public function affixGroups(): HasMany
{
return $this->hasMany(DungeonRouteAffixGroup::class);
}
Expand Down Expand Up @@ -1030,7 +1030,7 @@ public function cloneRoute(ThumbnailServiceInterface $thumbnailService, bool $un
$this->cloneRelationsInto($dungeonroute, [
$this->playerraces,
$this->playerclasses,
$this->affixgroups,
$this->affixGroups,
$this->paths,
$this->brushlines,
$this->killZones,
Expand Down Expand Up @@ -1465,7 +1465,7 @@ private function ensureAffixGroup(SeasonServiceInterface $seasonService, Expansi
]);

// Make sure the relation should be reloaded
$this->unsetRelation('affixgroups');
$this->unsetRelation('affixGroups');
}
}

Expand Down
36 changes: 12 additions & 24 deletions app/Models/Expansion.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,31 +59,19 @@ class Expansion extends CacheModel
// 'updated_at' => 'date',
// ];

public const EXPANSION_CLASSIC = 'classic';

public const EXPANSION_TBC = 'tbc';

public const EXPANSION_WOTLK = 'wotlk';

public const EXPANSION_CATACLYSM = 'cata';

public const EXPANSION_MOP = 'mop';

public const EXPANSION_WOD = 'wod';

public const EXPANSION_LEGION = 'legion';

public const EXPANSION_BFA = 'bfa';

public const EXPANSION_SHADOWLANDS = 'shadowlands';

public const EXPANSION_CLASSIC = 'classic';
public const EXPANSION_TBC = 'tbc';
public const EXPANSION_WOTLK = 'wotlk';
public const EXPANSION_CATACLYSM = 'cata';
public const EXPANSION_MOP = 'mop';
public const EXPANSION_WOD = 'wod';
public const EXPANSION_LEGION = 'legion';
public const EXPANSION_BFA = 'bfa';
public const EXPANSION_SHADOWLANDS = 'shadowlands';
public const EXPANSION_DRAGONFLIGHT = 'dragonflight';

public const EXPANSION_TWW = 'tww';

public const EXPANSION_MIDNIGHT = 'midnight';

public const EXPANSION_TLT = 'tlt';
public const EXPANSION_TWW = 'tww';
public const EXPANSION_MIDNIGHT = 'midnight';
public const EXPANSION_TLT = 'tlt';

public const ALL = [
self::EXPANSION_CLASSIC => 'Classic',
Expand Down
Loading

0 comments on commit 8dd8115

Please sign in to comment.