Setup/Data

* move custom data from setup scripts to DB
 * move strings from DB to locale files
 * use common function to calculate coordinates of dungeon entrances instead of inline sql
 * fixed manual data zones and itemset
 * fixed typos across the board
This commit is contained in:
Sarjuuk
2022-02-21 22:51:25 +01:00
parent 10805a1f70
commit bc71ae762c
32 changed files with 481 additions and 373 deletions

View File

@@ -9,26 +9,12 @@ if (!CLI)
SqlGen::register(new class extends SetupScript
{
use TrCustomData;
use TrCustomData; // import custom data from DB
protected $command = 'classes';
protected $dbcSourceFiles = ['spell', 'charbaseinfo', 'skillraceclassinfo', 'skilllineability', 'chrclasses'];
// roles (1:heal; 2:mleDPS; 4:rngDPS; 8:tank)
private $customData = array(
1 => ['roles' => 0xA],
2 => ['roles' => 0xB],
3 => ['roles' => 0x4],
4 => ['roles' => 0x2],
5 => ['roles' => 0x5],
6 => ['roles' => 0xA],
7 => ['roles' => 0x7],
8 => ['roles' => 0x4],
9 => ['roles' => 0x4],
11 => ['roles' => 0xF],
);
public function generate(array $ids = []) : bool
{
$classes = DB::Aowow()->select('SELECT *, id AS ARRAY_KEY FROM dbc_chrclasses');