aboutsummaryrefslogtreecommitdiff
path: root/src/shared/Database
diff options
context:
space:
mode:
Diffstat (limited to 'src/shared/Database')
-rw-r--r--src/shared/Database/DBCStructure.h16
-rw-r--r--src/shared/Database/Database.cpp2
-rw-r--r--src/shared/Database/Database.h2
-rw-r--r--src/shared/Database/DatabaseEnv.h2
-rw-r--r--src/shared/Database/DatabaseImpl.h2
-rw-r--r--src/shared/Database/DatabaseMysql.cpp2
-rw-r--r--src/shared/Database/DatabaseMysql.h158
-rw-r--r--src/shared/Database/DatabasePostgre.cpp2
-rw-r--r--src/shared/Database/DatabasePostgre.h2
-rw-r--r--src/shared/Database/DatabaseSqlite.cpp2
-rw-r--r--src/shared/Database/DatabaseSqlite.h2
-rw-r--r--src/shared/Database/Field.cpp2
-rw-r--r--src/shared/Database/Field.h2
-rw-r--r--src/shared/Database/MySQLDelayThread.h2
-rw-r--r--src/shared/Database/PGSQLDelayThread.h2
-rw-r--r--src/shared/Database/QueryResult.h2
-rw-r--r--src/shared/Database/QueryResultMysql.cpp2
-rw-r--r--src/shared/Database/QueryResultMysql.h2
-rw-r--r--src/shared/Database/QueryResultPostgre.cpp2
-rw-r--r--src/shared/Database/QueryResultPostgre.h2
-rw-r--r--src/shared/Database/QueryResultSqlite.cpp2
-rw-r--r--src/shared/Database/QueryResultSqlite.h2
-rw-r--r--src/shared/Database/SQLStorage.cpp2
-rw-r--r--src/shared/Database/SQLStorage.h2
-rw-r--r--src/shared/Database/SqlDelayThread.cpp2
-rw-r--r--src/shared/Database/SqlDelayThread.h2
-rw-r--r--src/shared/Database/SqlOperations.cpp2
-rw-r--r--src/shared/Database/SqlOperations.h2
-rw-r--r--src/shared/Database/dbcfile.cpp2
-rw-r--r--src/shared/Database/dbcfile.h2
30 files changed, 115 insertions, 115 deletions
diff --git a/src/shared/Database/DBCStructure.h b/src/shared/Database/DBCStructure.h
index 4840a242401..d041f8fa3b2 100644
--- a/src/shared/Database/DBCStructure.h
+++ b/src/shared/Database/DBCStructure.h
@@ -1278,14 +1278,14 @@ struct SpellItemEnchantmentEntry
uint32 amount[3]; // 5-7 m_effectPointsMin[3]
//uint32 amount2[3] // 8-10 m_effectPointsMax[3]
uint32 spellid[3]; // 11-13 m_effectArg[3]
- char* description[16]; // 14-30 m_name_lang[16]
- //uint32 descriptionFlags; // 31 name flags
- uint32 aura_id; // 32 m_itemVisual
- uint32 slot; // 33 m_flags
- uint32 GemID; // 34 m_src_itemID
- uint32 EnchantmentCondition; // 35 m_condition_id
- //uint32 requiredSkill; // 36 m_requiredSkillID
- //uint32 requiredSkillValue; // 37 m_requiredSkillRank
+ char* description[16]; // 14-29 m_name_lang[16]
+ //uint32 descriptionFlags; // 30 name flags
+ uint32 aura_id; // 31 m_itemVisual
+ uint32 slot; // 32 m_flags
+ uint32 GemID; // 33 m_src_itemID
+ uint32 EnchantmentCondition; // 34 m_condition_id
+ //uint32 requiredSkill; // 35 m_requiredSkillID
+ //uint32 requiredSkillValue; // 36 m_requiredSkillRank
};
struct SpellItemEnchantmentConditionEntry
diff --git a/src/shared/Database/Database.cpp b/src/shared/Database/Database.cpp
index d67140726e5..5d7f5bf473e 100644
--- a/src/shared/Database/Database.cpp
+++ b/src/shared/Database/Database.cpp
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
* Copyright (C) 2008-2009 Trinity <http://www.trinitycore.org/>
diff --git a/src/shared/Database/Database.h b/src/shared/Database/Database.h
index 8d70ccaa545..beff0fb740a 100644
--- a/src/shared/Database/Database.h
+++ b/src/shared/Database/Database.h
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
* Copyright (C) 2008-2009 Trinity <http://www.trinitycore.org/>
diff --git a/src/shared/Database/DatabaseEnv.h b/src/shared/Database/DatabaseEnv.h
index 9aa37d3929b..df1f51adbe7 100644
--- a/src/shared/Database/DatabaseEnv.h
+++ b/src/shared/Database/DatabaseEnv.h
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
* Copyright (C) 2008-2009 Trinity <http://www.trinitycore.org/>
diff --git a/src/shared/Database/DatabaseImpl.h b/src/shared/Database/DatabaseImpl.h
index 8e4f3ce47e1..c9a02a0a4a1 100644
--- a/src/shared/Database/DatabaseImpl.h
+++ b/src/shared/Database/DatabaseImpl.h
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
* Copyright (C) 2008-2009 Trinity <http://www.trinitycore.org/>
diff --git a/src/shared/Database/DatabaseMysql.cpp b/src/shared/Database/DatabaseMysql.cpp
index dd52fcf36f0..7e67861d883 100644
--- a/src/shared/Database/DatabaseMysql.cpp
+++ b/src/shared/Database/DatabaseMysql.cpp
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
* Copyright (C) 2008-2009 Trinity <http://www.trinitycore.org/>
diff --git a/src/shared/Database/DatabaseMysql.h b/src/shared/Database/DatabaseMysql.h
index 3d8b92eb842..0ef046541b5 100644
--- a/src/shared/Database/DatabaseMysql.h
+++ b/src/shared/Database/DatabaseMysql.h
@@ -1,79 +1,79 @@
-/*
- * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
- *
- * Copyright (C) 2008-2009 Trinity <http://www.trinitycore.org/>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#ifndef DO_POSTGRESQL
-
-#ifndef _DATABASEMYSQL_H
-#define _DATABASEMYSQL_H
-
-#include "Database.h"
-#include "Policies/Singleton.h"
-#include "zthread/FastMutex.h"
-
-#ifdef WIN32
-#define FD_SETSIZE 1024
-#include <winsock2.h>
-#include <mysql/mysql.h>
-#else
-#include <mysql.h>
-#endif
-
-class TRINITY_DLL_SPEC DatabaseMysql : public Database
-{
- friend class Trinity::OperatorNew<DatabaseMysql>;
-
- public:
- DatabaseMysql();
- ~DatabaseMysql();
-
- //! Initializes Mysql and connects to a server.
- /*! infoString should be formated like hostname;username;password;database. */
- bool Initialize(const char *infoString);
- void InitDelayThread();
- void HaltDelayThread();
- QueryResult* Query(const char *sql);
- bool Execute(const char *sql);
- bool DirectExecute(const char* sql);
- bool BeginTransaction();
- bool CommitTransaction();
- bool RollbackTransaction();
-
- operator bool () const { return mMysql != NULL; }
-
- unsigned long escape_string(char *to, const char *from, unsigned long length);
- using Database::escape_string;
-
- // must be call before first query in thread
- void ThreadStart();
- // must be call before finish thread run
- void ThreadEnd();
- private:
- ZThread::FastMutex mMutex;
-
- ZThread::ThreadImpl* tranThread;
-
- MYSQL *mMysql;
-
- static size_t db_count;
-
- bool _TransactionCmd(const char *sql);
-};
-#endif
-#endif
+/*
+ * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
+ *
+ * Copyright (C) 2008-2009 Trinity <http://www.trinitycore.org/>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef DO_POSTGRESQL
+
+#ifndef _DATABASEMYSQL_H
+#define _DATABASEMYSQL_H
+
+#include "Database.h"
+#include "Policies/Singleton.h"
+#include "zthread/FastMutex.h"
+
+#ifdef WIN32
+#define FD_SETSIZE 1024
+#include <winsock2.h>
+#include <mysql/mysql.h>
+#else
+#include <mysql.h>
+#endif
+
+class TRINITY_DLL_SPEC DatabaseMysql : public Database
+{
+ friend class Trinity::OperatorNew<DatabaseMysql>;
+
+ public:
+ DatabaseMysql();
+ ~DatabaseMysql();
+
+ //! Initializes Mysql and connects to a server.
+ /*! infoString should be formated like hostname;username;password;database. */
+ bool Initialize(const char *infoString);
+ void InitDelayThread();
+ void HaltDelayThread();
+ QueryResult* Query(const char *sql);
+ bool Execute(const char *sql);
+ bool DirectExecute(const char* sql);
+ bool BeginTransaction();
+ bool CommitTransaction();
+ bool RollbackTransaction();
+
+ operator bool () const { return mMysql != NULL; }
+
+ unsigned long escape_string(char *to, const char *from, unsigned long length);
+ using Database::escape_string;
+
+ // must be call before first query in thread
+ void ThreadStart();
+ // must be call before finish thread run
+ void ThreadEnd();
+ private:
+ ZThread::FastMutex mMutex;
+
+ ZThread::ThreadImpl* tranThread;
+
+ MYSQL *mMysql;
+
+ static size_t db_count;
+
+ bool _TransactionCmd(const char *sql);
+};
+#endif
+#endif
diff --git a/src/shared/Database/DatabasePostgre.cpp b/src/shared/Database/DatabasePostgre.cpp
index f576a3cfd18..8f8cf95b429 100644
--- a/src/shared/Database/DatabasePostgre.cpp
+++ b/src/shared/Database/DatabasePostgre.cpp
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
* Copyright (C) 2008-2009 Trinity <http://www.trinitycore.org/>
diff --git a/src/shared/Database/DatabasePostgre.h b/src/shared/Database/DatabasePostgre.h
index 4e9d8f99cc0..9a2aeb84a07 100644
--- a/src/shared/Database/DatabasePostgre.h
+++ b/src/shared/Database/DatabasePostgre.h
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
* Copyright (C) 2008-2009 Trinity <http://www.trinitycore.org/>
diff --git a/src/shared/Database/DatabaseSqlite.cpp b/src/shared/Database/DatabaseSqlite.cpp
index 303a118f87a..a3fffd8aa4c 100644
--- a/src/shared/Database/DatabaseSqlite.cpp
+++ b/src/shared/Database/DatabaseSqlite.cpp
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
* Copyright (C) 2008-2009 Trinity <http://www.trinitycore.org/>
diff --git a/src/shared/Database/DatabaseSqlite.h b/src/shared/Database/DatabaseSqlite.h
index 86a9becaf62..a9593989143 100644
--- a/src/shared/Database/DatabaseSqlite.h
+++ b/src/shared/Database/DatabaseSqlite.h
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
* Copyright (C) 2008-2009 Trinity <http://www.trinitycore.org/>
diff --git a/src/shared/Database/Field.cpp b/src/shared/Database/Field.cpp
index 97a537fd7fd..18831e23687 100644
--- a/src/shared/Database/Field.cpp
+++ b/src/shared/Database/Field.cpp
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
* Copyright (C) 2008-2009 Trinity <http://www.trinitycore.org/>
diff --git a/src/shared/Database/Field.h b/src/shared/Database/Field.h
index 346cac39e20..a4514c963cd 100644
--- a/src/shared/Database/Field.h
+++ b/src/shared/Database/Field.h
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
* Copyright (C) 2008-2009 Trinity <http://www.trinitycore.org/>
diff --git a/src/shared/Database/MySQLDelayThread.h b/src/shared/Database/MySQLDelayThread.h
index 35530a86337..5f3e66de722 100644
--- a/src/shared/Database/MySQLDelayThread.h
+++ b/src/shared/Database/MySQLDelayThread.h
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
* Copyright (C) 2008-2009 Trinity <http://www.trinitycore.org/>
diff --git a/src/shared/Database/PGSQLDelayThread.h b/src/shared/Database/PGSQLDelayThread.h
index 4c7b1c77321..bd6a2bf962d 100644
--- a/src/shared/Database/PGSQLDelayThread.h
+++ b/src/shared/Database/PGSQLDelayThread.h
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
* Copyright (C) 2008-2009 Trinity <http://www.trinitycore.org/>
diff --git a/src/shared/Database/QueryResult.h b/src/shared/Database/QueryResult.h
index 82b9a2c5545..0fab7a3633b 100644
--- a/src/shared/Database/QueryResult.h
+++ b/src/shared/Database/QueryResult.h
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
* Copyright (C) 2008-2009 Trinity <http://www.trinitycore.org/>
diff --git a/src/shared/Database/QueryResultMysql.cpp b/src/shared/Database/QueryResultMysql.cpp
index a3c358edc1f..8ae59b350d8 100644
--- a/src/shared/Database/QueryResultMysql.cpp
+++ b/src/shared/Database/QueryResultMysql.cpp
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
* Copyright (C) 2008-2009 Trinity <http://www.trinitycore.org/>
diff --git a/src/shared/Database/QueryResultMysql.h b/src/shared/Database/QueryResultMysql.h
index 894bd365ee3..39d2985ad77 100644
--- a/src/shared/Database/QueryResultMysql.h
+++ b/src/shared/Database/QueryResultMysql.h
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
* Copyright (C) 2008-2009 Trinity <http://www.trinitycore.org/>
diff --git a/src/shared/Database/QueryResultPostgre.cpp b/src/shared/Database/QueryResultPostgre.cpp
index 05a120df4af..e10905f0feb 100644
--- a/src/shared/Database/QueryResultPostgre.cpp
+++ b/src/shared/Database/QueryResultPostgre.cpp
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
* Copyright (C) 2008-2009 Trinity <http://www.trinitycore.org/>
diff --git a/src/shared/Database/QueryResultPostgre.h b/src/shared/Database/QueryResultPostgre.h
index dff207dcb09..aa183ab4b96 100644
--- a/src/shared/Database/QueryResultPostgre.h
+++ b/src/shared/Database/QueryResultPostgre.h
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
* Copyright (C) 2008-2009 Trinity <http://www.trinitycore.org/>
diff --git a/src/shared/Database/QueryResultSqlite.cpp b/src/shared/Database/QueryResultSqlite.cpp
index 0f3919b9069..9a32e36bc84 100644
--- a/src/shared/Database/QueryResultSqlite.cpp
+++ b/src/shared/Database/QueryResultSqlite.cpp
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
* Copyright (C) 2008-2009 Trinity <http://www.trinitycore.org/>
diff --git a/src/shared/Database/QueryResultSqlite.h b/src/shared/Database/QueryResultSqlite.h
index b88ecb7d249..d3462977e49 100644
--- a/src/shared/Database/QueryResultSqlite.h
+++ b/src/shared/Database/QueryResultSqlite.h
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
* Copyright (C) 2008-2009 Trinity <http://www.trinitycore.org/>
diff --git a/src/shared/Database/SQLStorage.cpp b/src/shared/Database/SQLStorage.cpp
index 65fe5340c2a..4d4b883926a 100644
--- a/src/shared/Database/SQLStorage.cpp
+++ b/src/shared/Database/SQLStorage.cpp
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
* Copyright (C) 2008-2009 Trinity <http://www.trinitycore.org/>
diff --git a/src/shared/Database/SQLStorage.h b/src/shared/Database/SQLStorage.h
index e4d0b3f01d9..f2250410c26 100644
--- a/src/shared/Database/SQLStorage.h
+++ b/src/shared/Database/SQLStorage.h
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
* Copyright (C) 2008-2009 Trinity <http://www.trinitycore.org/>
diff --git a/src/shared/Database/SqlDelayThread.cpp b/src/shared/Database/SqlDelayThread.cpp
index a91bd12a3c0..a35090adb7e 100644
--- a/src/shared/Database/SqlDelayThread.cpp
+++ b/src/shared/Database/SqlDelayThread.cpp
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
* Copyright (C) 2008-2009 Trinity <http://www.trinitycore.org/>
diff --git a/src/shared/Database/SqlDelayThread.h b/src/shared/Database/SqlDelayThread.h
index 39936d1e203..1fc35741fc5 100644
--- a/src/shared/Database/SqlDelayThread.h
+++ b/src/shared/Database/SqlDelayThread.h
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
* Copyright (C) 2008-2009 Trinity <http://www.trinitycore.org/>
diff --git a/src/shared/Database/SqlOperations.cpp b/src/shared/Database/SqlOperations.cpp
index c7148ab086c..233eed1e4cb 100644
--- a/src/shared/Database/SqlOperations.cpp
+++ b/src/shared/Database/SqlOperations.cpp
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
* Copyright (C) 2008-2009 Trinity <http://www.trinitycore.org/>
diff --git a/src/shared/Database/SqlOperations.h b/src/shared/Database/SqlOperations.h
index 28e854e02e9..b7c84b5d6cf 100644
--- a/src/shared/Database/SqlOperations.h
+++ b/src/shared/Database/SqlOperations.h
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
* Copyright (C) 2008-2009 Trinity <http://www.trinitycore.org/>
diff --git a/src/shared/Database/dbcfile.cpp b/src/shared/Database/dbcfile.cpp
index 7fe95f0624e..f0b7e6e3c15 100644
--- a/src/shared/Database/dbcfile.cpp
+++ b/src/shared/Database/dbcfile.cpp
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
* Copyright (C) 2008-2009 Trinity <http://www.trinitycore.org/>
diff --git a/src/shared/Database/dbcfile.h b/src/shared/Database/dbcfile.h
index ca12dfb989d..470322326aa 100644
--- a/src/shared/Database/dbcfile.h
+++ b/src/shared/Database/dbcfile.h
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
* Copyright (C) 2008-2009 Trinity <http://www.trinitycore.org/>