Core: header cleanup, split realmlist, boost compatibility, cotire, remove stormlib/zlib and stormlib/bzip2 and instead use dep sources
This commit is contained in:
1 parent
7fff6c424f
commit
5ff847159c
1243 files changed
+29780
-36517
No files matched your search
@@ -23,15 +23,21 @@ Category: commandscripts
|
||||
EndScriptData */
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "GameEventMgr.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "PoolMgr.h"
|
||||
#include "MapManager.h"
|
||||
#include "Chat.h"
|
||||
#include "DatabaseEnv.h"
|
||||
#include "DBCStores.h"
|
||||
#include "GameEventMgr.h"
|
||||
#include "Language.h"
|
||||
#include "Player.h"
|
||||
#include "Log.h"
|
||||
#include "MapManager.h"
|
||||
#include "ObjectAccessor.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "Opcodes.h"
|
||||
#include "PhasingHandler.h"
|
||||
#include "Player.h"
|
||||
#include "PoolMgr.h"
|
||||
#include "RBAC.h"
|
||||
#include "WorldSession.h"
|
||||
|
||||
class gobject_commandscript : public CommandScript
|
||||
{
|
||||
@@ -59,12 +65,12 @@ public:
|
||||
{ "near", rbac::RBAC_PERM_COMMAND_GOBJECT_NEAR, false, &HandleGameObjectNearCommand, "" },
|
||||
{ "target", rbac::RBAC_PERM_COMMAND_GOBJECT_TARGET, false, &HandleGameObjectTargetCommand, "" },
|
||||
{ "turn", rbac::RBAC_PERM_COMMAND_GOBJECT_TURN, false, &HandleGameObjectTurnCommand, "" },
|
||||
{ "add", rbac::RBAC_PERM_COMMAND_GOBJECT_ADD, false, NULL, "", gobjectAddCommandTable },
|
||||
{ "set", rbac::RBAC_PERM_COMMAND_GOBJECT_SET, false, NULL, "", gobjectSetCommandTable },
|
||||
{ "add", rbac::RBAC_PERM_COMMAND_GOBJECT_ADD, false, nullptr, "", gobjectAddCommandTable },
|
||||
{ "set", rbac::RBAC_PERM_COMMAND_GOBJECT_SET, false, nullptr, "", gobjectSetCommandTable },
|
||||
};
|
||||
static std::vector<ChatCommand> commandTable =
|
||||
{
|
||||
{ "gobject", rbac::RBAC_PERM_COMMAND_GOBJECT, false, NULL, "", gobjectCommandTable },
|
||||
{ "gobject", rbac::RBAC_PERM_COMMAND_GOBJECT, false, nullptr, "", gobjectCommandTable },
|
||||
};
|
||||
return commandTable;
|
||||
}
|
||||
@@ -116,9 +122,9 @@ public:
|
||||
if (!objectId)
|
||||
return false;
|
||||
|
||||
char* spawntimeSecs = strtok(NULL, " ");
|
||||
char* spawntimeSecs = strtok(nullptr, " ");
|
||||
|
||||
const GameObjectTemplate* objectInfo = sObjectMgr->GetGameObjectTemplate(objectId);
|
||||
GameObjectTemplate const* objectInfo = sObjectMgr->GetGameObjectTemplate(objectId);
|
||||
|
||||
if (!objectInfo)
|
||||
{
|
||||
@@ -142,7 +148,7 @@ public:
|
||||
GameObject* object = new GameObject;
|
||||
ObjectGuid::LowType guidLow = map->GenerateLowGuid<HighGuid::GameObject>();
|
||||
|
||||
if (!object->Create(guidLow, objectInfo->entry, map, 0, *player, G3D::Quat(), 255, GO_STATE_READY))
|
||||
if (!object->Create(guidLow, objectInfo->entry, map, 0, *player, QuaternionData(), 255, GO_STATE_READY))
|
||||
{
|
||||
delete object;
|
||||
return false;
|
||||
@@ -191,13 +197,13 @@ public:
|
||||
|
||||
Player* player = handler->GetSession()->GetPlayer();
|
||||
|
||||
char* spawntime = strtok(NULL, " ");
|
||||
char* spawntime = strtok(nullptr, " ");
|
||||
uint32 spawntm = 300;
|
||||
|
||||
if (spawntime)
|
||||
spawntm = atoul(spawntime);
|
||||
|
||||
G3D::Quat rotation = G3D::Matrix3::fromEulerAnglesZYX(player->GetOrientation(), 0.f, 0.f);
|
||||
QuaternionData rotation = QuaternionData::fromEulerAnglesZYX(player->GetOrientation(), 0.f, 0.f);
|
||||
uint32 objectId = atoul(id);
|
||||
|
||||
if (!sObjectMgr->GetGameObjectTemplate(objectId))
|
||||
@@ -236,7 +242,7 @@ public:
|
||||
WorldDatabase.EscapeString(name);
|
||||
result = WorldDatabase.PQuery(
|
||||
"SELECT guid, id, position_x, position_y, position_z, orientation, map, phaseMask, (POW(position_x - %f, 2) + POW(position_y - %f, 2) + POW(position_z - %f, 2)) AS order_ "
|
||||
"FROM gameobject, gameobject_template WHERE gameobject_template.entry = gameobject.id AND map = %i AND name " _LIKE_" " _CONCAT3_("'%%'", "'%s'", "'%%'")" ORDER BY order_ ASC LIMIT 1",
|
||||
"FROM gameobject LEFT JOIN gameobject_template ON gameobject_template.entry = gameobject.id WHERE map = %i AND name LIKE '%%%s%%' ORDER BY order_ ASC LIMIT 1",
|
||||
player->GetPositionX(), player->GetPositionY(), player->GetPositionZ(), player->GetMapId(), name.c_str());
|
||||
}
|
||||
}
|
||||
@@ -318,7 +324,7 @@ public:
|
||||
|
||||
if (target)
|
||||
{
|
||||
int32 curRespawnDelay = int32(target->GetRespawnTimeEx() - time(NULL));
|
||||
int32 curRespawnDelay = int32(target->GetRespawnTimeEx() - time(nullptr));
|
||||
if (curRespawnDelay < 0)
|
||||
curRespawnDelay = 0;
|
||||
|
||||
@@ -393,18 +399,18 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
char* orientation = strtok(NULL, " ");
|
||||
char* orientation = strtok(nullptr, " ");
|
||||
float oz = 0.f, oy = 0.f, ox = 0.f;
|
||||
|
||||
if (orientation)
|
||||
{
|
||||
oz = float(atof(orientation));
|
||||
|
||||
orientation = strtok(NULL, " ");
|
||||
orientation = strtok(nullptr, " ");
|
||||
if (orientation)
|
||||
{
|
||||
oy = float(atof(orientation));
|
||||
orientation = strtok(NULL, " ");
|
||||
orientation = strtok(nullptr, " ");
|
||||
if (orientation)
|
||||
ox = float(atof(orientation));
|
||||
}
|
||||
@@ -444,9 +450,9 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
char* toX = strtok(NULL, " ");
|
||||
char* toY = strtok(NULL, " ");
|
||||
char* toZ = strtok(NULL, " ");
|
||||
char* toX = strtok(nullptr, " ");
|
||||
char* toY = strtok(nullptr, " ");
|
||||
char* toZ = strtok(nullptr, " ");
|
||||
|
||||
float x, y, z;
|
||||
if (!toX)
|
||||
@@ -499,7 +505,7 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
char* phase = strtok (NULL, " ");
|
||||
char* phase = strtok (nullptr, " ");
|
||||
uint32 phaseMask = phase ? atoi(phase) : 0;
|
||||
if (phaseMask == 0)
|
||||
{
|
||||
@@ -581,7 +587,7 @@ public:
|
||||
if (!cValue)
|
||||
return false;
|
||||
ObjectGuid::LowType guidLow = atoul(cValue);
|
||||
const GameObjectData* data = sObjectMgr->GetGOData(guidLow);
|
||||
GameObjectData const* data = sObjectMgr->GetGOData(guidLow);
|
||||
if (!data)
|
||||
return false;
|
||||
entry = data->id;
|
||||
@@ -641,7 +647,7 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
char* type = strtok(NULL, " ");
|
||||
char* type = strtok(nullptr, " ");
|
||||
if (!type)
|
||||
return false;
|
||||
|
||||
@@ -655,7 +661,7 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
char* state = strtok(NULL, " ");
|
||||
char* state = strtok(nullptr, " ");
|
||||
if (!state)
|
||||
return false;
|
||||
|
||||
|
||||
Reference in new issue
Block a user