Fix a couple of mistakes made in the last commit. It appears to have been too long since I last worked on TC.
This commit is contained in:
@@ -3063,7 +3063,7 @@ void Player::GiveLevel(uint8 level)
|
||||
|
||||
// Refer-A-Friend
|
||||
if (GetSession()->GetRecruiterId())
|
||||
if (level < sWorld.getConfig(CONFIG_MAX_RECRUIT_A_FRIEND_BONUS_PLAYER_LEVEL)) {
|
||||
if (level < sWorld->getConfig(CONFIG_MAX_RECRUIT_A_FRIEND_BONUS_PLAYER_LEVEL)) {
|
||||
if (level % 2 == 0) {
|
||||
m_grantableLevels++;
|
||||
|
||||
|
||||
@@ -499,7 +499,7 @@ void WorldSession::HandleSetSelectionOpcode(WorldPacket & recv_data)
|
||||
if (!unit)
|
||||
return;
|
||||
|
||||
_player->SetSelectionGuid(guid);
|
||||
_player->SetSelection(guid);
|
||||
|
||||
if (FactionTemplateEntry const* factionTemplateEntry = sFactionTemplateStore.LookupEntry(unit->getFaction()))
|
||||
_player->GetReputationMgr().SetVisible(factionTemplateEntry);
|
||||
|
||||
@@ -15,6 +15,12 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "WorldSession.h"
|
||||
#include "Player.h"
|
||||
#include "ObjectManager.h"
|
||||
#include "Opcodes.h"
|
||||
#include "Log.h"
|
||||
|
||||
void WorldSession::HandleGrantLevel(WorldPacket& recv_data)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_GRANT_LEVEL");
|
||||
@@ -22,7 +28,7 @@ void WorldSession::HandleGrantLevel(WorldPacket& recv_data)
|
||||
uint64 guid;
|
||||
recv_data.readPackGUID(guid);
|
||||
|
||||
Player *target = sObjectMgr.GetPlayer(guid);
|
||||
Player *target = sObjectMgr->GetPlayer(guid);
|
||||
|
||||
// check cheating
|
||||
uint8 levels = _player->GetGrantableLevels();
|
||||
@@ -64,7 +70,7 @@ void WorldSession::HandleAcceptGrantLevel(WorldPacket& recv_data)
|
||||
uint64 guid;
|
||||
recv_data.readPackGUID(guid);
|
||||
|
||||
Player *other = sObjectMgr.GetPlayer(guid);
|
||||
Player *other = sObjectMgr->GetPlayer(guid);
|
||||
if (!(other && other->GetSession()))
|
||||
return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user