Core/Misc: buildfix
This commit is contained in:
1 parent
594002faa6
commit
3ef6132fce
11 files changed
+70
-25
No files matched your search
@@ -18,16 +18,12 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
mkdir bin
|
mkdir bin
|
||||||
cd bin
|
cd bin
|
||||||
cmake ../ -DWITH_WARNINGS=1 -DWITH_COREDEBUG=0 -DUSE_COREPCH=1 -DUSE_SCRIPTPCH=1 -DTOOLS=1 -DSCRIPTS=static -DSERVERS=1 -DNOJEM=0 -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=clang-11 -DCMAKE_CXX_COMPILER=clang++-11 -DCMAKE_C_FLAGS="-Werror" -DCMAKE_CXX_FLAGS="-Werror" -DCMAKE_C_FLAGS_DEBUG="-DNDEBUG" -DCMAKE_CXX_FLAGS_DEBUG="-DNDEBUG" -DCMAKE_INSTALL_PREFIX=check_install -DBUILD_TESTING=0
|
cmake ../ -DWITH_WARNINGS=1 -DWITH_COREDEBUG=0 -DUSE_COREPCH=1 -DUSE_SCRIPTPCH=1 -DTOOLS=1 -DSCRIPTS=static -DSERVERS=1 -DNOJEM=0 -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_FLAGS="-Werror" -DCMAKE_CXX_FLAGS="-Werror" -DCMAKE_C_FLAGS_DEBUG="-DNDEBUG" -DCMAKE_CXX_FLAGS_DEBUG="-DNDEBUG" -DCMAKE_INSTALL_PREFIX=check_install -DBUILD_TESTING=0
|
||||||
cd ..
|
cd ..
|
||||||
- name: Build
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
cd bin
|
cd bin
|
||||||
make -j 4 -k && make install
|
make -j 4 -k && make install
|
||||||
- name: Unit tests
|
|
||||||
run: |
|
|
||||||
cd bin
|
|
||||||
make test
|
|
||||||
- name: Check executables
|
- name: Check executables
|
||||||
run: |
|
run: |
|
||||||
cd bin/check_install/bin
|
cd bin/check_install/bin
|
||||||
|
|||||||
@@ -23,10 +23,6 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
cd bin
|
cd bin
|
||||||
make -j 4 -k && make install
|
make -j 4 -k && make install
|
||||||
- name: Unit tests
|
|
||||||
run: |
|
|
||||||
cd bin
|
|
||||||
make test
|
|
||||||
- name: Check executables
|
- name: Check executables
|
||||||
run: |
|
run: |
|
||||||
cd bin/check_install/bin
|
cd bin/check_install/bin
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
UPDATE `world_state` SET `MapIDs`= '30' WHERE `MapIDs`= '30,2197';
|
||||||
|
UPDATE `world_state` SET `MapIDs`= '489,726' WHERE `MapIDs`= '489,726,2106';
|
||||||
|
UPDATE `world_state` SET `MapIDs`= '489' WHERE `MapIDs`= '489,2106';
|
||||||
|
UPDATE `world_state` SET `MapIDs`= '529,566,761,968' WHERE `MapIDs`= '529,566,761,968,1105,1681,2107,2177';
|
||||||
|
UPDATE `world_state` SET `MapIDs`= '529,566,761,968' WHERE `MapIDs`= '529,761,1681,2107,2177';
|
||||||
|
UPDATE `world_state` SET `MapIDs`= '529' WHERE `MapIDs`= '529,1681,2107,2177';
|
||||||
@@ -626,6 +626,11 @@ void Trinity::Impl::HexStrToByteArray(std::string_view str, uint8* out, size_t o
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool StringEqualI(std::string_view a, std::string_view b)
|
||||||
|
{
|
||||||
|
return std::ranges::equal(a, b, {}, charToLower, charToLower);
|
||||||
|
}
|
||||||
|
|
||||||
bool StringToBool(std::string const& str)
|
bool StringToBool(std::string const& str)
|
||||||
{
|
{
|
||||||
std::string lowerStr = str;
|
std::string lowerStr = str;
|
||||||
|
|||||||
@@ -269,6 +269,16 @@ inline wchar_t wcharToLower(wchar_t wchar)
|
|||||||
return wchar;
|
return wchar;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
struct CharToUpper
|
||||||
|
{
|
||||||
|
char operator()(char c) const { return std::toupper(static_cast<unsigned char>(c)); }
|
||||||
|
} inline constexpr charToUpper;
|
||||||
|
|
||||||
|
struct CharToLower
|
||||||
|
{
|
||||||
|
char operator()(char c) const { return std::tolower(static_cast<unsigned char>(c)); }
|
||||||
|
} inline constexpr charToLower;
|
||||||
|
|
||||||
TC_COMMON_API void wstrToUpper(std::wstring& str);
|
TC_COMMON_API void wstrToUpper(std::wstring& str);
|
||||||
TC_COMMON_API void wstrToLower(std::wstring& str);
|
TC_COMMON_API void wstrToLower(std::wstring& str);
|
||||||
|
|
||||||
@@ -326,6 +336,8 @@ TC_COMMON_API bool StringContainsStringI(std::string const& haystack, std::strin
|
|||||||
|
|
||||||
TC_COMMON_API float DegToRad(float degrees);
|
TC_COMMON_API float DegToRad(float degrees);
|
||||||
|
|
||||||
|
TC_COMMON_API bool StringEqualI(std::string_view str1, std::string_view str2);
|
||||||
|
|
||||||
template<class Container>
|
template<class Container>
|
||||||
std::string StringJoin(Container const& c, std::string delimiter)
|
std::string StringJoin(Container const& c, std::string delimiter)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1528,13 +1528,13 @@ struct SkillLineAbilityEntry
|
|||||||
struct SkillRaceClassInfoEntry
|
struct SkillRaceClassInfoEntry
|
||||||
{
|
{
|
||||||
//uint32 ID; // 0
|
//uint32 ID; // 0
|
||||||
uint32 SkillID; // 1
|
int32 SkillID; // 1
|
||||||
uint32 RaceMask; // 2
|
int32 RaceMask; // 2
|
||||||
uint32 ClassMask; // 3
|
int32 ClassMask; // 3
|
||||||
uint32 Flags; // 4
|
int32 Flags; // 4
|
||||||
uint32 Availability; // 5
|
int32 Availability; // 5
|
||||||
uint32 MinLevel; // 6
|
int32 MinLevel; // 6
|
||||||
uint32 SkillTierID; // 7
|
int32 SkillTierID; // 7
|
||||||
//uint32 SkillCostIndex; // 8
|
//uint32 SkillCostIndex; // 8
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -8103,7 +8103,7 @@ void Player::CastItemUseSpell(Item* item, SpellCastTargets const& targets, uint8
|
|||||||
Spell* spell = new Spell(this, spellInfo, TRIGGERED_NONE);
|
Spell* spell = new Spell(this, spellInfo, TRIGGERED_NONE);
|
||||||
spell->m_CastItem = item;
|
spell->m_CastItem = item;
|
||||||
spell->m_cast_count = castId;
|
spell->m_cast_count = castId;
|
||||||
spell->SetSpellValue({ SPELLVALUE_BASE_POINT0, learning_spell_id });
|
spell->SetSpellValue({ SPELLVALUE_BASE_POINT0, static_cast<int32>(learning_spell_id) });
|
||||||
spell->prepare(targets);
|
spell->prepare(targets);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -23351,7 +23351,7 @@ void Player::LearnSkillRewardedSpells(uint32 skillId, uint32 skillValue)
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
// need unlearn spell
|
// need unlearn spell
|
||||||
if (int32(skillValue) < ability->MinSkillLineRank && ability->GetAcquireMethod() == SkillLineAbilityAcquireMethod::AutomaticSkillRank)
|
if (skillValue < ability->MinSkillLineRank && ability->GetAcquireMethod() == SkillLineAbilityAcquireMethod::AutomaticSkillRank)
|
||||||
RemoveSpell(ability->Spell);
|
RemoveSpell(ability->Spell);
|
||||||
|
|
||||||
// need learn
|
// need learn
|
||||||
|
|||||||
@@ -7849,7 +7849,7 @@ void ObjectMgr::LoadQuestPOI()
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Some POIs can reference empty blobs according to sniff data
|
// Some POIs can reference empty blobs according to sniff data
|
||||||
poiData.Blobs.emplace_back(blobIndex, objectiveIndex, mapID, worldMapAreaID, floor, priority, flags, std::move(std::vector<QuestPOIBlobPoint>()));
|
poiData.Blobs.emplace_back(blobIndex, objectiveIndex, mapID, worldMapAreaID, floor, priority, flags, std::vector<QuestPOIBlobPoint>());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1132,7 +1132,7 @@ void WorldSession::HandleSetTitleOpcode(WorldPacket& recvData)
|
|||||||
recvData >> title;
|
recvData >> title;
|
||||||
|
|
||||||
// -1 at none
|
// -1 at none
|
||||||
if (title > 0 && title < MAX_TITLE_INDEX)
|
if (title > 0)
|
||||||
{
|
{
|
||||||
if (!GetPlayer()->HasTitle(title))
|
if (!GetPlayer()->HasTitle(title))
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -693,7 +693,7 @@ void PoolMgr::LoadFromDB()
|
|||||||
|
|
||||||
// Now check for circular reference
|
// Now check for circular reference
|
||||||
// All pool_ids are in pool_template
|
// All pool_ids are in pool_template
|
||||||
for (auto const it : mPoolTemplate)
|
for (auto const& it : mPoolTemplate)
|
||||||
{
|
{
|
||||||
std::set<uint32> checkedPools;
|
std::set<uint32> checkedPools;
|
||||||
for (SearchMap::iterator poolItr = mPoolSearchMap.find(it.first); poolItr != mPoolSearchMap.end(); poolItr = mPoolSearchMap.find(poolItr->second))
|
for (SearchMap::iterator poolItr = mPoolSearchMap.find(it.first); poolItr != mPoolSearchMap.end(); poolItr = mPoolSearchMap.find(poolItr->second))
|
||||||
|
|||||||
@@ -483,7 +483,7 @@ void AuraEffect::GetApplicationList(Container& applicationContainer) const
|
|||||||
int32 AuraEffect::CalculateAmount(Unit* caster)
|
int32 AuraEffect::CalculateAmount(Unit* caster)
|
||||||
{
|
{
|
||||||
// default amount calculation
|
// default amount calculation
|
||||||
int32 amount = amount = m_spellInfo->Effects[m_effIndex].CalcValue(caster, &m_baseAmount, GetBase()->GetOwner()->ToUnit());;
|
int32 amount = m_spellInfo->Effects[m_effIndex].CalcValue(caster, &m_baseAmount, GetBase()->GetOwner()->ToUnit());;
|
||||||
|
|
||||||
// check item enchant aura cast
|
// check item enchant aura cast
|
||||||
if (!amount && caster)
|
if (!amount && caster)
|
||||||
@@ -581,6 +581,8 @@ int32 AuraEffect::CalculateAmount(Unit* caster)
|
|||||||
case 90363: // Embrace of the Shale Spider
|
case 90363: // Embrace of the Shale Spider
|
||||||
amount = resist / 2;
|
amount = resist / 2;
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -1420,6 +1422,8 @@ void AuraEffect::HandleShapeshiftBoosts(Unit* target, bool apply) const
|
|||||||
case 33873:
|
case 33873:
|
||||||
spellId3 = 47180;
|
spellId3 = 47180;
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
target->CastSpell(target, spellId3, this);
|
target->CastSpell(target, spellId3, this);
|
||||||
}
|
}
|
||||||
@@ -2538,7 +2542,7 @@ void AuraEffect::HandleAuraModPacifyAndSilence(AuraApplication const* aurApp, ui
|
|||||||
|
|
||||||
Unit* target = aurApp->GetTarget();
|
Unit* target = aurApp->GetTarget();
|
||||||
|
|
||||||
// Vengeance of the Blue Flight (@todo REMOVE THIS!)
|
// Vengeance of the Blue Flight (@todo REMOVE THIS!)5402
|
||||||
/// @workaround
|
/// @workaround
|
||||||
if (m_spellInfo->Id == 45839)
|
if (m_spellInfo->Id == 45839)
|
||||||
{
|
{
|
||||||
@@ -4634,6 +4638,8 @@ void AuraEffect::HandleAuraDummy(AuraApplication const* aurApp, uint8 mode, bool
|
|||||||
if (caster)
|
if (caster)
|
||||||
target->GetMotionMaster()->MoveFall();
|
target->GetMotionMaster()->MoveFall();
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// AT REMOVE
|
// AT REMOVE
|
||||||
@@ -4662,6 +4668,8 @@ void AuraEffect::HandleAuraDummy(AuraApplication const* aurApp, uint8 mode, bool
|
|||||||
case 30099: finalSpelId = 30100; break;
|
case 30099: finalSpelId = 30100; break;
|
||||||
case 30102: finalSpelId = 30103; break;
|
case 30102: finalSpelId = 30103; break;
|
||||||
case 30105: finalSpelId = 30104; break;
|
case 30105: finalSpelId = 30104; break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (finalSpelId)
|
if (finalSpelId)
|
||||||
@@ -4709,6 +4717,8 @@ void AuraEffect::HandleAuraDummy(AuraApplication const* aurApp, uint8 mode, bool
|
|||||||
if (aurApp->GetRemoveMode().HasFlag(AuraRemoveFlags::Expired))
|
if (aurApp->GetRemoveMode().HasFlag(AuraRemoveFlags::Expired))
|
||||||
target->CastSpell(target, 58601, true);
|
target->CastSpell(target, 58601, true);
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case SPELLFAMILY_DEATHKNIGHT:
|
case SPELLFAMILY_DEATHKNIGHT:
|
||||||
@@ -4793,7 +4803,7 @@ void AuraEffect::HandleAuraDummy(AuraApplication const* aurApp, uint8 mode, bool
|
|||||||
case 93806: // Darnassus Champion
|
case 93806: // Darnassus Champion
|
||||||
case 93811: // Exodar Champion
|
case 93811: // Exodar Champion
|
||||||
case 93805: // Ironforge Champion
|
case 93805: // Ironforge Champion
|
||||||
case 93795: // Sturmwind Champion
|
case 93795: // Stormwind Champion
|
||||||
{
|
{
|
||||||
if (!caster || caster->GetTypeId() != TYPEID_PLAYER)
|
if (!caster || caster->GetTypeId() != TYPEID_PLAYER)
|
||||||
break;
|
break;
|
||||||
@@ -4825,7 +4835,9 @@ void AuraEffect::HandleAuraDummy(AuraApplication const* aurApp, uint8 mode, bool
|
|||||||
case 93806: FactionID = 69; break; // Darnassus Champion
|
case 93806: FactionID = 69; break; // Darnassus Champion
|
||||||
case 93811: FactionID = 930; break; // Exodar Champion
|
case 93811: FactionID = 930; break; // Exodar Champion
|
||||||
case 93805: FactionID = 47; break; // Ironforge Champion
|
case 93805: FactionID = 47; break; // Ironforge Champion
|
||||||
case 93795: FactionID = 72; break; // Sturmwind Champion
|
case 93795: FactionID = 72; break; // Stormwind Champion
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
caster->ToPlayer()->SetChampioningFaction(FactionID);
|
caster->ToPlayer()->SetChampioningFaction(FactionID);
|
||||||
@@ -4877,6 +4889,8 @@ void AuraEffect::HandleAuraDummy(AuraApplication const* aurApp, uint8 mode, bool
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
@@ -4915,6 +4929,8 @@ void AuraEffect::HandleAuraDummy(AuraApplication const* aurApp, uint8 mode, bool
|
|||||||
// break;
|
// break;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -5332,6 +5348,8 @@ void AuraEffect::HandlePeriodicDummyAuraTick(Unit* target, Unit* caster) const
|
|||||||
target->RemoveAura(64821);
|
target->RemoveAura(64821);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case SPELLFAMILY_HUNTER:
|
case SPELLFAMILY_HUNTER:
|
||||||
@@ -5378,9 +5396,13 @@ void AuraEffect::HandlePeriodicDummyAuraTick(Unit* target, Unit* caster) const
|
|||||||
switch (GetId())
|
switch (GetId())
|
||||||
{
|
{
|
||||||
case 49016: // Hysteria
|
case 49016: // Hysteria
|
||||||
|
{
|
||||||
uint32 damage = uint32(target->CountPctFromMaxHealth(1));
|
uint32 damage = uint32(target->CountPctFromMaxHealth(1));
|
||||||
Unit::DealDamage(target, target, damage, 0, NODAMAGE, SPELL_SCHOOL_MASK_NORMAL, nullptr, false);
|
Unit::DealDamage(target, target, damage, 0, NODAMAGE, SPELL_SCHOOL_MASK_NORMAL, nullptr, false);
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
// Blood of the North
|
// Blood of the North
|
||||||
// Reaping
|
// Reaping
|
||||||
@@ -5550,6 +5572,8 @@ void AuraEffect::HandlePeriodicTriggerSpellAuraTick(Unit* target, Unit* caster)
|
|||||||
case 46736:
|
case 46736:
|
||||||
triggerSpellId = 46737;
|
triggerSpellId = 46737;
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -5565,6 +5589,8 @@ void AuraEffect::HandlePeriodicTriggerSpellAuraTick(Unit* target, Unit* caster)
|
|||||||
target->RemoveAurasDueToSpell(28820);
|
target->RemoveAurasDueToSpell(28820);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -5663,6 +5689,8 @@ void AuraEffect::HandlePeriodicTriggerSpellAuraTick(Unit* target, Unit* caster)
|
|||||||
caster->CastSpell(target, triggerSpellId, false);
|
caster->CastSpell(target, triggerSpellId, false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -5743,6 +5771,8 @@ void AuraEffect::HandlePeriodicDamageAurasTick(Unit* target, Unit* caster) const
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user