Skip to content
This repository was archived by the owner on Jun 16, 2019. It is now read-only.

Commit addc0e9

Browse files
Merge pull request #6 from ShinDarth/quest-items
Implemented *_questitem routes for Creatures and GameObjects
2 parents 92dd2a1 + a7142c0 commit addc0e9

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

app/Http/routes.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -635,6 +635,14 @@
635635
})
636636
->where('id', '[0-9]+');
637637

638+
Route::get('/creature/questitem/{id}', function($id) {
639+
640+
$results = DB::connection('world')->select("SELECT * FROM creature_questitem WHERE CreatureEntry = ?", [$id]);
641+
642+
return Response::json($results);
643+
})
644+
->where('id', '[0-9]+');
645+
638646

639647
/* Gameobjects */
640648

@@ -723,6 +731,14 @@
723731
})
724732
->where('id', '[0-9]+');
725733

734+
Route::get('/gameobject/questitem/{id}', function($id) {
735+
736+
$results = DB::connection('world')->select("SELECT * FROM gameobject_questitem WHERE GameObjectEntry = ?", [$id]);
737+
738+
return Response::json($results);
739+
})
740+
->where('id', '[0-9]+');
741+
726742

727743
/* Items */
728744

0 commit comments

Comments
 (0)