Git Product home page Git Product logo

spellitemenchantment-reader's Introduction

SpellItemEnchantment-Reader

DBC reader for specific SpellItemEnchantment file


How to use ?

Simply insert the header file where you want extract some data and define an object with the file path to your SpellItemEnchantment.dbc:

#include <SpellItemEnchantmentReader/spell_item_enchantment_reader.h>
spell_item_enchantment_reader someData = new spell_item_enchantment_reader(":/binary/dbc/enUS/SpellItemEnchantment.dbc");

Now you can use some functions for getting data

// return record position for corresponding parameters ID ( Unique ID fields 0 )
// lang refer to your dbc loc, possibility of lang is contain in enum SpellItemEnchantmentStructure;
// you can use like : 
//                      SpellItemEnchantmentStructure::LANG_enUS or just LANG_enUS
//                      SpellItemEnchantmentStructure::LANG_frFR or just LANG_frFR
//                      ...
quint32 searchRecordByID(uint ID, int lang = LANG_enUS);

// return quint32 value from position in file
quint32 ValueFrom(quint32 pos);

// return quint32 value where ceil = {record, field}
quint32 ValueWhere(quint32 record, quint32 field);

// return array corresponding to fiels (2,3,4) in the record index
QVector<quint32> getStatKey(quint32 record );

// return array corresponding to fiels (11,12,13) in the record index
QVector<quint32> getStatType(quint32 record);

// return couple of array corresponding to fiels ( {5,8}, {6,9}, {7,10} ) in the record index
QVector<QVector<quint32>> getStatValue(quint32 record);

// return the only one string's field in the record index
QString getText(quint32 record);

And here there is an simple exemple

spell_item_enchantment_reader data = new spell_item_enchantment_reader(":/binary/dbc/enUS/SpellItemEnchantment.dbc", LANG_enUS);
quint32 record = data.searchRecordByID(266);

qDebug() << "Current cell [" << record << "]";

if (record) {
    QVector<quint32> stat_key = data.getStatKey(record);
    QVector<quint32> stat_type = data.getStatType(record);
    QVector<QVector<quint32>> stat_value = data.getStatValue(record);

    qDebug() << "String [" << data.getText(record); << "]";

    for (int i = 0; i <stat_type.size(); i++)
        qDebug() << "Key [" << stat_key[i] << "] : Type [" << stat_type[i] << "] : Min,Max - [" << stat_value[i][0] << "," << stat_value[i][1] << "]";
}

/* RETURN :

Current cell [ 242 ]
String [ "Fishing Lure (+100 Fishing Skill)" ]
Key [ 3 ] : Type [ 8085 ] : Min,Max - [ 0 , 0 ]
Key [ 0 ] : Type [ 0 ] : Min,Max - [ 0 , 0 ]
Key [ 0 ] : Type [ 0 ] : Min,Max - [ 0 , 0 ]

*/

spellitemenchantment-reader's People

Contributors

intemporel avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

freadblangks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.