- 28 Nis 2020
- 932
- 261
- 334
GameServerDlg.cpp açtıktan sonra
void CGameServerDlg::SetPlayerRankingRewards(uint16 ZoneID) bulup değiştirin.
void CGameServerDlg::SetPlayerRankingRewards(uint16 ZoneID) bulup değiştirin.
Gizli metni görüntülemek için konuya cevap vermelisiniz.
Kod:
void CGameServerDlg::SetPlayerRankingRewards(uint16 ZoneID)
{
SessionMap sessMap = g_pMain->m_socketMgr.GetActiveSessionMap();
foreach (itr, sessMap)
{
CUser * pUser = TO_USER(itr->second);
if (pUser == nullptr
|| !pUser->isInGame()
|| pUser->isGM()
|| pUser->GetZoneID() != ZoneID)
continue;
if (pUser->GetPlayerRank(RANK_TYPE_PK_ZONE) > 0
&& pUser->GetPlayerRank(RANK_TYPE_PK_ZONE) <= 10)
{
if (m_nPlayerRankingLoyaltyReward > 0)
pUser->SendLoyaltyChange(m_nPlayerRankingLoyaltyReward, false, true, false);
if (m_nPlayerRankingKnightCashReward > 0)
g_DBAgent.UpdateAccountKnightCash(pUser->GetAccountName(), m_nPlayerRankingKnightCashReward);
string Cash = string_format ("Earned 1 Cash Kazandınız ");
g_pMain->SendNotice(Cash.c_str());
}
}
}