Merge branch 'master' of github.com:TrinityCore/TrinityCore into 4.3.4

This commit is contained in:
Shauren
2013-09-01 00:59:58 +02:00
7 changed files with 64 additions and 10 deletions

View File

@@ -0,0 +1,13 @@
diff --git a/dep/g3dlite/source/Matrix4.cpp b/dep/g3dlite/source/Matrix4.cpp
index 2ce14f6..fbc918f 100644
--- a/dep/g3dlite/source/Matrix4.cpp
+++ b/dep/g3dlite/source/Matrix4.cpp
@@ -382,7 +382,7 @@ bool Matrix4::operator==(const Matrix4& other) const {
// If the bit patterns are identical, they must be
// the same matrix. If not, they *might* still have
// equal elements due to floating point weirdness.
- if (memcmp(this, &other, sizeof(Matrix4) == 0)) {
+ if (memcmp(this, &other, sizeof(Matrix4)) == 0) {
return true;
}

View File

@@ -382,7 +382,7 @@ bool Matrix4::operator==(const Matrix4& other) const {
// If the bit patterns are identical, they must be
// the same matrix. If not, they *might* still have
// equal elements due to floating point weirdness.
if (memcmp(this, &other, sizeof(Matrix4) == 0)) {
if (memcmp(this, &other, sizeof(Matrix4)) == 0) {
return true;
}

View File

@@ -0,0 +1,24 @@
/* cs_bf.cpp */
SET @id = 257;
-- Add new permissions
DELETE FROM `rbac_permissions` WHERE `id` BETWEEN @id AND @id+5;
INSERT INTO `rbac_permissions` (`id`, `name`) VALUES
(@id+0, 'bf'),
(@id+1, 'bf start'),
(@id+2, 'bf stop'),
(@id+3, 'bf switch'),
(@id+4, 'bf timer'),
(@id+5, 'bf enabled');
-- Add permissions to "corresponding Commands Role"
DELETE FROM `rbac_role_permissions` WHERE `permissionId` BETWEEN @id AND @id+5;
INSERT INTO `rbac_role_permissions` (`roleId`, `permissionId`) VALUES
(4, @id+0),
(4, @id+1),
(4, @id+2),
(4, @id+3),
(4, @id+4),
(4, @id+5);

View File

@@ -0,0 +1,12 @@
/* cs_bf.cpp */
SET @id = 257;
-- Update command table with new RBAC permissions
UPDATE `command` SET `permission` = @id+0 WHERE `name` = 'bf';
UPDATE `command` SET `permission` = @id+1 WHERE `name` = 'bf start';
UPDATE `command` SET `permission` = @id+2 WHERE `name` = 'bf stop';
UPDATE `command` SET `permission` = @id+3 WHERE `name` = 'bf switch';
UPDATE `command` SET `permission` = @id+4 WHERE `name` = 'bf timer';
UPDATE `command` SET `permission` = @id+5 WHERE `name` = 'bf enabled';

View File

@@ -154,6 +154,12 @@ enum RBACPermissions
RBAC_PERM_COMMAND_UNBAN_CHARACTER = 254,
RBAC_PERM_COMMAND_UNBAN_IP = 255,
RBAC_PERM_COMMAND_UNBAN_PLAYERACCOUNT = 256,
RBAC_PERM_COMMAND_BF = 257,
RBAC_PERM_COMMAND_BF_START = 258,
RBAC_PERM_COMMAND_BF_STOP = 259,
RBAC_PERM_COMMAND_BF_SWITCH = 260,
RBAC_PERM_COMMAND_BF_TIMER = 261,
RBAC_PERM_COMMAND_BF_ENABLE = 262,
// custom permissions 1000+
RBAC_PERM_MAX

View File

@@ -524,7 +524,6 @@ int WorldSocket::handle_input_payload (void)
m_RecvPct.base (NULL, 0);
m_RecvPct.reset();
delete m_RecvWPct;
m_RecvWPct = NULL;
m_Header.reset();

View File

@@ -35,17 +35,17 @@ public:
{
static ChatCommand battlefieldcommandTable[] =
{
{ "start", RBAC_PERM_ADMINISTRATOR_COMMANDS, false, &HandleBattlefieldStart, "", NULL },
{ "stop", RBAC_PERM_ADMINISTRATOR_COMMANDS, false, &HandleBattlefieldEnd, "", NULL },
{ "switch", RBAC_PERM_ADMINISTRATOR_COMMANDS, false, &HandleBattlefieldSwitch, "", NULL },
{ "timer", RBAC_PERM_ADMINISTRATOR_COMMANDS, false, &HandleBattlefieldTimer, "", NULL },
{ "enable", RBAC_PERM_ADMINISTRATOR_COMMANDS, false, &HandleBattlefieldEnable, "", NULL },
{ NULL, 0, false, NULL, "", NULL }
{ "start", RBAC_PERM_COMMAND_BF_START, false, &HandleBattlefieldStart, "", NULL },
{ "stop", RBAC_PERM_COMMAND_BF_STOP, false, &HandleBattlefieldEnd, "", NULL },
{ "switch", RBAC_PERM_COMMAND_BF_SWITCH, false, &HandleBattlefieldSwitch, "", NULL },
{ "timer", RBAC_PERM_COMMAND_BF_TIMER, false, &HandleBattlefieldTimer, "", NULL },
{ "enable", RBAC_PERM_COMMAND_BF_ENABLE, false, &HandleBattlefieldEnable, "", NULL },
{ NULL, 0, false, NULL, "", NULL }
};
static ChatCommand commandTable[] =
{
{ "bf", RBAC_PERM_ADMINISTRATOR_COMMANDS, false, NULL, "", battlefieldcommandTable },
{ NULL, 0, false, NULL, "", NULL }
{ "bf", RBAC_PERM_COMMAND_BF, false, NULL, "", battlefieldcommandTable },
{ NULL, 0, false, NULL, "", NULL }
};
return commandTable;
}