add: Basics of the Wiki API.

fix: Mall authentication.
master
WildEgo 2025-09-16 18:54:18 +01:00
parent a6040c6993
commit 54b937c3b2
40 changed files with 5656 additions and 4112 deletions

1
.gitignore vendored
View File

@ -3,6 +3,7 @@
/public/build
/public/hot
/public/patch-data
/public/item-icon
/storage/*.key
/vendor
.env

File diff suppressed because it is too large Load Diff

View File

@ -7,18 +7,22 @@ use App\Models\Game\Player\Player;
use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Illuminate\Validation\Rule;
class AuthController extends Controller
{
public function auth(Request $request): RedirectResponse
{
if (!$request->hasValidSignature()) {
if (! $request->hasValidSignature()) {
abort(401);
}
// Validate the request data
$validated = $request->validate([
'pid' => 'required|exists:player.player,id',
'pid' => [
'required',
Rule::exists(Player::class, 'id'),
],
'sid' => 'required|int',
]);

View File

@ -0,0 +1,105 @@
<?php
namespace App\Http\Controllers;
use App\Http\Resources\Models\ItemProtoResource;
use App\Http\Resources\Models\ItemProtoSearchResource;
use App\Http\Resources\Models\ItemProtoShopResource;
use App\Models\Game\Player\ItemProto;
use Illuminate\Http\Request;
class WikiController extends Controller
{
public $itemColumns = [
'vnum',
'locale_name',
'type',
'subtype',
'refined_vnum',
'refine_set',
'magic_pct',
// Limits
'limittype0',
'limitvalue0',
'limittype1',
'limitvalue1',
// Applies
'applytype0',
'applyvalue0',
'applytype1',
'applyvalue1',
'applytype2',
'applyvalue2',
];
public function search(Request $request)
{
return ItemProtoSearchResource::collection(
ItemProto::query()
->select('locale_name', 'vnum')
->when($request->query('query'), fn ($q, $term) => $q->where('locale_name', 'like', "%$term%"))
->take(10)
->get()
);
}
public function show(ItemProto $item)
{
if ($item->type->isUpgradeable()) {
$baseName = str($item->locale_name)
->beforeLast('+');
$items = ItemProto::select($this->itemColumns)
->where('locale_name', 'like', "$baseName%")
->orderBy('vnum', 'asc')
->with([
'refineSet',
'refineSet.item0' => fn ($q) => $q->select(['vnum', 'locale_name']),
'refineSet.item1' => fn ($q) => $q->select(['vnum', 'locale_name']),
'refineSet.item2' => fn ($q) => $q->select(['vnum', 'locale_name']),
'refineSet.item3' => fn ($q) => $q->select(['vnum', 'locale_name']),
'refineSet.item4' => fn ($q) => $q->select(['vnum', 'locale_name']),
'sellers.mob',
])
->get();
if ($items->first()->vnum) {
$from = ItemProto::select($this->itemColumns)
->whereRefinedVnum($items->first()->vnum)
// ->where('refine_set', '!=', 0)
->first();
if ($from) {
$items->prepend($from);
}
}
if (($last = $items->last())->refined_vnum && $last->refine_set !== 0) {
$to = ItemProto::select($this->itemColumns)
->whereVnum($items->last()->refined_vnum)
->first();
if ($to) {
$items->push($to);
}
}
return [
'items' => ItemProtoResource::collection($items),
'sources' => [
'shops' => ItemProtoShopResource::collection(
$items
->flatMap(fn ($item) => $item->sellers)
->unique(fn ($seller) => $seller->vnum)
),
],
];
}
return new ItemProtoResource(
$item->loadMissing([
'sellers.mob',
])
);
}
}

View File

@ -0,0 +1,31 @@
<?php
namespace App\Http\Resources\Models;
use Illuminate\Http\Request;
use Illuminate\Http\Resources\Json\JsonResource;
class ItemProtoRefineResource extends JsonResource
{
/**
* Transform the resource into an array.
*
* @return array<string, mixed>
*/
public function toArray(Request $request): array
{
$maxItems = 5;
return [
'items' => collect(range(0, $maxItems - 1))
->filter(fn ($index) => $this->{"item$index"})
->map(fn ($index) => [
'vnum' => $this->{"item$index"}->vnum,
'name' => $this->{"item$index"}->locale_name,
'count' => $this->{"count$index"},
]),
'cost' => $this->cost,
'probability' => $this->prob,
];
}
}

View File

@ -0,0 +1,46 @@
<?php
namespace App\Http\Resources\Models;
use Illuminate\Http\Request;
use Illuminate\Http\Resources\Json\JsonResource;
class ItemProtoResource extends JsonResource
{
/**
* Transform the resource into an array.
*
* @return array<string, mixed>
*/
public function toArray(Request $request): array
{
$maxLimits = 2;
$maxApplies = 3;
return [
'vnum' => $this->vnum,
'name' => $this->locale_name,
'type' => $this->type->getLabel(),
'subtype' => $this->subtype,
// 'refined_vnum',
'refine_set' => new ItemProtoRefineResource($this->refineSet),
'magic_pct' => $this->magic_pct,
// Limits
'limits' => collect(range(0, $maxLimits - 1))
->map(fn ($index) => [
'type' => $this->{"limittype$index"},
'value' => $this->{"limitvalue$index"},
])
->filter(fn ($row) => $row['type']->value !== 0)
->map(fn ($row) => ['type' => $row['type']->getLabel(), 'value' => $row['value']]),
// Applies
'applies' => collect(range(0, $maxApplies - 1))
->map(fn ($index) => [
'type' => $this->{"applytype$index"},
'value' => $this->{"applyvalue$index"},
])
->filter(fn ($row) => $row['type']->value !== 0)
->map(fn ($row) => ['type' => $row['type']->getLabel(), 'value' => $row['value']]),
];
}
}

View File

@ -0,0 +1,22 @@
<?php
namespace App\Http\Resources\Models;
use Illuminate\Http\Request;
use Illuminate\Http\Resources\Json\JsonResource;
class ItemProtoSearchResource extends JsonResource
{
/**
* Transform the resource into an array.
*
* @return array<string, mixed>
*/
public function toArray(Request $request): array
{
return [
'vnum' => $this->vnum,
'name' => $this->locale_name,
];
}
}

View File

@ -0,0 +1,23 @@
<?php
namespace App\Http\Resources\Models;
use Illuminate\Http\Request;
use Illuminate\Http\Resources\Json\JsonResource;
class ItemProtoShopResource extends JsonResource
{
/**
* Transform the resource into an array.
*
* @return array<string, mixed>
*/
public function toArray(Request $request): array
{
return [
'vnum' => $this->vnum,
'name' => $this->mob->locale_name,
'count' => $this->pivot->count,
];
}
}

View File

