mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 19:37:02 +00:00
[7102] Fixed .showarea/,hodearea commands.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
parent
c138b5462d
commit
1d80a7a788
3 changed files with 6 additions and 8 deletions
|
|
@ -3836,8 +3836,6 @@ bool ChatHandler::HandleShowAreaCommand(const char* args)
|
||||||
if (!*args)
|
if (!*args)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
int area = atoi((char*)args);
|
|
||||||
|
|
||||||
Player *chr = getSelectedPlayer();
|
Player *chr = getSelectedPlayer();
|
||||||
if (chr == NULL)
|
if (chr == NULL)
|
||||||
{
|
{
|
||||||
|
|
@ -3846,10 +3844,11 @@ bool ChatHandler::HandleShowAreaCommand(const char* args)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int area = GetAreaFlagByAreaID(atoi((char*)args));
|
||||||
int offset = area / 32;
|
int offset = area / 32;
|
||||||
uint32 val = (uint32)(1 << (area % 32));
|
uint32 val = (uint32)(1 << (area % 32));
|
||||||
|
|
||||||
if(offset >= 128)
|
if(area<0 || offset >= 128)
|
||||||
{
|
{
|
||||||
SendSysMessage(LANG_BAD_VALUE);
|
SendSysMessage(LANG_BAD_VALUE);
|
||||||
SetSentErrorMessage(true);
|
SetSentErrorMessage(true);
|
||||||
|
|
@ -3868,8 +3867,6 @@ bool ChatHandler::HandleHideAreaCommand(const char* args)
|
||||||
if (!*args)
|
if (!*args)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
int area = atoi((char*)args);
|
|
||||||
|
|
||||||
Player *chr = getSelectedPlayer();
|
Player *chr = getSelectedPlayer();
|
||||||
if (chr == NULL)
|
if (chr == NULL)
|
||||||
{
|
{
|
||||||
|
|
@ -3878,10 +3875,11 @@ bool ChatHandler::HandleHideAreaCommand(const char* args)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int area = GetAreaFlagByAreaID(atoi((char*)args));
|
||||||
int offset = area / 32;
|
int offset = area / 32;
|
||||||
uint32 val = (uint32)(1 << (area % 32));
|
uint32 val = (uint32)(1 << (area % 32));
|
||||||
|
|
||||||
if(offset >= 128)
|
if(area<0 || offset >= 128)
|
||||||
{
|
{
|
||||||
SendSysMessage(LANG_BAD_VALUE);
|
SendSysMessage(LANG_BAD_VALUE);
|
||||||
SetSentErrorMessage(true);
|
SetSentErrorMessage(true);
|
||||||
|
|
|
||||||
|
|
@ -5322,7 +5322,7 @@ void Player::CheckExploreSystem()
|
||||||
|
|
||||||
if(offset >= 128)
|
if(offset >= 128)
|
||||||
{
|
{
|
||||||
sLog.outError("ERROR: Wrong area flag %u in map data for (X: %f Y: %f) point to field PLAYER_EXPLORED_ZONES_1 + %u ( %u must be < 64 ).",areaFlag,GetPositionX(),GetPositionY(),offset,offset);
|
sLog.outError("ERROR: Wrong area flag %u in map data for (X: %f Y: %f) point to field PLAYER_EXPLORED_ZONES_1 + %u ( %u must be < 128 ).",areaFlag,GetPositionX(),GetPositionY(),offset,offset);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "7101"
|
#define REVISION_NR "7102"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue