FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

[1961] Fix provided version information · scriptdev2/scriptdev2-tbc@1f51cb6 · GitHub

Commit 1f51cb6

Browse files
committed
[1961] Fix provided version information
Fix provided version information git-svn-id: https://scriptdev2.svn.sourceforge.net/svnroot/scriptdev2@1961 5f9c896b-1e26-0410-94da-f77f675e2462
1 parent 4cdf9d8 commit 1f51cb6

3 files changed

Lines changed: 12 additions & 14 deletions

File tree

‎ScriptMgr.cpp‎

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -226,13 +226,7 @@ void Script::RegisterSelf(bool bReportError)
226226
MANGOS_DLL_EXPORT
227227
char const* GetScriptLibraryVersion()
228228
{
229-
if (!strSD2Version.empty())
230-
{
231-
strSD2Version.append(_FULLVERSION);
232-
return strSD2Version.c_str();
233-
}
234-
235-
return _FULLVERSION;
229+
return strSD2Version.c_str();
236230
}
237231

238232
MANGOS_DLL_EXPORT

‎system/system.cpp‎

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
#include "precompiled.h"
66
#include "system.h"
7+
#include "../config.h"
78
#include "ProgressBar.h"
89
#include "ObjectMgr.h"
910
#include "Database/DatabaseEnv.h"
@@ -32,16 +33,19 @@ void SystemMgr::LoadVersion()
3233

3334
strSD2Version = pFields[0].GetCppString();
3435

35-
outstring_log("Loading %s", strSD2Version.c_str());
36-
outstring_log("");
37-
3836
delete pResult;
3937
}
4038
else
41-
{
4239
error_log("SD2: Missing `sd2_db_version` information.");
43-
outstring_log("");
44-
}
40+
41+
// Setup version info and display it
42+
if (strSD2Version.empty())
43+
strSD2Version.append("ScriptDev2 ");
44+
45+
strSD2Version.append(_FULLVERSION);
46+
47+
outstring_log("Loading %s", strSD2Version.c_str());
48+
outstring_log("");
4549
}
4650

4751
void SystemMgr::LoadScriptTexts()

‎system/system.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#define SC_SYSTEM_H
77

88
extern DatabaseType SD2Database;
9-
extern std::string strSD2Version; //version info from database
9+
extern std::string strSD2Version; //version info: database entry and revision
1010

1111
#define TEXT_SOURCE_RANGE -1000000 //the amount of entries each text source has available
1212

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL