Merge branch 'master' of github.com:TrinityCore/TrinityCore into 4.3.4
This commit is contained in:
commit
fca4a5448a
166 files changed
+3523
-3008
No files matched your search
@@ -154,7 +154,7 @@ bool ChatHandler::HasLowerSecurityAccount(WorldSession* target, uint32 target_ac
|
||||
return false;
|
||||
|
||||
// ignore only for non-players for non strong checks (when allow apply command at least to same sec level)
|
||||
if (m_session->HasPermission(RBAC_PERM_CHECK_FOR_LOWER_SECURITY) && !strong && !sWorld->getBoolConfig(CONFIG_GM_LOWER_SECURITY))
|
||||
if (m_session->HasPermission(rbac::RBAC_PERM_CHECK_FOR_LOWER_SECURITY) && !strong && !sWorld->getBoolConfig(CONFIG_GM_LOWER_SECURITY))
|
||||
return false;
|
||||
|
||||
if (target)
|
||||
@@ -344,7 +344,7 @@ bool ChatHandler::ExecuteCommandInTable(ChatCommand* table, const char* text, st
|
||||
Player* player = m_session->GetPlayer();
|
||||
if (!AccountMgr::IsPlayerAccount(m_session->GetSecurity()))
|
||||
{
|
||||
uint64 guid = player->GetSelection();
|
||||
uint64 guid = player->GetTarget();
|
||||
uint32 areaId = player->GetAreaId();
|
||||
std::string areaName = "Unknown";
|
||||
std::string zoneName = "Unknown";
|
||||
@@ -464,7 +464,7 @@ bool ChatHandler::ParseCommands(char const* text)
|
||||
|
||||
if (!ExecuteCommandInTable(getCommandTable(), text, fullcmd))
|
||||
{
|
||||
if (m_session && !m_session->HasPermission(RBAC_PERM_COMMANDS_NOTIFY_COMMAND_NOT_FOUND_ERROR))
|
||||
if (m_session && !m_session->HasPermission(rbac::RBAC_PERM_COMMANDS_NOTIFY_COMMAND_NOT_FOUND_ERROR))
|
||||
return false;
|
||||
|
||||
SendSysMessage(LANG_NO_CMD);
|
||||
@@ -726,12 +726,11 @@ Player* ChatHandler::getSelectedPlayer()
|
||||
if (!m_session)
|
||||
return NULL;
|
||||
|
||||
uint64 guid = m_session->GetPlayer()->GetSelection();
|
||||
|
||||
if (guid == 0)
|
||||
uint64 selected = m_session->GetPlayer()->GetTarget();
|
||||
if (!selected)
|
||||
return m_session->GetPlayer();
|
||||
|
||||
return ObjectAccessor::FindPlayer(guid);
|
||||
return ObjectAccessor::FindPlayer(selected);
|
||||
}
|
||||
|
||||
Unit* ChatHandler::getSelectedUnit()
|
||||
@@ -739,12 +738,10 @@ Unit* ChatHandler::getSelectedUnit()
|
||||
if (!m_session)
|
||||
return NULL;
|
||||
|
||||
uint64 guid = m_session->GetPlayer()->GetSelection();
|
||||
if (Unit* selected = m_session->GetPlayer()->GetSelectedUnit())
|
||||
return selected;
|
||||
|
||||
if (guid == 0)
|
||||
return m_session->GetPlayer();
|
||||
|
||||
return ObjectAccessor::GetUnit(*m_session->GetPlayer(), guid);
|
||||
return m_session->GetPlayer();
|
||||
}
|
||||
|
||||
WorldObject* ChatHandler::getSelectedObject()
|
||||
@@ -752,7 +749,7 @@ WorldObject* ChatHandler::getSelectedObject()
|
||||
if (!m_session)
|
||||
return NULL;
|
||||
|
||||
uint64 guid = m_session->GetPlayer()->GetSelection();
|
||||
uint64 guid = m_session->GetPlayer()->GetTarget();
|
||||
|
||||
if (guid == 0)
|
||||
return GetNearbyGameObject();
|
||||
@@ -765,7 +762,7 @@ Creature* ChatHandler::getSelectedCreature()
|
||||
if (!m_session)
|
||||
return NULL;
|
||||
|
||||
return ObjectAccessor::GetCreatureOrPetOrVehicle(*m_session->GetPlayer(), m_session->GetPlayer()->GetSelection());
|
||||
return ObjectAccessor::GetCreatureOrPetOrVehicle(*m_session->GetPlayer(), m_session->GetPlayer()->GetTarget());
|
||||
}
|
||||
|
||||
char* ChatHandler::extractKeyFromLink(char* text, char const* linkType, char** something1)
|
||||
|
||||
Reference in new issue
Block a user