From 7cd2260d04c2e12755ff4c9c2f3c18316d661603 Mon Sep 17 00:00:00 2001 From: WildEgo Date: Sun, 28 Sep 2025 22:28:18 +0100 Subject: [PATCH] change: Rename Sash as Acce to mirror official, Support for pendant, Support for extended item proto. --- app/Models/Enums/CostumeSubTypesEnum.php | 2 +- app/Models/Game/Player/Player.php | 6 ++-- ...4_03_30_000030_create_item_proto_table.php | 6 ++++ .../2025_09_07_001306_create_sash_table.php | 12 ++++---- ..._133130_add_pendant_to_item_attr_table.php | 28 +++++++++++++++++++ 5 files changed, 45 insertions(+), 9 deletions(-) create mode 100644 database/migrations/2025_09_28_133130_add_pendant_to_item_attr_table.php diff --git a/app/Models/Enums/CostumeSubTypesEnum.php b/app/Models/Enums/CostumeSubTypesEnum.php index b9de820..2d03624 100644 --- a/app/Models/Enums/CostumeSubTypesEnum.php +++ b/app/Models/Enums/CostumeSubTypesEnum.php @@ -8,7 +8,7 @@ enum CostumeSubTypesEnum: int case COSTUME_HAIR = 1; case COSTUME_MOUNT = 2; case COSTUME_WEAPON = 3; - case COSTUME_SASH = 4; + case COSTUME_ACCE = 4; case COSTUME_NUM_TYPES = 5; public function getLabel(): string diff --git a/app/Models/Game/Player/Player.php b/app/Models/Game/Player/Player.php index 9d2ed7e..8a9241a 100644 --- a/app/Models/Game/Player/Player.php +++ b/app/Models/Game/Player/Player.php @@ -44,7 +44,7 @@ use Illuminate\Database\Eloquent\Relations\HasOne; * @property int $part_main * @property int $part_base * @property int $part_hair - * @property int $part_sash + * @property int $part_acce * @property int $skill_group * @property string|null $skill_level * @property int $alignment @@ -62,6 +62,7 @@ use Illuminate\Database\Eloquent\Relations\HasOne; * @property-read Account $account * @property-read HighscoreCache|null $highscore * @property-read \App\Models\Game\Player\PlayerIndex $index + * * @method static \Illuminate\Database\Eloquent\Builder|Player newModelQuery() * @method static \Illuminate\Database\Eloquent\Builder|Player newQuery() * @method static \Illuminate\Database\Eloquent\Builder|Player query() @@ -97,7 +98,7 @@ use Illuminate\Database\Eloquent\Relations\HasOne; * @method static \Illuminate\Database\Eloquent\Builder|Player wherePartBase($value) * @method static \Illuminate\Database\Eloquent\Builder|Player wherePartHair($value) * @method static \Illuminate\Database\Eloquent\Builder|Player wherePartMain($value) - * @method static \Illuminate\Database\Eloquent\Builder|Player wherePartSash($value) + * @method static \Illuminate\Database\Eloquent\Builder|Player wherePartAcce($value) * @method static \Illuminate\Database\Eloquent\Builder|Player wherePlaytime($value) * @method static \Illuminate\Database\Eloquent\Builder|Player whereQuickslot($value) * @method static \Illuminate\Database\Eloquent\Builder|Player whereRandomHp($value) @@ -114,6 +115,7 @@ use Illuminate\Database\Eloquent\Relations\HasOne; * @method static \Illuminate\Database\Eloquent\Builder|Player whereX($value) * @method static \Illuminate\Database\Eloquent\Builder|Player whereY($value) * @method static \Illuminate\Database\Eloquent\Builder|Player whereZ($value) + * * @mixin \Eloquent */ class Player extends Model diff --git a/database/migrations/2024_03_30_000030_create_item_proto_table.php b/database/migrations/2024_03_30_000030_create_item_proto_table.php index b034309..f35f472 100644 --- a/database/migrations/2024_03_30_000030_create_item_proto_table.php +++ b/database/migrations/2024_03_30_000030_create_item_proto_table.php @@ -41,12 +41,18 @@ return new class extends Migration $table->integer('applyvalue1')->nullable()->default(0); $table->tinyInteger('applytype2')->nullable()->default(0); $table->integer('applyvalue2')->nullable()->default(0); + $table->tinyInteger('applytype3')->nullable()->default(0); + $table->integer('applyvalue3')->nullable()->default(0); $table->integer('value0')->nullable()->default(0); $table->integer('value1')->nullable()->default(0); $table->integer('value2')->nullable()->default(0); $table->integer('value3')->nullable()->default(0); $table->integer('value4')->nullable()->default(0); $table->integer('value5')->nullable()->default(0); + $table->integer('value6')->nullable()->default(0); + $table->integer('value7')->nullable()->default(0); + $table->integer('value8')->nullable()->default(0); + $table->integer('value9')->nullable()->default(0); $table->tinyInteger('socket0')->nullable()->default(-1); $table->tinyInteger('socket1')->nullable()->default(-1); $table->tinyInteger('socket2')->nullable()->default(-1); diff --git a/database/migrations/2025_09_07_001306_create_sash_table.php b/database/migrations/2025_09_07_001306_create_sash_table.php index d49d67e..ed3e6c7 100644 --- a/database/migrations/2025_09_07_001306_create_sash_table.php +++ b/database/migrations/2025_09_07_001306_create_sash_table.php @@ -11,7 +11,7 @@ return new class extends Migration */ public function up(): void { - Schema::create('sash', function (Blueprint $table) { + Schema::create('acce', function (Blueprint $table) { $table->unsignedInteger('pid'); $table->timestamp('time')->useCurrent(); $table->tinyInteger('x'); @@ -26,11 +26,11 @@ return new class extends Migration }); Schema::table('player', function (Blueprint $table) { - $table->unsignedSmallInteger('part_sash')->default(0)->after('part_hair'); + $table->unsignedSmallInteger('part_acce')->default(0)->after('part_hair'); }); Schema::table('player_deleted', function (Blueprint $table) { - $table->unsignedSmallInteger('part_sash')->default(0)->after('part_hair'); + $table->unsignedSmallInteger('part_acce')->default(0)->after('part_hair'); }); } @@ -39,14 +39,14 @@ return new class extends Migration */ public function down(): void { - Schema::dropIfExists('sash'); + Schema::dropIfExists('acce'); Schema::table('player', function (Blueprint $table) { - $table->dropColumn('part_sash'); + $table->dropColumn('part_acce'); }); Schema::table('player_deleted', function (Blueprint $table) { - $table->dropColumn('part_sash'); + $table->dropColumn('part_acce'); }); } }; diff --git a/database/migrations/2025_09_28_133130_add_pendant_to_item_attr_table.php b/database/migrations/2025_09_28_133130_add_pendant_to_item_attr_table.php new file mode 100644 index 0000000..86e2a48 --- /dev/null +++ b/database/migrations/2025_09_28_133130_add_pendant_to_item_attr_table.php @@ -0,0 +1,28 @@ +string('pendant', 100)->after('ear'); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::table('item_attr', function (Blueprint $table) { + $table->dropColumn('pendant'); + }); + } +};