diff --git a/sql/mangos.sql b/sql/mangos.sql index e8a59be7c..c320c9169 100644 --- a/sql/mangos.sql +++ b/sql/mangos.sql @@ -2158,6 +2158,8 @@ INSERT INTO `mangos_string` VALUES (54,'The new passwords do not match',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL), (55,'Your password can\'t be longer than 16 characters (client limit), password not changed!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL), (56,'Current Message of the day: \r\n%s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL), +(57,'Using World DB: %s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL), +(58,'Using script library: %s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL), (100,'Global notify: ',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL), (101,'Map: %u (%s) Zone: %u (%s) Area: %u (%s)\nX: %f Y: %f Z: %f Orientation: %f\ngrid[%u,%u]cell[%u,%u] InstanceID: %u\n ZoneX: %f ZoneY: %f\nGroundZ: %f FloorZ: %f Have height data (Map: %u VMap: %u)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL), (102,'%s is already being teleported.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL), diff --git a/sql/updates/2008_10_26_01_mangos_mangos_string.sql b/sql/updates/2008_10_26_01_mangos_mangos_string.sql new file mode 100644 index 000000000..2cdf5e294 --- /dev/null +++ b/sql/updates/2008_10_26_01_mangos_mangos_string.sql @@ -0,0 +1,5 @@ +DELETE FROM mangos_string WHERE entry IN (57,58); + +INSERT INTO mangos_string VALUES +(57,'Using World DB: %s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL), +(58,'Using script library: %s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); diff --git a/sql/updates/Makefile.am b/sql/updates/Makefile.am index 5c10eed8a..da45d285a 100644 --- a/sql/updates/Makefile.am +++ b/sql/updates/Makefile.am @@ -106,6 +106,7 @@ pkgdata_DATA = \ 2008_10_23_03_mangos_mangos_string.sql \ 2008_10_23_04_mangos_command.sql \ 2008_10_23_05_mangos_command.sql \ + 2008_10_26_01_mangos_mangos_string.sql \ README ## Additional files to include when running 'make dist' @@ -193,4 +194,5 @@ EXTRA_DIST = \ 2008_10_23_03_mangos_mangos_string.sql \ 2008_10_23_04_mangos_command.sql \ 2008_10_23_05_mangos_command.sql \ + 2008_10_26_01_mangos_mangos_string.sql \ README diff --git a/src/bindings/universal/ScriptMgr.cpp b/src/bindings/universal/ScriptMgr.cpp index edbdaa3f5..3e2a557db 100644 --- a/src/bindings/universal/ScriptMgr.cpp +++ b/src/bindings/universal/ScriptMgr.cpp @@ -64,6 +64,12 @@ void ScriptsInit() } +MANGOS_DLL_EXPORT +char const* ScriptsVersion() +{ + return "Default MaNGOS scripting library"; +} + Script* GetScriptByName(std::string Name) { if(Name.empty()) diff --git a/src/bindings/universal/ScriptMgr.h b/src/bindings/universal/ScriptMgr.h index 414da1614..f374f1db9 100644 --- a/src/bindings/universal/ScriptMgr.h +++ b/src/bindings/universal/ScriptMgr.h @@ -38,11 +38,11 @@ class Map; struct Script { Script() : - pGossipHello(NULL), pQuestAccept(NULL), pGossipSelect(NULL), pGossipSelectWithCode(NULL), + pGossipHello(NULL), pQuestAccept(NULL), pGossipSelect(NULL), pGossipSelectWithCode(NULL), pQuestSelect(NULL), pQuestComplete(NULL), pNPCDialogStatus(NULL), pGODialogStatus(NULL), pChooseReward(NULL), pItemHello(NULL), pGOHello(NULL), pAreaTrigger(NULL), pItemQuestAccept(NULL), pGOQuestAccept(NULL), pGOChooseReward(NULL), pReceiveEmote(NULL), pItemUse(NULL), GetAI(NULL) - {} + {} std::string Name; diff --git a/src/game/Chat.cpp b/src/game/Chat.cpp index 355f24650..86e96d5bf 100644 --- a/src/game/Chat.cpp +++ b/src/game/Chat.cpp @@ -67,7 +67,7 @@ ChatCommand * ChatHandler::getCommandTable() { "exit", SEC_CONSOLE, true, &ChatHandler::HandleServerExitCommand, "", NULL }, { "idlerestart", SEC_ADMINISTRATOR, true, &ChatHandler::HandleIdleRestartCommand, "", NULL }, { "idleshutdown", SEC_ADMINISTRATOR, true, &ChatHandler::HandleIdleShutDownCommand, "", NULL }, - { "info", SEC_PLAYER, true, &ChatHandler::HandleInfoCommand, "", NULL }, + { "info", SEC_PLAYER, true, &ChatHandler::HandleServerInfoCommand, "", NULL }, { "motd", SEC_PLAYER, true, &ChatHandler::HandleServerMotdCommand, "", NULL }, { "restart", SEC_ADMINISTRATOR, true, &ChatHandler::HandleRestartCommand, "", NULL }, { "shutdown", SEC_ADMINISTRATOR, true, &ChatHandler::HandleShutDownCommand, "", NULL }, diff --git a/src/game/Chat.h b/src/game/Chat.h index 6ab125f1a..c91f0b673 100644 --- a/src/game/Chat.h +++ b/src/game/Chat.h @@ -95,7 +95,6 @@ class ChatHandler bool HandleHelpCommand(const char* args); bool HandleCommandsCommand(const char* args); bool HandleStartCommand(const char* args); - bool HandleInfoCommand(const char* args); bool HandleDismountCommand(const char* args); bool HandleSaveCommand(const char* args); bool HandleGMListIngameCommand(const char* args); @@ -220,6 +219,7 @@ class ChatHandler bool HandleServerCorpsesCommand(const char* args); bool HandleServerExitCommand(const char* args); + bool HandleServerInfoCommand(const char* args); bool HandleServerMotdCommand(const char* args); bool HandleServerSetMotdCommand(const char* args); bool HandleServerSetLogLevelCommand(const char* args); diff --git a/src/game/Language.h b/src/game/Language.h index 093c6b57e..e512d297b 100644 --- a/src/game/Language.h +++ b/src/game/Language.h @@ -80,7 +80,9 @@ enum MangosStrings LANG_NEW_PASSWORDS_NOT_MATCH = 54, LANG_PASSWORD_TOO_LONG = 55, LANG_MOTD_CURRENT = 56, - // Room for more level 0 57-99 not used + LANG_USING_WORLD_DB = 57, + LANG_USING_SCRIPT_LIB = 58, + // Room for more level 0 59-99 not used // level 1 chat LANG_GLOBAL_NOTIFY = 100, diff --git a/src/game/Level0.cpp b/src/game/Level0.cpp index a4c82c3de..49cfb3ed5 100644 --- a/src/game/Level0.cpp +++ b/src/game/Level0.cpp @@ -85,7 +85,7 @@ bool ChatHandler::HandleStartCommand(const char* /*args*/) return true; } -bool ChatHandler::HandleInfoCommand(const char* /*args*/) +bool ChatHandler::HandleServerInfoCommand(const char* /*args*/) { uint32 activeClientsNum = sWorld.GetActiveSessionCount(); uint32 queuedClientsNum = sWorld.GetQueuedSessionCount(); @@ -99,7 +99,9 @@ bool ChatHandler::HandleInfoCommand(const char* /*args*/) else full = _FULLVERSION(REVISION_DATE,REVISION_TIME,REVISION_ID); - PSendSysMessage(full); + SendSysMessage(full); + PSendSysMessage(LANG_USING_SCRIPT_LIB,sWorld.GetScriptsVersion()); + PSendSysMessage(LANG_USING_WORLD_DB,sWorld.GetDBVersion()); PSendSysMessage(LANG_CONNECTED_USERS, activeClientsNum, maxActiveClientsNum, queuedClientsNum, maxQueuedClientsNum); PSendSysMessage(LANG_UPTIME, str.c_str()); diff --git a/src/game/Level2.cpp b/src/game/Level2.cpp index ff850cbb7..647d7ebbb 100644 --- a/src/game/Level2.cpp +++ b/src/game/Level2.cpp @@ -1950,7 +1950,7 @@ bool ChatHandler::HandleTicketCommand(const char* args) int num = atoi(px); if(num > 0) { - QueryResult *result = CharacterDatabase.PQuery("SELECT guid,ticket_text,ticket_lastchange FROM character_ticket ORDER BY ticket_id ASC LIMIT %d,1",num-1); + QueryResult *result = CharacterDatabase.PQuery("SELECT guid,ticket_text,ticket_lastchange FROM character_ticket ORDER BY ticket_id ASC "_OFFSET_, num-1); if(!result) { @@ -2062,9 +2062,9 @@ bool ChatHandler::HandleDelTicketCommand(const char *args) // delticket #num if(num > 0) { - QueryResult *result = CharacterDatabase.PQuery("SELECT ticket_id,guid FROM character_ticket LIMIT %i",num); + QueryResult *result = CharacterDatabase.PQuery("SELECT ticket_id,guid FROM character_ticket ORDER BY ticket_id ASC "_OFFSET_,num-1); - if(!result || uint64(num) > result->GetRowCount()) + if(!result) { PSendSysMessage(LANG_COMMAND_TICKENOTEXIST, num); delete result; @@ -2072,9 +2072,6 @@ bool ChatHandler::HandleDelTicketCommand(const char *args) return false; } - for(int i = 1; i < num; ++i) - result->NextRow(); - Field* fields = result->Fetch(); uint32 id = fields[0].GetUInt32(); diff --git a/src/game/Level3.cpp b/src/game/Level3.cpp index 7cfea3192..91a50b0d5 100644 --- a/src/game/Level3.cpp +++ b/src/game/Level3.cpp @@ -5450,7 +5450,7 @@ bool ChatHandler::HandleLoadPDumpCommand(const char *args) SetSentErrorMessage(true); return false; case DUMP_TOO_MANY_CHARS: - PSendSysMessage(LANG_ACCOUNT_CHARACTER_LIST_FULL,account_name,account_id); + PSendSysMessage(LANG_ACCOUNT_CHARACTER_LIST_FULL,account_name.c_str(),account_id); SetSentErrorMessage(true); return false; default: diff --git a/src/game/ObjectMgr.cpp b/src/game/ObjectMgr.cpp index 601915d64..28562fbc5 100644 --- a/src/game/ObjectMgr.cpp +++ b/src/game/ObjectMgr.cpp @@ -6398,6 +6398,10 @@ bool PlayerCondition::Meets(Player const * player) const return true; return false; } + case CONDITION_NO_AURA: + return !player->HasAura(value1, value2); + case CONDITION_ACTIVE_EVENT: + return gameeventmgr.IsActiveEvent(value1); default: return false; } @@ -6518,6 +6522,30 @@ bool PlayerCondition::IsValid(ConditionType condition, uint32 value1, uint32 val sLog.outErrorDb("Quest condition has useless data in value2 (%u)!", value2); break; } + case CONDITION_NO_AURA: + { + if(!sSpellStore.LookupEntry(value1)) + { + sLog.outErrorDb("Aura condition requires to have non existing spell (Id: %d), skipped", value1); + return false; + } + if(value2 > 2) + { + sLog.outErrorDb("Aura condition requires to have non existing effect index (%u) (must be 0..2), skipped", value2); + return false; + } + break; + } + case CONDITION_ACTIVE_EVENT: + { + GameEvent::GameEventDataMap const& events = gameeventmgr.GetEventMap(); + if(value1 >=events.size() || !events[value1].isValid()) + { + sLog.outErrorDb("Active event condition requires existed event id (%u), skipped", value1); + return false; + } + break; + } } return true; } diff --git a/src/game/ObjectMgr.h b/src/game/ObjectMgr.h index a19e5f1d9..bdf15399a 100644 --- a/src/game/ObjectMgr.h +++ b/src/game/ObjectMgr.h @@ -203,9 +203,11 @@ enum ConditionType CONDITION_QUESTREWARDED = 8, // quest_id 0 CONDITION_QUESTTAKEN = 9, // quest_id 0, for condition true while quest active. CONDITION_AD_COMMISSION_AURA = 10, // 0 0, for condition true while one from AD ñommission aura active + CONDITION_NO_AURA = 11, // spell_id effindex + CONDITION_ACTIVE_EVENT = 12, // event_id }; -#define MAX_CONDITION 11 // maximum value in ConditionType enum +#define MAX_CONDITION 13 // maximum value in ConditionType enum struct PlayerCondition { @@ -742,6 +744,7 @@ class ObjectMgr bool RemoveVendorItem(uint32 entry,uint32 item); bool IsVendorItemValid( uint32 vendor_entry, uint32 item, uint32 maxcount, uint32 ptime, uint32 ExtendedCost, Player* pl = NULL, std::set* skip_vendors = NULL ) const; void LoadAchievementCriteriaList(); + protected: uint32 m_auctionid; uint32 m_mailid; diff --git a/src/game/ScriptCalls.cpp b/src/game/ScriptCalls.cpp index 2a744e437..00435fa8f 100644 --- a/src/game/ScriptCalls.cpp +++ b/src/game/ScriptCalls.cpp @@ -22,6 +22,7 @@ #include "Platform/Define.h" #include "ScriptCalls.h" +#include "World.h" ScriptsSet Script=NULL; @@ -55,6 +56,7 @@ bool LoadScriptingModule(char const* libName) if( !(testScript->ScriptsInit =(scriptCallScriptsInit )MANGOS_GET_PROC_ADDR(testScript->hScriptsLib,"ScriptsInit" )) ||!(testScript->ScriptsFree =(scriptCallScriptsFree )MANGOS_GET_PROC_ADDR(testScript->hScriptsLib,"ScriptsFree" )) + ||!(testScript->ScriptsVersion =(scriptCallScriptsVersion )MANGOS_GET_PROC_ADDR(testScript->hScriptsLib,"ScriptsVersion" )) ||!(testScript->GossipHello =(scriptCallGossipHello )MANGOS_GET_PROC_ADDR(testScript->hScriptsLib,"GossipHello" )) ||!(testScript->GOChooseReward =(scriptCallGOChooseReward )MANGOS_GET_PROC_ADDR(testScript->hScriptsLib,"GOChooseReward" )) ||!(testScript->QuestAccept =(scriptCallQuestAccept )MANGOS_GET_PROC_ADDR(testScript->hScriptsLib,"QuestAccept" )) @@ -91,5 +93,7 @@ bool LoadScriptingModule(char const* libName) Script=testScript; Script->ScriptsInit(); + sWorld.SetScriptsVersion(Script->ScriptsVersion()); + return true; } diff --git a/src/game/ScriptCalls.h b/src/game/ScriptCalls.h index 0b8b58344..bab186187 100644 --- a/src/game/ScriptCalls.h +++ b/src/game/ScriptCalls.h @@ -37,6 +37,7 @@ void UnloadScriptingModule(); typedef void(MANGOS_IMPORT * scriptCallScriptsInit) (); typedef void(MANGOS_IMPORT * scriptCallScriptsFree) (); +typedef char const* (MANGOS_IMPORT * scriptCallScriptsVersion) (); typedef bool(MANGOS_IMPORT * scriptCallGossipHello) (Player *player, Creature *_Creature ); typedef bool(MANGOS_IMPORT * scriptCallQuestAccept) (Player *player, Creature *_Creature, Quest const *); @@ -62,6 +63,7 @@ typedef struct { scriptCallScriptsInit ScriptsInit; scriptCallScriptsFree ScriptsFree; + scriptCallScriptsVersion ScriptsVersion; scriptCallGossipHello GossipHello; scriptCallGOChooseReward GOChooseReward; diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index 63adcba42..a4b28a814 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -4047,12 +4047,12 @@ void Spell::EffectSummonPet(uint32 i) NewSummon->setPetType(SUMMON_PET); uint32 faction = m_caster->getFaction(); - if(m_caster->GetTypeId() == TYPEID_UNIT && ((Creature*)m_caster)->isTotem()) + if(m_caster->GetTypeId() == TYPEID_UNIT) { - Unit* owner = ((Totem*)m_caster)->GetOwner(); - if(owner) - faction = owner->getFaction(); - NewSummon->GetCharmInfo()->SetReactState(REACT_AGGRESSIVE); + if ( ((Creature*)m_caster)->isTotem() ) + NewSummon->GetCharmInfo()->SetReactState(REACT_AGGRESSIVE); + else + NewSummon->GetCharmInfo()->SetReactState(REACT_DEFENSIVE); } NewSummon->SetUInt64Value(UNIT_FIELD_SUMMONEDBY, m_caster->GetGUID()); diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 08175df9a..53d713a27 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -9853,7 +9853,7 @@ CharmInfo* Unit::InitCharmInfo(Unit *charm) } CharmInfo::CharmInfo(Unit* unit) -: m_unit(unit), m_CommandState(COMMAND_FOLLOW), m_ReactSate(REACT_PASSIVE), m_petnumber(0) +: m_unit(unit), m_CommandState(COMMAND_FOLLOW), m_reactState(REACT_PASSIVE), m_petnumber(0) { for(int i =0; i<4; ++i) { diff --git a/src/game/Unit.h b/src/game/Unit.h index f886000b2..f7c2625b3 100644 --- a/src/game/Unit.h +++ b/src/game/Unit.h @@ -644,9 +644,9 @@ struct CharmInfo void SetCommandState(CommandStates st) { m_CommandState = st; } CommandStates GetCommandState() { return m_CommandState; } bool HasCommandState(CommandStates state) { return (m_CommandState == state); } - void SetReactState(ReactStates st) { m_ReactSate = st; } - ReactStates GetReactState() { return m_ReactSate; } - bool HasReactState(ReactStates state) { return (m_ReactSate == state); } + void SetReactState(ReactStates st) { m_reactState = st; } + ReactStates GetReactState() { return m_reactState; } + bool HasReactState(ReactStates state) { return (m_reactState == state); } void InitPossessCreateSpells(); void InitCharmCreateSpells(); @@ -663,7 +663,7 @@ struct CharmInfo UnitActionBarEntry PetActionBar[10]; CharmSpellEntry m_charmspells[4]; CommandStates m_CommandState; - ReactStates m_ReactSate; + ReactStates m_reactState; uint32 m_petnumber; }; diff --git a/src/game/World.cpp b/src/game/World.cpp index 36ddff520..7cad831ef 100644 --- a/src/game/World.cpp +++ b/src/game/World.cpp @@ -2554,3 +2554,17 @@ void World::UpdateMaxSessionCounters() m_maxActiveSessionCount = std::max(m_maxActiveSessionCount,uint32(m_sessions.size()-m_QueuedPlayer.size())); m_maxQueuedSessionCount = std::max(m_maxQueuedSessionCount,uint32(m_QueuedPlayer.size())); } + +void World::LoadDBVersion() +{ + QueryResult* result = WorldDatabase.Query("SELECT version FROM db_version LIMIT 1"); + if(result) + { + Field* fields = result->Fetch(); + + m_DBVersion = fields[0].GetString(); + delete result; + } + else + m_DBVersion = "unknown world database"; +} diff --git a/src/game/World.h b/src/game/World.h index 2dad31440..108b1bb86 100644 --- a/src/game/World.h +++ b/src/game/World.h @@ -449,6 +449,15 @@ class World void UpdateRealmCharCount(uint32 accid); LocaleConstant GetAvailableDbcLocale(LocaleConstant locale) const { if(m_availableDbcLocaleMask & (1 << locale)) return locale; else return m_defaultDbcLocale; } + + //used World DB version + void LoadDBVersion(); + char const* GetDBVersion() { return m_DBVersion.c_str(); } + + //used Script version + void SetScriptsVersion(char const* version) { m_ScriptsVersion = version ? version : "unknown scripting library"; } + char const* GetScriptsVersion() { return m_ScriptsVersion.c_str(); } + protected: void _UpdateGameTime(); void ScriptsProcess(); @@ -508,6 +517,10 @@ class World //sessions that are added async void AddSession_(WorldSession* s); ZThread::LockedQueue addSessQueue; + + //used versions + std::string m_DBVersion; + std::string m_ScriptsVersion; }; extern uint32 realmID; diff --git a/src/mangosd/Master.cpp b/src/mangosd/Master.cpp index c902e44af..6435d8dfc 100644 --- a/src/mangosd/Master.cpp +++ b/src/mangosd/Master.cpp @@ -458,17 +458,9 @@ bool Master::_StartDB() ///- Clean the database before starting clearOnlineAccounts(); - QueryResult* result = WorldDatabase.Query("SELECT version FROM db_version LIMIT 1"); - if(result) - { - Field* fields = result->Fetch(); - - sLog.outString("Using %s", fields[0].GetString()); - delete result; - } - else - sLog.outString("Using unknown world database."); + sWorld.LoadDBVersion(); + sLog.outString("Using %s", sWorld.GetDBVersion()); return true; } diff --git a/src/shared/Database/DatabaseEnv.h b/src/shared/Database/DatabaseEnv.h index 286e3a830..88cb05710 100644 --- a/src/shared/Database/DatabaseEnv.h +++ b/src/shared/Database/DatabaseEnv.h @@ -32,9 +32,10 @@ #include "Database/Database.h" #include "Database/DatabasePostgre.h" typedef DatabasePostgre DatabaseType; -#define _LIKE_ "ILIKE" -#define _TABLE_SIM_ "\"" +#define _LIKE_ "ILIKE" +#define _TABLE_SIM_ "\"" #define _CONCAT3_(A,B,C) "( " A " || " B " || " C " )" +#define _OFFSET_ "LIMIT 1 OFFSET %d" #else #include "Database/QueryResultMysql.h" #include "Database/QueryResultSqlite.h" @@ -42,9 +43,10 @@ typedef DatabasePostgre DatabaseType; #include "Database/DatabaseMysql.h" #include "Database/DatabaseSqlite.h" typedef DatabaseMysql DatabaseType; -#define _LIKE_ "LIKE" -#define _TABLE_SIM_ "`" +#define _LIKE_ "LIKE" +#define _TABLE_SIM_ "`" #define _CONCAT3_(A,B,C) "CONCAT( " A " , " B " , " C " )" +#define _OFFSET_ "LIMIT %d,1" #endif extern DatabaseType WorldDatabase; diff --git a/src/shared/SystemConfig.h.in b/src/shared/SystemConfig.h.in index 7a19c1dc4..863fab1e5 100644 --- a/src/shared/SystemConfig.h.in +++ b/src/shared/SystemConfig.h.in @@ -27,7 +27,7 @@ #ifndef _VERSION #if PLATFORM == PLATFORM_WINDOWS -# define _VERSION(REVD,REVT,REV) "0.12.0-SVN" " (" REVD " " REVT " Revision " REV ")" +# define _VERSION(REVD,REVT,REV) "0.12.0-DEV" " (" REVD " " REVT " Revision " REV ")" #else # define _VERSION(REVD,REVT,REV) "@VERSION@" " (" REVD " " REVT " Revision " REV ")" #endif diff --git a/src/tools/genrevision/genrevision.cpp b/src/tools/genrevision/genrevision.cpp index 6ce5850c0..aa893d57c 100644 --- a/src/tools/genrevision/genrevision.cpp +++ b/src/tools/genrevision/genrevision.cpp @@ -19,6 +19,8 @@ #include #include #include +#include +#include #pragma warning(disable:4996) @@ -56,12 +58,28 @@ void extractDataFromSvn(FILE* EntriesFile, bool url, RawData& data) void extractDataFromGit(FILE* EntriesFile, std::string path, bool url, RawData& data) { char buf[200]; - fgets(buf,200,EntriesFile); char hash_str[200]; char branch_str[200]; char url_str[200]; - sscanf(buf,"%s branch %s of %s",hash_str,branch_str,url_str); + + bool found = false; + while(fgets(buf,200,EntriesFile)) + { + if(sscanf(buf,"%s branch %s of %s",hash_str,branch_str,url_str)==3) + { + found = true; + break; + } + } + + if(!found) + { + strcpy(data.rev_str,"Unknown"); + strcpy(data.date_str,"Unknown"); + strcpy(data.time_str,"Unknown"); + return; + } if(url) { diff --git a/win/VC71/mangosd.vcproj b/win/VC71/mangosd.vcproj index 7d86059ec..a8c650864 100644 --- a/win/VC71/mangosd.vcproj +++ b/win/VC71/mangosd.vcproj @@ -23,7 +23,7 @@ Name="VCCLCompilerTool" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\dep\include,..\..\src\framework,..\..\src\shared,..\..\src\game,..\..\src\mangosd;..\..\dep\ACE_wrappers" - PreprocessorDefinitions="VERSION="0.12.0-SVN";WIN32;NDEBUG;_CONSOLE;ENABLE_CLI" + PreprocessorDefinitions="VERSION="0.12.0-DEV";WIN32;NDEBUG;_CONSOLE;ENABLE_CLI" StringPooling="TRUE" RuntimeLibrary="0" EnableFunctionLevelLinking="TRUE" @@ -92,7 +92,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\dep\include,..\..\src\framework,..\..\src\shared,..\..\src\game,..\..\src\mangosd;..\..\dep\ACE_wrappers" - PreprocessorDefinitions="VERSION="0.12.0-SVN";WIN32;_DEBUG;MANGOS_DEBUG;_CONSOLE;ENABLE_CLI" + PreprocessorDefinitions="VERSION="0.12.0-DEV";WIN32;_DEBUG;MANGOS_DEBUG;_CONSOLE;ENABLE_CLI" IgnoreStandardIncludePath="FALSE" BasicRuntimeChecks="3" RuntimeLibrary="1" diff --git a/win/VC71/realmd.vcproj b/win/VC71/realmd.vcproj index 64b48d8b3..91e8546ad 100644 --- a/win/VC71/realmd.vcproj +++ b/win/VC71/realmd.vcproj @@ -24,7 +24,7 @@ Name="VCCLCompilerTool" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\dep\include;..\..\src\framework;..\..\src\shared;..\..\src\realmd;..\..\dep\ACE_wrappers" - PreprocessorDefinitions="VERSION="0.12.0-SVN",WIN32,NDEBUG,_CONSOLE" + PreprocessorDefinitions="VERSION="0.12.0-DEV",WIN32,NDEBUG,_CONSOLE" StringPooling="TRUE" RuntimeLibrary="0" EnableFunctionLevelLinking="TRUE" @@ -91,7 +91,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\dep\include;..\..\src\framework;..\..\src\shared;..\..\src\realmd;..\..\dep\ACE_wrappers" - PreprocessorDefinitions="VERSION="0.12.0-SVN";WIN32;_DEBUG;MANGOS_DEBUG;_CONSOLE" + PreprocessorDefinitions="VERSION="0.12.0-DEV";WIN32;_DEBUG;MANGOS_DEBUG;_CONSOLE" IgnoreStandardIncludePath="FALSE" BasicRuntimeChecks="3" RuntimeLibrary="1" diff --git a/win/VC71/shared.vcproj b/win/VC71/shared.vcproj index 83c509a8c..1e5d5c3e1 100644 --- a/win/VC71/shared.vcproj +++ b/win/VC71/shared.vcproj @@ -437,7 +437,7 @@ Description="Extract revision" CommandLine="cd "$(SolutionDir)..\src\shared" "$(TargetDir)\..\genrevision__$(PlatformName)_$(ConfigurationName)\genrevision.exe" "..\.." " - AdditionalDependencies="$(SolutionDir)../.svn/entries;$(SolutionDir)../.git/FETCH_HEAD" + AdditionalDependencies="$(SolutionDir)../.svn/entries;$(SolutionDir)../_svn/entries;$(SolutionDir)../.git/FETCH_HEAD" Outputs="revision.h"/> diff --git a/win/VC80/mangosd.vcproj b/win/VC80/mangosd.vcproj index 0acbf84eb..17e9c4791 100644 --- a/win/VC80/mangosd.vcproj +++ b/win/VC80/mangosd.vcproj @@ -48,7 +48,7 @@ AdditionalOptions="/MP" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\dep\include,..\..\src\framework,..\..\src\shared,..\..\src\game,..\..\src\mangosd;..\..\dep\ACE_wrappers" - PreprocessorDefinitions="VERSION="0.12.0-SVN";WIN32;NDEBUG;_CONSOLE;ENABLE_CLI" + PreprocessorDefinitions="VERSION="0.12.0-DEV";WIN32;NDEBUG;_CONSOLE;ENABLE_CLI" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -150,7 +150,7 @@ AdditionalOptions="/MP" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\dep\include,..\..\src\framework,..\..\src\shared,..\..\src\game,..\..\src\mangosd;..\..\dep\ACE_wrappers" - PreprocessorDefinitions="VERSION="0.12.0-SVN";WIN32;NDEBUG;_CONSOLE;ENABLE_CLI" + PreprocessorDefinitions="VERSION="0.12.0-DEV";WIN32;NDEBUG;_CONSOLE;ENABLE_CLI" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -250,7 +250,7 @@ AdditionalOptions="/MP" Optimization="0" AdditionalIncludeDirectories="..\..\dep\include,..\..\src\framework,..\..\src\shared,..\..\src\game,..\..\src\mangosd;..\..\dep\ACE_wrappers" - PreprocessorDefinitions="VERSION="0.12.0-SVN";WIN32;_DEBUG;MANGOS_DEBUG;_CONSOLE;ENABLE_CLI" + PreprocessorDefinitions="VERSION="0.12.0-DEV";WIN32;_DEBUG;MANGOS_DEBUG;_CONSOLE;ENABLE_CLI" IgnoreStandardIncludePath="false" BasicRuntimeChecks="3" RuntimeLibrary="1" @@ -352,7 +352,7 @@ AdditionalOptions="/MP" Optimization="0" AdditionalIncludeDirectories="..\..\dep\include,..\..\src\framework,..\..\src\shared,..\..\src\game,..\..\src\mangosd;..\..\dep\ACE_wrappers" - PreprocessorDefinitions="VERSION="0.12.0-SVN";WIN32;_DEBUG;MANGOS_DEBUG;_CONSOLE;ENABLE_CLI" + PreprocessorDefinitions="VERSION="0.12.0-DEV";WIN32;_DEBUG;MANGOS_DEBUG;_CONSOLE;ENABLE_CLI" IgnoreStandardIncludePath="false" BasicRuntimeChecks="3" RuntimeLibrary="1" diff --git a/win/VC80/realmd.vcproj b/win/VC80/realmd.vcproj index d04196574..3a39a6750 100644 --- a/win/VC80/realmd.vcproj +++ b/win/VC80/realmd.vcproj @@ -48,7 +48,7 @@ AdditionalOptions="/MP" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\dep\include;..\..\src\framework;..\..\src\shared;..\..\src\realmd;..\..\dep\ACE_wrappers" - PreprocessorDefinitions="VERSION="0.12.0-SVN",WIN32,NDEBUG,_CONSOLE" + PreprocessorDefinitions="VERSION="0.12.0-DEV",WIN32,NDEBUG,_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -147,7 +147,7 @@ AdditionalOptions="/MP" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\dep\include;..\..\src\framework;..\..\src\shared;..\..\src\realmd;..\..\dep\ACE_wrappers" - PreprocessorDefinitions="VERSION="0.12.0-SVN",WIN32,NDEBUG,_CONSOLE" + PreprocessorDefinitions="VERSION="0.12.0-DEV",WIN32,NDEBUG,_CONSOLE" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" @@ -244,7 +244,7 @@ AdditionalOptions="/MP" Optimization="0" AdditionalIncludeDirectories="..\..\dep\include;..\..\src\framework;..\..\src\shared;..\..\src\realmd;..\..\dep\ACE_wrappers" - PreprocessorDefinitions="VERSION="0.12.0-SVN";WIN32;_DEBUG;MANGOS_DEBUG;_CONSOLE" + PreprocessorDefinitions="VERSION="0.12.0-DEV";WIN32;_DEBUG;MANGOS_DEBUG;_CONSOLE" IgnoreStandardIncludePath="false" BasicRuntimeChecks="3" RuntimeLibrary="1" @@ -343,7 +343,7 @@ AdditionalOptions="/MP" Optimization="0" AdditionalIncludeDirectories="..\..\dep\include;..\..\src\framework;..\..\src\shared;..\..\src\realmd;..\..\dep\ACE_wrappers" - PreprocessorDefinitions="VERSION="0.12.0-SVN";WIN32;_DEBUG;MANGOS_DEBUG;_CONSOLE" + PreprocessorDefinitions="VERSION="0.12.0-DEV";WIN32;_DEBUG;MANGOS_DEBUG;_CONSOLE" IgnoreStandardIncludePath="false" BasicRuntimeChecks="3" RuntimeLibrary="1" diff --git a/win/VC80/shared.vcproj b/win/VC80/shared.vcproj index 5a9f4ae4f..8e6afd50c 100644 --- a/win/VC80/shared.vcproj +++ b/win/VC80/shared.vcproj @@ -771,7 +771,7 @@ Name="VCCustomBuildTool" Description="Extract revision" CommandLine="cd "$(SolutionDir)..\src\shared" "$(TargetDir)\..\genrevision__$(PlatformName)_$(ConfigurationName)\genrevision.exe" "..\.." " - AdditionalDependencies="$(SolutionDir)../.svn/entries;$(SolutionDir)../.git/FETCH_HEAD" + AdditionalDependencies="$(SolutionDir)../.svn/entries;$(SolutionDir)../_svn/entries;$(SolutionDir)../.git/FETCH_HEAD" Outputs="revision.h" /> @@ -782,7 +782,7 @@ Name="VCCustomBuildTool" Description="Extract revision" CommandLine="cd "$(SolutionDir)..\src\shared" "$(TargetDir)\..\genrevision__$(PlatformName)_$(ConfigurationName)\genrevision.exe" "..\.." " - AdditionalDependencies="$(SolutionDir)../.svn/entries;$(SolutionDir)../.git/FETCH_HEAD" + AdditionalDependencies="$(SolutionDir)../.svn/entries;$(SolutionDir)../_svn/entries;$(SolutionDir)../.git/FETCH_HEAD" Outputs="revision.h" /> @@ -793,7 +793,7 @@ Name="VCCustomBuildTool" Description="Extract revision" CommandLine="cd "$(SolutionDir)..\src\shared" "$(TargetDir)\..\genrevision__$(PlatformName)_$(ConfigurationName)\genrevision.exe" "..\.." " - AdditionalDependencies="$(SolutionDir)../.svn/entries;$(SolutionDir)../.git/FETCH_HEAD" + AdditionalDependencies="$(SolutionDir)../.svn/entries;$(SolutionDir)../_svn/entries;$(SolutionDir)../.git/FETCH_HEAD" Outputs="revision.h" /> @@ -804,7 +804,7 @@ Name="VCCustomBuildTool" Description="Extract revision" CommandLine="cd "$(SolutionDir)..\src\shared" "$(TargetDir)\..\genrevision__$(PlatformName)_$(ConfigurationName)\genrevision.exe" "..\.." " - AdditionalDependencies="$(SolutionDir)../.svn/entries;$(SolutionDir)../.git/FETCH_HEAD" + AdditionalDependencies="$(SolutionDir)../.svn/entries;$(SolutionDir)../_svn/entries;$(SolutionDir)../.git/FETCH_HEAD" Outputs="revision.h" /> diff --git a/win/VC90/mangosd.vcproj b/win/VC90/mangosd.vcproj index 6282ba9d3..f6ae56d33 100644 --- a/win/VC90/mangosd.vcproj +++ b/win/VC90/mangosd.vcproj @@ -49,7 +49,7 @@ AdditionalOptions="/MP" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\dep\include,..\..\src\framework,..\..\src\shared,..\..\src\game,..\..\src\mangosd;..\..\dep\ACE_wrappers" - PreprocessorDefinitions="VERSION="0.12.0-SVN";WIN32;NDEBUG;_CONSOLE;ENABLE_CLI" + PreprocessorDefinitions="VERSION="0.12.0-DEV";WIN32;NDEBUG;_CONSOLE;ENABLE_CLI" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -150,7 +150,7 @@ AdditionalOptions="/MP" InlineFunctionExpansion="1" AdditionalIncludeDirectories="..\..\dep\include,..\..\src\framework,..\..\src\shared,..\..\src\game,..\..\src\mangosd;..\..\dep\ACE_wrappers" - PreprocessorDefinitions="VERSION="0.12.0-SVN";WIN32;NDEBUG;_CONSOLE;ENABLE_CLI" + PreprocessorDefinitions="VERSION="0.12.0-DEV";WIN32;NDEBUG;_CONSOLE;ENABLE_CLI" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -249,7 +249,7 @@ AdditionalOptions="/MP" Optimization="0" AdditionalIncludeDirectories="..\..\dep\include,..\..\src\framework,..\..\src\shared,..\..\src\game,..\..\src\mangosd;..\..\dep\ACE_wrappers" - PreprocessorDefinitions="VERSION="0.12.0-SVN";WIN32;_DEBUG;MANGOS_DEBUG;_CONSOLE;ENABLE_CLI" + PreprocessorDefinitions="VERSION="0.12.0-DEV";WIN32;_DEBUG;MANGOS_DEBUG;_CONSOLE;ENABLE_CLI" IgnoreStandardIncludePath="false" BasicRuntimeChecks="3" RuntimeLibrary="3" @@ -351,7 +351,7 @@ AdditionalOptions="/MP" Optimization="0" AdditionalIncludeDirectories="..\..\dep\include,..\..\src\framework,..\..\src\shared,..\..\src\game,..\..\src\mangosd;..\..\dep\ACE_wrappers" - PreprocessorDefinitions="VERSION="0.12.0-SVN";WIN32;_DEBUG;MANGOS_DEBUG;_CONSOLE;ENABLE_CLI" + PreprocessorDefinitions="VERSION="0.12.0-DEV";WIN32;_DEBUG;MANGOS_DEBUG;_CONSOLE;ENABLE_CLI" IgnoreStandardIncludePath="false" BasicRuntimeChecks="3" RuntimeLibrary="3" diff --git a/win/VC90/shared.vcproj b/win/VC90/shared.vcproj index cb0b6e01a..de3fa88df 100644 --- a/win/VC90/shared.vcproj +++ b/win/VC90/shared.vcproj @@ -767,7 +767,7 @@ Name="VCCustomBuildTool" Description="Extract revision" CommandLine="cd "$(SolutionDir)..\src\shared" "$(TargetDir)\..\genrevision__$(PlatformName)_$(ConfigurationName)\genrevision.exe" "..\.." " - AdditionalDependencies="$(SolutionDir)../.svn/entries;$(SolutionDir)../.git/FETCH_HEAD" + AdditionalDependencies="$(SolutionDir)../.svn/entries;$(SolutionDir)../_svn/entries;$(SolutionDir)../.git/FETCH_HEAD" Outputs="revision.h" /> @@ -778,7 +778,7 @@ Name="VCCustomBuildTool" Description="Extract revision" CommandLine="cd "$(SolutionDir)..\src\shared" "$(TargetDir)\..\genrevision__$(PlatformName)_$(ConfigurationName)\genrevision.exe" "..\.." " - AdditionalDependencies="$(SolutionDir)../.svn/entries;$(SolutionDir)../.git/FETCH_HEAD" + AdditionalDependencies="$(SolutionDir)../.svn/entries;$(SolutionDir)../_svn/entries;$(SolutionDir)../.git/FETCH_HEAD" Outputs="revision.h" /> @@ -789,7 +789,7 @@ Name="VCCustomBuildTool" Description="Extract revision" CommandLine="cd "$(SolutionDir)..\src\shared" "$(TargetDir)\..\genrevision__$(PlatformName)_$(ConfigurationName)\genrevision.exe" "..\.." " - AdditionalDependencies="$(SolutionDir)../.svn/entries;$(SolutionDir)../.git/FETCH_HEAD" + AdditionalDependencies="$(SolutionDir)../.svn/entries;$(SolutionDir)../_svn/entries;$(SolutionDir)../.git/FETCH_HEAD" Outputs="revision.h" /> @@ -800,7 +800,7 @@ Name="VCCustomBuildTool" Description="Extract revision" CommandLine="cd "$(SolutionDir)..\src\shared" "$(TargetDir)\..\genrevision__$(PlatformName)_$(ConfigurationName)\genrevision.exe" "..\.." " - AdditionalDependencies="$(SolutionDir)../.svn/entries;$(SolutionDir)../.git/FETCH_HEAD" + AdditionalDependencies="$(SolutionDir)../.svn/entries;$(SolutionDir)../_svn/entries;$(SolutionDir)../.git/FETCH_HEAD" Outputs="revision.h" />