Skip to content

Commit c947bba

Browse files
committed
remove mutex
1 parent 75011d4 commit c947bba

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

src/Server/Ebenezer/User.cpp

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5875,16 +5875,9 @@ void CUser::ChangeMannerPoint(const int loyaltyAmount)
58755875
}
58765876
else if (m_bIsChicken && m_sPartyIndex != -1)
58775877
{
5878-
_PARTY_GROUP* userParty {};
5879-
{
5880-
std::lock_guard<std::recursive_mutex> lock(g_region_mutex);
5881-
userParty = m_pMain->m_PartyMap.GetData(m_sPartyIndex);
5882-
}
5883-
5878+
_PARTY_GROUP* userParty = m_pMain->m_PartyMap.GetData(m_sPartyIndex);
58845879
if (userParty == nullptr)
5885-
{
58865880
return;
5887-
}
58885881

58895882
uint8_t partyPointChange = 0;
58905883
if (m_pUserData->m_bLevel <= MANNER_LEVEL_BAND_1)
@@ -7540,7 +7533,7 @@ void CUser::LoyaltyDivide(int tid)
75407533
continue;
75417534

75427535
//TRACE(_T("LoyaltyDivide 333 - user1=%hs, %d\n"), pUser->m_pUserData->m_id, pUser->m_pUserData->m_iLoyalty);
7543-
individualvalue = pUser->m_pUserData->m_bLevel * loyalty_source / levelsum;
7536+
individualvalue = pUser->m_pUserData->m_bLevel * loyalty_source / levelsum;
75447537
CurrencyChange(pUser->m_pUserData->m_iLoyalty, individualvalue);
75457538

75467539
//TRACE(_T("LoyaltyDivide 444 - user1=%hs, %d\n"), pUser->m_pUserData->m_id, pUser->m_pUserData->m_iLoyalty);
@@ -11129,7 +11122,7 @@ void CUser::MarketBBSTimeCheck()
1112911122
if (pUser->m_pUserData->m_iGold >= BUY_POST_PRICE)
1113011123
{
1113111124
CurrencyChange(pUser->m_pUserData->m_iGold, -BUY_POST_PRICE);
11132-
m_pMain->m_fBuyStartTime[i] = TimeGet();
11125+
m_pMain->m_fBuyStartTime[i] = TimeGet();
1113311126

1113411127
// Now the target
1113511128
memset(sendBuffer, 0, sizeof(sendBuffer));
@@ -11162,7 +11155,7 @@ void CUser::MarketBBSTimeCheck()
1116211155
if (pUser->m_pUserData->m_iGold >= SELL_POST_PRICE)
1116311156
{
1116411157
CurrencyChange(pUser->m_pUserData->m_iGold, -SELL_POST_PRICE);
11165-
m_pMain->m_fSellStartTime[i] = TimeGet();
11158+
m_pMain->m_fSellStartTime[i] = TimeGet();
1116611159

1116711160
// Now the target
1116811161
memset(sendBuffer, 0, sizeof(sendBuffer));

0 commit comments

Comments
 (0)