Skip to content

Commit 207432a

Browse files
author
Github Actions
committed
Merge 3.3.5 to 3.3.5-solocraft
2 parents 818d84a + ff0d198 commit 207432a

File tree

6 files changed

+18
-16
lines changed

6 files changed

+18
-16
lines changed

dep/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@ if(SERVERS OR TOOLS)
2222
add_subdirectory(openssl)
2323
add_subdirectory(jemalloc)
2424
add_subdirectory(argon2)
25+
add_subdirectory(short_alloc)
2526
endif()
2627

2728
if(SERVERS)
2829
add_subdirectory(mysql)
2930
add_subdirectory(readline)
3031
add_subdirectory(gsoap)
3132
add_subdirectory(efsw)
32-
add_subdirectory(short_alloc)
3333
endif()
3434

3535
if(TOOLS)

src/server/game/Entities/Player/Player.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4512,8 +4512,7 @@ void Player::BuildPlayerRepop()
45124512
// there must be SMSG.STOP_MIRROR_TIMER
45134513

45144514
// the player cannot have a corpse already on current map, only bones which are not returned by GetCorpse
4515-
WorldLocation corpseLocation = GetCorpseLocation();
4516-
if (corpseLocation.GetMapId() == GetMapId())
4515+
if (GetCorpseLocation().GetMapId() == GetMapId())
45174516
{
45184517
TC_LOG_ERROR("entities.player", "Player::BuildPlayerRepop: Player '{}' ({}) already has a corpse", GetName(), GetGUID().ToString());
45194518
return;

src/server/game/Entities/Player/Player.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1700,7 +1700,7 @@ class TC_GAME_API Player : public Unit, public GridObject<Player>
17001700
void KillPlayer();
17011701
static void OfflineResurrect(ObjectGuid const& guid, CharacterDatabaseTransaction trans);
17021702
bool HasCorpse() const { return _corpseLocation.GetMapId() != MAPID_INVALID; }
1703-
WorldLocation GetCorpseLocation() const { return _corpseLocation; }
1703+
WorldLocation const& GetCorpseLocation() const { return _corpseLocation; }
17041704
uint32 GetResurrectionSpellId();
17051705
void ResurrectPlayer(float restore_percent, bool applySickness = false);
17061706
void BuildPlayerRepop();

src/server/game/Handlers/NPCHandler.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,9 +218,9 @@ void WorldSession::SendSpiritResurrect()
218218

219219
// get corpse nearest graveyard
220220
WorldSafeLocsEntry const* corpseGrave = nullptr;
221-
WorldLocation corpseLocation = _player->GetCorpseLocation();
222221
if (_player->HasCorpse())
223222
{
223+
WorldLocation const& corpseLocation = _player->GetCorpseLocation();
224224
corpseGrave = sObjectMgr->GetClosestGraveyard(corpseLocation.GetPositionX(), corpseLocation.GetPositionY(),
225225
corpseLocation.GetPositionZ(), corpseLocation.GetMapId(), _player->GetTeam());
226226
}

src/server/game/World/World.cpp

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2247,27 +2247,30 @@ void World::DetectDBCLang()
22472247
std::string availableLocalsStr;
22482248

22492249
uint8 default_locale = TOTAL_LOCALES;
2250-
for (uint8 i = default_locale-1; i < TOTAL_LOCALES; --i) // -1 will be 255 due to uint8
2250+
for (uint8 i = LOCALE_enUS; i < TOTAL_LOCALES; ++i)
22512251
{
22522252
if (race->Name[i][0] != '\0') // check by race names
22532253
{
2254-
default_locale = i;
2254+
// Mark the first found locale as default locale
2255+
if (default_locale == TOTAL_LOCALES)
2256+
default_locale = i;
2257+
22552258
m_availableDbcLocaleMask |= (1 << i);
22562259
availableLocalsStr += localeNames[i];
22572260
availableLocalsStr += " ";
22582261
}
22592262
}
22602263

2261-
if (default_locale != m_lang_confid && m_lang_confid < TOTAL_LOCALES &&
2262-
(m_availableDbcLocaleMask & (1 << m_lang_confid)))
2264+
if (m_availableDbcLocaleMask == 0)
22632265
{
2264-
default_locale = m_lang_confid;
2266+
TC_LOG_ERROR("server.loading", "Unable to determine your DBC Locale! (corrupt DBC?)");
2267+
exit(1);
22652268
}
22662269

2267-
if (default_locale >= TOTAL_LOCALES)
2270+
if (default_locale != m_lang_confid && m_lang_confid < TOTAL_LOCALES &&
2271+
(m_availableDbcLocaleMask & (1 << m_lang_confid)))
22682272
{
2269-
TC_LOG_ERROR("server.loading", "Unable to determine your DBC Locale! (corrupt DBC?)");
2270-
exit(1);
2273+
default_locale = m_lang_confid;
22712274
}
22722275

22732276
m_defaultDbcLocale = LocaleConstant(default_locale);

src/server/game/World/World.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ enum WorldTimers
8686
};
8787

8888
/// Configuration elements
89-
enum WorldBoolConfigs
89+
enum WorldBoolConfigs : uint32
9090
{
9191
CONFIG_DURABILITY_LOSS_IN_PVP = 0,
9292
CONFIG_ADDON_CHANNEL,
@@ -181,7 +181,7 @@ enum WorldBoolConfigs
181181
BOOL_CONFIG_VALUE_COUNT
182182
};
183183

184-
enum WorldFloatConfigs
184+
enum WorldFloatConfigs : uint32
185185
{
186186
CONFIG_GROUP_XP_DISTANCE = 0,
187187
CONFIG_MAX_RECRUIT_A_FRIEND_DISTANCE,
@@ -206,7 +206,7 @@ enum WorldFloatConfigs
206206
FLOAT_CONFIG_VALUE_COUNT
207207
};
208208

209-
enum WorldIntConfigs
209+
enum WorldIntConfigs : uint32
210210
{
211211
CONFIG_COMPRESSION = 0,
212212
CONFIG_INTERVAL_SAVE,

0 commit comments

Comments
 (0)