Skip to content

update #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 21 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions CHANGELOG

This file was deleted.

17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Changelog

### v1.2 - May 16, 2013
- Allow adding nulls to records (thanks Steff!)
- Ensure string-block is always written preventing DBC corruption (thanks Sigmur!)

### v1.1 - April 8, 2013
- Fixed rule count bug when explicitly defining count of one
- Fixed dealing with sequential string mappings (thanks Artox!)
- Ensure empty field mappings default to unsigned integer
- `DBCRecord.get` and `DBCRecord.set` now use mappings correctly (thanks Artox!)
- Implemented `DBCMap::getFieldType`

### v1.0 - August 5, 2011
- Stable version release
- Changelog added
- Added DBC::VERSION
21 changes: 0 additions & 21 deletions LICENSE

This file was deleted.

24 changes: 24 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# License

Licensed under the **MIT** license

> Copyright (c) 2011-2013 Tim Kurvers <<[email protected]>>
>
> Permission is hereby granted, free of charge, to any person obtaining
> a copy of this software and associated documentation files (the
> "Software"), to deal in the Software without restriction, including
> without limitation the rights to use, copy, modify, merge, publish,
> distribute, sublicense, and/or sell copies of the Software, and to
> permit persons to whom the Software is furnished to do so, subject to
> the following conditions:
>
> The above copyright notice and this permission notice shall be
> included in all copies or substantial portions of the Software.
>
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
> EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
> MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
> IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
> CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
> TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
> SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
30 changes: 13 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,24 @@
World of Warcraft DBC Library
=============================
# World of Warcraft DBC Library

