diff --git a/src/game/Server/DBCStructure.h b/src/game/Server/DBCStructure.h index 452403c8f..e58d579ab 100644 --- a/src/game/Server/DBCStructure.h +++ b/src/game/Server/DBCStructure.h @@ -2050,14 +2050,6 @@ struct SpellEntry uint32 GetTargets() const; uint32 GetEffectApplyAuraNameByIndex(SpellEffectIndex index) const; - // helpers - /* - int32 CalculateSimpleValue(SpellEffectIndex eff) const { return EffectBasePoints[eff] + int32(1); } - ClassFamilyMask const& GetEffectSpellClassMask(SpellEffectIndex effect) const - { - return EffectSpellClassMask[effect]; - } */ - bool IsFitToFamilyMask(uint64 familyFlags, uint32 familyFlags2 = 0) const { SpellClassOptionsEntry const* classOpt = GetSpellClassOptions(); diff --git a/src/modules/Eluna/UnitMethods.h b/src/modules/Eluna/UnitMethods.h index 68920969f..e17274788 100644 --- a/src/modules/Eluna/UnitMethods.h +++ b/src/modules/Eluna/UnitMethods.h @@ -2209,8 +2209,9 @@ namespace LuaUnit SpellAuraHolder* holder = CreateSpellAuraHolder(spellInfo, target, unit); for (uint32 i = 0; i < MAX_EFFECT_INDEX; ++i) - { - uint8 eff = spellInfo->Effect[i]; + { + uint8 eff = (uint8)spellInfo->GetSpellEffect(SpellEffectIndex(i)); + // uint8 eff = spellInfo->Effect[i]; // Effect is a member of SpellEffectIndex, nit SpellEvent if (eff >= TOTAL_SPELL_EFFECTS) continue; if (IsAreaAuraEffect(eff) || diff --git a/src/shared/Utilities/Util.cpp b/src/shared/Utilities/Util.cpp index b28460e16..85ba2b8eb 100644 --- a/src/shared/Utilities/Util.cpp +++ b/src/shared/Utilities/Util.cpp @@ -422,6 +422,17 @@ bool Utf8toWStr(const std::string& utf8str, std::wstring& wstr) return true; } +bool Utf8ToUpperOnlyLatin(std::string &utf8String) +{ + std::wstring wstr; + if (!Utf8toWStr(utf8String, wstr)) + return false; + + std::transform(wstr.begin(), wstr.end(), wstr.begin(), wcharToUpperOnlyLatin); + + return WStrToUtf8(wstr, utf8String); +} + bool WStrToUtf8(wchar_t* wstr, size_t size, std::string& utf8str) { try diff --git a/src/shared/Utilities/Util.h b/src/shared/Utilities/Util.h index 6891c9efd..bd7f4808a 100644 --- a/src/shared/Utilities/Util.h +++ b/src/shared/Utilities/Util.h @@ -282,7 +282,13 @@ inline bool Utf8toWStr(const std::string& utf8str, wchar_t* wstr, size_t& wsize) { return Utf8toWStr(utf8str.c_str(), utf8str.size(), wstr, wsize); } - +/** +* @brief +* +* @param utf8String +* @return bool +*/ +bool Utf8ToUpperOnlyLatin(std::string &utf8String); /** * @brief *