aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/server/game/DungeonFinding/LFGMgr.cpp9
-rw-r--r--src/server/game/DungeonFinding/LFGMgr.h2
-rw-r--r--src/server/game/Entities/Item/Item.cpp2
-rw-r--r--src/server/game/Entities/Player/Player.cpp4
-rw-r--r--src/server/game/Globals/ObjectMgr.cpp1
-rw-r--r--src/server/game/Handlers/GuildHandler.cpp7
-rw-r--r--src/server/game/Loot/LootMgr.cpp9
-rw-r--r--src/server/game/Loot/LootMgr.h1
-rw-r--r--src/server/game/Reputation/ReputationMgr.cpp2
9 files changed, 16 insertions, 21 deletions
diff --git a/src/server/game/DungeonFinding/LFGMgr.cpp b/src/server/game/DungeonFinding/LFGMgr.cpp
index 2733f2c8df7..6a3ee1df3ab 100644
--- a/src/server/game/DungeonFinding/LFGMgr.cpp
+++ b/src/server/game/DungeonFinding/LFGMgr.cpp
@@ -187,7 +187,7 @@ LFGDungeonData const* LFGMgr::GetLFGDungeon(uint32 id)
return nullptr;
}
-void LFGMgr::LoadLFGDungeons(bool reload /* = false */)
+void LFGMgr::LoadLFGDungeons()
{
uint32 oldMSTime = getMSTime();
@@ -231,7 +231,7 @@ void LFGMgr::LoadLFGDungeons(bool reload /* = false */)
LFGDungeonContainer::iterator dungeonItr = LfgDungeonStore.find(dungeonId);
if (dungeonItr == LfgDungeonStore.end())
{
- TC_LOG_ERROR("sql.sql", "table `lfg_entrances` contains coordinates for wrong dungeon {}", dungeonId);
+ TC_LOG_ERROR("sql.sql", "table `lfg_dungeon_template` contains coordinates for wrong dungeon {}", dungeonId);
continue;
}
@@ -248,6 +248,8 @@ void LFGMgr::LoadLFGDungeons(bool reload /* = false */)
TC_LOG_INFO("server.loading", ">> Loaded {} lfg dungeon templates in {} ms", count, GetMSTimeDiffToNow(oldMSTime));
+ CachedDungeonMapStore.clear();
+
// Fill all other teleport coords from areatriggers
for (LFGDungeonContainer::iterator itr = LfgDungeonStore.begin(); itr != LfgDungeonStore.end(); ++itr)
{
@@ -274,9 +276,6 @@ void LFGMgr::LoadLFGDungeons(bool reload /* = false */)
CachedDungeonMapStore[dungeon.group].insert(dungeon.id);
CachedDungeonMapStore[0].insert(dungeon.id);
}
-
- if (reload)
- CachedDungeonMapStore.clear();
}
LFGMgr* LFGMgr::instance()
diff --git a/src/server/game/DungeonFinding/LFGMgr.h b/src/server/game/DungeonFinding/LFGMgr.h
index b31b1d1b9ac..b20a5fad3b9 100644
--- a/src/server/game/DungeonFinding/LFGMgr.h
+++ b/src/server/game/DungeonFinding/LFGMgr.h
@@ -339,7 +339,7 @@ class TC_GAME_API LFGMgr
/// Loads rewards for random dungeons
void LoadRewards();
/// Loads dungeons from dbc and adds teleport coords
- void LoadLFGDungeons(bool reload = false);
+ void LoadLFGDungeons();
// Multiple files
/// Check if given guid applied for random dungeon
diff --git a/src/server/game/Entities/Item/Item.cpp b/src/server/game/Entities/Item/Item.cpp
index 7fa5ba63d37..5401c0c9c45 100644
--- a/src/server/game/Entities/Item/Item.cpp
+++ b/src/server/game/Entities/Item/Item.cpp
@@ -1421,12 +1421,10 @@ bool Item::HasEnchantRequiredSkill(Player const* player) const
{
// Check all enchants for required skill
for (uint32 enchant_slot = PERM_ENCHANTMENT_SLOT; enchant_slot < MAX_ENCHANTMENT_SLOT; ++enchant_slot)
- {
if (uint32 enchant_id = GetEnchantmentId(EnchantmentSlot(enchant_slot)))
if (SpellItemEnchantmentEntry const* enchantEntry = sSpellItemEnchantmentStore.LookupEntry(enchant_id))
if (enchantEntry->RequiredSkillID && player->GetSkillValue(enchantEntry->RequiredSkillID) < enchantEntry->RequiredSkillRank)
return false;
- }
return true;
}
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp
index 89bf5831d36..c8c75eb8279 100644
--- a/src/server/game/Entities/Player/Player.cpp
+++ b/src/server/game/Entities/Player/Player.cpp
@@ -2316,7 +2316,7 @@ void Player::GiveLevel(uint8 level)
UpdateAllStats();
- _ApplyAllLevelScaleItemMods(true); // Moved to above SetFullHealth so player will have full health from Heirlooms
+ _ApplyAllLevelScaleItemMods(true);
if (Aura const* artifactAura = GetAura(ARTIFACTS_ALL_WEAPONS_GENERAL_WEAPON_EQUIPPED_PASSIVE))
if (Item* artifact = GetItemByGuid(artifactAura->GetCastItemGUID()))
@@ -25983,7 +25983,7 @@ bool Player::isHonorOrXPTarget(Unit const* victim) const
if (v_level < k_grey && !sWorld->getIntConfig(CONFIG_MIN_CREATURE_SCALED_XP_RATIO))
return false;
- if (Creature const* const creature = victim->ToCreature())
+ if (Creature const* creature = victim->ToCreature())
{
if (creature->IsCritter() || creature->IsTotem())
return false;
diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp
index 075875e7fe5..72be6ff52fb 100644
--- a/src/server/game/Globals/ObjectMgr.cpp
+++ b/src/server/game/Globals/ObjectMgr.cpp
@@ -6089,6 +6089,7 @@ void ObjectMgr::LoadSpellScriptNames()
TC_LOG_ERROR("sql.sql", "Scriptname: `{}` spell (Id: {}) is not first rank of spell.", scriptName, fields[0].GetInt32());
continue;
}
+
while (spellInfo)
{
_spellScriptsStore.insert(SpellScriptsContainer::value_type(spellInfo->Id, std::make_pair(GetScriptId(scriptName), true)));
diff --git a/src/server/game/Handlers/GuildHandler.cpp b/src/server/game/Handlers/GuildHandler.cpp
index 2dbc1c5e02a..f8d41200177 100644
--- a/src/server/game/Handlers/GuildHandler.cpp
+++ b/src/server/game/Handlers/GuildHandler.cpp
@@ -589,8 +589,11 @@ void WorldSession::HandleGuildReplaceGuildMaster(WorldPackets::Guild::GuildRepla
void WorldSession::HandleGuildSetGuildMaster(WorldPackets::Guild::GuildSetGuildMaster& packet)
{
- if (Guild* guild = GetPlayer()->GetGuild())
- guild->HandleSetNewGuildMaster(this, packet.NewMasterName, false);
+ TC_LOG_DEBUG("guild", "CMSG_GUILD_SET_GUILD_MASTER [{}]: Target: {}", GetPlayerInfo(), packet.NewMasterName);
+
+ if (normalizePlayerName(packet.NewMasterName))
+ if (Guild* guild = GetPlayer()->GetGuild())
+ guild->HandleSetNewGuildMaster(this, packet.NewMasterName, false);
}
void WorldSession::HandleGuildSetAchievementTracking(WorldPackets::Guild::GuildSetAchievementTracking& packet)
diff --git a/src/server/game/Loot/LootMgr.cpp b/src/server/game/Loot/LootMgr.cpp
index 5c8999b99e7..650c7190c92 100644
--- a/src/server/game/Loot/LootMgr.cpp
+++ b/src/server/game/Loot/LootMgr.cpp
@@ -236,11 +236,6 @@ void LootStore::ReportUnusedIds(LootIdSet const& lootIdSet) const
TC_LOG_ERROR("sql.sql", "Table '{}' Entry {} isn't {} and not referenced from loot, and thus useless.", GetName(), lootId, GetEntryName());
}
-void LootStore::ReportNonExistingId(uint32 lootId) const
-{
- TC_LOG_ERROR("sql.sql", "Table '{}' Entry {} does not exist", GetName(), lootId);
-}
-
void LootStore::ReportNonExistingId(uint32 lootId, char const* ownerType, uint32 ownerId) const
{
TC_LOG_ERROR("sql.sql", "Table '{}' Entry {} does not exist but it is used by {} {}", GetName(), lootId, ownerType, ownerId);
@@ -1127,7 +1122,7 @@ void LoadLootTemplates_Disenchant()
{
uint32 lootid = disenchant->ID;
if (!lootIdSet.contains(lootid))
- LootTemplates_Disenchant.ReportNonExistingId(lootid);
+ LootTemplates_Disenchant.ReportNonExistingId(lootid, "ItemDisenchantLoot", lootid);
else
lootIdSetUsed.insert(lootid);
}
@@ -1139,7 +1134,7 @@ void LoadLootTemplates_Disenchant()
uint32 lootid = itemBonus->Value[0];
if (!lootIdSet.contains(lootid))
- LootTemplates_Disenchant.ReportNonExistingId(lootid);
+ LootTemplates_Disenchant.ReportNonExistingId(lootid, "ItemBonusList", itemBonus->ParentItemBonusListID);
else
lootIdSetUsed.insert(lootid);
}
diff --git a/src/server/game/Loot/LootMgr.h b/src/server/game/Loot/LootMgr.h
index 808cf529201..8d9ed8df8f0 100644
--- a/src/server/game/Loot/LootMgr.h
+++ b/src/server/game/Loot/LootMgr.h
@@ -87,7 +87,6 @@ class TC_GAME_API LootStore
uint32 LoadAndCollectLootIds(LootIdSet& lootIdSet);
void CheckLootRefs(LootIdSet* ref_set = nullptr) const; // check existence reference and remove it from ref_set
void ReportUnusedIds(LootIdSet const& lootIdSet) const;
- void ReportNonExistingId(uint32 lootId) const;
void ReportNonExistingId(uint32 lootId, char const* ownerType, uint32 ownerId) const;
bool HaveLootFor(uint32 loot_id) const { return m_LootTemplates.contains(loot_id); }
diff --git a/src/server/game/Reputation/ReputationMgr.cpp b/src/server/game/Reputation/ReputationMgr.cpp
index f5463a420d3..574969a1cc0 100644
--- a/src/server/game/Reputation/ReputationMgr.cpp
+++ b/src/server/game/Reputation/ReputationMgr.cpp
@@ -209,7 +209,7 @@ std::string ReputationMgr::GetReputationRankName(FactionEntry const* factionEntr
{
ReputationRank rank = GetRank(factionEntry);
if (!factionEntry->FriendshipRepID)
- return sObjectMgr->GetTrinityString(ReputationRankStrIndex[GetRank(factionEntry)], _player->GetSession()->GetSessionDbcLocale());
+ return sObjectMgr->GetTrinityString(ReputationRankStrIndex[rank], _player->GetSession()->GetSessionDbcLocale());
if (DB2Manager::FriendshipRepReactionSet const* friendshipReactions = sDB2Manager.GetFriendshipRepReactions(factionEntry->FriendshipRepID))
{