From 2057e08ef3c15a9e87daaa9e7469ce101e3bdb1b Mon Sep 17 00:00:00 2001 From: Luth31 Date: Sat, 13 Aug 2016 23:51:52 +0300 Subject: [PATCH 1/5] Core/Misc: Fix instant logout config --- src/game/Handlers/MiscHandler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/game/Handlers/MiscHandler.cpp b/src/game/Handlers/MiscHandler.cpp index b5b65ba66..76e970dbf 100644 --- a/src/game/Handlers/MiscHandler.cpp +++ b/src/game/Handlers/MiscHandler.cpp @@ -410,7 +410,7 @@ void WorldSession::HandleLogoutRequestOpcode(WorldPacket & /*recv_data*/) if (uint64 lguid = GetPlayer()->GetLootGUID()) DoLootRelease(lguid); - bool instantLogout = (GetSecurity() > SEC_PLAYER || GetPlayer()->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_RESTING) && !GetPlayer()->IsInCombat()) || GetPlayer()->IsInFlight(); + bool instantLogout = (GetSecurity() >= sWorld->getIntConfig(CONFIG_INSTANT_LOGOUT) || GetPlayer()->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_RESTING) && !GetPlayer()->IsInCombat()) || GetPlayer()->IsInFlight(); /// TODO: Possibly add RBAC permission to log out in combat bool canLogoutInCombat = GetPlayer()->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_RESTING); From 42e5f1310177cf63fd9c15a764ec7f3ec34ec65d Mon Sep 17 00:00:00 2001 From: ShinDarth Date: Sun, 14 Aug 2016 09:08:45 +0200 Subject: [PATCH 2/5] Bin/Defines fix error in Mac OS X --- bin/bash_shared/defines.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bin/bash_shared/defines.sh b/bin/bash_shared/defines.sh index 8d30720b5..512173a8b 100644 --- a/bin/bash_shared/defines.sh +++ b/bin/bash_shared/defines.sh @@ -1,4 +1,9 @@ -AC_PATH_ROOT=$(readlink -f "$AC_PATH_BIN/../") +unamestr=`uname` +if [[ "$unamestr" == 'Darwin' ]]; then + AC_PATH_ROOT=$(greadlink -f "$AC_PATH_BIN/../") +else + AC_PATH_ROOT=$(readlink -f "$AC_PATH_BIN/../") +fi AC_PATH_CONF="$AC_PATH_ROOT/conf" From f6b759adced1c876ff729fe08df697de379f1aca Mon Sep 17 00:00:00 2001 From: ShinDarth Date: Sun, 14 Aug 2016 12:31:40 +0200 Subject: [PATCH 3/5] DB/Characters: fix base dumps --- .../base/characters/battleground_deserters.sql | 6 +++--- data/sql/base/characters/character_aura.sql | 18 +++++++++--------- data/sql/base/characters/character_glyphs.sql | 4 ++-- data/sql/base/characters/characters.sql | 4 ++-- .../base/characters/characters_db_version.sql | 2 +- data/sql/base/characters/gm_subsurveys.sql | 18 +++++++++--------- .../{gm_surveys.sql => gm_survey.sql} | 12 ++++++------ data/sql/base/characters/groups.sql | 2 +- data/sql/base/characters/pet_aura.sql | 16 ++++++++-------- 9 files changed, 41 insertions(+), 41 deletions(-) rename data/sql/base/characters/{gm_surveys.sql => gm_survey.sql} (82%) diff --git a/data/sql/base/characters/battleground_deserters.sql b/data/sql/base/characters/battleground_deserters.sql index 5a9e58427..f9830d769 100644 --- a/data/sql/base/characters/battleground_deserters.sql +++ b/data/sql/base/characters/battleground_deserters.sql @@ -9,9 +9,9 @@ DROP TABLE IF EXISTS `battleground_deserters`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `battleground_deserters` ( - `guid` int(10) unsigned NOT NULL COMMENT 'characters.guid', - `type` tinyint(3) unsigned NOT NULL COMMENT 'type of the desertion', - `datetime` datetime NOT NULL COMMENT 'datetime of the desertion' + `guid` INT(10) UNSIGNED NOT NULL COMMENT 'characters.guid', + `type` TINYINT(3) UNSIGNED NOT NULL COMMENT 'type of the desertion', + `datetime` DATETIME NOT NULL COMMENT 'datetime of the desertion' ) ENGINE=InnoDB DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */; diff --git a/data/sql/base/characters/character_aura.sql b/data/sql/base/characters/character_aura.sql index 7e2b27a8f..645269a31 100644 --- a/data/sql/base/characters/character_aura.sql +++ b/data/sql/base/characters/character_aura.sql @@ -10,22 +10,22 @@ DROP TABLE IF EXISTS `character_aura`; CREATE TABLE `character_aura` ( `guid` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Global Unique Identifier', - `caster_guid` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT 'Full Global Unique Identifier', - `item_guid` bigint(20) unsigned NOT NULL DEFAULT '0', + `casterGuid` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT 'Full Global Unique Identifier', + `itemGuid` bigint(20) unsigned NOT NULL DEFAULT '0', `spell` mediumint(8) unsigned NOT NULL DEFAULT '0', - `effect_mask` tinyint(3) unsigned NOT NULL DEFAULT '0', - `recalculate_mask` tinyint(3) unsigned NOT NULL DEFAULT '0', - `stackcount` tinyint(3) unsigned NOT NULL DEFAULT '1', + `effectMask` tinyint(3) unsigned NOT NULL DEFAULT '0', + `recalculateMask` tinyint(3) unsigned NOT NULL DEFAULT '0', + `stackCount` tinyint(3) unsigned NOT NULL DEFAULT '1', `amount0` int(11) NOT NULL DEFAULT '0', `amount1` int(11) NOT NULL DEFAULT '0', `amount2` int(11) NOT NULL DEFAULT '0', `base_amount0` int(11) NOT NULL DEFAULT '0', `base_amount1` int(11) NOT NULL DEFAULT '0', `base_amount2` int(11) NOT NULL DEFAULT '0', - `maxduration` int(11) NOT NULL DEFAULT '0', - `remaintime` int(11) NOT NULL DEFAULT '0', - `remaincharges` tinyint(3) unsigned NOT NULL DEFAULT '0', - PRIMARY KEY (`guid`,`caster_guid`,`item_guid`,`spell`,`effect_mask`) + `maxDuration` int(11) NOT NULL DEFAULT '0', + `remainTime` int(11) NOT NULL DEFAULT '0', + `remainCharges` tinyint(3) unsigned NOT NULL DEFAULT '0', + PRIMARY KEY (`guid`,`casterGuid`,`itemGuid`,`spell`,`effectMask`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Player System'; /*!40101 SET character_set_client = @saved_cs_client */; diff --git a/data/sql/base/characters/character_glyphs.sql b/data/sql/base/characters/character_glyphs.sql index b373090da..9786a0c22 100644 --- a/data/sql/base/characters/character_glyphs.sql +++ b/data/sql/base/characters/character_glyphs.sql @@ -10,14 +10,14 @@ DROP TABLE IF EXISTS `character_glyphs`; CREATE TABLE `character_glyphs` ( `guid` int(10) unsigned NOT NULL, - `spec` tinyint(3) unsigned NOT NULL DEFAULT '0', + `talentGroup` tinyint(3) unsigned NOT NULL DEFAULT '0', `glyph1` smallint(5) unsigned DEFAULT '0', `glyph2` smallint(5) unsigned DEFAULT '0', `glyph3` smallint(5) unsigned DEFAULT '0', `glyph4` smallint(5) unsigned DEFAULT '0', `glyph5` smallint(5) unsigned DEFAULT '0', `glyph6` smallint(5) unsigned DEFAULT '0', - PRIMARY KEY (`guid`,`spec`) + PRIMARY KEY (`guid`,`talentGroup`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; diff --git a/data/sql/base/characters/characters.sql b/data/sql/base/characters/characters.sql index 8d68377f9..37b9f3802 100644 --- a/data/sql/base/characters/characters.sql +++ b/data/sql/base/characters/characters.sql @@ -69,8 +69,8 @@ CREATE TABLE `characters` `power6` int(10) unsigned NOT NULL DEFAULT '0', `power7` int(10) unsigned NOT NULL DEFAULT '0', `latency` mediumint(8) unsigned NOT NULL DEFAULT '0', - `speccount` tinyint(3) unsigned NOT NULL DEFAULT '1', - `activespec` tinyint(3) unsigned NOT NULL DEFAULT '0', + `talentGroupsCount` tinyint(3) unsigned NOT NULL DEFAULT '1', + `activeTalentGroup` tinyint(3) unsigned NOT NULL DEFAULT '0', `exploredZones` longtext, `equipmentCache` longtext, `ammoId` int(10) unsigned NOT NULL DEFAULT '0', diff --git a/data/sql/base/characters/characters_db_version.sql b/data/sql/base/characters/characters_db_version.sql index 8e2ea118b..082e41fe3 100644 --- a/data/sql/base/characters/characters_db_version.sql +++ b/data/sql/base/characters/characters_db_version.sql @@ -9,7 +9,7 @@ DROP TABLE IF EXISTS `characters_db_version`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `characters_db_version` ( - `2016_07_10_00` bit(1) DEFAULT NULL + `2016_08_12_00` bit(1) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='Last applied sql update to DB'; /*!40101 SET character_set_client = @saved_cs_client */; diff --git a/data/sql/base/characters/gm_subsurveys.sql b/data/sql/base/characters/gm_subsurveys.sql index 59d1260c4..745571a1a 100644 --- a/data/sql/base/characters/gm_subsurveys.sql +++ b/data/sql/base/characters/gm_subsurveys.sql @@ -4,22 +4,22 @@ /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; -DROP TABLE IF EXISTS `gm_subsurveys`; +DROP TABLE IF EXISTS `gm_subsurvey`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; -CREATE TABLE `gm_subsurveys` +CREATE TABLE `gm_subsurvey` ( `surveyId` int(10) unsigned NOT NULL AUTO_INCREMENT, - `subsurveyId` int(10) unsigned NOT NULL DEFAULT '0', - `rank` int(10) unsigned NOT NULL DEFAULT '0', - `comment` text NOT NULL, - PRIMARY KEY (`surveyId`,`subsurveyId`) + `questionId` int(10) unsigned NOT NULL DEFAULT '0', + `answer` int(10) unsigned NOT NULL DEFAULT '0', + `answerComment` text NOT NULL, + PRIMARY KEY (`surveyId`,`questionId`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Player System'; /*!40101 SET character_set_client = @saved_cs_client */; -LOCK TABLES `gm_subsurveys` WRITE; -/*!40000 ALTER TABLE `gm_subsurveys` DISABLE KEYS */; -/*!40000 ALTER TABLE `gm_subsurveys` ENABLE KEYS */; +LOCK TABLES `gm_subsurvey` WRITE; +/*!40000 ALTER TABLE `gm_subsurvey` DISABLE KEYS */; +/*!40000 ALTER TABLE `gm_subsurvey` ENABLE KEYS */; UNLOCK TABLES; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; diff --git a/data/sql/base/characters/gm_surveys.sql b/data/sql/base/characters/gm_survey.sql similarity index 82% rename from data/sql/base/characters/gm_surveys.sql rename to data/sql/base/characters/gm_survey.sql index e30a81c7e..7366c40e5 100644 --- a/data/sql/base/characters/gm_surveys.sql +++ b/data/sql/base/characters/gm_survey.sql @@ -4,24 +4,24 @@ /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; -DROP TABLE IF EXISTS `gm_surveys`; +DROP TABLE IF EXISTS `gm_survey`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; -CREATE TABLE `gm_surveys` +CREATE TABLE `gm_survey` ( `surveyId` int(10) unsigned NOT NULL AUTO_INCREMENT, `guid` int(10) unsigned NOT NULL DEFAULT '0', `mainSurvey` int(10) unsigned NOT NULL DEFAULT '0', - `overallComment` longtext NOT NULL, + `comment` longtext NOT NULL, `createTime` int(10) unsigned NOT NULL DEFAULT '0', `maxMMR` smallint(5) NOT NULL, PRIMARY KEY (`surveyId`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Player System'; /*!40101 SET character_set_client = @saved_cs_client */; -LOCK TABLES `gm_surveys` WRITE; -/*!40000 ALTER TABLE `gm_surveys` DISABLE KEYS */; -/*!40000 ALTER TABLE `gm_surveys` ENABLE KEYS */; +LOCK TABLES `gm_survey` WRITE; +/*!40000 ALTER TABLE `gm_survey` DISABLE KEYS */; +/*!40000 ALTER TABLE `gm_survey` ENABLE KEYS */; UNLOCK TABLES; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; diff --git a/data/sql/base/characters/groups.sql b/data/sql/base/characters/groups.sql index d99c5ab56..68e29b9bf 100644 --- a/data/sql/base/characters/groups.sql +++ b/data/sql/base/characters/groups.sql @@ -24,7 +24,7 @@ CREATE TABLE `groups` `icon8` int(10) unsigned NOT NULL, `groupType` tinyint(3) unsigned NOT NULL, `difficulty` tinyint(3) unsigned NOT NULL DEFAULT '0', - `raiddifficulty` tinyint(3) unsigned NOT NULL DEFAULT '0', + `raidDifficulty` tinyint(3) unsigned NOT NULL DEFAULT '0', `masterLooterGuid` int(10) unsigned NOT NULL, `MaxlevelGroup` int(10) unsigned NOT NULL DEFAULT '0', PRIMARY KEY (`guid`), diff --git a/data/sql/base/characters/pet_aura.sql b/data/sql/base/characters/pet_aura.sql index fa99d140a..ec1776109 100644 --- a/data/sql/base/characters/pet_aura.sql +++ b/data/sql/base/characters/pet_aura.sql @@ -10,21 +10,21 @@ DROP TABLE IF EXISTS `pet_aura`; CREATE TABLE `pet_aura` ( `guid` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Global Unique Identifier', - `caster_guid` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT 'Full Global Unique Identifier', + `casterGuid` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT 'Full Global Unique Identifier', `spell` mediumint(8) unsigned NOT NULL DEFAULT '0', - `effect_mask` tinyint(3) unsigned NOT NULL DEFAULT '0', - `recalculate_mask` tinyint(3) unsigned NOT NULL DEFAULT '0', - `stackcount` tinyint(3) unsigned NOT NULL DEFAULT '1', + `effectMask` tinyint(3) unsigned NOT NULL DEFAULT '0', + `recalculateMask` tinyint(3) unsigned NOT NULL DEFAULT '0', + `stackCount` tinyint(3) unsigned NOT NULL DEFAULT '1', `amount0` mediumint(8) NOT NULL, `amount1` mediumint(8) NOT NULL, `amount2` mediumint(8) NOT NULL, `base_amount0` mediumint(8) NOT NULL, `base_amount1` mediumint(8) NOT NULL, `base_amount2` mediumint(8) NOT NULL, - `maxduration` int(11) NOT NULL DEFAULT '0', - `remaintime` int(11) NOT NULL DEFAULT '0', - `remaincharges` tinyint(3) unsigned NOT NULL DEFAULT '0', - PRIMARY KEY (`guid`,`spell`,`effect_mask`) + `maxDuration` int(11) NOT NULL DEFAULT '0', + `remainTime` int(11) NOT NULL DEFAULT '0', + `remainCharges` tinyint(3) unsigned NOT NULL DEFAULT '0', + PRIMARY KEY (`guid`,`spell`,`effectMask`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Pet System'; /*!40101 SET character_set_client = @saved_cs_client */; From 338318e262aefa6e86afd5a8116668dda5772de7 Mon Sep 17 00:00:00 2001 From: ShinDarth Date: Sun, 14 Aug 2016 12:34:03 +0200 Subject: [PATCH 4/5] DB/Characters: fix code indentation --- data/sql/base/characters/battleground_deserters.sql | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/data/sql/base/characters/battleground_deserters.sql b/data/sql/base/characters/battleground_deserters.sql index f9830d769..a7d1893e1 100644 --- a/data/sql/base/characters/battleground_deserters.sql +++ b/data/sql/base/characters/battleground_deserters.sql @@ -9,9 +9,9 @@ DROP TABLE IF EXISTS `battleground_deserters`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `battleground_deserters` ( - `guid` INT(10) UNSIGNED NOT NULL COMMENT 'characters.guid', - `type` TINYINT(3) UNSIGNED NOT NULL COMMENT 'type of the desertion', - `datetime` DATETIME NOT NULL COMMENT 'datetime of the desertion' + `guid` INT(10) UNSIGNED NOT NULL COMMENT 'characters.guid', + `type` TINYINT(3) UNSIGNED NOT NULL COMMENT 'type of the desertion', + `datetime` DATETIME NOT NULL COMMENT 'datetime of the desertion' ) ENGINE=InnoDB DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */; From 6bde1b7297e267b1b312cd323cc68c93789bc321 Mon Sep 17 00:00:00 2001 From: Shin Date: Sun, 14 Aug 2016 12:50:18 +0200 Subject: [PATCH 5/5] Update README.md --- README.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 8b7fe1725..bff344b13 100644 --- a/README.md +++ b/README.md @@ -12,13 +12,15 @@ It is written in C++ and based on MaNGOS, TrinityCore and SunwellCore. Our main goal is to create a playable game server, offering a fully working game experience. In short, we focus on the **user experience (UX)**. -Like MaNGOS and TrinityCore did in past, we like to write clean code and doing software development right, but **our main goal is to have fully working features**. In other terms, we always prefer proper solutions to problems, but we may accept "*hackfixes*" (when they do not affect the game stability) if a proper solution is not available yet. +We also believe in [software modularity](https://en.wikipedia.org/wiki/Modular_programming), because the more the software is modular, and the more it will be easy to be maintained, understood, developed, etc... So we organized the structure of AzerothCore as modular as possible, giving the possibility to [create new modules](https://github.com/azerothcore/azerothcore-wotlk/wiki/Create-a-Module) to add custom features (instead of patching the core). -We also believe in [software modularity](https://en.wikipedia.org/wiki/Modular_programming), because the more the software is modular, and the more it will be easy to be maintained, understood, developed, etc... +## Learning project -## Work in progress... +AzerothCore is a learning project. +If you want to learn how to use C++, SQL, git, etc... you came to the right place! We will gladly to help you: **programming is our passion**. + +If you want to contribute, in [our wiki](https://github.com/azerothcore/azerothcore-wotlk/wiki) you fill find a lot of resources that will guide you. Also you can poke us in [our gitter chat channel](https://gitter.im/azerothcore/azerothcore). -The project is still under a work in progress phase, so all guidelines may not be available yet and PRs may be not merged immediately, but feel free to starting contributing. We will love to review and accept your PRs. ## Authors & Contributors