diff --git a/QSW/plugins/spellinfo/pre-tbc-cmangos/spellinfo.cpp b/QSW/plugins/spellinfo/pre-tbc-cmangos/spellinfo.cpp index 2c8fec4..bd9ccbc 100644 --- a/QSW/plugins/spellinfo/pre-tbc-cmangos/spellinfo.cpp +++ b/QSW/plugins/spellinfo/pre-tbc-cmangos/spellinfo.cpp @@ -112,7 +112,7 @@ void SpellInfo::setModifiedSqlDataResult(quint8 queryIndex, QSqlQuery& query) // add new index for meta spell m_metaSpellIndexes.append(id); m_internalSpells.append(id); - m_metaSpells.append(new Spell::meta(spell)); + m_metaSpells.append(new Spell::meta(spell, true)); QString str = query.value(117).toString(); qint32 index = m_modifiedStrings.indexOf(str); @@ -1279,4 +1279,4 @@ QVariantHash SpellInfo::getValues(quint32 id) const values["effect"] = effectList; return values; -} \ No newline at end of file +} diff --git a/QSW/plugins/spellinfo/pre-tbc-cmangos/structure.h b/QSW/plugins/spellinfo/pre-tbc-cmangos/structure.h index a07fc65..783023b 100644 --- a/QSW/plugins/spellinfo/pre-tbc-cmangos/structure.h +++ b/QSW/plugins/spellinfo/pre-tbc-cmangos/structure.h @@ -315,7 +315,7 @@ namespace Spell public: - meta(const entry* info) : m_info(info), m_destroyInfo(false) {} + meta(const entry* info, bool serverSide = false) : m_info(info), m_destroyInfo(false), m_serverSide(serverSide) {} ~meta() { @@ -430,6 +430,9 @@ namespace Spell qint32 TriggerDuration(quint8 index) { return m_info->getTriggerDuration(index); } QString NameWithRank() { return m_info->nameWithRank(); } + // Addition properties + bool IsServerSide() { return m_serverSide; } + bool hasAura(quint32 auraId) { for (quint8 i = 0; i < MAX_EFFECT_INDEX; ++i) @@ -468,6 +471,7 @@ namespace Spell const entry* m_info; bool m_destroyInfo; + bool m_serverSide; Q_PROPERTY(quint32 Id READ Id) Q_PROPERTY(quint32 School READ School) @@ -538,6 +542,7 @@ namespace Spell Q_PROPERTY(quint32 RequiredAuraVision READ RequiredAuraVision) Q_PROPERTY(qint32 Duration READ Duration) Q_PROPERTY(QString NameWithRank READ NameWithRank) + Q_PROPERTY(bool IsServerSide READ IsServerSide) }; } diff --git a/QSW/plugins/spellinfo/tbc-cmangos/spellinfo.cpp b/QSW/plugins/spellinfo/tbc-cmangos/spellinfo.cpp index 1f2ece7..956a18a 100644 --- a/QSW/plugins/spellinfo/tbc-cmangos/spellinfo.cpp +++ b/QSW/plugins/spellinfo/tbc-cmangos/spellinfo.cpp @@ -115,7 +115,7 @@ void SpellInfo::setModifiedSqlDataResult(quint8 queryIndex, QSqlQuery& query) // add new index for meta spell m_metaSpellIndexes.append(id); m_internalSpells.append(id); - m_metaSpells.append(new Spell::meta(spell)); + m_metaSpells.append(new Spell::meta(spell, true)); QString str = query.value(124).toString(); qint32 index = m_modifiedStrings.indexOf(str); diff --git a/QSW/plugins/spellinfo/tbc-cmangos/structure.h b/QSW/plugins/spellinfo/tbc-cmangos/structure.h index ee68627..84ddc73 100644 --- a/QSW/plugins/spellinfo/tbc-cmangos/structure.h +++ b/QSW/plugins/spellinfo/tbc-cmangos/structure.h @@ -317,7 +317,7 @@ namespace Spell public: - meta(const entry* info) : m_info(info), m_destroyInfo(false) {} + meta(const entry* info, bool serverSide = false) : m_info(info), m_destroyInfo(false), m_serverSide(serverSide) {} ~meta() { @@ -440,6 +440,9 @@ namespace Spell qint32 TriggerDuration(quint8 index) { return m_info->getTriggerDuration(index); } QString NameWithRank() { return m_info->nameWithRank(); } + // Addition properties + bool IsServerSide() { return m_serverSide; } + bool hasAura(quint32 auraId) { for (quint8 i = 0; i < MAX_EFFECT_INDEX; ++i) @@ -478,6 +481,7 @@ namespace Spell const entry* m_info; bool m_destroyInfo; + bool m_serverSide; Q_PROPERTY(quint32 Id READ Id) Q_PROPERTY(quint32 Category READ Category) @@ -555,6 +559,7 @@ namespace Spell Q_PROPERTY(quint32 SchoolMask READ SchoolMask) Q_PROPERTY(qint32 Duration READ Duration) Q_PROPERTY(QString NameWithRank READ NameWithRank) + Q_PROPERTY(bool IsServerSide READ IsServerSide) }; } diff --git a/QSW/plugins/spellinfo/wotlk-cmangos/spellinfo.cpp b/QSW/plugins/spellinfo/wotlk-cmangos/spellinfo.cpp index 3186428..f9db985 100644 --- a/QSW/plugins/spellinfo/wotlk-cmangos/spellinfo.cpp +++ b/QSW/plugins/spellinfo/wotlk-cmangos/spellinfo.cpp @@ -125,7 +125,7 @@ void SpellInfo::setModifiedSqlDataResult(quint8 queryIndex, QSqlQuery& query) // add new index for meta spell m_metaSpellIndexes.append(id); m_internalSpells.append(id); - m_metaSpells.append(new Spell::meta(spell)); + m_metaSpells.append(new Spell::meta(spell, true)); QString str = query.value(133).toString(); qint32 index = m_modifiedStrings.indexOf(str); diff --git a/QSW/plugins/spellinfo/wotlk-cmangos/structure.h b/QSW/plugins/spellinfo/wotlk-cmangos/structure.h index 097657a..008a6dc 100644 --- a/QSW/plugins/spellinfo/wotlk-cmangos/structure.h +++ b/QSW/plugins/spellinfo/wotlk-cmangos/structure.h @@ -334,7 +334,7 @@ namespace Spell public: - meta(const entry* info) : m_info(info), m_destroyInfo(false) {} + meta(const entry* info, bool serverSide = false) : m_info(info), m_destroyInfo(false), m_serverSide(serverSide) {} ~meta() { @@ -468,6 +468,9 @@ namespace Spell qint32 TriggerDuration(quint8 index) { return m_info->getTriggerDuration(index); } QString NameWithRank() { return m_info->nameWithRank(); } + // Addition properties + bool IsServerSide() { return m_serverSide; } + bool hasAura(quint32 auraId) { for (quint8 i = 0; i < MAX_EFFECT_INDEX; ++i) @@ -506,6 +509,7 @@ namespace Spell const entry* m_info; bool m_destroyInfo; + bool m_serverSide; Q_PROPERTY(quint32 Id READ Id) Q_PROPERTY(quint32 Category READ Category) @@ -591,6 +595,7 @@ namespace Spell Q_PROPERTY(quint32 SpellDifficultyId READ SpellDifficultyId) Q_PROPERTY(qint32 Duration READ Duration) Q_PROPERTY(QString NameWithRank READ NameWithRank) + Q_PROPERTY(bool IsServerSide READ IsServerSide) }; }