mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-23 13:46:24 +00:00
Merge branch 'master' of https://github.com/azerothcore/azerothcore-wotlk into dir-restructure
This commit is contained in:
@@ -31,6 +31,7 @@ set(scripts_STAT_SRCS
|
||||
Commands/cs_lookup.cpp
|
||||
Commands/cs_message.cpp
|
||||
Commands/cs_misc.cpp
|
||||
Commands/cs_mmaps.cpp
|
||||
Commands/cs_modify.cpp
|
||||
Commands/cs_npc.cpp
|
||||
Commands/cs_quest.cpp
|
||||
|
||||
@@ -191,14 +191,10 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
const uint32 VISUAL_AURA = 37800;
|
||||
std::string param = (char*)args;
|
||||
|
||||
if (param == "on")
|
||||
{
|
||||
if (_player->HasAura(VISUAL_AURA, 0))
|
||||
_player->RemoveAurasDueToSpell(VISUAL_AURA);
|
||||
|
||||
_player->SetGMVisible(true);
|
||||
//_player->UpdateObjectVisibility();
|
||||
handler->GetSession()->SendNotification(LANG_INVISIBLE_VISIBLE);
|
||||
@@ -208,7 +204,6 @@ public:
|
||||
|
||||
if (param == "off")
|
||||
{
|
||||
_player->AddAura(VISUAL_AURA, _player);
|
||||
_player->SetGMVisible(false);
|
||||
//_player->UpdateObjectVisibility();
|
||||
handler->GetSession()->SendNotification(LANG_INVISIBLE_INVISIBLE);
|
||||
|
||||
@@ -417,7 +417,7 @@ public:
|
||||
|
||||
uint32 areaId = id ? (uint32)atoi(id) : player->GetZoneId();
|
||||
|
||||
AreaTableEntry const* areaEntry = GetAreaEntryByAreaID(areaId);
|
||||
AreaTableEntry const* areaEntry = sAreaTableStore.LookupEntry(areaId);
|
||||
|
||||
if (x < 0 || x > 100 || y < 0 || y > 100 || !areaEntry)
|
||||
{
|
||||
@@ -427,7 +427,7 @@ public:
|
||||
}
|
||||
|
||||
// update to parent zone if exist (client map show only zones without parents)
|
||||
AreaTableEntry const* zoneEntry = areaEntry->zone ? GetAreaEntryByAreaID(areaEntry->zone) : areaEntry;
|
||||
AreaTableEntry const* zoneEntry = areaEntry->zone ? sAreaTableStore.LookupEntry(areaEntry->zone) : areaEntry;
|
||||
|
||||
Map const* map = sMapMgr->CreateBaseMap(zoneEntry->mapid);
|
||||
|
||||
|
||||
@@ -548,6 +548,7 @@ public:
|
||||
stmt->setFloat(5, player->GetPositionY());
|
||||
stmt->setFloat(6, player->GetPositionZ());
|
||||
stmt->setFloat(7, distance * distance);
|
||||
stmt->setFloat(8, player->GetPhaseMask());
|
||||
PreparedQueryResult result = WorldDatabase.Query(stmt);
|
||||
|
||||
if (result)
|
||||
|
||||
@@ -86,9 +86,9 @@ public:
|
||||
wstrToLower(wNamePart);
|
||||
|
||||
// Search in AreaTable.dbc
|
||||
for (uint32 areaflag = 0; areaflag < sAreaStore.GetNumRows(); ++areaflag)
|
||||
for (uint32 i = 0; i < sAreaTableStore.GetNumRows(); ++i)
|
||||
{
|
||||
AreaTableEntry const* areaEntry = sAreaStore.LookupEntry(areaflag);
|
||||
AreaTableEntry const* areaEntry = sAreaTableStore.LookupEntry(i);
|
||||
if (areaEntry)
|
||||
{
|
||||
int locale = handler->GetSessionDbcLocale();
|
||||
|
||||
@@ -400,8 +400,8 @@ public:
|
||||
object->GetZoneAndAreaId(zoneId, areaId);
|
||||
|
||||
MapEntry const* mapEntry = sMapStore.LookupEntry(object->GetMapId());
|
||||
AreaTableEntry const* zoneEntry = GetAreaEntryByAreaID(zoneId);
|
||||
AreaTableEntry const* areaEntry = GetAreaEntryByAreaID(areaId);
|
||||
AreaTableEntry const* zoneEntry = sAreaTableStore.LookupEntry(zoneId);
|
||||
AreaTableEntry const* areaEntry = sAreaTableStore.LookupEntry(areaId);
|
||||
|
||||
float zoneX = object->GetPositionX();
|
||||
float zoneY = object->GetPositionY();
|
||||
@@ -612,8 +612,8 @@ public:
|
||||
else
|
||||
_player->SaveRecallPosition();
|
||||
|
||||
_player->TeleportTo(target->GetMapId(), target->GetPositionX(), target->GetPositionY(), target->GetPositionZ()+0.25f, _player->GetOrientation(), TELE_TO_GM_MODE);
|
||||
_player->SetPhaseMask(target->GetPhaseMask() | 1, false);
|
||||
if (_player->TeleportTo(target->GetMapId(), target->GetPositionX(), target->GetPositionY(), target->GetPositionZ()+0.25f, _player->GetOrientation(), TELE_TO_GM_MODE, target))
|
||||
_player->SetPhaseMask(target->GetPhaseMask() | 1, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -734,8 +734,8 @@ public:
|
||||
// before GM
|
||||
float x, y, z;
|
||||
handler->GetSession()->GetPlayer()->GetClosePoint(x, y, z, target->GetObjectSize());
|
||||
target->TeleportTo(handler->GetSession()->GetPlayer()->GetMapId(), x, y, z, target->GetOrientation());
|
||||
target->SetPhaseMask(handler->GetSession()->GetPlayer()->GetPhaseMask(), false);
|
||||
if (target->TeleportTo(handler->GetSession()->GetPlayer()->GetMapId(), x, y, z, target->GetOrientation(), 0, handler->GetSession()->GetPlayer()))
|
||||
target->SetPhaseMask(handler->GetSession()->GetPlayer()->GetPhaseMask(), false);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -845,7 +845,7 @@ public:
|
||||
// before GM
|
||||
float x, y, z;
|
||||
handler->GetSession()->GetPlayer()->GetClosePoint(x, y, z, player->GetObjectSize());
|
||||
player->TeleportTo(handler->GetSession()->GetPlayer()->GetMapId(), x, y, z, player->GetOrientation());
|
||||
player->TeleportTo(handler->GetSession()->GetPlayer()->GetMapId(), x, y, z, player->GetOrientation(), 0, handler->GetSession()->GetPlayer());
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -1280,7 +1280,7 @@ public:
|
||||
|
||||
uint32 zoneId = player->GetZoneId();
|
||||
|
||||
AreaTableEntry const* areaEntry = GetAreaEntryByAreaID(zoneId);
|
||||
AreaTableEntry const* areaEntry = sAreaTableStore.LookupEntry(zoneId);
|
||||
if (!areaEntry || areaEntry->zone !=0)
|
||||
{
|
||||
handler->PSendSysMessage(LANG_COMMAND_GRAVEYARDWRONGZONE, graveyardId, zoneId);
|
||||
@@ -1411,17 +1411,23 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
int32 area = GetAreaFlagByAreaID(atoi((char*)args));
|
||||
int32 offset = area / 32;
|
||||
uint32 val = uint32((1 << (area % 32)));
|
||||
|
||||
if (area<0 || offset >= PLAYER_EXPLORED_ZONES_SIZE)
|
||||
AreaTableEntry const* area = sAreaTableStore.LookupEntry(atoi(args));
|
||||
if (!area)
|
||||
{
|
||||
handler->SendSysMessage(LANG_BAD_VALUE);
|
||||
handler->SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
int32 offset = area->exploreFlag / 32;
|
||||
if (offset >= PLAYER_EXPLORED_ZONES_SIZE)
|
||||
{
|
||||
handler->SendSysMessage(LANG_BAD_VALUE);
|
||||
handler->SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
uint32 val = uint32((1 << (area->exploreFlag % 32)));
|
||||
uint32 currFields = playerTarget->GetUInt32Value(PLAYER_EXPLORED_ZONES_1 + offset);
|
||||
playerTarget->SetUInt32Value(PLAYER_EXPLORED_ZONES_1 + offset, uint32((currFields | val)));
|
||||
|
||||
@@ -1442,17 +1448,23 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
int32 area = GetAreaFlagByAreaID(atoi((char*)args));
|
||||
int32 offset = area / 32;
|
||||
uint32 val = uint32((1 << (area % 32)));
|
||||
|
||||
if (area < 0 || offset >= PLAYER_EXPLORED_ZONES_SIZE)
|
||||
AreaTableEntry const* area = sAreaTableStore.LookupEntry(atoi(args));
|
||||
if (!area)
|
||||
{
|
||||
handler->SendSysMessage(LANG_BAD_VALUE);
|
||||
handler->SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
int32 offset = area->exploreFlag / 32;
|
||||
if (offset >= PLAYER_EXPLORED_ZONES_SIZE)
|
||||
{
|
||||
handler->SendSysMessage(LANG_BAD_VALUE);
|
||||
handler->SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
uint32 val = uint32((1 << (area->exploreFlag % 32)));
|
||||
uint32 currFields = playerTarget->GetUInt32Value(PLAYER_EXPLORED_ZONES_1 + offset);
|
||||
playerTarget->SetUInt32Value(PLAYER_EXPLORED_ZONES_1 + offset, uint32((currFields ^ val)));
|
||||
|
||||
@@ -2025,12 +2037,12 @@ public:
|
||||
|
||||
MapEntry const* map = sMapStore.LookupEntry(mapId);
|
||||
|
||||
AreaTableEntry const* area = GetAreaEntryByAreaID(areaId);
|
||||
AreaTableEntry const* area = sAreaTableStore.LookupEntry(areaId);
|
||||
if (area)
|
||||
{
|
||||
areaName = area->area_name[locale];
|
||||
|
||||
AreaTableEntry const* zone = GetAreaEntryByAreaID(area->zone);
|
||||
AreaTableEntry const* zone = sAreaTableStore.LookupEntry(area->zone);
|
||||
if (zone)
|
||||
zoneName = zone->area_name[locale];
|
||||
}
|
||||
|
||||
@@ -668,6 +668,7 @@ public:
|
||||
stmt->setFloat(5, player->GetPositionY());
|
||||
stmt->setFloat(6, player->GetPositionZ());
|
||||
stmt->setFloat(7, distance * distance);
|
||||
stmt->setFloat(8, player->GetPhaseMask());
|
||||
PreparedQueryResult result = WorldDatabase.Query(stmt);
|
||||
|
||||
if (result)
|
||||
|
||||
Reference in New Issue
Block a user