Copyright (c) 2011 Tim Kurvers <http://www.moonsphere.net>
![Unmaintained](https://img.shields.io/badge/%E2%9A%A0-unmaintained-red.svg?style=flat)

This library allows creation, reading and export of World of Warcraft's
client-side database files. These so-called DBCs store information
required by the client to operate successfully and can be extracted
from the MPQ archives of the actual game client.
This library allows creation, reading and export of World of Warcraft's
client-side database files.

These so-called DBCs store information required by the client and can be
extracted from the MPQ archives of the actual game client.

**Required PHP version: 5.x**

Licensed under the **MIT** license, see LICENSE for more information.

## Getting Started

Getting Started
---------------

Will be adding a quick-start quide soon.

Check out the `examples` to get started.

Usage Notes
-----------
## Usage Notes

* String localization will only provide accurate results when used with
the US English (enUS) or British English (enGB) distributed DBCs.
- String localization will only provide accurate results when used with US
English (enUS) or British English (enGB) distributed DBCs.

* Attempting to read DBCs with a non-standard field size, **may fail**.
- Attempting to read DBCs with a non-standard field size, **may fail**.
16 changes: 8 additions & 8 deletions examples/api.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,23 @@
/**
* World of Warcraft DBC Library
* Copyright (c) 2011 Tim Kurvers <http://www.moonsphere.net>
*
*
* This library allows creation, reading and export of World of Warcraft's
* client-side database files. These so-called DBCs store information
* required by the client to operate successfully and can be extracted
* from the MPQ archives of the actual game client.
*
* The contents of this file are subject to the MIT License, under which
*
* The contents of this file are subject to the MIT License, under which
* this library is licensed. See the LICENSE file for the full license.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*
* @author Tim Kurvers <[email protected]>
*/

Expand Down
16 changes: 8 additions & 8 deletions examples/creation.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,23 @@
/**
* World of Warcraft DBC Library
* Copyright (c) 2011 Tim Kurvers <http://www.moonsphere.net>
*
*
* This library allows creation, reading and export of World of Warcraft's
* client-side database files. These so-called DBCs store information
* required by the client to operate successfully and can be extracted
* from the MPQ archives of the actual game client.
*
* The contents of this file are subject to the MIT License, under which
*
* The contents of this file are subject to the MIT License, under which
* this library is licensed. See the LICENSE file for the full license.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*
* @author Tim Kurvers <[email protected]>
*/

Expand Down
16 changes: 8 additions & 8 deletions examples/edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,23 @@
/**
* World of Warcraft DBC Library
* Copyright (c) 2011 Tim Kurvers <http://www.moonsphere.net>
*
*
* This library allows creation, reading and export of World of Warcraft's
* client-side database files. These so-called DBCs store information
* required by the client to operate successfully and can be extracted
* from the MPQ archives of the actual game client.
*
* The contents of this file are subject to the MIT License, under which
*
* The contents of this file are subject to the MIT License, under which
* this library is licensed. See the LICENSE file for the full license.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*
* @author Tim Kurvers <[email protected]>
*/

Expand Down
18 changes: 9 additions & 9 deletions examples/export.database.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,23 @@
/**
* World of Warcraft DBC Library
* Copyright (c) 2011 Tim Kurvers <http://www.moonsphere.net>
*
*
* This library allows creation, reading and export of World of Warcraft's
* client-side database files. These so-called DBCs store information
* required by the client to operate successfully and can be extracted
* from the MPQ archives of the actual game client.
*
* The contents of this file are subject to the MIT License, under which
*
* The contents of this file are subject to the MIT License, under which
* this library is licensed. See the LICENSE file for the full license.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*
* @author Tim Kurvers <[email protected]>
*/

Expand All @@ -39,7 +39,7 @@
// And instruct it to export the given DBC to the default table 'dbc' (ensure the DBC has an attached map)
$dbe->export($dbc);

// Alternatively supports exporting to a file by providing a second argument
// Alternatively supports exporting to a file by providing a second argument
$dbe->export($dbc, './export/sample.sql');

// If you would rather export to a specific table, pass in a third parameter
Expand Down
18 changes: 9 additions & 9 deletions examples/export.json.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,23 @@
/**
* World of Warcraft DBC Library
* Copyright (c) 2011 Tim Kurvers <http://www.moonsphere.net>
*
*
* This library allows creation, reading and export of World of Warcraft's
* client-side database files. These so-called DBCs store information
* required by the client to operate successfully and can be extracted
* from the MPQ archives of the actual game client.
*
* The contents of this file are subject to the MIT License, under which
*
* The contents of this file are subject to the MIT License, under which
* this library is licensed. See the LICENSE file for the full license.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*
* @author Tim Kurvers <[email protected]>
*/

Expand All @@ -42,5 +42,5 @@
// And instruct it to export the given DBC (ensure the DBC has an attached map)
$json->export($dbc);

// Alternatively supports exporting to a file by providing a second argument
// Alternatively supports exporting to a file by providing a second argument
$json->export($dbc, './export/sample.json');
16 changes: 8 additions & 8 deletions examples/export.xml.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,23 @@
/**
* World of Warcraft DBC Library
* Copyright (c) 2011 Tim Kurvers <http://www.moonsphere.net>
*
*
* This library allows creation, reading and export of World of Warcraft's
* client-side database files. These so-called DBCs store information
* required by the client to operate successfully and can be extracted
* from the MPQ archives of the actual game client.
*
* The contents of this file are subject to the MIT License, under which
*
* The contents of this file are subject to the MIT License, under which
* this library is licensed. See the LICENSE file for the full license.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*
* @author Tim Kurvers <[email protected]>
*/

Expand Down
17 changes: 8 additions & 9 deletions examples/export/sample.sql
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
DROP TABLE IF EXISTS `my_table`;

CREATE TABLE `my_table` (
`id` INT(11) UNSIGNED NOT NULL,
`name` TEXT NOT NULL,
`points` INT(11) SIGNED NOT NULL,
`height` FLOAT NOT NULL,
`friend1` INT(11) SIGNED NOT NULL,
`friend2` INT(11) SIGNED NOT NULL,
PRIMARY KEY (`id`)
`id` INT(11) UNSIGNED NOT NULL,
`name` TEXT NULL,
`points` INT(11) SIGNED NOT NULL,
`height` FLOAT NOT NULL,
`friend1` INT(11) SIGNED NOT NULL,
`friend2` INT(11) SIGNED NOT NULL,
PRIMARY KEY (`id`)
);

INSERT INTO `my_table` VALUES
INSERT INTO `my_table` VALUES
(1, 'John', 100, 1.79999995232, 2, 0),
(2, 'Tim', 1337, 1.79999995232, 1, 0),
(3, 'Pete', -10, 1.54999995232, 1, 2),
Expand All @@ -19,4 +19,3 @@ INSERT INTO `my_table` VALUES
(4, 'Helen', 100, 1.79999995232, 0, 0),
(8, 'Frank', 1337, 1.73000001907, 0, 0),
(10, 'Brad', -10, 1.54999995232, 0, 0);

16 changes: 8 additions & 8 deletions examples/mappings.detect.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,23 @@
/**
* World of Warcraft DBC Library
* Copyright (c) 2011 Tim Kurvers <http://www.moonsphere.net>
*
*
* This library allows creation, reading and export of World of Warcraft's
* client-side database files. These so-called DBCs store information
* required by the client to operate successfully and can be extracted
* from the MPQ archives of the actual game client.
*
* The contents of this file are subject to the MIT License, under which
*
* The contents of this file are subject to the MIT License, under which
* this library is licensed. See the LICENSE file for the full license.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*
* @author Tim Kurvers <[email protected]>
*/

Expand Down
Loading