@ -10,6 +10,56 @@ use Illuminate\Foundation\Auth\User;
use Illuminate\Notifications\Notifiable;
use Laravel\Sanctum\HasApiTokens;
/**
* @property int $id
* @property string $login
* @property string $password
* @property string $social_id
* @property string $email
* @property \Illuminate\Support\Carbon $create_time
* @property AccountStatusEnum $status
* @property string|null $securitycode
* @property string $availDt
* @property int $mileage
* @property int $cash
* @property string $gold_expire
* @property string $silver_expire
* @property string $safebox_expire
* @property string $autoloot_expire
* @property string $fish_mind_expire
* @property string $marriage_fast_expire
* @property string $money_drop_rate_expire
* @property string|null $ip
* @property string|null $last_play
* @property-read \Illuminate\Notifications\DatabaseNotificationCollection<int, \Illuminate\Notifications\DatabaseNotification> $notifications
* @property-read int|null $notifications_count
* @property-read \Illuminate\Database\Eloquent\Collection<int, \Laravel\Sanctum\PersonalAccessToken> $tokens
* @property-read int|null $tokens_count
* @method static \Illuminate\Database\Eloquent\Builder<static>|Account newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder<static>|Account newQuery()
* @method static \Illuminate\Database\Eloquent\Builder<static>|Account query()
* @method static \Illuminate\Database\Eloquent\Builder<static>|Account whereAutolootExpire($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Account whereAvailDt($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Account whereCash($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Account whereCreateTime($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Account whereEmail($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Account whereFishMindExpire($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Account whereGoldExpire($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Account whereId($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Account whereIp($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Account whereLastPlay($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Account whereLogin($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Account whereMarriageFastExpire($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Account whereMileage($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Account whereMoneyDropRateExpire($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Account wherePassword($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Account whereSafeboxExpire($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Account whereSecuritycode($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Account whereSilverExpire($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Account whereSocialId($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Account whereStatus($value)
* @mixin \Eloquent
*/
class Account extends User implements MustVerifyEmail
{
use HasApiTokens, HasFactory, Notifiable;

View File

@ -0,0 +1,105 @@
<?php
namespace App\Models\Enums;
enum ApplyTypesEnum: int
{
case APPLY_NONE = 0;
case APPLY_MAX_HP = 1;
case APPLY_MAX_SP = 2;
case APPLY_CON = 3;
case APPLY_INT = 4;
case APPLY_STR = 5;
case APPLY_DEX = 6;
case APPLY_ATT_SPEED = 7;
case APPLY_MOV_SPEED = 8;
case APPLY_CAST_SPEED = 9;
case APPLY_HP_REGEN = 10;
case APPLY_SP_REGEN = 11;
case APPLY_POISON_PCT = 12;
case APPLY_STUN_PCT = 13;
case APPLY_SLOW_PCT = 14;
case APPLY_CRITICAL_PCT = 15;
case APPLY_PENETRATE_PCT = 16;
case APPLY_ATTBONUS_HUMAN = 17;
case APPLY_ATTBONUS_ANIMAL = 18;
case APPLY_ATTBONUS_ORC = 19;
case APPLY_ATTBONUS_MILGYO = 20;
case APPLY_ATTBONUS_UNDEAD = 21;
case APPLY_ATTBONUS_DEVIL = 22;
case APPLY_STEAL_HP = 23;
case APPLY_STEAL_SP = 24;
case APPLY_MANA_BURN_PCT = 25;
case APPLY_DAMAGE_SP_RECOVER = 26;
case APPLY_BLOCK = 27;
case APPLY_DODGE = 28;
case APPLY_RESIST_SWORD = 29;
case APPLY_RESIST_TWOHAND = 30;
case APPLY_RESIST_DAGGER = 31;
case APPLY_RESIST_BELL = 32;
case APPLY_RESIST_FAN = 33;
case APPLY_RESIST_BOW = 34;
case APPLY_RESIST_FIRE = 35;
case APPLY_RESIST_ELEC = 36;
case APPLY_RESIST_MAGIC = 37;
case APPLY_RESIST_WIND = 38;
case APPLY_REFLECT_MELEE = 39;
case APPLY_REFLECT_CURSE = 40;
case APPLY_POISON_REDUCE = 41;
case APPLY_KILL_SP_RECOVER = 42;
case APPLY_EXP_DOUBLE_BONUS = 43;
case APPLY_GOLD_DOUBLE_BONUS = 44;
case APPLY_ITEM_DROP_BONUS = 45;
case APPLY_POTION_BONUS = 46;
case APPLY_KILL_HP_RECOVER = 47;
case APPLY_IMMUNE_STUN = 48;
case APPLY_IMMUNE_SLOW = 49;
case APPLY_IMMUNE_FALL = 50;
case APPLY_SKILL = 51;
case APPLY_BOW_DISTANCE = 52;
case APPLY_ATT_GRADE_BONUS = 53;
case APPLY_DEF_GRADE_BONUS = 54;
case APPLY_MAGIC_ATT_GRADE = 55;
case APPLY_MAGIC_DEF_GRADE = 56;
case APPLY_CURSE_PCT = 57;
case APPLY_MAX_STAMINA = 58;
case APPLY_ATTBONUS_WARRIOR = 59;
case APPLY_ATTBONUS_ASSASSIN = 60;
case APPLY_ATTBONUS_SURA = 61;
case APPLY_ATTBONUS_SHAMAN = 62;
case APPLY_ATTBONUS_MONSTER = 63;
case APPLY_MALL_ATTBONUS = 64;
case APPLY_MALL_DEFBONUS = 65;
case APPLY_MALL_EXPBONUS = 66;
case APPLY_MALL_ITEMBONUS = 67;
case APPLY_MALL_GOLDBONUS = 68;
case APPLY_MAX_HP_PCT = 69;
case APPLY_MAX_SP_PCT = 70;
case APPLY_SKILL_DAMAGE_BONUS = 71;
case APPLY_NORMAL_HIT_DAMAGE_BONUS = 72;
case APPLY_SKILL_DEFEND_BONUS = 73;
case APPLY_NORMAL_HIT_DEFEND_BONUS = 74;
case APPLY_PC_BANG_EXP_BONUS = 75;
case APPLY_PC_BANG_DROP_BONUS = 76;
case APPLY_EXTRACT_HP_PCT = 77;
case APPLY_RESIST_WARRIOR = 78;
case APPLY_RESIST_ASSASSIN = 79;
case APPLY_RESIST_SURA = 80;
case APPLY_RESIST_SHAMAN = 81;
case APPLY_ENERGY = 82;
case APPLY_DEF_GRADE = 83;
case APPLY_COSTUME_ATTR_BONUS = 84;
case APPLY_MAGIC_ATTBONUS_PER = 85;
case APPLY_MELEE_MAGIC_ATTBONUS_PER = 86;
case APPLY_RESIST_ICE = 87;
case APPLY_RESIST_EARTH = 88;
case APPLY_RESIST_DARK = 89;
case APPLY_ANTI_CRITICAL_PCT = 90;
case APPLY_ANTI_PENETRATE_PCT = 91;
case MAX_APPLY_NUM = 92;
public function getLabel(): string
{
return $this->name;
}
}

View File

@ -0,0 +1,20 @@
<?php
namespace App\Models\Enums;
enum ArmorSubTypesEnum: int
{
case ARMOR_BODY = 0;
case ARMOR_HEAD = 1;
case ARMOR_SHIELD = 2;
case ARMOR_WRIST = 3;
case ARMOR_FOOTS = 4;
case ARMOR_NECK = 5;
case ARMOR_EAR = 6;
case ARMOR_NUM_TYPES = 7;
public function getLabel(): string
{
return $this->name;
}
}

View File

@ -0,0 +1,18 @@
<?php
namespace App\Models\Enums;
enum CostumeSubTypesEnum: int
{
case COSTUME_BODY = 0;
case COSTUME_HAIR = 1;
case COSTUME_MOUNT = 2;
case COSTUME_WEAPON = 3;
case COSTUME_SASH = 4;
case COSTUME_NUM_TYPES = 5;
public function getLabel(): string
{
return $this->name;
}
}

View File

@ -0,0 +1,53 @@
<?php
namespace App\Models\Enums;
enum ItemTypesEnum: int
{
case ITEM_TYPE_NONE = 0;
case ITEM_TYPE_WEAPON = 1;
case ITEM_TYPE_ARMOR = 2;
case ITEM_TYPE_USE = 3;
case ITEM_TYPE_AUTOUSE = 4;
case ITEM_TYPE_MATERIAL = 5;
case ITEM_TYPE_SPECIAL = 6;
case ITEM_TYPE_TOOL = 7;
case ITEM_TYPE_LOTTERY = 8;
case ITEM_TYPE_ELK = 9;
case ITEM_TYPE_METIN = 10;
case ITEM_TYPE_CONTAINER = 11;
case ITEM_TYPE_FISH = 12;
case ITEM_TYPE_ROD = 13;
case ITEM_TYPE_RESOURCE = 14;
case ITEM_TYPE_CAMPFIRE = 15;
case ITEM_TYPE_UNIQUE = 16;
case ITEM_TYPE_SKILLBOOK = 17;
case ITEM_TYPE_QUEST = 18;
case ITEM_TYPE_POLYMORPH = 19;
case ITEM_TYPE_TREASURE_BOX = 20;
case ITEM_TYPE_TREASURE_KEY = 21;
case ITEM_TYPE_SKILLFORGET = 22;
case ITEM_TYPE_GIFTBOX = 23;
case ITEM_TYPE_PICK = 24;
case ITEM_TYPE_HAIR = 25;
case ITEM_TYPE_TOTEM = 26;
case ITEM_TYPE_BLEND = 27;
case ITEM_TYPE_COSTUME = 28;
case ITEM_TYPE_DS = 29;
case ITEM_TYPE_SPECIAL_DS = 30;
case ITEM_TYPE_EXTRACT = 31;
case ITEM_TYPE_SECONDARY_COIN = 32;
case ITEM_TYPE_RING = 33;
case ITEM_TYPE_BELT = 34;
case ITEM_TYPE_MAX_NUM = 35;
public function getLabel(): string
{
return $this->name;
}
public function isUpgradeable(): bool
{
return in_array($this, [self::ITEM_TYPE_WEAPON, self::ITEM_TYPE_ARMOR, self::ITEM_TYPE_BELT]);
}
}

View File

@ -0,0 +1,23 @@
<?php
namespace App\Models\Enums;
enum LimitTypesEnum: int
{
case LIMIT_NONE = 0;
case LIMIT_LEVEL = 1;
case LIMIT_STR = 2;
case LIMIT_DEX = 3;
case LIMIT_INT = 4;
case LIMIT_CON = 5;
case LIMIT_PCBANG = 6;
case LIMIT_REAL_TIME = 7;
case LIMIT_REAL_TIME_START_FIRST_USE = 8;
case LIMIT_TIMER_BASED_ON_WEAR = 9;
case LIMIT_MAX_NUM = 10;
public function getLabel(): string
{
return $this->name;
}
}

View File

@ -0,0 +1,20 @@
<?php
namespace App\Models\Enums;
enum WeaponSubTypesEnum: int
{
case WEAPON_SWORD = 0;
case WEAPON_DAGGER = 1;
case WEAPON_BOW = 2;
case WEAPON_TWO_HANDED = 3;
case WEAPON_BELL = 4;
case WEAPON_FAN = 5;
case WEAPON_ARROW = 6;
case WEAPON_NUM_TYPES = 7;
public function getLabel(): string
{
return $this->name;
}
}

View File

@ -4,6 +4,16 @@ namespace App\Models\Game\Common;
use Illuminate\Database\Eloquent\Model;
/**
* @property int $mKey
* @property string $mValue
* @method static \Illuminate\Database\Eloquent\Builder<static>|Locale newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder<static>|Locale newQuery()
* @method static \Illuminate\Database\Eloquent\Builder<static>|Locale query()
* @method static \Illuminate\Database\Eloquent\Builder<static>|Locale whereMKey($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Locale whereMValue($value)
* @mixin \Eloquent
*/
class Locale extends Model
{
/**

View File

@ -5,6 +5,26 @@ namespace App\Models\Game\Highscore;
use App\Models\Enums\EmpireEnum;
use Illuminate\Database\Eloquent\Model;
/**
* @property int $id
* @property string $name
* @property string $master
* @property EmpireEnum $empire
* @property int $level
* @property int $ladder_point
* @property \Illuminate\Support\Carbon $date
* @method static \Illuminate\Database\Eloquent\Builder<static>|GuildHighscoreCache newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder<static>|GuildHighscoreCache newQuery()
* @method static \Illuminate\Database\Eloquent\Builder<static>|GuildHighscoreCache query()
* @method static \Illuminate\Database\Eloquent\Builder<static>|GuildHighscoreCache whereDate($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|GuildHighscoreCache whereEmpire($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|GuildHighscoreCache whereId($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|GuildHighscoreCache whereLadderPoint($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|GuildHighscoreCache whereLevel($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|GuildHighscoreCache whereMaster($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|GuildHighscoreCache whereName($value)
* @mixin \Eloquent
*/
class GuildHighscoreCache extends Model
{
/**

View File

@ -6,6 +6,26 @@ use App\Models\Enums\CharacterClassEnum;
use App\Models\Enums\EmpireEnum;
use Illuminate\Database\Eloquent\Model;
/**
* @property int $id
* @property string $name
* @property CharacterClassEnum $job
* @property EmpireEnum $empire
* @property int $level
* @property int $exp
* @property \Illuminate\Support\Carbon $date
* @method static \Illuminate\Database\Eloquent\Builder<static>|HighscoreCache newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder<static>|HighscoreCache newQuery()
* @method static \Illuminate\Database\Eloquent\Builder<static>|HighscoreCache query()
* @method static \Illuminate\Database\Eloquent\Builder<static>|HighscoreCache whereDate($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|HighscoreCache whereEmpire($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|HighscoreCache whereExp($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|HighscoreCache whereId($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|HighscoreCache whereJob($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|HighscoreCache whereLevel($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|HighscoreCache whereName($value)
* @mixin \Eloquent
*/
class HighscoreCache extends Model
{
/**

View File

@ -4,6 +4,14 @@ namespace App\Models\Game\Player;
use Illuminate\Database\Eloquent\Model;
/**
* @property int $word
* @method static \Illuminate\Database\Eloquent\Builder<static>|Banword newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder<static>|Banword newQuery()
* @method static \Illuminate\Database\Eloquent\Builder<static>|Banword query()
* @method static \Illuminate\Database\Eloquent\Builder<static>|Banword whereWord($value)
* @mixin \Eloquent
*/
class Banword extends Model
{
/**

View File

@ -4,6 +4,42 @@ namespace App\Models\Game\Player;
use Illuminate\Database\Eloquent\Model;
/**
* @property int $apply
* @property string $prob
* @property string $lv1
* @property string $lv2
* @property string $lv3
* @property string $lv4
* @property string $lv5
* @property string $weapon
* @property string $body
* @property string $wrist
* @property string $foots
* @property string $neck
* @property string $head
* @property string $shield
* @property string $ear
* @method static \Illuminate\Database\Eloquent\Builder<static>|ItemAttr newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder<static>|ItemAttr newQuery()
* @method static \Illuminate\Database\Eloquent\Builder<static>|ItemAttr query()
* @method static \Illuminate\Database\Eloquent\Builder<static>|ItemAttr whereApply($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|ItemAttr whereBody($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|ItemAttr whereEar($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|ItemAttr whereFoots($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|ItemAttr whereHead($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|ItemAttr whereLv1($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|ItemAttr whereLv2($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|ItemAttr whereLv3($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|ItemAttr whereLv4($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|ItemAttr whereLv5($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|ItemAttr whereNeck($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|ItemAttr whereProb($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|ItemAttr whereShield($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|ItemAttr whereWeapon($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|ItemAttr whereWrist($value)
* @mixin \Eloquent
*/
class ItemAttr extends Model
{
/**

View File

@ -4,6 +4,42 @@ namespace App\Models\Game\Player;
use Illuminate\Database\Eloquent\Model;
/**
* @property int $apply
* @property string $prob
* @property string $lv1
* @property string $lv2
* @property string $lv3
* @property string $lv4
* @property string $lv5
* @property string $weapon
* @property string $body
* @property string $wrist
* @property string $foots
* @property string $neck
* @property string $head
* @property string $shield
* @property string $ear
* @method static \Illuminate\Database\Eloquent\Builder<static>|ItemAttrRare newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder<static>|ItemAttrRare newQuery()
* @method static \Illuminate\Database\Eloquent\Builder<static>|ItemAttrRare query()
* @method static \Illuminate\Database\Eloquent\Builder<static>|ItemAttrRare whereApply($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|ItemAttrRare whereBody($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|ItemAttrRare whereEar($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|ItemAttrRare whereFoots($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|ItemAttrRare whereHead($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|ItemAttrRare whereLv1($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|ItemAttrRare whereLv2($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|ItemAttrRare whereLv3($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|ItemAttrRare whereLv4($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|ItemAttrRare whereLv5($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|ItemAttrRare whereNeck($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|ItemAttrRare whereProb($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|ItemAttrRare whereShield($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|ItemAttrRare whereWeapon($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|ItemAttrRare whereWrist($value)
* @mixin \Eloquent
*/
class ItemAttrRare extends Model
{
/**

View File

@ -2,8 +2,106 @@
namespace App\Models\Game\Player;
use App\Models\Enums\ApplyTypesEnum;
use App\Models\Enums\ItemTypesEnum;
use App\Models\Enums\LimitTypesEnum;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
/**
* @property int $vnum
* @property string $name
* @property string $locale_name
* @property ItemTypesEnum $type
* @property int $subtype
* @property int|null $weight
* @property int|null $size
* @property int|null $antiflag
* @property int|null $flag
* @property int|null $wearflag
* @property string $immuneflag
* @property int|null $gold
* @property int $shop_buy_price
* @property int $refined_vnum
* @property int $refine_set
* @property int $refine_set2
* @property int $magic_pct
* @property LimitTypesEnum|null $limittype0
* @property int|null $limitvalue0
* @property LimitTypesEnum|null $limittype1
* @property int|null $limitvalue1
* @property ApplyTypesEnum|null $applytype0
* @property int|null $applyvalue0
* @property ApplyTypesEnum|null $applytype1
* @property int|null $applyvalue1
* @property ApplyTypesEnum|null $applytype2
* @property int|null $applyvalue2
* @property int|null $value0
* @property int|null $value1
* @property int|null $value2
* @property int|null $value3
* @property int|null $value4
* @property int|null $value5
* @property int|null $socket0
* @property int|null $socket1
* @property int|null $socket2
* @property int|null $socket3
* @property int|null $socket4
* @property int|null $socket5
* @property int $specular
* @property int $socket_pct
* @property int $addon_type
* @property-read \App\Models\Game\Player\RefineProto|null $refineSet
*
* @method static \Illuminate\Database\Eloquent\Builder<static>|ItemProto newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder<static>|ItemProto newQuery()
* @method static \Illuminate\Database\Eloquent\Builder<static>|ItemProto query()
* @method static \Illuminate\Database\Eloquent\Builder<static>|ItemProto whereAddonType($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|ItemProto whereAntiflag($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|ItemProto whereApplytype0($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|ItemProto whereApplytype1($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|ItemProto whereApplytype2($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|ItemProto whereApplyvalue0($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|ItemProto whereApplyvalue1($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|ItemProto whereApplyvalue2($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|ItemProto whereFlag($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|ItemProto whereGold($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|ItemProto whereImmuneflag($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|ItemProto whereLimittype0($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|ItemProto whereLimittype1($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|ItemProto whereLimitvalue0($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|ItemProto whereLimitvalue1($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|ItemProto whereLocaleName($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|ItemProto whereMagicPct($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|ItemProto whereName($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|ItemProto whereRefineSet($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|ItemProto whereRefineSet2($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|ItemProto whereRefinedVnum($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|ItemProto whereShopBuyPrice($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|ItemProto whereSize($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|ItemProto whereSocket0($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|ItemProto whereSocket1($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|ItemProto whereSocket2($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|ItemProto whereSocket3($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|ItemProto whereSocket4($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|ItemProto whereSocket5($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|ItemProto whereSocketPct($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|ItemProto whereSpecular($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|ItemProto whereSubtype($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|ItemProto whereType($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|ItemProto whereValue0($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|ItemProto whereValue1($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|ItemProto whereValue2($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|ItemProto whereValue3($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|ItemProto whereValue4($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|ItemProto whereValue5($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|ItemProto whereVnum($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|ItemProto whereWearflag($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|ItemProto whereWeight($value)
*
* @mixin \Eloquent
*/
class ItemProto extends Model
{
/**
@ -51,6 +149,30 @@ class ItemProto extends Model
* @var array<string, string>
*/
protected $casts = [
'type' => ItemTypesEnum::class,
'limittype0' => LimitTypesEnum::class,
'limittype1' => LimitTypesEnum::class,
'applytype0' => ApplyTypesEnum::class,
'applytype1' => ApplyTypesEnum::class,
'applytype2' => ApplyTypesEnum::class,
];
public function refineSet(): BelongsTo
{
return $this->belongsTo(RefineProto::class, 'refine_set');
}
public function sellers(): BelongsToMany
{
return $this->belongsToMany(
Shop::class,
ShopItem::class,
'item_vnum',
'shop_vnum',
'vnum',
'vnum'
)
->where('npc_vnum', '!=', 0)
->withPivot('count');
}
}

View File

@ -4,6 +4,32 @@ namespace App\Models\Game\Player;
use Illuminate\Database\Eloquent\Model;
/**
* @property int $id
* @property int $map_index
* @property int $x
* @property int $y
* @property int $width
* @property int $height
* @property int|null $guild_id
* @property int $guild_level_limit
* @property int $price
* @property string $enable
* @method static \Illuminate\Database\Eloquent\Builder<static>|Land newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder<static>|Land newQuery()
* @method static \Illuminate\Database\Eloquent\Builder<static>|Land query()
* @method static \Illuminate\Database\Eloquent\Builder<static>|Land whereEnable($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Land whereGuildId($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Land whereGuildLevelLimit($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Land whereHeight($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Land whereId($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Land whereMapIndex($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Land wherePrice($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Land whereWidth($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Land whereX($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Land whereY($value)
* @mixin \Eloquent
*/
class Land extends Model
{
/**

View File

@ -0,0 +1,47 @@
<?php
namespace App\Models\Game\Player;
use Illuminate\Database\Eloquent\Model;
class MobProto extends Model
{
/**
* Indicates if the model should be timestamped.
*
* @var bool
*/
public $timestamps = false;
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'mob_proto';
/**
* The primary key for the model.
*
* @var string
*/
protected $primaryKey = 'vnum';
/**
* The attributes that are mass assignable.
*
* @var array<int, string>
*/
protected $fillable = [
'name',
];
/**
* The attributes that should be hidden for serialization.
*
* @var array<int, string>
*/
protected $hidden = [
];
}

View File

@ -4,6 +4,40 @@ namespace App\Models\Game\Player;
use Illuminate\Database\Eloquent\Model;
/**
* @property int $vnum
* @property string $name
* @property int $price
* @property string $materials
* @property int $upgrade_vnum
* @property int $upgrade_limit_time
* @property int $life
* @property int $reg_1
* @property int $reg_2
* @property int $reg_3
* @property int $reg_4
* @property int $npc
* @property int $group_vnum
* @property int $dependent_group
* @method static \Illuminate\Database\Eloquent\Builder<static>|ObjectProto newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder<static>|ObjectProto newQuery()
* @method static \Illuminate\Database\Eloquent\Builder<static>|ObjectProto query()
* @method static \Illuminate\Database\Eloquent\Builder<static>|ObjectProto whereDependentGroup($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|ObjectProto whereGroupVnum($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|ObjectProto whereLife($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|ObjectProto whereMaterials($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|ObjectProto whereName($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|ObjectProto whereNpc($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|ObjectProto wherePrice($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|ObjectProto whereReg1($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|ObjectProto whereReg2($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|ObjectProto whereReg3($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|ObjectProto whereReg4($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|ObjectProto whereUpgradeLimitTime($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|ObjectProto whereUpgradeVnum($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|ObjectProto whereVnum($value)
* @mixin \Eloquent
*/
class ObjectProto extends Model
{
/**

View File

@ -9,6 +9,113 @@ use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasOne;
/**
* @property int $id
* @property int $account_id
* @property string $name
* @property CharacterJobEnum $job
* @property int $voice
* @property int $dir
* @property int $x
* @property int $y
* @property int $z
* @property int $map_index
* @property int $exit_x
* @property int $exit_y
* @property int $exit_map_index
* @property int $hp
* @property int $mp
* @property int $stamina
* @property int $random_hp
* @property int $random_sp
* @property int $playtime
* @property int $level
* @property int $level_step
* @property int $st
* @property int $ht
* @property int $dx
* @property int $iq
* @property int $exp
* @property int $gold
* @property int $stat_point
* @property int $skill_point
* @property string|null $quickslot
* @property string|null $ip
* @property int $part_main
* @property int $part_base
* @property int $part_hair
* @property int $part_sash
* @property int $skill_group
* @property string|null $skill_level
* @property int $alignment
* @property string $last_play
* @property int $change_name
* @property int $sub_skill_point
* @property int $stat_reset_count
* @property int $horse_hp
* @property int $horse_stamina
* @property int $horse_level
* @property int $horse_hp_droptime
* @property int $horse_riding
* @property int $horse_skill_point
* @property int $bank_value
* @property-read Account $account
* @property-read HighscoreCache|null $highscore
* @property-read \App\Models\Game\Player\PlayerIndex $index
* @method static \Illuminate\Database\Eloquent\Builder<static>|Player newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder<static>|Player newQuery()
* @method static \Illuminate\Database\Eloquent\Builder<static>|Player query()
* @method static \Illuminate\Database\Eloquent\Builder<static>|Player whereAccountId($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Player whereAlignment($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Player whereBankValue($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Player whereChangeName($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Player whereDir($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Player whereDx($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Player whereExitMapIndex($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Player whereExitX($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Player whereExitY($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Player whereExp($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Player whereGold($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Player whereHorseHp($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Player whereHorseHpDroptime($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Player whereHorseLevel($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Player whereHorseRiding($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Player whereHorseSkillPoint($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Player whereHorseStamina($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Player whereHp($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Player whereHt($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Player whereId($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Player whereIp($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Player whereIq($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Player whereJob($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Player whereLastPlay($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Player whereLevel($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Player whereLevelStep($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Player whereMapIndex($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Player whereMp($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Player whereName($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Player wherePartBase($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Player wherePartHair($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Player wherePartMain($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Player wherePartSash($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Player wherePlaytime($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Player whereQuickslot($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Player whereRandomHp($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Player whereRandomSp($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Player whereSkillGroup($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Player whereSkillLevel($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Player whereSkillPoint($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Player whereSt($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Player whereStamina($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Player whereStatPoint($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Player whereStatResetCount($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Player whereSubSkillPoint($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Player whereVoice($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Player whereX($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Player whereY($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Player whereZ($value)
* @mixin \Eloquent
*/
class Player extends Model
{
/**

View File

@ -7,6 +7,25 @@ use App\Models\Enums\EmpireEnum;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
/**
* @property int $id
* @property int|null $pid1
* @property int|null $pid2
* @property int|null $pid3
* @property int|null $pid4
* @property EmpireEnum $empire
* @property-read Account $account
* @method static \Illuminate\Database\Eloquent\Builder<static>|PlayerIndex newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder<static>|PlayerIndex newQuery()
* @method static \Illuminate\Database\Eloquent\Builder<static>|PlayerIndex query()
* @method static \Illuminate\Database\Eloquent\Builder<static>|PlayerIndex whereEmpire($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|PlayerIndex whereId($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|PlayerIndex wherePid1($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|PlayerIndex wherePid2($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|PlayerIndex wherePid3($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|PlayerIndex wherePid4($value)
* @mixin \Eloquent
*/
class PlayerIndex extends Model
{
/**

View File

@ -3,7 +3,49 @@
namespace App\Models\Game\Player;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
/**
* @property int $id
* @property int $vnum0
* @property int $count0
* @property int $vnum1
* @property int $count1
* @property int $vnum2
* @property int $count2
* @property int $vnum3
* @property int $count3
* @property int $vnum4
* @property int $count4
* @property int $cost
* @property int $src_vnum
* @property int $result_vnum
* @property int $prob
* @property-read \App\Models\Game\Player\ItemProto|null $item0
* @property-read \App\Models\Game\Player\ItemProto|null $item1
* @property-read \App\Models\Game\Player\ItemProto|null $item2
* @property-read \App\Models\Game\Player\ItemProto|null $item3
* @property-read \App\Models\Game\Player\ItemProto|null $item4
* @method static \Illuminate\Database\Eloquent\Builder<static>|RefineProto newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder<static>|RefineProto newQuery()
* @method static \Illuminate\Database\Eloquent\Builder<static>|RefineProto query()
* @method static \Illuminate\Database\Eloquent\Builder<static>|RefineProto whereCost($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|RefineProto whereCount0($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|RefineProto whereCount1($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|RefineProto whereCount2($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|RefineProto whereCount3($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|RefineProto whereCount4($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|RefineProto whereId($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|RefineProto whereProb($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|RefineProto whereResultVnum($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|RefineProto whereSrcVnum($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|RefineProto whereVnum0($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|RefineProto whereVnum1($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|RefineProto whereVnum2($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|RefineProto whereVnum3($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|RefineProto whereVnum4($value)
* @mixin \Eloquent
*/
class RefineProto extends Model
{
/**
@ -53,4 +95,29 @@ class RefineProto extends Model
protected $casts = [
];
public function item0(): BelongsTo
{
return $this->belongsTo(ItemProto::class, 'vnum0');
}
public function item1(): BelongsTo
{
return $this->belongsTo(ItemProto::class, 'vnum1');
}
public function item2(): BelongsTo
{
return $this->belongsTo(ItemProto::class, 'vnum2');
}
public function item3(): BelongsTo
{
return $this->belongsTo(ItemProto::class, 'vnum3');
}
public function item4(): BelongsTo
{
return $this->belongsTo(ItemProto::class, 'vnum4');
}
}

View File

@ -3,7 +3,22 @@
namespace App\Models\Game\Player;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
/**
* @property int $vnum
* @property string $name
* @property int $npc_vnum
*
* @method static \Illuminate\Database\Eloquent\Builder<static>|Shop newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder<static>|Shop newQuery()
* @method static \Illuminate\Database\Eloquent\Builder<static>|Shop query()
* @method static \Illuminate\Database\Eloquent\Builder<static>|Shop whereName($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Shop whereNpcVnum($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|Shop whereVnum($value)
*
* @mixin \Eloquent
*/
class Shop extends Model
{
/**
@ -53,4 +68,9 @@ class Shop extends Model
protected $casts = [
];
public function mob(): BelongsTo
{
return $this->belongsTo(MobProto::class, 'npc_vnum', 'vnum');
}
}

View File

@ -4,6 +4,18 @@ namespace App\Models\Game\Player;
use Illuminate\Database\Eloquent\Model;
/**
* @property int $shop_vnum
* @property int $item_vnum
* @property int $count
* @method static \Illuminate\Database\Eloquent\Builder<static>|ShopItem newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder<static>|ShopItem newQuery()
* @method static \Illuminate\Database\Eloquent\Builder<static>|ShopItem query()
* @method static \Illuminate\Database\Eloquent\Builder<static>|ShopItem whereCount($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|ShopItem whereItemVnum($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|ShopItem whereShopVnum($value)
* @mixin \Eloquent
*/
class ShopItem extends Model
{
/**

View File

@ -4,6 +4,74 @@ namespace App\Models\Game\Player;
use Illuminate\Database\Eloquent\Model;
/**
* @property int $dwVnum
* @property string $szName
* @property int $bType
* @property int $bLevelStep
* @property int $bMaxLevel
* @property int $bLevelLimit
* @property string $szPointOn
* @property string $szPointPoly
* @property string $szSPCostPoly
* @property string $szDurationPoly
* @property string $szDurationSPCostPoly
* @property string $szCooldownPoly
* @property string $szMasterBonusPoly
* @property string $szAttackGradePoly
* @property string $setFlag
* @property string|null $setAffectFlag
* @property string $szPointOn2
* @property string $szPointPoly2
* @property string $szDurationPoly2
* @property string|null $setAffectFlag2
* @property string $szPointOn3
* @property string $szPointPoly3
* @property string $szDurationPoly3
* @property string $szGrandMasterAddSPCostPoly
* @property int $prerequisiteSkillVnum
* @property int $prerequisiteSkillLevel
* @property string|null $eSkillType
* @property int $iMaxHit
* @property string $szSplashAroundDamageAdjustPoly
* @property int $dwTargetRange
* @property int $dwSplashRange
* @method static \Illuminate\Database\Eloquent\Builder<static>|SkillProto newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder<static>|SkillProto newQuery()
* @method static \Illuminate\Database\Eloquent\Builder<static>|SkillProto query()
* @method static \Illuminate\Database\Eloquent\Builder<static>|SkillProto whereBLevelLimit($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|SkillProto whereBLevelStep($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|SkillProto whereBMaxLevel($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|SkillProto whereBType($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|SkillProto whereDwSplashRange($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|SkillProto whereDwTargetRange($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|SkillProto whereDwVnum($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|SkillProto whereESkillType($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|SkillProto whereIMaxHit($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|SkillProto wherePrerequisiteSkillLevel($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|SkillProto wherePrerequisiteSkillVnum($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|SkillProto whereSetAffectFlag($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|SkillProto whereSetAffectFlag2($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|SkillProto whereSetFlag($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|SkillProto whereSzAttackGradePoly($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|SkillProto whereSzCooldownPoly($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|SkillProto whereSzDurationPoly($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|SkillProto whereSzDurationPoly2($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|SkillProto whereSzDurationPoly3($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|SkillProto whereSzDurationSPCostPoly($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|SkillProto whereSzGrandMasterAddSPCostPoly($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|SkillProto whereSzMasterBonusPoly($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|SkillProto whereSzName($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|SkillProto whereSzPointOn($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|SkillProto whereSzPointOn2($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|SkillProto whereSzPointOn3($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|SkillProto whereSzPointPoly($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|SkillProto whereSzPointPoly2($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|SkillProto whereSzPointPoly3($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|SkillProto whereSzSPCostPoly($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|SkillProto whereSzSplashAroundDamageAdjustPoly($value)
* @mixin \Eloquent
*/
class SkillProto extends Model
{
/**

View File

@ -5,6 +5,18 @@ namespace App\Models\Mall;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\HasMany;
/**
* @property int $id
* @property string $name
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Mall\MallItem> $items
* @property-read int|null $items_count
* @method static \Illuminate\Database\Eloquent\Builder<static>|MallCategory newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder<static>|MallCategory newQuery()
* @method static \Illuminate\Database\Eloquent\Builder<static>|MallCategory query()
* @method static \Illuminate\Database\Eloquent\Builder<static>|MallCategory whereId($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|MallCategory whereName($value)
* @mixin \Eloquent
*/
class MallCategory extends Model
{
/**

View File

@ -8,6 +8,33 @@ use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\HasOne;
use Illuminate\Support\Facades\Auth;
/**
* @property int $id
* @property int $vnum
* @property int $category_id
* @property int|null $old_price
* @property int $price
* @property MallItemPricingEnum $pricing
* @property int $quantity
* @property string|null $image
* @property string|null $description
* @property string|null $other
* @property-read ItemProto|null $proto
* @method static \Illuminate\Database\Eloquent\Builder<static>|MallItem newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder<static>|MallItem newQuery()
* @method static \Illuminate\Database\Eloquent\Builder<static>|MallItem query()
* @method static \Illuminate\Database\Eloquent\Builder<static>|MallItem whereCategoryId($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|MallItem whereDescription($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|MallItem whereId($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|MallItem whereImage($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|MallItem whereOldPrice($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|MallItem whereOther($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|MallItem wherePrice($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|MallItem wherePricing($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|MallItem whereQuantity($value)
* @method static \Illuminate\Database\Eloquent\Builder<static>|MallItem whereVnum($value)
* @mixin \Eloquent
*/
class MallItem extends Model
{
/**

97
bun.lock Normal file
View File

@ -0,0 +1,97 @@
{
"lockfileVersion": 1,
"workspaces": {
"": {
"devDependencies": {
"axios": "^1.1.2",
"laravel-vite-plugin": "^0.7.5",
"vite": "^4.0.0",
},
},
},
"packages": {
"@esbuild/android-arm": ["@esbuild/android-arm@0.18.15", "", { "os": "android", "cpu": "arm" }, "sha512-wlkQBWb79/jeEEoRmrxt/yhn5T1lU236OCNpnfRzaCJHZ/5gf82uYx1qmADTBWE0AR/v7FiozE1auk2riyQd3w=="],
"@esbuild/android-arm64": ["@esbuild/android-arm64@0.18.15", "", { "os": "android", "cpu": "arm64" }, "sha512-NI/gnWcMl2kXt1HJKOn2H69SYn4YNheKo6NZt1hyfKWdMbaGadxjZIkcj4Gjk/WPxnbFXs9/3HjGHaknCqjrww=="],
"@esbuild/android-x64": ["@esbuild/android-x64@0.18.15", "", { "os": "android", "cpu": "x64" }, "sha512-FM9NQamSaEm/IZIhegF76aiLnng1kEsZl2eve/emxDeReVfRuRNmvT28l6hoFD9TsCxpK+i4v8LPpEj74T7yjA=="],
"@esbuild/darwin-arm64": ["@esbuild/darwin-arm64@0.18.15", "", { "os": "darwin", "cpu": "arm64" }, "sha512-XmrFwEOYauKte9QjS6hz60FpOCnw4zaPAb7XV7O4lx1r39XjJhTN7ZpXqJh4sN6q60zbP6QwAVVA8N/wUyBH/w=="],
"@esbuild/darwin-x64": ["@esbuild/darwin-x64@0.18.15", "", { "os": "darwin", "cpu": "x64" }, "sha512-bMqBmpw1e//7Fh5GLetSZaeo9zSC4/CMtrVFdj+bqKPGJuKyfNJ5Nf2m3LknKZTS+Q4oyPiON+v3eaJ59sLB5A=="],
"@esbuild/freebsd-arm64": ["@esbuild/freebsd-arm64@0.18.15", "", { "os": "freebsd", "cpu": "arm64" }, "sha512-LoTK5N3bOmNI9zVLCeTgnk5Rk0WdUTrr9dyDAQGVMrNTh9EAPuNwSTCgaKOKiDpverOa0htPcO9NwslSE5xuLA=="],
"@esbuild/freebsd-x64": ["@esbuild/freebsd-x64@0.18.15", "", { "os": "freebsd", "cpu": "x64" }, "sha512-62jX5n30VzgrjAjOk5orYeHFq6sqjvsIj1QesXvn5OZtdt5Gdj0vUNJy9NIpjfdNdqr76jjtzBJKf+h2uzYuTQ=="],
"@esbuild/linux-arm": ["@esbuild/linux-arm@0.18.15", "", { "os": "linux", "cpu": "arm" }, "sha512-dT4URUv6ir45ZkBqhwZwyFV6cH61k8MttIwhThp2BGiVtagYvCToF+Bggyx2VI57RG4Fbt21f9TmXaYx0DeUJg=="],
"@esbuild/linux-arm64": ["@esbuild/linux-arm64@0.18.15", "", { "os": "linux", "cpu": "arm64" }, "sha512-BWncQeuWDgYv0jTNzJjaNgleduV4tMbQjmk/zpPh/lUdMcNEAxy+jvneDJ6RJkrqloG7tB9S9rCrtfk/kuplsQ=="],
"@esbuild/linux-ia32": ["@esbuild/linux-ia32@0.18.15", "", { "os": "linux", "cpu": "ia32" }, "sha512-JPXORvgHRHITqfms1dWT/GbEY89u848dC08o0yK3fNskhp0t2TuNUnsrrSgOdH28ceb1hJuwyr8R/1RnyPwocw=="],
"@esbuild/linux-loong64": ["@esbuild/linux-loong64@0.18.15", "", { "os": "linux", "cpu": "none" }, "sha512-kArPI0DopjJCEplsVj/H+2Qgzz7vdFSacHNsgoAKpPS6W/Ndh8Oe24HRDQ5QCu4jHgN6XOtfFfLpRx3TXv/mEg=="],
"@esbuild/linux-mips64el": ["@esbuild/linux-mips64el@0.18.15", "", { "os": "linux", "cpu": "none" }, "sha512-b/tmngUfO02E00c1XnNTw/0DmloKjb6XQeqxaYuzGwHe0fHVgx5/D6CWi+XH1DvkszjBUkK9BX7n1ARTOst59w=="],
"@esbuild/linux-ppc64": ["@esbuild/linux-ppc64@0.18.15", "", { "os": "linux", "cpu": "ppc64" }, "sha512-KXPY69MWw79QJkyvUYb2ex/OgnN/8N/Aw5UDPlgoRtoEfcBqfeLodPr42UojV3NdkoO4u10NXQdamWm1YEzSKw=="],
"@esbuild/linux-riscv64": ["@esbuild/linux-riscv64@0.18.15", "", { "os": "linux", "cpu": "none" }, "sha512-komK3NEAeeGRnvFEjX1SfVg6EmkfIi5aKzevdvJqMydYr9N+pRQK0PGJXk+bhoPZwOUgLO4l99FZmLGk/L1jWg=="],
"@esbuild/linux-s390x": ["@esbuild/linux-s390x@0.18.15", "", { "os": "linux", "cpu": "s390x" }, "sha512-632T5Ts6gQ2WiMLWRRyeflPAm44u2E/s/TJvn+BP6M5mnHSk93cieaypj3VSMYO2ePTCRqAFXtuYi1yv8uZJNA=="],
"@esbuild/linux-x64": ["@esbuild/linux-x64@0.18.15", "", { "os": "linux", "cpu": "x64" }, "sha512-MsHtX0NgvRHsoOtYkuxyk4Vkmvk3PLRWfA4okK7c+6dT0Fu4SUqXAr9y4Q3d8vUf1VWWb6YutpL4XNe400iQ1g=="],
"@esbuild/netbsd-x64": ["@esbuild/netbsd-x64@0.18.15", "", { "os": "none", "cpu": "x64" }, "sha512-djST6s+jQiwxMIVQ5rlt24JFIAr4uwUnzceuFL7BQT4CbrRtqBPueS4GjXSiIpmwVri1Icj/9pFRJ7/aScvT+A=="],
"@esbuild/openbsd-x64": ["@esbuild/openbsd-x64@0.18.15", "", { "os": "openbsd", "cpu": "x64" }, "sha512-naeRhUIvhsgeounjkF5mvrNAVMGAm6EJWiabskeE5yOeBbLp7T89tAEw0j5Jm/CZAwyLe3c67zyCWH6fsBLCpw=="],
"@esbuild/sunos-x64": ["@esbuild/sunos-x64@0.18.15", "", { "os": "sunos", "cpu": "x64" }, "sha512-qkT2+WxyKbNIKV1AEhI8QiSIgTHMcRctzSaa/I3kVgMS5dl3fOeoqkb7pW76KwxHoriImhx7Mg3TwN/auMDsyQ=="],
"@esbuild/win32-arm64": ["@esbuild/win32-arm64@0.18.15", "", { "os": "win32", "cpu": "arm64" }, "sha512-HC4/feP+pB2Vb+cMPUjAnFyERs+HJN7E6KaeBlFdBv799MhD+aPJlfi/yk36SED58J9TPwI8MAcVpJgej4ud0A=="],
"@esbuild/win32-ia32": ["@esbuild/win32-ia32@0.18.15", "", { "os": "win32", "cpu": "ia32" }, "sha512-ovjwoRXI+gf52EVF60u9sSDj7myPixPxqzD5CmkEUmvs+W9Xd0iqISVBQn8xcx4ciIaIVlWCuTbYDOXOnOL44Q=="],
"@esbuild/win32-x64": ["@esbuild/win32-x64@0.18.15", "", { "os": "win32", "cpu": "x64" }, "sha512-imUxH9a3WJARyAvrG7srLyiK73XdX83NXQkjKvQ+7vPh3ZxoLrzvPkQKKw2DwZ+RV2ZB6vBfNHP8XScAmQC3aA=="],
"asynckit": ["asynckit@0.4.0", "", {}, "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q=="],
"axios": ["axios@1.4.0", "", { "dependencies": { "follow-redirects": "^1.15.0", "form-data": "^4.0.0", "proxy-from-env": "^1.1.0" } }, "sha512-S4XCWMEmzvo64T9GfvQDOXgYRDJ/wsSZc7Jvdgx5u1sd0JwsuPLqb3SYmusag+edF6ziyMensPVqLTSc1PiSEA=="],
"combined-stream": ["combined-stream@1.0.8", "", { "dependencies": { "delayed-stream": "~1.0.0" } }, "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg=="],
"delayed-stream": ["delayed-stream@1.0.0", "", {}, "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ=="],
"esbuild": ["esbuild@0.18.15", "", { "optionalDependencies": { "@esbuild/android-arm": "0.18.15", "@esbuild/android-arm64": "0.18.15", "@esbuild/android-x64": "0.18.15", "@esbuild/darwin-arm64": "0.18.15", "@esbuild/darwin-x64": "0.18.15", "@esbuild/freebsd-arm64": "0.18.15", "@esbuild/freebsd-x64": "0.18.15", "@esbuild/linux-arm": "0.18.15", "@esbuild/linux-arm64": "0.18.15", "@esbuild/linux-ia32": "0.18.15", "@esbuild/linux-loong64": "0.18.15", "@esbuild/linux-mips64el": "0.18.15", "@esbuild/linux-ppc64": "0.18.15", "@esbuild/linux-riscv64": "0.18.15", "@esbuild/linux-s390x": "0.18.15", "@esbuild/linux-x64": "0.18.15", "@esbuild/netbsd-x64": "0.18.15", "@esbuild/openbsd-x64": "0.18.15", "@esbuild/sunos-x64": "0.18.15", "@esbuild/win32-arm64": "0.18.15", "@esbuild/win32-ia32": "0.18.15", "@esbuild/win32-x64": "0.18.15" }, "bin": "bin/esbuild" }, "sha512-3WOOLhrvuTGPRzQPU6waSDWrDTnQriia72McWcn6UCi43GhCHrXH4S59hKMeez+IITmdUuUyvbU9JIp+t3xlPQ=="],
"follow-redirects": ["follow-redirects@1.15.2", "", {}, "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA=="],
"form-data": ["form-data@4.0.0", "", { "dependencies": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", "mime-types": "^2.1.12" } }, "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww=="],
"fsevents": ["fsevents@2.3.2", "", { "os": "darwin" }, "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA=="],
"laravel-vite-plugin": ["laravel-vite-plugin@0.7.8", "", { "dependencies": { "picocolors": "^1.0.0", "vite-plugin-full-reload": "^1.0.5" }, "peerDependencies": { "vite": "^3.0.0 || ^4.0.0" } }, "sha512-HWYqpQYHR3kEQ1LsHX7gHJoNNf0bz5z5mDaHBLzS+PGLCTmYqlU5/SZyeEgObV7z7bC/cnStYcY9H1DI1D5Udg=="],
"mime-db": ["mime-db@1.52.0", "", {}, "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg=="],
"mime-types": ["mime-types@2.1.35", "", { "dependencies": { "mime-db": "1.52.0" } }, "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw=="],
"nanoid": ["nanoid@3.3.6", "", { "bin": "bin/nanoid.cjs" }, "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA=="],
"picocolors": ["picocolors@1.0.0", "", {}, "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ=="],
"picomatch": ["picomatch@2.3.1", "", {}, "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA=="],
"postcss": ["postcss@8.4.27", "", { "dependencies": { "nanoid": "^3.3.6", "picocolors": "^1.0.0", "source-map-js": "^1.0.2" } }, "sha512-gY/ACJtJPSmUFPDCHtX78+01fHa64FaU4zaaWfuh1MhGJISufJAH4cun6k/8fwsHYeK4UQmENQK+tRLCFJE8JQ=="],
"proxy-from-env": ["proxy-from-env@1.1.0", "", {}, "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg=="],
"rollup": ["rollup@3.26.3", "", { "optionalDependencies": { "fsevents": "~2.3.2" }, "bin": "dist/bin/rollup" }, "sha512-7Tin0C8l86TkpcMtXvQu6saWH93nhG3dGQ1/+l5V2TDMceTxO7kDiK6GzbfLWNNxqJXm591PcEZUozZm51ogwQ=="],
"source-map-js": ["source-map-js@1.0.2", "", {}, "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw=="],
"vite": ["vite@4.4.6", "", { "dependencies": { "esbuild": "^0.18.10", "postcss": "^8.4.26", "rollup": "^3.25.2" }, "optionalDependencies": { "fsevents": "~2.3.2" }, "peerDependencies": { "@types/node": ">= 14", "less": "*", "lightningcss": "^1.21.0", "sass": "*", "stylus": "*", "sugarss": "*", "terser": "^5.4.0" }, "optionalPeers": ["@types/node", "less", "lightningcss", "sass", "stylus", "sugarss", "terser"], "bin": "bin/vite.js" }, "sha512-EY6Mm8vJ++S3D4tNAckaZfw3JwG3wa794Vt70M6cNJ6NxT87yhq7EC8Rcap3ahyHdo8AhCmV9PTk+vG1HiYn1A=="],
"vite-plugin-full-reload": ["vite-plugin-full-reload@1.0.5", "", { "dependencies": { "picocolors": "^1.0.0", "picomatch": "^2.3.1" }, "peerDependencies": { "vite": "^2 || ^3 || ^4" } }, "sha512-kVZFDFWr0DxiHn6MuDVTQf7gnWIdETGlZh0hvTiMXzRN80vgF4PKbONSq8U1d0WtHsKaFODTQgJeakLacoPZEQ=="],
}
}

View File

@ -10,12 +10,13 @@
"ext-simplexml": "*",
"guzzlehttp/guzzle": "^7.2",
"laravel/framework": "^11.31",
"laravel/octane": "^2.6",
"laravel/octane": "^2.12",
"laravel/sanctum": "^4.0",
"laravel/scout": "^10.19",
"laravel/tinker": "^2.8"
},
"require-dev": {
"barryvdh/laravel-ide-helper": "^3.5",
"barryvdh/laravel-ide-helper": "^3.6",
"fakerphp/faker": "^1.9.1",
"kitloong/laravel-migrations-generator": "^7.0",
"laravel/pint": "^1.0",

171
composer.lock generated
View File

@ -4,29 +4,29 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "34ec1655d5daad80c8054955b0117451",
"content-hash": "b66c418f91c106538c00a8554609ae88",
"packages": [
{
"name": "brick/math",
"version": "0.12.3",
"version": "0.14.0",
"source": {
"type": "git",
"url": "https://github.com/brick/math.git",
"reference": "866551da34e9a618e64a819ee1e01c20d8a588ba"
"reference": "113a8ee2656b882d4c3164fa31aa6e12cbb7aaa2"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/brick/math/zipball/866551da34e9a618e64a819ee1e01c20d8a588ba",
"reference": "866551da34e9a618e64a819ee1e01c20d8a588ba",
"url": "https://api.github.com/repos/brick/math/zipball/113a8ee2656b882d4c3164fa31aa6e12cbb7aaa2",
"reference": "113a8ee2656b882d4c3164fa31aa6e12cbb7aaa2",
"shasum": ""
},
"require": {
"php": "^8.1"
"php": "^8.2"
},
"require-dev": {
"php-coveralls/php-coveralls": "^2.2",
"phpunit/phpunit": "^10.1",
"vimeo/psalm": "6.8.8"
"phpstan/phpstan": "2.1.22",
"phpunit/phpunit": "^11.5"
},
"type": "library",
"autoload": {
@ -56,7 +56,7 @@
],
"support": {
"issues": "https://github.com/brick/math/issues",
"source": "https://github.com/brick/math/tree/0.12.3"
"source": "https://github.com/brick/math/tree/0.14.0"
},
"funding": [
{
@ -64,7 +64,7 @@
"type": "github"
}
],
"time": "2025-02-28T13:11:00+00:00"
"time": "2025-08-29T12:40:03+00:00"
},
{
"name": "carbonphp/carbon-doctrine-types",
@ -1143,20 +1143,20 @@
},
{
"name": "laravel/framework",
"version": "v11.45.2",
"version": "v11.46.0",
"source": {
"type": "git",
"url": "https://github.com/laravel/framework.git",
"reference": "d134bf11e2208c0c5bd488cf19e612ca176b820a"
"reference": "2c6d85f22d08123ad45aa3a6726b16f06e68eecd"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laravel/framework/zipball/d134bf11e2208c0c5bd488cf19e612ca176b820a",
"reference": "d134bf11e2208c0c5bd488cf19e612ca176b820a",
"url": "https://api.github.com/repos/laravel/framework/zipball/2c6d85f22d08123ad45aa3a6726b16f06e68eecd",
"reference": "2c6d85f22d08123ad45aa3a6726b16f06e68eecd",
"shasum": ""
},
"require": {
"brick/math": "^0.9.3|^0.10.2|^0.11|^0.12",
"brick/math": "^0.9.3|^0.10.2|^0.11|^0.12|^0.13|^0.14",
"composer-runtime-api": "^2.2",
"doctrine/inflector": "^2.0.5",
"dragonmantank/cron-expression": "^3.4",
@ -1260,7 +1260,7 @@
"league/flysystem-read-only": "^3.25.1",
"league/flysystem-sftp-v3": "^3.25.1",
"mockery/mockery": "^1.6.10",
"orchestra/testbench-core": "^9.16.0",
"orchestra/testbench-core": "^9.16.1",
"pda/pheanstalk": "^5.0.6",
"php-http/discovery": "^1.15",
"phpstan/phpstan": "^2.0",
@ -1354,7 +1354,7 @@
"issues": "https://github.com/laravel/framework/issues",
"source": "https://github.com/laravel/framework"
},
"time": "2025-08-13T20:28:00+00:00"
"time": "2025-09-08T21:54:34+00:00"
},
{
"name": "laravel/octane",
@ -1569,6 +1569,87 @@
},
"time": "2025-07-09T19:45:24+00:00"
},
{
"name": "laravel/scout",
"version": "v10.19.0",
"source": {
"type": "git",
"url": "https://github.com/laravel/scout.git",
"reference": "996b2a8b5ccc583e7df667c8aac924a46bc8bdd3"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laravel/scout/zipball/996b2a8b5ccc583e7df667c8aac924a46bc8bdd3",
"reference": "996b2a8b5ccc583e7df667c8aac924a46bc8bdd3",
"shasum": ""
},
"require": {
"illuminate/bus": "^9.0|^10.0|^11.0|^12.0",
"illuminate/contracts": "^9.0|^10.0|^11.0|^12.0",
"illuminate/database": "^9.0|^10.0|^11.0|^12.0",
"illuminate/http": "^9.0|^10.0|^11.0|^12.0",
"illuminate/pagination": "^9.0|^10.0|^11.0|^12.0",
"illuminate/queue": "^9.0|^10.0|^11.0|^12.0",
"illuminate/support": "^9.0|^10.0|^11.0|^12.0",
"php": "^8.0",
"symfony/console": "^6.0|^7.0"
},
"conflict": {
"algolia/algoliasearch-client-php": "<3.2.0|>=5.0.0"
},
"require-dev": {
"algolia/algoliasearch-client-php": "^3.2|^4.0",
"meilisearch/meilisearch-php": "^1.0",
"mockery/mockery": "^1.0",
"orchestra/testbench": "^7.31|^8.11|^9.0|^10.0",
"php-http/guzzle7-adapter": "^1.0",
"phpstan/phpstan": "^1.10",
"phpunit/phpunit": "^9.3|^10.4|^11.5",
"typesense/typesense-php": "^4.9.3"
},
"suggest": {
"algolia/algoliasearch-client-php": "Required to use the Algolia engine (^3.2).",
"meilisearch/meilisearch-php": "Required to use the Meilisearch engine (^1.0).",
"typesense/typesense-php": "Required to use the Typesense engine (^4.9)."
},
"type": "library",
"extra": {
"laravel": {
"providers": [
"Laravel\\Scout\\ScoutServiceProvider"
]
},
"branch-alias": {
"dev-master": "10.x-dev"
}
},
"autoload": {
"psr-4": {
"Laravel\\Scout\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Taylor Otwell",
"email": "taylor@laravel.com"
}
],
"description": "Laravel Scout provides a driver based solution to searching your Eloquent models.",
"keywords": [
"algolia",
"laravel",
"search"
],
"support": {
"issues": "https://github.com/laravel/scout/issues",
"source": "https://github.com/laravel/scout"
},
"time": "2025-08-26T14:24:24+00:00"
},
{
"name": "laravel/serializable-closure",
"version": "v2.0.4",
@ -2352,16 +2433,16 @@
},
{
"name": "nesbot/carbon",
"version": "3.10.2",
"version": "3.10.3",
"source": {
"type": "git",
"url": "https://github.com/CarbonPHP/carbon.git",
"reference": "76b5c07b8a9d2025ed1610e14cef1f3fd6ad2c24"
"reference": "8e3643dcd149ae0fe1d2ff4f2c8e4bbfad7c165f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/CarbonPHP/carbon/zipball/76b5c07b8a9d2025ed1610e14cef1f3fd6ad2c24",
"reference": "76b5c07b8a9d2025ed1610e14cef1f3fd6ad2c24",
"url": "https://api.github.com/repos/CarbonPHP/carbon/zipball/8e3643dcd149ae0fe1d2ff4f2c8e4bbfad7c165f",
"reference": "8e3643dcd149ae0fe1d2ff4f2c8e4bbfad7c165f",
"shasum": ""
},
"require": {
@ -2379,13 +2460,13 @@
"require-dev": {
"doctrine/dbal": "^3.6.3 || ^4.0",
"doctrine/orm": "^2.15.2 || ^3.0",
"friendsofphp/php-cs-fixer": "^3.75.0",
"friendsofphp/php-cs-fixer": "^v3.87.1",
"kylekatarnls/multi-tester": "^2.5.3",
"phpmd/phpmd": "^2.15.0",
"phpstan/extension-installer": "^1.4.3",
"phpstan/phpstan": "^2.1.17",
"phpunit/phpunit": "^10.5.46",
"squizlabs/php_codesniffer": "^3.13.0"
"phpstan/phpstan": "^2.1.22",
"phpunit/phpunit": "^10.5.53",
"squizlabs/php_codesniffer": "^3.13.4"
},
"bin": [
"bin/carbon"
@ -2453,7 +2534,7 @@
"type": "tidelift"
}
],
"time": "2025-08-02T09:36:06+00:00"
"time": "2025-09-06T13:39:36+00:00"
},
{
"name": "nette/schema",
@ -3438,20 +3519,20 @@
},
{
"name": "ramsey/uuid",
"version": "4.9.0",
"version": "4.9.1",
"source": {
"type": "git",
"url": "https://github.com/ramsey/uuid.git",
"reference": "4e0e23cc785f0724a0e838279a9eb03f28b092a0"
"reference": "81f941f6f729b1e3ceea61d9d014f8b6c6800440"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/ramsey/uuid/zipball/4e0e23cc785f0724a0e838279a9eb03f28b092a0",
"reference": "4e0e23cc785f0724a0e838279a9eb03f28b092a0",
"url": "https://api.github.com/repos/ramsey/uuid/zipball/81f941f6f729b1e3ceea61d9d014f8b6c6800440",
"reference": "81f941f6f729b1e3ceea61d9d014f8b6c6800440",
"shasum": ""
},
"require": {
"brick/math": "^0.8.8 || ^0.9 || ^0.10 || ^0.11 || ^0.12 || ^0.13",
"brick/math": "^0.8.8 || ^0.9 || ^0.10 || ^0.11 || ^0.12 || ^0.13 || ^0.14",
"php": "^8.0",
"ramsey/collection": "^1.2 || ^2.0"
},
@ -3510,9 +3591,9 @@
],
"support": {
"issues": "https://github.com/ramsey/uuid/issues",
"source": "https://github.com/ramsey/uuid/tree/4.9.0"
"source": "https://github.com/ramsey/uuid/tree/4.9.1"
},
"time": "2025-06-25T14:20:11+00:00"
"time": "2025-09-04T20:59:21+00:00"
},
{
"name": "symfony/clock",
@ -7835,16 +7916,16 @@
},
{
"name": "sebastian/comparator",
"version": "5.0.3",
"version": "5.0.4",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/comparator.git",
"reference": "a18251eb0b7a2dcd2f7aa3d6078b18545ef0558e"
"reference": "e8e53097718d2b53cfb2aa859b06a41abf58c62e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/a18251eb0b7a2dcd2f7aa3d6078b18545ef0558e",
"reference": "a18251eb0b7a2dcd2f7aa3d6078b18545ef0558e",
"url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/e8e53097718d2b53cfb2aa859b06a41abf58c62e",
"reference": "e8e53097718d2b53cfb2aa859b06a41abf58c62e",
"shasum": ""
},
"require": {
@ -7900,15 +7981,27 @@
"support": {
"issues": "https://github.com/sebastianbergmann/comparator/issues",
"security": "https://github.com/sebastianbergmann/comparator/security/policy",
"source": "https://github.com/sebastianbergmann/comparator/tree/5.0.3"
"source": "https://github.com/sebastianbergmann/comparator/tree/5.0.4"
},
"funding": [
{
"url": "https://github.com/sebastianbergmann",
"type": "github"
},
{
"url": "https://liberapay.com/sebastianbergmann",
"type": "liberapay"
},
{
"url": "https://thanks.dev/u/gh/sebastianbergmann",
"type": "thanks_dev"
},
{
"url": "https://tidelift.com/funding/github/packagist/sebastian/comparator",
"type": "tidelift"
}
],
"time": "2024-10-18T14:56:07+00:00"
"time": "2025-09-07T05:25:07+00:00"
},
{
"name": "sebastian/complexity",

View File

@ -71,6 +71,7 @@ return [
'links' => [
public_path('patch-data') => storage_path('app/public/patch-data'),
public_path('item-icon') => storage_path('app/public/item-icon'),
],
];

209
config/scout.php Normal file
View File

@ -0,0 +1,209 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Default Search Engine
|--------------------------------------------------------------------------
|
| This option controls the default search connection that gets used while
| using Laravel Scout. This connection is used when syncing all models
| to the search service. You should adjust this based on your needs.
|
| Supported: "algolia", "meilisearch", "typesense",
| "database", "collection", "null"
|
*/
'driver' => env('SCOUT_DRIVER', 'algolia'),
/*
|--------------------------------------------------------------------------
| Index Prefix
|--------------------------------------------------------------------------
|
| Here you may specify a prefix that will be applied to all search index
| names used by Scout. This prefix may be useful if you have multiple
| "tenants" or applications sharing the same search infrastructure.
|
*/
'prefix' => env('SCOUT_PREFIX', ''),
/*
|--------------------------------------------------------------------------
| Queue Data Syncing
|--------------------------------------------------------------------------
|
| This option allows you to control if the operations that sync your data
| with your search engines are queued. When this is set to "true" then
| all automatic data syncing will get queued for better performance.
|
*/
'queue' => env('SCOUT_QUEUE', false),
/*
|--------------------------------------------------------------------------
| Database Transactions
|--------------------------------------------------------------------------
|
| This configuration option determines if your data will only be synced
| with your search indexes after every open database transaction has
| been committed, thus preventing any discarded data from syncing.
|
*/
'after_commit' => false,
/*
|--------------------------------------------------------------------------
| Chunk Sizes
|--------------------------------------------------------------------------
|
| These options allow you to control the maximum chunk size when you are
| mass importing data into the search engine. This allows you to fine
| tune each of these chunk sizes based on the power of the servers.
|
*/
'chunk' => [
'searchable' => 500,
'unsearchable' => 500,
],
/*
|--------------------------------------------------------------------------
| Soft Deletes
|--------------------------------------------------------------------------
|
| This option allows to control whether to keep soft deleted records in
| the search indexes. Maintaining soft deleted records can be useful
| if your application still needs to search for the records later.
|
*/
'soft_delete' => false,
/*
|--------------------------------------------------------------------------
| Identify User
|--------------------------------------------------------------------------
|
| This option allows you to control whether to notify the search engine
| of the user performing the search. This is sometimes useful if the
| engine supports any analytics based on this application's users.
|
| Supported engines: "algolia"
|
*/
'identify' => env('SCOUT_IDENTIFY', false),
/*
|--------------------------------------------------------------------------
| Algolia Configuration
|--------------------------------------------------------------------------
|
| Here you may configure your Algolia settings. Algolia is a cloud hosted
| search engine which works great with Scout out of the box. Just plug
| in your application ID and admin API key to get started searching.
|
*/
'algolia' => [
'id' => env('ALGOLIA_APP_ID', ''),
'secret' => env('ALGOLIA_SECRET', ''),
'index-settings' => [
// 'users' => [
// 'searchableAttributes' => ['id', 'name', 'email'],
// 'attributesForFaceting'=> ['filterOnly(email)'],
// ],
],
],
/*
|--------------------------------------------------------------------------
| Meilisearch Configuration
|--------------------------------------------------------------------------
|
| Here you may configure your Meilisearch settings. Meilisearch is an open
| source search engine with minimal configuration. Below, you can state
| the host and key information for your own Meilisearch installation.
|
| See: https://www.meilisearch.com/docs/learn/configuration/instance_options#all-instance-options
|
*/
'meilisearch' => [
'host' => env('MEILISEARCH_HOST', 'http://localhost:7700'),
'key' => env('MEILISEARCH_KEY'),
'index-settings' => [
// 'users' => [
// 'filterableAttributes'=> ['id', 'name', 'email'],
// ],
],
],
/*
|--------------------------------------------------------------------------
| Typesense Configuration
|--------------------------------------------------------------------------
|
| Here you may configure your Typesense settings. Typesense is an open
| source search engine using minimal configuration. Below, you will
| state the host, key, and schema configuration for the instance.
|
*/
'typesense' => [
'client-settings' => [
'api_key' => env('TYPESENSE_API_KEY', 'xyz'),
'nodes' => [
[
'host' => env('TYPESENSE_HOST', 'localhost'),
'port' => env('TYPESENSE_PORT', '8108'),
'path' => env('TYPESENSE_PATH', ''),
'protocol' => env('TYPESENSE_PROTOCOL', 'http'),
],
],
'nearest_node' => [
'host' => env('TYPESENSE_HOST', 'localhost'),
'port' => env('TYPESENSE_PORT', '8108'),
'path' => env('TYPESENSE_PATH', ''),
'protocol' => env('TYPESENSE_PROTOCOL', 'http'),
],
'connection_timeout_seconds' => env('TYPESENSE_CONNECTION_TIMEOUT_SECONDS', 2),
'healthcheck_interval_seconds' => env('TYPESENSE_HEALTHCHECK_INTERVAL_SECONDS', 30),
'num_retries' => env('TYPESENSE_NUM_RETRIES', 3),
'retry_interval_seconds' => env('TYPESENSE_RETRY_INTERVAL_SECONDS', 1),
],
// 'max_total_results' => env('TYPESENSE_MAX_TOTAL_RESULTS', 1000),
'model-settings' => [
// User::class => [
// 'collection-schema' => [
// 'fields' => [
// [
// 'name' => 'id',
// 'type' => 'string',
// ],
// [
// 'name' => 'name',
// 'type' => 'string',
// ],
// [
// 'name' => 'created_at',
// 'type' => 'int64',
// ],
// ],
// 'default_sorting_field' => 'created_at',
// ],
// 'search-parameters' => [
// 'query_by' => 'name'
// ],
// ],
],
],
];

View File

@ -0,0 +1,49 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('pets', function (Blueprint $table) {
$table->integer('id')->primary();
$table->string('name', 255);
$table->integer('level')->default(1);
$table->integer('evolution')->default(1);
$table->integer('exp')->default(0);
$table->integer('expi')->default(0);
$table->integer('bonus0')->default(0);
$table->integer('bonus1')->default(0);
$table->integer('bonus2')->default(0);
$table->integer('skill0')->default(-1);
$table->integer('skill0lv')->default(0);
$table->integer('skill1')->default(-1);
$table->integer('skill1lv')->default(0);
$table->integer('skill2')->default(-1);
$table->integer('skill2lv')->default(0);
$table->integer('item_duration')->default(0);
$table->integer('born_duration')->nullable();
$table->dateTime('birthday')->nullable();
$table->integer('age')->nullable();
$table->integer('age_bonus')->nullable()->default(0);
$table->integer('pettype')->nullable()->default(0);
$table->integer('typebonus0')->nullable()->default(0);
$table->integer('typebonus1')->nullable()->default(0);
$table->integer('typebonus2')->nullable()->default(0);
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('pets');
}
};

View File

@ -1,5 +1,6 @@
<?php
use App\Http\Controllers\WikiController;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Route;
@ -17,3 +18,10 @@ use Illuminate\Support\Facades\Route;
Route::middleware('auth:sanctum')->get('/user', function (Request $request) {
return $request->user();
});
Route::prefix('wiki')->group(function () {
Route::prefix('items')->group(function () {
Route::get('/', [WikiController::class, 'search']);
Route::get('/{item}', [WikiController::class, 'show']);
});
});