aboutsummaryrefslogtreecommitdiff
path: root/src/game/Level2.cpp
diff options
context:
space:
mode:
authorKingPin <none@none>2008-10-20 12:59:45 -0500
committerKingPin <none@none>2008-10-20 12:59:45 -0500
commitcdb7fd43eef1a4577da1af9012d302b0cd2de5bb (patch)
tree9ae1be3f5958265703d9701ac4b796c70c29ec99 /src/game/Level2.cpp
parent35f378aef9e2da3b24b2adb182f165d52da6a09b (diff)
[svn] * Minor code fixes
* Move account related functions from ObjectMgr to AccountMgr and drop duplicate functions - source mangos * recognize the dummy spells 38637, 38638 and 38639 as negative - source mangos * added new command ".reload all_locales". Now all locales_* tables can be reloaded - source mangos --HG-- branch : trunk
Diffstat (limited to 'src/game/Level2.cpp')
-rw-r--r--src/game/Level2.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/game/Level2.cpp b/src/game/Level2.cpp
index 485555e09f2..eb84bcbd1cd 100644
--- a/src/game/Level2.cpp
+++ b/src/game/Level2.cpp
@@ -96,7 +96,7 @@ bool ChatHandler::HandleMuteCommand(const char* args)
else
{
account_id = objmgr.GetPlayerAccountIdByGUID(guid);
- security = objmgr.GetSecurityByAccount(account_id);
+ security = accmgr.GetSecurity(account_id);
}
if(security >= m_session->GetSecurity())
@@ -162,7 +162,7 @@ bool ChatHandler::HandleUnmuteCommand(const char* args)
else
{
account_id = objmgr.GetPlayerAccountIdByGUID(guid);
- security = objmgr.GetSecurityByAccount(account_id);
+ security = accmgr.GetSecurity(account_id);
}
if(security >= m_session->GetSecurity())
@@ -1449,7 +1449,7 @@ bool ChatHandler::HandleSetMoveTypeCommand(const char* args)
{
type_str = guid_str;
pCreature = getSelectedCreature();
- if(!pCreature)
+ if(!pCreature || pCreature->isPet())
return false;
lowguid = pCreature->GetDBTableGUIDLow();
}
@@ -1595,7 +1595,7 @@ bool ChatHandler::HandleSetModelCommand(const char* args)
Creature *pCreature = getSelectedCreature();
- if(!pCreature)
+ if(!pCreature || pCreature->isPet())
{
SendSysMessage(LANG_SELECT_CREATURE);
SetSentErrorMessage(true);
@@ -2212,7 +2212,7 @@ bool ChatHandler::HandleWpAddCommand(const char* args)
// No GUID provided
// -> Player must have selected a creature
- if(!target)
+ if(!target || target->isPet())
{
SendSysMessage(LANG_SELECT_CREATURE);
SetSentErrorMessage(true);
@@ -2296,7 +2296,7 @@ bool ChatHandler::HandleWpAddCommand(const char* args)
}
target = ObjectAccessor::GetCreature(*m_session->GetPlayer(),MAKE_NEW_GUID(lowguid,data->id,HIGHGUID_UNIT));
- if(!target)
+ if(!target || target->isPet())
{
PSendSysMessage(LANG_WAYPOINT_CREATNOTFOUND, lowguid);
SetSentErrorMessage(true);