Skip to content

Commit

Permalink
Lets Log handing in a quest to see what the issue is.
Browse files Browse the repository at this point in the history
  • Loading branch information
AdamKyle committed Oct 12, 2024
1 parent 03ba177 commit 7fd34f2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,6 @@ class MassImportCustomData extends Command
public function handle()
{

Artisan::call('import:game-data Items');

Item::where('name', 'Musty Childs Teddy bare')->first()->update([
'name' => 'Musty Childs Teddy Bear',
]);

$this->importInformationSection();

if (config('app.env') !== 'production') {
Expand Down
9 changes: 5 additions & 4 deletions app/Game/Quests/Controllers/Api/QuestsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
use App\Game\Quests\Services\QuestHandlerService;
use App\Game\Skills\Values\SkillTypeValue;
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\Log;

class QuestsController extends Controller
{
Expand Down Expand Up @@ -80,9 +81,10 @@ public function handInQuest(Quest $quest, Character $character)
->where('game_map_id', $quest->npc->game_map_id);

if (! is_null($characterIsAtLocation)) {

Log::info('Moving Character: ' . $character->name);
$response = $this->questHandler->moveCharacter($character, $quest->npc);

Log::info('Moved Character: ' . $character->name);
Log::info($response);
if ($response instanceof Character) {
$response = $this->questHandler->handInQuest($character, $quest);
}
Expand All @@ -98,9 +100,8 @@ public function handInQuest(Quest $quest, Character $character)

unset($response['status']);

$response['message'] = 'You completed the quest: '.$quest->name.'. Above is the updated story for the quest.';
$response['message'] = 'You completed the quest: ' . $quest->name . '. Above is the updated story for the quest.';

return response()->json($response);

}
}

0 comments on commit 7fd34f2

Please sign in to comment.