aboutsummaryrefslogtreecommitdiff
path: root/src/shared
diff options
context:
space:
mode:
Diffstat (limited to 'src/shared')
-rw-r--r--src/shared/Auth/AuthCrypt.cpp9
-rw-r--r--src/shared/Auth/AuthCrypt.h5
-rw-r--r--src/shared/Auth/BigNumber.cpp4
-rw-r--r--src/shared/Auth/BigNumber.h4
-rw-r--r--src/shared/Auth/Hmac.cpp4
-rw-r--r--src/shared/Auth/Hmac.h4
-rw-r--r--src/shared/Auth/Makefile.am10
-rw-r--r--src/shared/Auth/Sha1.cpp4
-rw-r--r--src/shared/Auth/Sha1.h4
-rw-r--r--src/shared/ByteBuffer.h30
-rw-r--r--src/shared/Common.cpp4
-rw-r--r--src/shared/Common.h10
-rw-r--r--src/shared/Config/Config.cpp4
-rw-r--r--src/shared/Config/Config.h4
-rw-r--r--src/shared/Config/ConfigEnv.h4
-rw-r--r--src/shared/Config/Makefile.am10
-rw-r--r--src/shared/Config/dotconfpp/dotconfpp.cpp4
-rw-r--r--src/shared/Database/DBCEnums.h247
-rw-r--r--src/shared/Database/DBCStores.cpp135
-rw-r--r--src/shared/Database/DBCStores.h24
-rw-r--r--src/shared/Database/DBCStructure.h1489
-rw-r--r--src/shared/Database/DBCfmt.cpp70
-rw-r--r--src/shared/Database/Database.cpp4
-rw-r--r--src/shared/Database/Database.h6
-rw-r--r--src/shared/Database/DatabaseEnv.h4
-rw-r--r--src/shared/Database/DatabaseImpl.h4
-rw-r--r--src/shared/Database/DatabaseMysql.cpp4
-rw-r--r--src/shared/Database/DatabaseMysql.h4
-rw-r--r--src/shared/Database/DatabasePostgre.cpp4
-rw-r--r--src/shared/Database/DatabasePostgre.h4
-rw-r--r--src/shared/Database/DatabaseSqlite.cpp4
-rw-r--r--src/shared/Database/DatabaseSqlite.h4
-rw-r--r--src/shared/Database/Field.cpp4
-rw-r--r--src/shared/Database/Field.h4
-rw-r--r--src/shared/Database/Makefile.am12
-rw-r--r--src/shared/Database/MySQLDelayThread.h4
-rw-r--r--src/shared/Database/PGSQLDelayThread.h4
-rw-r--r--src/shared/Database/QueryResult.h4
-rw-r--r--src/shared/Database/QueryResultMysql.cpp4
-rw-r--r--src/shared/Database/QueryResultMysql.h4
-rw-r--r--src/shared/Database/QueryResultPostgre.cpp4
-rw-r--r--src/shared/Database/QueryResultPostgre.h4
-rw-r--r--src/shared/Database/QueryResultSqlite.cpp4
-rw-r--r--src/shared/Database/QueryResultSqlite.h4
-rw-r--r--src/shared/Database/SQLStorage.cpp18
-rw-r--r--src/shared/Database/SQLStorage.h4
-rw-r--r--src/shared/Database/SQLStorageImpl.h10
-rw-r--r--src/shared/Database/SqlDelayThread.cpp4
-rw-r--r--src/shared/Database/SqlDelayThread.h6
-rw-r--r--src/shared/Database/SqlOperations.cpp4
-rw-r--r--src/shared/Database/SqlOperations.h4
-rw-r--r--src/shared/Database/dbcfile.cpp37
-rw-r--r--src/shared/Database/dbcfile.h4
-rw-r--r--src/shared/Errors.h4
-rw-r--r--src/shared/Log.cpp6
-rw-r--r--src/shared/Log.h7
-rw-r--r--src/shared/Makefile.am126
-rw-r--r--src/shared/MemoryLeaks.cpp32
-rw-r--r--src/shared/MemoryLeaks.h48
-rw-r--r--src/shared/PacketLog.cpp4
-rw-r--r--src/shared/PacketLog.h4
-rw-r--r--src/shared/ProgressBar.cpp4
-rw-r--r--src/shared/ProgressBar.h4
-rw-r--r--src/shared/ServiceWin32.cpp4
-rw-r--r--src/shared/ServiceWin32.h4
-rw-r--r--src/shared/SystemConfig.h6
-rw-r--r--src/shared/SystemConfig.h.in79
-rw-r--r--src/shared/Timer.h4
-rw-r--r--src/shared/Util.cpp20
-rw-r--r--src/shared/Util.h256
-rw-r--r--src/shared/WorldPacket.h4
-rw-r--r--src/shared/vmap/BaseModel.cpp4
-rw-r--r--src/shared/vmap/BaseModel.h4
-rw-r--r--src/shared/vmap/CoordModelMapping.cpp4
-rw-r--r--src/shared/vmap/CoordModelMapping.h4
-rw-r--r--src/shared/vmap/DebugCmdLogger.cpp4
-rw-r--r--src/shared/vmap/DebugCmdLogger.h4
-rw-r--r--src/shared/vmap/IVMapManager.h4
-rw-r--r--src/shared/vmap/Makefile.am78
-rw-r--r--src/shared/vmap/ManagedModelContainer.cpp4
-rw-r--r--src/shared/vmap/ManagedModelContainer.h4
-rw-r--r--src/shared/vmap/ModelContainer.cpp4
-rw-r--r--src/shared/vmap/ModelContainer.h4
-rw-r--r--src/shared/vmap/NodeValueAccess.h4
-rw-r--r--src/shared/vmap/ShortBox.h4
-rw-r--r--src/shared/vmap/ShortVector.h4
-rw-r--r--src/shared/vmap/SubModel.cpp4
-rw-r--r--src/shared/vmap/SubModel.h4
-rw-r--r--src/shared/vmap/TileAssembler.cpp7
-rw-r--r--src/shared/vmap/TileAssembler.h4
-rw-r--r--src/shared/vmap/TreeNode.cpp4
-rw-r--r--src/shared/vmap/TreeNode.h4
-rw-r--r--src/shared/vmap/VMapDefinitions.h4
-rw-r--r--src/shared/vmap/VMapFactory.cpp4
-rw-r--r--src/shared/vmap/VMapFactory.h4
-rw-r--r--src/shared/vmap/VMapManager.cpp4
-rw-r--r--src/shared/vmap/VMapManager.h4
-rw-r--r--src/shared/vmap/VMapTools.h4
98 files changed, 2250 insertions, 823 deletions
diff --git a/src/shared/Auth/AuthCrypt.cpp b/src/shared/Auth/AuthCrypt.cpp
index 7cbb7f13648..0b2a3f64338 100644
--- a/src/shared/Auth/AuthCrypt.cpp
+++ b/src/shared/Auth/AuthCrypt.cpp
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
+ * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
- * Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
+ * 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
@@ -50,9 +50,8 @@ void AuthCrypt::DecryptRecv(uint8 *data, size_t len)
void AuthCrypt::EncryptSend(uint8 *data, size_t len)
{
if (!_initialized) return;
- if (len < CRYPTED_SEND_LEN) return;
- for (size_t t = 0; t < CRYPTED_SEND_LEN; t++)
+ for (size_t t = 0; t < len; t++)
{
_send_i %= _key.size();
uint8 x = (data[t] ^ _key[_send_i]) + _send_j;
@@ -67,7 +66,7 @@ void AuthCrypt::SetKey(BigNumber *bn)
GenerateKey(key, bn);
_key.resize(SHA_DIGEST_LENGTH);
std::copy(key, key + SHA_DIGEST_LENGTH, _key.begin());
- delete key;
+ delete[] key;
}
AuthCrypt::~AuthCrypt()
diff --git a/src/shared/Auth/AuthCrypt.h b/src/shared/Auth/AuthCrypt.h
index 020f8bcdc96..5c35511ad9f 100644
--- a/src/shared/Auth/AuthCrypt.h
+++ b/src/shared/Auth/AuthCrypt.h
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
+ * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
- * Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
+ * 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
@@ -32,7 +32,6 @@ class AuthCrypt
AuthCrypt();
~AuthCrypt();
- const static size_t CRYPTED_SEND_LEN = 4;
const static size_t CRYPTED_RECV_LEN = 6;
void Init();
diff --git a/src/shared/Auth/BigNumber.cpp b/src/shared/Auth/BigNumber.cpp
index da31da3a522..7872b141f3d 100644
--- a/src/shared/Auth/BigNumber.cpp
+++ b/src/shared/Auth/BigNumber.cpp
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
+ * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
- * Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
+ * 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
diff --git a/src/shared/Auth/BigNumber.h b/src/shared/Auth/BigNumber.h
index df25e4f934d..b9038e86b13 100644
--- a/src/shared/Auth/BigNumber.h
+++ b/src/shared/Auth/BigNumber.h
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
+ * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
- * Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
+ * 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
diff --git a/src/shared/Auth/Hmac.cpp b/src/shared/Auth/Hmac.cpp
index 615edd26ca5..a8572f0e9f8 100644
--- a/src/shared/Auth/Hmac.cpp
+++ b/src/shared/Auth/Hmac.cpp
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
+ * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
- * Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
+ * 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
diff --git a/src/shared/Auth/Hmac.h b/src/shared/Auth/Hmac.h
index 5b7c4040f13..fc80bdca4c4 100644
--- a/src/shared/Auth/Hmac.h
+++ b/src/shared/Auth/Hmac.h
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
+ * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
- * Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
+ * 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
diff --git a/src/shared/Auth/Makefile.am b/src/shared/Auth/Makefile.am
index 9c71613a0de..7398e2f2fa7 100644
--- a/src/shared/Auth/Makefile.am
+++ b/src/shared/Auth/Makefile.am
@@ -1,6 +1,6 @@
-# Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
+# Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
#
-# Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
+# 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
@@ -9,19 +9,19 @@
#
# 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
+# 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
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
## Process this file with automake to produce Makefile.in
## Sub-directories to parse
## CPP flags for includes, defines, etc.
-AM_CPPFLAGS = $(MYSQL_INCLUDES) $(POSTGRE_INCLUDES) -I$(top_builddir)/src/shared -I$(srcdir) -I$(srcdir)/../../../dep/include -I$(srcdir)/../../framework -I$(srcdir)/../../shared -I$(srcdir)/../../../dep/include/g3dlite
+AM_CPPFLAGS = $(TRINI_INCLUDES) -I$(top_builddir)/src/shared -I$(srcdir) -I$(srcdir)/../../../dep/include -I$(srcdir)/../../framework -I$(srcdir)/../../shared -I$(srcdir)/../../../dep/include/g3dlite
## Build MaNGOS shared library and its parts as convenience library.
# All libraries will be convenience libraries. Might be changed to shared
diff --git a/src/shared/Auth/Sha1.cpp b/src/shared/Auth/Sha1.cpp
index 90334543b82..8743a14b838 100644
--- a/src/shared/Auth/Sha1.cpp
+++ b/src/shared/Auth/Sha1.cpp
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
+ * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
- * Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
+ * 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
diff --git a/src/shared/Auth/Sha1.h b/src/shared/Auth/Sha1.h
index 6794d3bd103..68c61eb7a8e 100644
--- a/src/shared/Auth/Sha1.h
+++ b/src/shared/Auth/Sha1.h
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
+ * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
- * Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
+ * 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
diff --git a/src/shared/ByteBuffer.h b/src/shared/ByteBuffer.h
index fb2d7cfc7b9..97b6c1cbd17 100644
--- a/src/shared/ByteBuffer.h
+++ b/src/shared/ByteBuffer.h
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
+ * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
- * Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
+ * 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
@@ -243,6 +243,32 @@ class ByteBuffer
_rpos += len;
}
+ bool readPackGUID(uint64& guid)
+ {
+ if(rpos()+1 > size())
+ return false;
+
+ guid = 0;
+
+ uint8 guidmark=0;
+ (*this) >> guidmark;
+
+ for(int i=0;i<8;i++)
+ {
+ if(guidmark & (uint8(1) << i))
+ {
+ if(rpos()+1 > size())
+ return false;
+
+ uint8 bit;
+ (*this) >> bit;
+ guid |= (uint64(bit) << (i*8));
+ }
+ }
+
+ return true;
+ }
+
const uint8 *contents() const { return &_storage[0]; }
size_t size() const { return _storage.size(); }
diff --git a/src/shared/Common.cpp b/src/shared/Common.cpp
index a31c88fdba5..27ae9184d69 100644
--- a/src/shared/Common.cpp
+++ b/src/shared/Common.cpp
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
+ * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
- * Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
+ * 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
diff --git a/src/shared/Common.h b/src/shared/Common.h
index 5e6a2cca520..abe804bb3a4 100644
--- a/src/shared/Common.h
+++ b/src/shared/Common.h
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
+ * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
- * Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
+ * 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
@@ -80,6 +80,8 @@
#pragma warning(disable:4305)
#pragma warning(disable:4005)
+
+#pragma warning(disable:4522)//warning when class has 2 constructosr
#endif // __SHOW_STUPID_WARNINGS__
#endif // __GNUC__
@@ -161,7 +163,9 @@ enum TimeConstants
MINUTE = 60,
HOUR = MINUTE*60,
DAY = HOUR*24,
- MONTH = DAY*30
+ MONTH = DAY*30,
+ YEAR = MONTH*12,
+ IN_MILISECONDS = 1000
};
enum AccountTypes
diff --git a/src/shared/Config/Config.cpp b/src/shared/Config/Config.cpp
index 4f9402b5f01..52fca953f64 100644
--- a/src/shared/Config/Config.cpp
+++ b/src/shared/Config/Config.cpp
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
+ * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
- * Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
+ * 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
diff --git a/src/shared/Config/Config.h b/src/shared/Config/Config.h
index 4dbff1b1153..2c709f02ae5 100644
--- a/src/shared/Config/Config.h
+++ b/src/shared/Config/Config.h
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
+ * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
- * Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
+ * 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
diff --git a/src/shared/Config/ConfigEnv.h b/src/shared/Config/ConfigEnv.h
index eaa86c882df..75209a7fc6b 100644
--- a/src/shared/Config/ConfigEnv.h
+++ b/src/shared/Config/ConfigEnv.h
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
+ * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
- * Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
+ * 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
diff --git a/src/shared/Config/Makefile.am b/src/shared/Config/Makefile.am
index 23188ba3447..4854095b98c 100644
--- a/src/shared/Config/Makefile.am
+++ b/src/shared/Config/Makefile.am
@@ -1,6 +1,6 @@
-# Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
+# Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
#
-# Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
+# 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
@@ -9,19 +9,19 @@
#
# 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
+# 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
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
## Process this file with automake to produce Makefile.in
## Sub-directories to parse
## CPP flags for includes, defines, etc.
-AM_CPPFLAGS = $(MYSQL_INCLUDES) $(POSTGRE_INCLUDES) -I$(top_builddir)/src/shared -I$(srcdir) -I$(srcdir)/../../../dep/include -I$(srcdir)/../../framework -I$(srcdir)/../../shared -I$(srcdir)/../../../dep/include/g3dlite
+AM_CPPFLAGS = $(TRINI_INCLUDES) -I$(top_builddir)/src/shared -I$(srcdir) -I$(srcdir)/../../../dep/include -I$(srcdir)/../../framework -I$(srcdir)/../../shared -I$(srcdir)/../../../dep/include/g3dlite
## Build MaNGOS shared library and its parts as convenience library.
# All libraries will be convenience libraries. Might be changed to shared
diff --git a/src/shared/Config/dotconfpp/dotconfpp.cpp b/src/shared/Config/dotconfpp/dotconfpp.cpp
index 3e2aa8683fe..bd575d95ece 100644
--- a/src/shared/Config/dotconfpp/dotconfpp.cpp
+++ b/src/shared/Config/dotconfpp/dotconfpp.cpp
@@ -138,7 +138,7 @@ int DOTCONFDocument::cleanupLine(char * line)
quoted = !quoted;
++line; continue;
}
- if(isspace(*line) && !quoted){
+ if(isspace((unsigned char)*line) && !quoted){
*bg++ = 0;
if(strlen(start)){
@@ -154,7 +154,7 @@ int DOTCONFDocument::cleanupLine(char * line)
words.push_back(word);
}
start = bg;
- while(isspace(*++line)) {}
+ while(isspace((unsigned char)*++line)) {}
continue;
}
diff --git a/src/shared/Database/DBCEnums.h b/src/shared/Database/DBCEnums.h
index d8699b2c240..ee4f165f898 100644
--- a/src/shared/Database/DBCEnums.h
+++ b/src/shared/Database/DBCEnums.h
@@ -1,5 +1,5 @@
/*
-* Copyright (C) 2005-2008 MaNGOS <http://getmangos.com/>
+* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
* 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
@@ -34,28 +34,190 @@ enum AreaTeams
AREATEAM_HORDE = 4
};
+enum AchievementFactionFlags
+{
+ ACHIEVEMENT_FACTION_FLAG_HORDE = 0x00000000,
+ ACHIEVEMENT_FACTION_FLAG_ALLIANCE = 0x00000001,
+};
+
+enum AchievementFlags
+{
+ ACHIEVEMENT_FLAG_COUNTER = 0x00000001,
+ ACHIEVEMENT_FLAG_REACH_LEVEL = 0x00000004,
+ ACHIEVEMENT_FLAG_RERERED_MAX = 0x00000010, // displays the maximum criteria of a refered achievement
+ ACHIEVEMENT_FLAG_AVERAGE = 0x00000040,
+ ACHIEVEMENT_FLAG_REALM_FIRST_REACH= 0x00000100,
+ ACHIEVEMENT_FLAG_REALM_FIRST_KILL = 0x00000200,
+};
+
+enum AchievementCriteriaCondition
+{
+ ACHIEVEMENT_CRITERIA_CONDITION_NONE = 0,
+ ACHIEVEMENT_CRITERIA_CONDITION_NO_DEATH = 1,
+ ACHIEVEMENT_CRITERIA_CONDITION_UNK1 = 2, // only used in "Complete a daily quest every day for five consecutive days"
+ ACHIEVEMENT_CRITERIA_CONDITION_MAP = 3, // requires you to be on specific map
+ ACHIEVEMENT_CRITERIA_CONDITION_NO_LOOSE = 4, // only used in "Win 10 arenas without losing"
+ ACHIEVEMENT_CRITERIA_CONDITION_UNK2 = 9, // unk
+ ACHIEVEMENT_CRITERIA_CONDITION_UNK3 = 13, // unk
+};
+
+enum AchievementCriteriaCompletionFlags
+{
+ // some Achievements (like 698) have several criteria but only one has to be fulfilled. These are identified by this flag.
+ ACHIEVEMENT_CRITERIA_COMPLETE_FLAG_ALL = 2,
+};
+
+enum AchievementCriteriaGroupFlags
+{
+ // you mustn't be in a group while fulfilling this achievement
+ ACHIEVEMENT_CRITERIA_GROUP_NOT_IN_GROUP = 2,
+};
+
+enum AchievementCriteriaTypes
+{
+ ACHIEVEMENT_CRITERIA_TYPE_KILL_CREATURE = 0,
+ ACHIEVEMENT_CRITERIA_TYPE_WIN_BG = 1,
+ ACHIEVEMENT_CRITERIA_TYPE_REACH_LEVEL = 5,
+ ACHIEVEMENT_CRITERIA_TYPE_REACH_SKILL_LEVEL = 7,
+ ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_ACHIEVEMENT = 8,
+ ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_QUEST_COUNT = 9,
+ // you have to complete a daily quest x times in a row
+ ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_DAILY_QUEST_DAILY = 10,
+ ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_QUESTS_IN_ZONE = 11,
+ ACHIEVEMENT_CRITERIA_TYPE_DAMAGE_DONE = 13,
+ ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_DAILY_QUEST = 14,
+ ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_BATTLEGROUND= 15,
+ ACHIEVEMENT_CRITERIA_TYPE_DEATH_AT_MAP= 16,
+ // TODO: this can be both arena and total deaths. Where is this difference in the dbc?
+ ACHIEVEMENT_CRITERIA_TYPE_DEATH= 17,
+ ACHIEVEMENT_CRITERIA_TYPE_DEATH_IN_DUNGEON = 18,
+ ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_RAID = 19,
+ ACHIEVEMENT_CRITERIA_TYPE_KILLED_BY_CREATURE = 20,
+ ACHIEVEMENT_CRITERIA_TYPE_KILLED_BY_PLAYER = 23,
+ ACHIEVEMENT_CRITERIA_TYPE_FALL_WITHOUT_DYING = 24,
+ ACHIEVEMENT_CRITERIA_TYPE_DEATHS_FROM = 26,
+ ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_QUEST = 27,
+ ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET = 28,
+ ACHIEVEMENT_CRITERIA_TYPE_CAST_SPELL= 29,
+ ACHIEVEMENT_CRITERIA_TYPE_BG_OBJECTIVE_CAPTURE = 30,
+ ACHIEVEMENT_CRITERIA_TYPE_HONORABLE_KILL_AT_AREA = 31,
+ ACHIEVEMENT_CRITERIA_TYPE_WIN_ARENA = 32,
+ ACHIEVEMENT_CRITERIA_TYPE_PLAY_ARENA = 33,
+ ACHIEVEMENT_CRITERIA_TYPE_LEARN_SPELL = 34,
+ // TODO: this criteria has additional conditions which can not be found in the dbcs
+ ACHIEVEMENT_CRITERIA_TYPE_HONORABLE_KILL = 35,
+ ACHIEVEMENT_CRITERIA_TYPE_OWN_ITEM = 36,
+ // TODO: the archievements 1162 and 1163 requires a special rating which can't be found in the dbc
+ ACHIEVEMENT_CRITERIA_TYPE_WIN_RATED_ARENA = 37,
+ ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_TEAM_RATING = 38,
+ ACHIEVEMENT_CRITERIA_TYPE_REACH_TEAM_RATING = 39,
+ ACHIEVEMENT_CRITERIA_TYPE_LEARN_SKILL_LEVEL = 40,
+ ACHIEVEMENT_CRITERIA_TYPE_USE_ITEM = 41,
+ ACHIEVEMENT_CRITERIA_TYPE_LOOT_ITEM= 42,
+ ACHIEVEMENT_CRITERIA_TYPE_EXPLORE_AREA = 43,
+ ACHIEVEMENT_CRITERIA_TYPE_OWN_RANK= 44,
+ ACHIEVEMENT_CRITERIA_TYPE_BUY_BANK_SLOT= 45,
+ ACHIEVEMENT_CRITERIA_TYPE_GAIN_REPUTATION= 46,
+ ACHIEVEMENT_CRITERIA_TYPE_GAIN_EXALTED_REPUTATION= 47,
+ // noted: rewarded as soon as the player payed, not at taking place at the seat
+ ACHIEVEMENT_CRITERIA_TYPE_VISIT_BARBER_SHOP= 48,
+ ACHIEVEMENT_CRITERIA_TYPE_EQUIP_EPIC_ITEM = 49,
+ // TODO: itemlevel is mentioned in text but not present in dbc
+ ACHIEVEMENT_CRITERIA_TYPE_ROLL_NEED_ON_LOOT = 50,
+ ACHIEVEMENT_CRITERIA_TYPE_ROLL_GREED_ON_LOOT= 51,
+ ACHIEVEMENT_CRITERIA_TYPE_HK_CLASS = 52,
+ ACHIEVEMENT_CRITERIA_TYPE_HK_RACE = 53,
+ ACHIEVEMENT_CRITERIA_TYPE_DO_EMOTE = 54,
+ ACHIEVEMENT_CRITERIA_TYPE_HEALING_DONE = 55,
+ // TODO: in some cases map not present, and in some cases need do without die
+ ACHIEVEMENT_CRITERIA_TYPE_GET_KILLING_BLOWS = 56,
+ ACHIEVEMENT_CRITERIA_TYPE_EQUIP_ITEM = 57,
+ ACHIEVEMENT_CRITERIA_TYPE_MONEY_FROM_VENDORS = 59,
+ ACHIEVEMENT_CRITERIA_TYPE_GOLD_SPENT_FOR_TALENTS = 60,
+ ACHIEVEMENT_CRITERIA_TYPE_NUMBER_OF_TALENT_RESETS = 61,
+ ACHIEVEMENT_CRITERIA_TYPE_MONEY_FROM_QUEST_REWARD = 62,
+ ACHIEVEMENT_CRITERIA_TYPE_GOLD_SPENT_FOR_TRAVELLING = 63,
+ ACHIEVEMENT_CRITERIA_TYPE_GOLD_SPENT_AT_BARBER = 65,
+ ACHIEVEMENT_CRITERIA_TYPE_GOLD_SPENT_FOR_MAIL = 66,
+ ACHIEVEMENT_CRITERIA_TYPE_LOOT_MONEY = 67,
+ ACHIEVEMENT_CRITERIA_TYPE_USE_GAMEOBJECT = 68,
+ ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET2= 69,
+ ACHIEVEMENT_CRITERIA_TYPE_SPECIAL_PVP_KILL= 70,
+ ACHIEVEMENT_CRITERIA_TYPE_FISH_IN_GAMEOBJECT = 72,
+ // TODO: title id is not mentioned in dbc
+ ACHIEVEMENT_CRITERIA_TYPE_EARNED_PVP_TITLE = 74,
+ ACHIEVEMENT_CRITERIA_TYPE_LEARN_SKILLLINE_SPELLS= 75,
+ ACHIEVEMENT_CRITERIA_TYPE_WIN_DUEL = 76,
+ ACHIEVEMENT_CRITERIA_TYPE_LOSE_DUEL = 77,
+ // TODO: creature type (demon, undead etc.) is not stored in dbc
+ ACHIEVEMENT_CRITERIA_TYPE_KILL_CREATURE_TYPE = 78,
+ ACHIEVEMENT_CRITERIA_TYPE_GOLD_EARNED_BY_AUCTIONS= 80,
+ ACHIEVEMENT_CRITERIA_TYPE_CREATE_AUCTION= 82,
+ ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_AUCTION_BID= 83,
+ ACHIEVEMENT_CRITERIA_TYPE_WON_AUCTIONS= 84,
+ ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_AUCTION_SOLD = 85,
+ ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_GOLD_VALUE_OWNED = 86,
+ ACHIEVEMENT_CRITERIA_TYPE_GAIN_REVERED_REPUTATION = 87,
+ ACHIEVEMENT_CRITERIA_TYPE_GAIN_HONORED_REPUTATION = 88,
+ ACHIEVEMENT_CRITERIA_TYPE_KNOWN_FACTIONS = 89,
+ ACHIEVEMENT_CRITERIA_TYPE_LOOT_EPIC_ITEM = 90,
+ ACHIEVEMENT_CRITERIA_TYPE_RECEIVE_EPIC_ITEM = 91,
+ ACHIEVEMENT_CRITERIA_TYPE_ROLL_NEED = 93,
+ ACHIEVEMENT_CRITERIA_TYPE_ROLL_GREED = 94,
+ ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_HEALTH = 95,
+ ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_POWER = 96,
+ ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_STAT = 97,
+ ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_SPELLPOWER = 98,
+ ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_ARMOR = 99,
+ ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_RATING = 100,
+ ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_HIT_DEALT = 101,
+ ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_HIT_RECEIVED = 102,
+ ACHIEVEMENT_CRITERIA_TYPE_TOTAL_DAMAGE_RECEIVED = 103,
+ ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_HEAL_CASTED = 104,
+ ACHIEVEMENT_CRITERIA_TYPE_TOTAL_HEALING_RECEIVED = 105,
+ ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_HEALING_RECEIVED = 106,
+ ACHIEVEMENT_CRITERIA_TYPE_QUEST_ABANDONED = 107,
+ ACHIEVEMENT_CRITERIA_TYPE_FLIGHT_PATHS_TAKEN = 108,
+ ACHIEVEMENT_CRITERIA_TYPE_LOOT_TYPE = 109,
+ // TODO: target entry is missing
+ ACHIEVEMENT_CRITERIA_TYPE_CAST_SPELL2 = 110,
+ ACHIEVEMENT_CRITERIA_TYPE_LEARN_SKILL_LINE= 112,
+ ACHIEVEMENT_CRITERIA_TYPE_EARN_HONORABLE_KILL = 113,
+ ACHIEVEMENT_CRITERIA_TYPE_ACCEPTED_SUMMONINGS = 114,
+ // 0..114 => 115 criteria types total
+ ACHIEVEMENT_CRITERIA_TYPE_TOTAL = 115,
+};
+
enum AreaFlags
{
AREA_FLAG_SNOW = 0x00000001, // snow (only Dun Morogh, Naxxramas, Razorfen Downs and Winterspring)
- AREA_FLAG_UNK1 = 0x00000002, // unknown, (only Naxxramas and Razorfen Downs)
- AREA_FLAG_UNK2 = 0x00000004, // Only used on development map
- AREA_FLAG_SLAVE_CAPITAL = 0x00000008, // slave capital city flag?
- AREA_FLAG_UNK3 = 0x00000010, // unknown
+ AREA_FLAG_UNK1 = 0x00000002, // may be necropolis?
+ AREA_FLAG_UNK2 = 0x00000004, // Only used for areas on map 571 (development before)
+ AREA_FLAG_SLAVE_CAPITAL = 0x00000008, // city and city subsones
+ AREA_FLAG_UNK3 = 0x00000010, // can't find common meaning
AREA_FLAG_SLAVE_CAPITAL2 = 0x00000020, // slave capital city flag?
AREA_FLAG_UNK4 = 0x00000040, // many zones have this flag
AREA_FLAG_ARENA = 0x00000080, // arena, both instanced and world arenas
AREA_FLAG_CAPITAL = 0x00000100, // main capital city flag
AREA_FLAG_CITY = 0x00000200, // only for one zone named "City" (where it located?)
- AREA_FLAG_OUTLAND = 0x00000400, // outland zones? (only Eye of the Storm not have this flag, but have 0x00004000 flag)
+ AREA_FLAG_OUTLAND = 0x00000400, // expansion zones? (only Eye of the Storm not have this flag, but have 0x00004000 flag)
AREA_FLAG_SANCTUARY = 0x00000800, // sanctuary area (PvP disabled)
AREA_FLAG_NEED_FLY = 0x00001000, // only Netherwing Ledge, Socrethar's Seat, Tempest Keep, The Arcatraz, The Botanica, The Mechanar, Sorrow Wing Point, Dragonspine Ridge, Netherwing Mines, Dragonmaw Base Camp, Dragonmaw Skyway
- AREA_FLAG_UNUSED1 = 0x00002000, // not used now (no area/zones with this flag set in 2.4.2)
- AREA_FLAG_OUTLAND2 = 0x00004000, // outland zones? (only Circle of Blood Arena not have this flag, but have 0x00000400 flag)
+ AREA_FLAG_UNUSED1 = 0x00002000, // not used now (no area/zones with this flag set in 3.0.3)
+ AREA_FLAG_OUTLAND2 = 0x00004000, // expansion zones? (only Circle of Blood Arena not have this flag, but have 0x00000400 flag)
AREA_FLAG_PVP = 0x00008000, // pvp objective area? (Death's Door also has this flag although it's no pvp object area)
AREA_FLAG_ARENA_INSTANCE = 0x00010000, // used by instanced arenas only
- AREA_FLAG_UNUSED2 = 0x00020000, // not used now (no area/zones with this flag set in 2.4.2)
- AREA_FLAG_UNK5 = 0x00040000, // just used for Amani Pass, Hatchet Hills
- AREA_FLAG_LOWLEVEL = 0x00100000 // used for some starting areas with area_level <=15
+ AREA_FLAG_UNUSED2 = 0x00020000, // not used now (no area/zones with this flag set in 3.0.3)
+ AREA_FLAG_UNK5 = 0x00040000, // only used for Amani Pass, Hatchet Hills
+ AREA_FLAG_UNK6 = 0x00080000, // Valgarde and Acherus: The Ebon Hold
+ AREA_FLAG_LOWLEVEL = 0x00100000, // used for some starting areas with area_level <=15
+ AREA_FLAG_TOWN = 0x00200000, // small towns with Inn
+ AREA_FLAG_UNK7 = 0x00400000, // Warsong Hold, Acherus: The Ebon Hold, New Agamand Inn, Vengeance Landing Inn
+ AREA_FLAG_UNK8 = 0x00800000, // Westguard Inn, Acherus: The Ebon Hold, Valgarde
+ AREA_FLAG_OUTDOOR_PVP = 0x01000000, // Wintergrasp and it's subzones
+ AREA_FLAG_UNK9 = 0x02000000, // unknown
+ AREA_FLAG_UNK10 = 0x04000000, // unknown
+ AREA_FLAG_OUTDOOR_PVP2 = 0x08000000 // Wintergrasp and it's subzones
};
enum FactionTemplateFlags
@@ -89,13 +251,15 @@ enum AbilytyLearnType
enum ItemEnchantmentType
{
- ITEM_ENCHANTMENT_TYPE_NONE = 0,
- ITEM_ENCHANTMENT_TYPE_COMBAT_SPELL = 1,
- ITEM_ENCHANTMENT_TYPE_DAMAGE = 2,
- ITEM_ENCHANTMENT_TYPE_EQUIP_SPELL = 3,
- ITEM_ENCHANTMENT_TYPE_RESISTANCE = 4,
- ITEM_ENCHANTMENT_TYPE_STAT = 5,
- ITEM_ENCHANTMENT_TYPE_TOTEM = 6
+ ITEM_ENCHANTMENT_TYPE_NONE = 0,
+ ITEM_ENCHANTMENT_TYPE_COMBAT_SPELL = 1,
+ ITEM_ENCHANTMENT_TYPE_DAMAGE = 2,
+ ITEM_ENCHANTMENT_TYPE_EQUIP_SPELL = 3,
+ ITEM_ENCHANTMENT_TYPE_RESISTANCE = 4,
+ ITEM_ENCHANTMENT_TYPE_STAT = 5,
+ ITEM_ENCHANTMENT_TYPE_TOTEM = 6,
+ ITEM_ENCHANTMENT_TYPE_USE_SPELL = 7,
+ ITEM_ENCHANTMENT_TYPE_PRISMATIC_SOCKET = 8
};
enum TotemCategoryType
@@ -109,5 +273,52 @@ enum TotemCategoryType
TOTEM_CATEGORY_TYPE_SPANNER = 24
};
+// SummonProperties.dbc, col 1
+/*enum SummonGroup
+{
+ SUMMON_GROUP_UNKNOWN1 = 0, // 1160 spells in 3.0.3
+ SUMMON_GROUP_UNKNOWN2 = 1, // 861 spells in 3.0.3
+ SUMMON_GROUP_PETS = 2, // 52 spells in 3.0.3, pets mostly
+ SUMMON_GROUP_CONTROLLABLE = 3, // 13 spells in 3.0.3, mostly controllable
+ SUMMON_GROUP_UNKNOWN3 = 4 // 86 spells in 3.0.3, taxi/mounts
+};
+
+// SummonProperties.dbc, col 3
+enum SummonType
+{
+ SUMMON_TYPE_UNKNOWN = 0, // different summons, 1330 spells in 3.0.3
+ SUMMON_TYPE_SUMMON = 1, // generic summons, 49 spells in 3.0.3
+ SUMMON_TYPE_GUARDIAN = 2, // summon guardian, 393 spells in 3.0.3
+ SUMMON_TYPE_ARMY = 3, // summon army, 5 spells in 3.0.3
+ SUMMON_TYPE_TOTEM = 4, // summon totem, 169 spells in 3.0.3
+ SUMMON_TYPE_CRITTER = 5, // critter/minipet, 195 spells in 3.0.3
+ SUMMON_TYPE_DK = 6, // summon DRW/Ghoul, 2 spells in 3.0.3
+ SUMMON_TYPE_BOMB = 7, // summon bot/bomb, 4 spells in 3.0.3
+ SUMMON_TYPE_PHASING = 8, // something todo with DK prequest line, 2 spells in 3.0.3
+ SUMMON_TYPE_SIEGE_VEH = 9, // summon different vehicles, 14 spells in 3.0.3
+ SUMMON_TYPE_DRAKE_VEH = 10, // summon drake (vehicle), 3 spells
+ SUMMON_TYPE_LIGHTWELL = 11 // summon lightwell, 6 spells in 3.0.3
+};
+
+// SummonProperties.dbc, col 5
+enum SummonFlags
+{
+ SUMMON_FLAG_NONE = 0x0000, // 1342 spells in 3.0.3
+ SUMMON_FLAG_UNK1 = 0x0001, // 75 spells in 3.0.3, something unfriendly
+ SUMMON_FLAG_UNK2 = 0x0002, // 616 spells in 3.0.3, something friendly
+ SUMMON_FLAG_UNK3 = 0x0004, // 22 spells in 3.0.3, no idea...
+ SUMMON_FLAG_UNK4 = 0x0008, // 49 spells in 3.0.3, some mounts
+ SUMMON_FLAG_UNK5 = 0x0010, // 25 spells in 3.0.3, quest related?
+ SUMMON_FLAG_UNK6 = 0x0020, // 0 spells in 3.0.3, unused
+ SUMMON_FLAG_UNK7 = 0x0040, // 12 spells in 3.0.3, no idea
+ SUMMON_FLAG_UNK8 = 0x0080, // 4 spells in 3.0.3, no idea
+ SUMMON_FLAG_UNK9 = 0x0100, // 51 spells in 3.0.3, no idea, many quest related
+ SUMMON_FLAG_UNK10 = 0x0200, // 51 spells in 3.0.3, something defensive
+ SUMMON_FLAG_UNK11 = 0x0400, // 3 spells, requires something near?
+ SUMMON_FLAG_UNK12 = 0x0800, // 30 spells in 3.0.3, no idea
+ SUMMON_FLAG_UNK13 = 0x1000, // 8 spells in 3.0.3, siege vehicle
+ SUMMON_FLAG_UNK14 = 0x2000, // 2 spells in 3.0.3, escort?
+};
+*/
#endif
diff --git a/src/shared/Database/DBCStores.cpp b/src/shared/Database/DBCStores.cpp
index 2031457ceaf..23a2b8e6cd5 100644
--- a/src/shared/Database/DBCStores.cpp
+++ b/src/shared/Database/DBCStores.cpp
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
+ * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
- * Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
+ * 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
@@ -32,13 +32,17 @@ typedef std::map<uint16,uint32> AreaFlagByAreaID;
typedef std::map<uint32,uint32> AreaFlagByMapID;
DBCStorage <AreaTableEntry> sAreaStore(AreaTableEntryfmt);
+DBCStorage <AreaGroupEntry> sAreaGroupStore(AreaGroupEntryfmt);
static AreaFlagByAreaID sAreaFlagByAreaID;
static AreaFlagByMapID sAreaFlagByMapID; // for instances without generated *.map files
+DBCStorage <AchievementEntry> sAchievementStore(Achievementfmt);
+DBCStorage <AchievementCriteriaEntry> sAchievementCriteriaStore(AchievementCriteriafmt);
DBCStorage <AreaTriggerEntry> sAreaTriggerStore(AreaTriggerEntryfmt);
DBCStorage <AuctionHouseEntry> sAuctionHouseStore(AuctionHouseEntryfmt);
DBCStorage <BankBagSlotPricesEntry> sBankBagSlotPricesStore(BankBagSlotPricesEntryfmt);
DBCStorage <BattlemasterListEntry> sBattlemasterListStore(BattlemasterListEntryfmt);
+DBCStorage <BarberShopStyleEntry> sBarberShopStyleStore(BarberShopStyleEntryfmt);
DBCStorage <CharStartOutfitEntry> sCharStartOutfitStore(CharStartOutfitEntryfmt);
DBCStorage <CharTitlesEntry> sCharTitlesStore(CharTitlesEntryfmt);
DBCStorage <ChatChannelsEntry> sChatChannelsStore(ChatChannelsEntryfmt);
@@ -47,6 +51,7 @@ DBCStorage <ChrRacesEntry> sChrRacesStore(ChrRacesEntryfmt);
DBCStorage <CreatureDisplayInfoEntry> sCreatureDisplayInfoStore(CreatureDisplayInfofmt);
DBCStorage <CreatureFamilyEntry> sCreatureFamilyStore(CreatureFamilyfmt);
DBCStorage <CreatureSpellDataEntry> sCreatureSpellDataStore(CreatureSpellDatafmt);
+DBCStorage <CreatureTypeEntry> sCreatureTypeStore(CreatureTypefmt);
DBCStorage <DurabilityQualityEntry> sDurabilityQualityStore(DurabilityQualityfmt);
DBCStorage <DurabilityCostsEntry> sDurabilityCostsStore(DurabilityCostsfmt);
@@ -59,7 +64,10 @@ DBCStorage <FactionEntry> sFactionStore(FactionEntryfmt);
DBCStorage <FactionTemplateEntry> sFactionTemplateStore(FactionTemplateEntryfmt);
DBCStorage <GemPropertiesEntry> sGemPropertiesStore(GemPropertiesEntryfmt);
+DBCStorage <GlyphPropertiesEntry> sGlyphPropertiesStore(GlyphPropertiesfmt);
+DBCStorage <GlyphSlotEntry> sGlyphSlotStore(GlyphSlotfmt);
+DBCStorage <GtBarberShopCostBaseEntry> sGtBarberShopCostBaseStore(GtBarberShopCostBasefmt);
DBCStorage <GtCombatRatingsEntry> sGtCombatRatingsStore(GtCombatRatingsfmt);
DBCStorage <GtChanceToMeleeCritBaseEntry> sGtChanceToMeleeCritBaseStore(GtChanceToMeleeCritBasefmt);
DBCStorage <GtChanceToMeleeCritEntry> sGtChanceToMeleeCritStore(GtChanceToMeleeCritfmt);
@@ -69,10 +77,12 @@ DBCStorage <GtOCTRegenHPEntry> sGtOCTRegenHPStore(GtOCTRegenHPfmt);
//DBCStorage <GtOCTRegenMPEntry> sGtOCTRegenMPStore(GtOCTRegenMPfmt); -- not used currently
DBCStorage <GtRegenHPPerSptEntry> sGtRegenHPPerSptStore(GtRegenHPPerSptfmt);
DBCStorage <GtRegenMPPerSptEntry> sGtRegenMPPerSptStore(GtRegenMPPerSptfmt);
+DBCStorage <HolidaysEntry> sHolidaysStore(Holidaysfmt);
DBCStorage <ItemEntry> sItemStore(Itemfmt);
//DBCStorage <ItemCondExtCostsEntry> sItemCondExtCostsStore(ItemCondExtCostsEntryfmt);
//DBCStorage <ItemDisplayInfoEntry> sItemDisplayInfoStore(ItemDisplayTemplateEntryfmt); -- not used currently
DBCStorage <ItemExtendedCostEntry> sItemExtendedCostStore(ItemExtendedCostEntryfmt);
+DBCStorage <ItemLimitCategoryEntry> sItemLimitCategoryStore(ItemLimitCategoryEntryfmt);
DBCStorage <ItemRandomPropertiesEntry> sItemRandomPropertiesStore(ItemRandomPropertiesfmt);
DBCStorage <ItemRandomSuffixEntry> sItemRandomSuffixStore(ItemRandomSuffixfmt);
DBCStorage <ItemSetEntry> sItemSetStore(ItemSetEntryfmt);
@@ -85,6 +95,8 @@ DBCStorage <MapEntry> sMapStore(MapEntryfmt);
DBCStorage <QuestSortEntry> sQuestSortStore(QuestSortEntryfmt);
DBCStorage <RandomPropertiesPointsEntry> sRandomPropertiesPointsStore(RandomPropertiesPointsfmt);
+DBCStorage <ScalingStatDistributionEntry> sScalingStatDistributionStore(ScalingStatDistributionfmt);
+DBCStorage <ScalingStatValuesEntry> sScalingStatValuesStore(ScalingStatValuesfmt);
DBCStorage <SkillLineEntry> sSkillLineStore(SkillLinefmt);
DBCStorage <SkillLineAbilityEntry> sSkillLineAbilityStore(SkillLineAbilityfmt);
@@ -102,8 +114,10 @@ DBCStorage <SpellDurationEntry> sSpellDurationStore(SpellDurationfmt);
DBCStorage <SpellFocusObjectEntry> sSpellFocusObjectStore(SpellFocusObjectfmt);
DBCStorage <SpellRadiusEntry> sSpellRadiusStore(SpellRadiusfmt);
DBCStorage <SpellRangeEntry> sSpellRangeStore(SpellRangefmt);
+DBCStorage <SpellRuneCostEntry> sSpellRuneCostStore(SpellRuneCostfmt);
DBCStorage <SpellShapeshiftEntry> sSpellShapeshiftStore(SpellShapeshiftfmt);
DBCStorage <StableSlotPricesEntry> sStableSlotPricesStore(StableSlotPricesfmt);
+//DBCStorage <SummonPropertiesEntry> sSummonPropertiesStore(SummonPropertiesfmt);
DBCStorage <TalentEntry> sTalentStore(TalentEntryfmt);
TalentSpellPosMap sTalentSpellPosMap;
DBCStorage <TalentTabEntry> sTalentTabStore(TalentTabEntryfmt);
@@ -126,8 +140,11 @@ TaxiPathNodesByPath sTaxiPathNodesByPath;
static DBCStorage <TaxiPathNodeEntry> sTaxiPathNodeStore(TaxiPathNodeEntryfmt);
DBCStorage <TotemCategoryEntry> sTotemCategoryStore(TotemCategoryEntryfmt);
+DBCStorage <VehicleEntry> sVehicleStore(VehicleEntryfmt);
+DBCStorage <VehicleSeatEntry> sVehicleSeatStore(VehicleSeatEntryfmt);
DBCStorage <WorldMapAreaEntry> sWorldMapAreaStore(WorldMapAreaEntryfmt);
DBCStorage <WorldSafeLocsEntry> sWorldSafeLocsStore(WorldSafeLocsEntryfmt);
+DBCStorage <WorldMapOverlayEntry> sWorldMapOverlayStore(WorldMapOverlayEntryfmt);
typedef std::list<std::string> StoreProblemList;
@@ -179,7 +196,7 @@ void LoadDBCStores(const std::string& dataPath)
{
std::string dbcPath = dataPath+"dbc/";
- const uint32 DBCFilesCount = 57;
+ const uint32 DBCFilesCount = 73;
barGoLink bar( DBCFilesCount );
@@ -197,15 +214,19 @@ void LoadDBCStores(const std::string& dataPath)
sAreaFlagByAreaID.insert(AreaFlagByAreaID::value_type(uint16(area->ID),area->exploreFlag));
// fill MapId->DBC records ( skip sub zones and continents )
- if(area->zone==0 && area->mapid != 0 && area->mapid != 1 && area->mapid != 530 )
+ if(area->zone==0 && area->mapid != 0 && area->mapid != 1 && area->mapid != 530 && area->mapid != 571 )
sAreaFlagByMapID.insert(AreaFlagByMapID::value_type(area->mapid,area->exploreFlag));
}
}
+ LoadDBC(availableDbcLocales,bar,bad_dbc_files,sAchievementStore, dbcPath,"Achievement.dbc");
+ LoadDBC(availableDbcLocales,bar,bad_dbc_files,sAchievementCriteriaStore, dbcPath,"Achievement_Criteria.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sAreaTriggerStore, dbcPath,"AreaTrigger.dbc");
+ LoadDBC(availableDbcLocales,bar,bad_dbc_files,sAreaGroupStore, dbcPath,"AreaGroup.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sAuctionHouseStore, dbcPath,"AuctionHouse.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sBankBagSlotPricesStore, dbcPath,"BankBagSlotPrices.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sBattlemasterListStore, dbcPath,"BattlemasterList.dbc");
+ LoadDBC(availableDbcLocales,bar,bad_dbc_files,sBarberShopStyleStore, dbcPath,"BarberShopStyle.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sCharStartOutfitStore, dbcPath,"CharStartOutfit.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sCharTitlesStore, dbcPath,"CharTitles.dbc");
@@ -215,6 +236,7 @@ void LoadDBCStores(const std::string& dataPath)
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sCreatureDisplayInfoStore, dbcPath,"CreatureDisplayInfo.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sCreatureFamilyStore, dbcPath,"CreatureFamily.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sCreatureSpellDataStore, dbcPath,"CreatureSpellData.dbc");
+ LoadDBC(availableDbcLocales,bar,bad_dbc_files,sCreatureTypeStore, dbcPath,"CreatureType.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sDurabilityCostsStore, dbcPath,"DurabilityCosts.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sDurabilityQualityStore, dbcPath,"DurabilityQuality.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sEmotesTextStore, dbcPath,"EmotesText.dbc");
@@ -231,7 +253,10 @@ void LoadDBCStores(const std::string& dataPath)
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sFactionTemplateStore, dbcPath,"FactionTemplate.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sGemPropertiesStore, dbcPath,"GemProperties.dbc");
+ LoadDBC(availableDbcLocales,bar,bad_dbc_files,sGlyphPropertiesStore, dbcPath,"GlyphProperties.dbc");
+ LoadDBC(availableDbcLocales,bar,bad_dbc_files,sGlyphSlotStore, dbcPath,"GlyphSlot.dbc");
+ LoadDBC(availableDbcLocales,bar,bad_dbc_files,sGtBarberShopCostBaseStore,dbcPath,"gtBarberShopCostBase.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sGtCombatRatingsStore, dbcPath,"gtCombatRatings.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sGtChanceToMeleeCritBaseStore, dbcPath,"gtChanceToMeleeCritBase.dbc");
@@ -244,10 +269,12 @@ void LoadDBCStores(const std::string& dataPath)
//LoadDBC(availableDbcLocales,bar,bad_dbc_files,sGtOCTRegenMPStore, dbcPath,"gtOCTRegenMP.dbc"); -- not used currently
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sGtRegenHPPerSptStore, dbcPath,"gtRegenHPPerSpt.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sGtRegenMPPerSptStore, dbcPath,"gtRegenMPPerSpt.dbc");
+ LoadDBC(availableDbcLocales,bar,bad_dbc_files,sHolidaysStore, dbcPath,"Holidays.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sItemStore, dbcPath,"Item.dbc");
//LoadDBC(availableDbcLocales,bar,bad_dbc_files,sItemDisplayInfoStore, dbcPath,"ItemDisplayInfo.dbc"); -- not used currently
//LoadDBC(availableDbcLocales,bar,bad_dbc_files,sItemCondExtCostsStore, dbcPath,"ItemCondExtCosts.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sItemExtendedCostStore, dbcPath,"ItemExtendedCost.dbc");
+ LoadDBC(availableDbcLocales,bar,bad_dbc_files,sItemLimitCategoryStore, dbcPath,"ItemLimitCategory.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sItemRandomPropertiesStore,dbcPath,"ItemRandomProperties.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sItemRandomSuffixStore, dbcPath,"ItemRandomSuffix.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sItemSetStore, dbcPath,"ItemSet.dbc");
@@ -256,6 +283,8 @@ void LoadDBCStores(const std::string& dataPath)
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sMapStore, dbcPath,"Map.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sQuestSortStore, dbcPath,"QuestSort.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sRandomPropertiesPointsStore, dbcPath,"RandPropPoints.dbc");
+ LoadDBC(availableDbcLocales,bar,bad_dbc_files,sScalingStatDistributionStore, dbcPath,"ScalingStatDistribution.dbc");
+ LoadDBC(availableDbcLocales,bar,bad_dbc_files,sScalingStatValuesStore, dbcPath,"ScalingStatValues.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sSkillLineStore, dbcPath,"SkillLine.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sSkillLineAbilityStore, dbcPath,"SkillLineAbility.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sSoundEntriesStore, dbcPath,"SoundEntries.dbc");
@@ -266,11 +295,11 @@ void LoadDBCStores(const std::string& dataPath)
if(spell && spell->Category)
sSpellCategoryStore[spell->Category].insert(i);
- // DBC not support uint64 fields but SpellEntry have SpellFamilyFlags mapped at 2 uint32 fields
+ /*// DBC not support uint64 fields but SpellEntry have SpellFamilyFlags mapped at 2 uint32 fields
// uint32 field already converted to bigendian if need, but must be swapped for correct uint64 bigendian view
#if TRINITY_ENDIAN == TRINITY_BIGENDIAN
std::swap(*((uint32*)(&spell->SpellFamilyFlags)),*(((uint32*)(&spell->SpellFamilyFlags))+1));
- #endif
+ #endif*/
}
for (uint32 j = 0; j < sSkillLineAbilityStore.GetNumRows(); ++j)
@@ -305,8 +334,10 @@ void LoadDBCStores(const std::string& dataPath)
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sSpellItemEnchantmentConditionStore,dbcPath,"SpellItemEnchantmentCondition.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sSpellRadiusStore, dbcPath,"SpellRadius.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sSpellRangeStore, dbcPath,"SpellRange.dbc");
+ LoadDBC(availableDbcLocales,bar,bad_dbc_files,sSpellRuneCostStore, dbcPath,"SpellRuneCost.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sSpellShapeshiftStore, dbcPath,"SpellShapeshiftForm.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sStableSlotPricesStore, dbcPath,"StableSlotPrices.dbc");
+ //LoadDBC(availableDbcLocales,bar,bad_dbc_files,sSummonPropertiesStore, dbcPath,"SummonProperties.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sTalentStore, dbcPath,"Talent.dbc");
// create talent spells set
@@ -384,18 +415,6 @@ void LoadDBCStores(const std::string& dataPath)
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sTaxiNodesStore, dbcPath,"TaxiNodes.dbc");
- // Initialize global taxinodes mask
- memset(sTaxiNodesMask,0,sizeof(sTaxiNodesMask));
- for(uint32 i = 1; i < sTaxiNodesStore.GetNumRows(); ++i)
- {
- if(sTaxiNodesStore.LookupEntry(i))
- {
- uint8 field = (uint8)((i - 1) / 32);
- uint32 submask = 1<<((i-1)%32);
- sTaxiNodesMask[field] |= submask;
- }
- }
-
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sTaxiPathStore, dbcPath,"TaxiPath.dbc");
for(uint32 i = 1; i < sTaxiPathStore.GetNumRows(); ++i)
if(TaxiPathEntry const* entry = sTaxiPathStore.LookupEntry(i))
@@ -409,7 +428,10 @@ void LoadDBCStores(const std::string& dataPath)
pathLength.resize(pathCount); // 0 and some other indexes not used
for(uint32 i = 1; i < sTaxiPathNodeStore.GetNumRows(); ++i)
if(TaxiPathNodeEntry const* entry = sTaxiPathNodeStore.LookupEntry(i))
- ++pathLength[entry->path];
+ {
+ if (pathLength[entry->path] < entry->index + 1)
+ pathLength[entry->path] = entry->index + 1;
+ }
// Set path length
sTaxiPathNodesByPath.resize(pathCount); // 0 and some other indexes not used
for(uint32 i = 1; i < sTaxiPathNodesByPath.size(); ++i)
@@ -420,9 +442,53 @@ void LoadDBCStores(const std::string& dataPath)
sTaxiPathNodesByPath[entry->path][entry->index] = TaxiPathNode(entry->mapid,entry->x,entry->y,entry->z,entry->actionFlag,entry->delay);
sTaxiPathNodeStore.Clear();
+ // Initialize global taxinodes mask
+ // include existed nodes that have at least single not spell base (scripted) path
+ {
+ std::set<uint32> spellPaths;
+ for(uint32 i = 1; i < sSpellStore.GetNumRows (); ++i)
+ if(SpellEntry const* sInfo = sSpellStore.LookupEntry (i))
+ for(int j=0; j < 3; ++j)
+ if(sInfo->Effect[j]==123 /*SPELL_EFFECT_SEND_TAXI*/)
+ spellPaths.insert(sInfo->EffectMiscValue[j]);
+
+ memset(sTaxiNodesMask,0,sizeof(sTaxiNodesMask));
+ for(uint32 i = 1; i < sTaxiNodesStore.GetNumRows(); ++i)
+ {
+ if(!sTaxiNodesStore.LookupEntry(i))
+ continue;
+
+ TaxiPathSetBySource::const_iterator src_i = sTaxiPathSetBySource.find(i);
+ if(src_i!=sTaxiPathSetBySource.end() && !src_i->second.empty())
+ {
+ bool ok = false;
+ for(TaxiPathSetForSource::const_iterator dest_i = src_i->second.begin();dest_i != src_i->second.end(); ++dest_i)
+ {
+ // not spell path
+ if(spellPaths.find(dest_i->second.ID)==spellPaths.end())
+ {
+ ok = true;
+ break;
+ }
+ }
+
+ if(!ok)
+ continue;
+ }
+
+ // valid taxi netowrk node
+ uint8 field = (uint8)((i - 1) / 32);
+ uint32 submask = 1<<((i-1)%32);
+ sTaxiNodesMask[field] |= submask;
+ }
+ }
+
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sTotemCategoryStore, dbcPath,"TotemCategory.dbc");
+ LoadDBC(availableDbcLocales,bar,bad_dbc_files,sVehicleStore, dbcPath,"Vehicle.dbc");
+ LoadDBC(availableDbcLocales,bar,bad_dbc_files,sVehicleSeatStore, dbcPath,"VehicleSeat.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sWorldMapAreaStore, dbcPath,"WorldMapArea.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sWorldSafeLocsStore, dbcPath,"WorldSafeLocs.dbc");
+ LoadDBC(availableDbcLocales,bar,bad_dbc_files,sWorldMapOverlayStore, dbcPath,"WorldMapOverlay.dbc");
// error checks
if(bad_dbc_files.size() >= DBCFilesCount )
@@ -440,28 +506,21 @@ void LoadDBCStores(const std::string& dataPath)
exit(1);
}
- // check at up-to-date DBC files (53085 is last added spell in 2.4.3)
- // check at up-to-date DBC files (17514 is last ID in SkillLineAbilities in 2.4.3)
- // check at up-to-date DBC files (598 is last map added in 2.4.3)
- // check at up-to-date DBC files (1127 is last gem property added in 2.4.3)
- // check at up-to-date DBC files (2425 is last item extended cost added in 2.4.3)
- // check at up-to-date DBC files (71 is last char title added in 2.4.3)
- // check at up-to-date DBC files (1768 is last area added in 2.4.3)
- if( !sSpellStore.LookupEntry(53085) ||
- !sSkillLineAbilityStore.LookupEntry(17514) ||
- !sMapStore.LookupEntry(598) ||
- !sGemPropertiesStore.LookupEntry(1127) ||
- !sItemExtendedCostStore.LookupEntry(2425) ||
- !sCharTitlesStore.LookupEntry(71) ||
- !sAreaStore.LookupEntry(1768) )
+ // Check loaded DBC files proper version
+ if( !sSpellStore.LookupEntry(62735) || // last added spell in 3.0.9
+ !sMapStore.LookupEntry(624) || // last map added in 3.0.8a/3.0.9
+ !sGemPropertiesStore.LookupEntry(1557) || // last gem property added in 3.0.8a/3.0.9
+ !sItemExtendedCostStore.LookupEntry(2589) || // last item extended cost added in 3.0.8a/3.0.9
+ !sCharTitlesStore.LookupEntry(144) || // last char title added in 3.0.8a/3.0.9
+ !sAreaStore.LookupEntry(2769) || // last area (areaflag) added in 3.0.8a/3.0.9
+ !sItemStore.LookupEntry(45037) ) // last client known item added in 3.0.9
{
sLog.outError("\nYou have _outdated_ DBC files. Please extract correct versions from current using client.");
exit(1);
}
sLog.outString();
- sLog.outString( ">> Loaded %d data stores", DBCFilesCount );
- sLog.outString();
+ sLog.outString( ">> Initialized %d data stores", DBCFilesCount );
}
SimpleFactionsList const* GetFactionTeamList(uint32 faction)
@@ -539,7 +598,7 @@ uint32 GetAreaFlagByMapId(uint32 mapid)
uint32 GetVirtualMapForMapAndZone(uint32 mapid, uint32 zoneId)
{
- if(mapid != 530) // speed for most cases
+ if(mapid != 530 && mapid != 571) // speed for most cases
return mapid;
if(WorldMapAreaEntry const* wma = sWorldMapAreaStore.LookupEntry(zoneId))
@@ -651,4 +710,6 @@ uint32 const* GetTalentTabPages(uint32 cls)
TRINITY_DLL_SPEC DBCStorage <SoundEntriesEntry> const* GetSoundEntriesStore() { return &sSoundEntriesStore; }
TRINITY_DLL_SPEC DBCStorage <SpellEntry> const* GetSpellStore() { return &sSpellStore; }
TRINITY_DLL_SPEC DBCStorage <SpellRangeEntry> const* GetSpellRangeStore() { return &sSpellRangeStore; }
-
+TRINITY_DLL_SPEC DBCStorage <FactionEntry> const* GetFactionStore() { return &sFactionStore; }
+TRINITY_DLL_SPEC DBCStorage <ItemEntry> const* GetItemDisplayStore() { return &sItemStore; }
+TRINITY_DLL_SPEC DBCStorage <CreatureDisplayInfoEntry> const* GetCreatureDisplayStore() { return &sCreatureDisplayInfoStore; }
diff --git a/src/shared/Database/DBCStores.h b/src/shared/Database/DBCStores.h
index 4ad275653e7..f915a613b71 100644
--- a/src/shared/Database/DBCStores.h
+++ b/src/shared/Database/DBCStores.h
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
+ * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
- * Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
+ * 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
@@ -132,10 +132,14 @@ class DBCStorage
StringPoolList m_stringPoolList;
};
+extern DBCStorage <AchievementEntry> sAchievementStore;
+extern DBCStorage <AchievementCriteriaEntry> sAchievementCriteriaStore;
extern DBCStorage <AreaTableEntry> sAreaStore;// recommend access using functions
+extern DBCStorage <AreaGroupEntry> sAreaGroupStore;
extern DBCStorage <AreaTriggerEntry> sAreaTriggerStore;
extern DBCStorage <AuctionHouseEntry> sAuctionHouseStore;
extern DBCStorage <BankBagSlotPricesEntry> sBankBagSlotPricesStore;
+extern DBCStorage <BarberShopStyleEntry> sBarberShopStyleStore;
extern DBCStorage <BattlemasterListEntry> sBattlemasterListStore;
//extern DBCStorage <ChatChannelsEntry> sChatChannelsStore; -- accessed using function, no usable index
extern DBCStorage <CharStartOutfitEntry> sCharStartOutfitStore;
@@ -145,13 +149,17 @@ extern DBCStorage <ChrRacesEntry> sChrRacesStore;
extern DBCStorage <CreatureDisplayInfoEntry> sCreatureDisplayInfoStore;
extern DBCStorage <CreatureFamilyEntry> sCreatureFamilyStore;
extern DBCStorage <CreatureSpellDataEntry> sCreatureSpellDataStore;
+extern DBCStorage <CreatureTypeEntry> sCreatureTypeStore;
extern DBCStorage <DurabilityCostsEntry> sDurabilityCostsStore;
extern DBCStorage <DurabilityQualityEntry> sDurabilityQualityStore;
extern DBCStorage <EmotesTextEntry> sEmotesTextStore;
extern DBCStorage <FactionEntry> sFactionStore;
extern DBCStorage <FactionTemplateEntry> sFactionTemplateStore;
extern DBCStorage <GemPropertiesEntry> sGemPropertiesStore;
+extern DBCStorage <GlyphPropertiesEntry> sGlyphPropertiesStore;
+extern DBCStorage <GlyphSlotEntry> sGlyphSlotStore;
+extern DBCStorage <GtBarberShopCostBaseEntry> sGtBarberShopCostBaseStore;
extern DBCStorage <GtCombatRatingsEntry> sGtCombatRatingsStore;
extern DBCStorage <GtChanceToMeleeCritBaseEntry> sGtChanceToMeleeCritBaseStore;
extern DBCStorage <GtChanceToMeleeCritEntry> sGtChanceToMeleeCritStore;
@@ -161,9 +169,11 @@ extern DBCStorage <GtOCTRegenHPEntry> sGtOCTRegenHPStore;
//extern DBCStorage <GtOCTRegenMPEntry> sGtOCTRegenMPStore; -- not used currently
extern DBCStorage <GtRegenHPPerSptEntry> sGtRegenHPPerSptStore;
extern DBCStorage <GtRegenMPPerSptEntry> sGtRegenMPPerSptStore;
+extern DBCStorage <HolidaysEntry> sHolidaysStore;
extern DBCStorage <ItemEntry> sItemStore;
//extern DBCStorage <ItemDisplayInfoEntry> sItemDisplayInfoStore; -- not used currently
extern DBCStorage <ItemExtendedCostEntry> sItemExtendedCostStore;
+extern DBCStorage <ItemLimitCategoryEntry> sItemLimitCategoryStore;
extern DBCStorage <ItemRandomPropertiesEntry> sItemRandomPropertiesStore;
extern DBCStorage <ItemRandomSuffixEntry> sItemRandomSuffixStore;
extern DBCStorage <ItemSetEntry> sItemSetStore;
@@ -172,6 +182,8 @@ extern DBCStorage <MailTemplateEntry> sMailTemplateStore;
extern DBCStorage <MapEntry> sMapStore;
extern DBCStorage <QuestSortEntry> sQuestSortStore;
extern DBCStorage <RandomPropertiesPointsEntry> sRandomPropertiesPointsStore;
+extern DBCStorage <ScalingStatDistributionEntry> sScalingStatDistributionStore;
+extern DBCStorage <ScalingStatValuesEntry> sScalingStatValuesStore;
extern DBCStorage <SkillLineEntry> sSkillLineStore;
extern DBCStorage <SkillLineAbilityEntry> sSkillLineAbilityStore;
extern DBCStorage <SoundEntriesEntry> sSoundEntriesStore;
@@ -184,9 +196,11 @@ extern SpellCategoryStore sSpellCategoryStore;
extern PetFamilySpellsStore sPetFamilySpellsStore;
extern DBCStorage <SpellRadiusEntry> sSpellRadiusStore;
extern DBCStorage <SpellRangeEntry> sSpellRangeStore;
+extern DBCStorage <SpellRuneCostEntry> sSpellRuneCostStore;
extern DBCStorage <SpellShapeshiftEntry> sSpellShapeshiftStore;
extern DBCStorage <SpellEntry> sSpellStore;
extern DBCStorage <StableSlotPricesEntry> sStableSlotPricesStore;
+//extern DBCStorage <SummonPropertiesEntry> sSummonPropertiesStore;
extern DBCStorage <TalentEntry> sTalentStore;
extern DBCStorage <TalentTabEntry> sTalentTabStore;
extern DBCStorage <TaxiNodesEntry> sTaxiNodesStore;
@@ -195,8 +209,11 @@ extern TaxiMask sTaxiNodesMask;
extern TaxiPathSetBySource sTaxiPathSetBySource;
extern TaxiPathNodesByPath sTaxiPathNodesByPath;
extern DBCStorage <TotemCategoryEntry> sTotemCategoryStore;
+extern DBCStorage <VehicleEntry> sVehicleStore;
+extern DBCStorage <VehicleSeatEntry> sVehicleSeatStore;
//extern DBCStorage <WorldMapAreaEntry> sWorldMapAreaStore; -- use Zone2MapCoordinates and Map2ZoneCoordinates
extern DBCStorage <WorldSafeLocsEntry> sWorldSafeLocsStore;
+extern DBCStorage <WorldMapOverlayEntry> sWorldMapOverlayStore;
void LoadDBCStores(const std::string& dataPath);
@@ -204,5 +221,8 @@ void LoadDBCStores(const std::string& dataPath);
TRINITY_DLL_SPEC DBCStorage <SoundEntriesEntry> const* GetSoundEntriesStore();
TRINITY_DLL_SPEC DBCStorage <SpellEntry> const* GetSpellStore();
TRINITY_DLL_SPEC DBCStorage <SpellRangeEntry> const* GetSpellRangeStore();
+TRINITY_DLL_SPEC DBCStorage <FactionEntry> const* GetFactionStore();
+TRINITY_DLL_SPEC DBCStorage <ItemEntry> const* GetItemDisplayStore();
+TRINITY_DLL_SPEC DBCStorage <CreatureDisplayInfoEntry> const* GetCreatureDisplayStore();
#endif
diff --git a/src/shared/Database/DBCStructure.h b/src/shared/Database/DBCStructure.h
index 95703f9b778..8f2fa87e17f 100644
--- a/src/shared/Database/DBCStructure.h
+++ b/src/shared/Database/DBCStructure.h
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
+ * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
- * Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
+ * 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
@@ -23,6 +23,7 @@
#include "DBCEnums.h"
#include "Platform/Define.h"
+#include "Util.h"
#include <map>
#include <set>
@@ -37,67 +38,543 @@
#pragma pack(push,1)
#endif
-struct AreaTableEntry
+struct AchievementEntry
{
uint32 ID; // 0
- uint32 mapid; // 1
- uint32 zone; // 2 if 0 then it's zone, else it's zone id of this area
- uint32 exploreFlag; // 3, main index
- uint32 flags; // 4, unknown value but 312 for all cities
+ uint32 factionFlag; // 1 -1=all, 0=horde, 1=alliance
+ uint32 mapID; // 2 -1=none
+ //uint32 parentAchievement; // 3 its Achievement parent (can`t start while parent uncomplete, use its Criteria if don`t have own, use its progress on begin)
+ //char *name[16]; // 4-19
+ //uint32 name_flags; // 20
+ //char *description[16]; // 21-36
+ //uint32 desc_flags; // 37
+ uint32 categoryId; // 38
+ uint32 points; // 39 reward points
+ //uint32 OrderInCategory; // 40
+ uint32 flags; // 41
+ //uint32 icon; // 42 icon (from SpellIcon.dbc)
+ //char *titleReward[16]; // 43-58
+ //uint32 titleReward_flags; // 59
+ //uint32 count; // 60 - need this count Criteria for complete
+ uint32 refAchievement; // 61 - related achievement?
+};
+
+struct AchievementCategoryEntry
+{
+ uint32 ID; // 0
+ uint32 parentCategory; // 1 -1 for main category
+ //char *name[16]; // 2-17
+ //uint32 name_flags; // 18
+ //uint32 sortOrder; // 19
+};
+
+struct AchievementCriteriaEntry
+{
+ uint32 ID; // 0
+ uint32 referredAchievement; // 1
+ uint32 requiredType; // 2
+ union
+ {
+ // ACHIEVEMENT_CRITERIA_TYPE_KILL_CREATURE = 0
+ // TODO: also used for player deaths..
+ struct
+ {
+ uint32 creatureID; // 3
+ uint32 creatureCount; // 4
+ } kill_creature;
+
+ // ACHIEVEMENT_CRITERIA_TYPE_WIN_BG = 1
+ // TODO: there are further criterias instead just winning
+ struct
+ {
+ uint32 bgMapID; // 3
+ uint32 winCount; // 4
+ } win_bg;
+
+ // ACHIEVEMENT_CRITERIA_TYPE_REACH_LEVEL = 5
+ struct
+ {
+ uint32 unused; // 3
+ uint32 level; // 4
+ } reach_level;
+
+ // ACHIEVEMENT_CRITERIA_TYPE_REACH_SKILL_LEVEL = 7
+ struct
+ {
+ uint32 skillID; // 3
+ uint32 skillLevel; // 4
+ } reach_skill_level;
+
+ // ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_ACHIEVEMENT = 8
+ struct
+ {
+ uint32 linkedAchievement; // 3
+ } complete_achievement;
+
+ // ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_QUEST_COUNT = 9
+ struct
+ {
+ uint32 unused; // 3
+ uint32 totalQuestCount; // 4
+ } complete_quest_count;
+
+ // ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_DAILY_QUEST_DAILY = 10
+ struct
+ {
+ uint32 unused; // 3
+ uint32 numberOfDays; // 4
+ } complete_daily_quest_daily;
+
+ // ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_QUESTS_IN_ZONE = 11
+ struct
+ {
+ uint32 zoneID; // 3
+ uint32 questCount; // 4
+ } complete_quests_in_zone;
+
+ // ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_DAILY_QUEST = 14
+ struct
+ {
+ uint32 unused; // 3
+ uint32 questCount; // 4
+ } complete_daily_quest;
+
+ // ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_BATTLEGROUND = 15
+ struct
+ {
+ uint32 mapID; // 3
+ } complete_battleground;
+
+ // ACHIEVEMENT_CRITERIA_TYPE_DEATH_AT_MAP = 16
+ struct
+ {
+ uint32 mapID; // 3
+ } death_at_map;
+
+ // ACHIEVEMENT_CRITERIA_TYPE_DEATH_IN_DUNGEON = 18
+ struct
+ {
+ uint32 manLimit; // 3
+ } death_in_dungeon;
+
+ // ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_RAID = 19
+ struct
+ {
+ uint32 groupSize; // 3 can be 5, 10 or 25
+ } complete_raid;
+
+ // ACHIEVEMENT_CRITERIA_TYPE_KILLED_BY_CREATURE = 20
+ struct
+ {
+ uint32 creatureEntry; // 3
+ } killed_by_creature;
+
+ // ACHIEVEMENT_CRITERIA_TYPE_FALL_WITHOUT_DYING = 24
+ struct
+ {
+ uint32 unused; // 3
+ uint32 fallHeight; // 4
+ } fall_without_dying;
+
+ // ACHIEVEMENT_CRITERIA_TYPE_DEATHS_FROM = 26
+ struct
+ {
+ uint32 type; // 3, see enum EnviromentalDamage
+ } death_from;
+
+ // ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_QUEST = 27
+ struct
+ {
+ uint32 questID; // 3
+ uint32 questCount; // 4
+ } complete_quest;
+
+ // ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET = 28
+ // ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET2 = 69
+ struct
+ {
+ uint32 spellID; // 3
+ uint32 spellCount; // 4
+ } be_spell_target;
+
+ // ACHIEVEMENT_CRITERIA_TYPE_CAST_SPELL = 29
+ // ACHIEVEMENT_CRITERIA_TYPE_CAST_SPELL2 = 110
+ struct
+ {
+ uint32 spellID; // 3
+ uint32 castCount; // 4
+ } cast_spell;
+
+ // ACHIEVEMENT_CRITERIA_TYPE_HONORABLE_KILL_AT_AREA = 31
+ struct
+ {
+ uint32 areaID; // 3 Reference to AreaTable.dbc
+ uint32 killCount; // 4
+ } honorable_kill_at_area;
+
+ // ACHIEVEMENT_CRITERIA_TYPE_WIN_ARENA = 32
+ struct
+ {
+ uint32 mapID; // 3 Reference to Map.dbc
+ } win_arena;
+
+ // ACHIEVEMENT_CRITERIA_TYPE_PLAY_ARENA = 33
+ struct
+ {
+ uint32 mapID; // 3 Reference to Map.dbc
+ } play_arena;
+
+ // ACHIEVEMENT_CRITERIA_TYPE_LEARN_SPELL = 34
+ struct
+ {
+ uint32 spellID; // 3 Reference to Map.dbc
+ } learn_spell;
+
+ // ACHIEVEMENT_CRITERIA_TYPE_OWN_ITEM = 36
+ struct
+ {
+ uint32 itemID; // 3
+ uint32 itemCount; // 4
+ } own_item;
+
+ // ACHIEVEMENT_CRITERIA_TYPE_WIN_RATED_ARENA = 37
+ struct
+ {
+ uint32 unused; // 3
+ uint32 count; // 4
+ uint32 flag; // 5 4=in a row
+ } win_rated_arena;
+
+ // ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_TEAM_RATING = 38
+ struct
+ {
+ uint32 teamtype; // 3 {2,3,5}
+ } highest_team_rating;
+
+ // ACHIEVEMENT_CRITERIA_TYPE_REACH_TEAM_RATING = 39
+ struct
+ {
+ uint32 teamtype; // 3 {2,3,5}
+ uint32 teamrating; // 4
+ } reach_team_rating;
+
+ // ACHIEVEMENT_CRITERIA_TYPE_LEARN_SKILL_LEVEL = 40
+ struct
+ {
+ uint32 skillID; // 3
+ uint32 skillLevel; // 4 apprentice=1, journeyman=2, expert=3, artisan=4, master=5, grand master=6
+ } learn_skill_level;
+
+ // ACHIEVEMENT_CRITERIA_TYPE_USE_ITEM = 41
+ struct
+ {
+ uint32 itemID; // 3
+ uint32 itemCount; // 4
+ } use_item;
+
+ // ACHIEVEMENT_CRITERIA_TYPE_LOOT_ITEM = 42
+ struct
+ {
+ uint32 itemID; // 3
+ uint32 itemCount; // 4
+ } loot_item;
+
+ // ACHIEVEMENT_CRITERIA_TYPE_EXPLORE_AREA = 43
+ struct
+ {
+ // TODO: This rank is _NOT_ the index from AreaTable.dbc
+ uint32 areaReference; // 3
+ } explore_area;
+
+ // ACHIEVEMENT_CRITERIA_TYPE_OWN_RANK = 44
+ struct
+ {
+ // TODO: This rank is _NOT_ the index from CharTitles.dbc
+ uint32 rank; // 3
+ } own_rank;
+
+ // ACHIEVEMENT_CRITERIA_TYPE_BUY_BANK_SLOT = 45
+ struct
+ {
+ uint32 unused; // 3
+ uint32 numberOfSlots; // 4
+ } buy_bank_slot;
+
+ // ACHIEVEMENT_CRITERIA_TYPE_GAIN_REPUTATION = 46
+ struct
+ {
+ uint32 factionID; // 3
+ uint32 reputationAmount; // 4 Total reputation amount, so 42000 = exalted
+ } gain_reputation;
+
+ // ACHIEVEMENT_CRITERIA_TYPE_GAIN_EXALTED_REPUTATION= 47
+ struct
+ {
+ uint32 unused; // 3
+ uint32 numberOfExaltedFactions; // 4
+ } gain_exalted_reputation;
+
+ // ACHIEVEMENT_CRITERIA_TYPE_VISIT_BARBER_SHOP = 48
+ struct
+ {
+ uint32 unused; // 3
+ uint32 numberOfVisits; // 4
+ } visit_barber;
+
+ // ACHIEVEMENT_CRITERIA_TYPE_EQUIP_EPIC_ITEM = 49
+ // TODO: where is the required itemlevel stored?
+ struct
+ {
+ uint32 itemSlot; // 3
+ } equip_epic_item;
+
+ // ACHIEVEMENT_CRITERIA_TYPE_ROLL_NEED_ON_LOOT = 50
+ struct
+ {
+ uint32 rollValue; // 3
+ uint32 count; // 4
+ } roll_need_on_loot;
+ // ACHIEVEMENT_CRITERIA_TYPE_ROLL_GREED_ON_LOOT = 51
+ struct
+ {
+ uint32 rollValue; // 3
+ uint32 count; // 4
+ } roll_greed_on_loot;
+
+ // ACHIEVEMENT_CRITERIA_TYPE_HK_CLASS = 52
+ struct
+ {
+ uint32 classID; // 3
+ uint32 count; // 4
+ } hk_class;
+
+ // ACHIEVEMENT_CRITERIA_TYPE_HK_RACE = 53
+ struct
+ {
+ uint32 raceID; // 3
+ uint32 count; // 4
+ } hk_race;
+
+ // ACHIEVEMENT_CRITERIA_TYPE_DO_EMOTE = 54
+ // TODO: where is the information about the target stored?
+ struct
+ {
+ uint32 emoteID; // 3 enum TextEmotes
+ uint32 count; // 4 count of emotes, always required special target or requirements
+ } do_emote;
+ // ACHIEVEMENT_CRITERIA_TYPE_DAMAGE_DONE = 13
+ // ACHIEVEMENT_CRITERIA_TYPE_HEALING_DONE = 55
+ // ACHIEVEMENT_CRITERIA_TYPE_GET_KILLING_BLOWS = 56
+ struct
+ {
+ uint32 unused; // 3
+ uint32 count; // 4
+ uint32 flag; // 5 =3 for battleground healing
+ uint32 mapid; // 6
+ } healing_done;
+
+ // ACHIEVEMENT_CRITERIA_TYPE_EQUIP_ITEM = 57
+ struct
+ {
+ uint32 itemID; // 3
+ } equip_item;
+
+ // ACHIEVEMENT_CRITERIA_TYPE_MONEY_FROM_QUEST_REWARD= 62
+ struct
+ {
+ uint32 unused; // 3
+ uint32 goldInCopper; // 4
+ } quest_reward_money;
+
+
+ // ACHIEVEMENT_CRITERIA_TYPE_LOOT_MONEY = 67
+ struct
+ {
+ uint32 unused; // 3
+ uint32 goldInCopper; // 4
+ } loot_money;
+
+ // ACHIEVEMENT_CRITERIA_TYPE_USE_GAMEOBJECT = 68
+ struct
+ {
+ uint32 goEntry; // 3
+ uint32 useCount; // 4
+ } use_gameobject;
+
+ // ACHIEVEMENT_CRITERIA_TYPE_SPECIAL_PVP_KILL = 70
+ // TODO: are those special criteria stored in the dbc or do we have to add another sql table?
+ struct
+ {
+ uint32 unused; // 3
+ uint32 killCount; // 4
+ } special_pvp_kill;
+
+ // ACHIEVEMENT_CRITERIA_TYPE_FISH_IN_GAMEOBJECT = 72
+ struct
+ {
+ uint32 goEntry; // 3
+ uint32 lootCount; // 4
+ } fish_in_gameobject;
+
+ // ACHIEVEMENT_CRITERIA_TYPE_LEARN_SKILLLINE_SPELLS = 75
+ struct
+ {
+ uint32 skillLine; // 3
+ uint32 spellCount; // 4
+ } learn_skilline_spell;
+
+ // ACHIEVEMENT_CRITERIA_TYPE_WIN_DUEL = 76
+ struct
+ {
+ uint32 unused; // 3
+ uint32 duelCount; // 4
+ } win_duel;
+
+ // ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_POWER = 96
+ struct
+ {
+ uint32 powerType; // 3 mana=0, 1=rage, 3=energy, 6=runic power
+ } highest_power;
+
+ // ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_STAT = 97
+ struct
+ {
+ uint32 statType; // 3 4=spirit, 3=int, 2=stamina, 1=agi, 0=strength
+ } highest_stat;
+
+ // ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_SPELLPOWER = 98
+ struct
+ {
+ uint32 spellSchool; // 3
+ } highest_spellpower;
+
+ // ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_RATING = 100
+ struct
+ {
+ uint32 ratingType; // 3
+ } highest_rating;
+
+ // ACHIEVEMENT_CRITERIA_TYPE_LOOT_TYPE = 109
+ struct
+ {
+ uint32 lootType; // 3 3=fishing, 2=pickpocket, 4=disentchant
+ uint32 lootTypeCount; // 4
+ } loot_type;
+
+ // ACHIEVEMENT_CRITERIA_TYPE_LEARN_SKILL_LINE = 112
+ struct
+ {
+ uint32 skillLine; // 3
+ uint32 spellCount; // 4
+ } learn_skill_line;
+
+ // ACHIEVEMENT_CRITERIA_TYPE_EARN_HONORABLE_KILL = 113
+ struct
+ {
+ uint32 unused; // 3
+ uint32 killCount; // 4
+ } honorable_kill;
+
+ struct
+ {
+ uint32 field3; // 3 main requirement
+ uint32 field4; // 4 main requirement count
+ uint32 additionalRequirement1_type; // 5 additional requirement 1 type
+ uint32 additionalRequirement1_value; // 6 additional requirement 1 value
+ uint32 additionalRequirement2_type; // 7 additional requirement 2 type
+ uint32 additionalRequirement2_value; // 8 additional requirement 1 value
+ } raw;
+ };
+ //char* name[16]; // 9-24
+ //uint32 name_flags; // 25
+ uint32 completionFlag; // 26
+ uint32 groupFlag; // 27
+ //uint32 unk1; // 28
+ uint32 timeLimit; // 29 time limit in seconds
+ //uint32 showOrder; // 30 show order
+};
+
+struct AreaTableEntry
+{
+ uint32 ID; // 0
+ uint32 mapid; // 1
+ uint32 zone; // 2 if 0 then it's zone, else it's zone id of this area
+ uint32 exploreFlag; // 3, main index
+ uint32 flags; // 4, unknown value but 312 for all cities
// 5-9 unused
- int32 area_level; // 10
- char* area_name[16]; // 11-26
+ int32 area_level; // 10
+ char* area_name[16]; // 11-26
// 27, string flags, unused
- uint32 team; // 28
+ uint32 team; // 28
+};
+
+struct AreaGroupEntry
+{
+ uint32 AreaGroupId; // 0
+ uint32 AreaId[7]; // 1-7
};
struct AreaTriggerEntry
{
- uint32 id; // 0
- uint32 mapid; // 1
- float x; // 2
- float y; // 3
- float z; // 4
- float radius; // 5
- float box_x; // 6 extent x edge
- float box_y; // 7 extent y edge
- float box_z; // 8 extent z edge
- float box_orientation; // 9 extent rotation by about z axis
+ uint32 id; // 0 m_ID
+ uint32 mapid; // 1 m_ContinentID
+ float x; // 2 m_x
+ float y; // 3 m_y
+ float z; // 4 m_z
+ float radius; // 5 m_radius
+ float box_x; // 6 m_box_length
+ float box_y; // 7 m_box_width
+ float box_z; // 8 m_box_heigh
+ float box_orientation; // 9 m_box_yaw
};
struct AuctionHouseEntry
{
- uint32 houseId; // 0 index
- uint32 faction; // 1 id of faction.dbc for player factions associated with city
- uint32 depositPercent; // 2 1/3 from real
- uint32 cutPercent; // 3
- //char* name[16]; // 4-19
+ uint32 houseId; // 0 index
+ uint32 faction; // 1 id of faction.dbc for player factions associated with city
+ uint32 depositPercent; // 2 1/3 from real
+ uint32 cutPercent; // 3
+ //char* name[16]; // 4-19
// 20 string flag, unused
};
struct BankBagSlotPricesEntry
{
- uint32 ID;
- uint32 price;
+ uint32 ID;
+ uint32 price;
+};
+
+struct BarberShopStyleEntry
+{
+ uint32 Id; // 0
+ uint32 type; // 1 value 0 -> hair, value 2 -> facialhair
+ //char* name[16]; // 2-17 name of hair style
+ //uint32 name_flags; // 18
+ //uint32 unk_name[16]; // 19-34, all empty
+ //uint32 unk_flags; // 35
+ //float CostMultiplier; // 36 values 1 and 0.75
+ uint32 race; // 37 race
+ uint32 gender; // 38 0 -> male, 1 -> female
+ uint32 hair_id; // 39 real ID to hair/facial hair
};
struct BattlemasterListEntry
{
- uint32 id; // 0
- uint32 mapid[3]; // 1-3 mapid
- // 4-8 unused
- uint32 type; // 9 (3 - BG, 4 - arena)
- uint32 minlvl; // 10
- uint32 maxlvl; // 11
- uint32 maxplayersperteam; // 12
- // 13-14 unused
- char* name[16]; // 15-30
- // 31 string flag, unused
- // 32 unused
+ uint32 id; // 0
+ int32 mapid[8]; // 1-8 mapid
+ uint32 type; // 9 (3 - BG, 4 - arena)
+ uint32 minlvl; // 10
+ uint32 maxlvl; // 11
+ uint32 maxplayersperteam; // 12
+ // 13 minplayers
+ // 14 0 or 9
+ // 15
+ char* name[16]; // 16-31
+ // 32 string flag, unused
+ // 33 unused
};
-#define MAX_OUTFIT_ITEMS 12
-// #define MAX_OUTFIT_ITEMS 24 // 12->24 in 3.0.x
+#define MAX_OUTFIT_ITEMS 24
struct CharStartOutfitEntry
{
@@ -113,20 +590,20 @@ struct CharStartOutfitEntry
struct CharTitlesEntry
{
- uint32 ID; // 0, title ids, for example in Quest::GetCharTitleId()
+ uint32 ID; // 0, title ids, for example in Quest::GetCharTitleId()
//uint32 unk1; // 1 flags?
//char* name[16]; // 2-17, unused
// 18 string flag, unused
//char* name2[16]; // 19-34, unused
// 35 string flag, unused
- uint32 bit_index; // 36 used in PLAYER_CHOSEN_TITLE and 1<<index in PLAYER__FIELD_KNOWN_TITLES
+ uint32 bit_index; // 36 used in PLAYER_CHOSEN_TITLE and 1<<index in PLAYER__FIELD_KNOWN_TITLES
};
struct ChatChannelsEntry
{
- uint32 ChannelID; // 0
- uint32 flags; // 1
- char* pattern[16]; // 3-18
+ uint32 ChannelID; // 0
+ uint32 flags; // 1
+ char* pattern[16]; // 3-18
// 19 string flags, unused
//char* name[16]; // 20-35 unused
// 36 string flag, unused
@@ -134,20 +611,21 @@ struct ChatChannelsEntry
struct ChrClassesEntry
{
- uint32 ClassID; // 0
- // 1-2, unused
- uint32 powerType; // 3
- // 4, unused
+ uint32 ClassID; // 0
+ // 1, unused
+ uint32 powerType; // 2
+ // 3-4, unused
//char* name[16]; // 5-20 unused
- char* name[16]; // 5-20 unused
// 21 string flag, unused
//char* nameFemale[16]; // 21-36 unused, if different from base (male) case
// 37 string flag, unused
//char* nameNeutralGender[16]; // 38-53 unused, if different from base (male) case
// 54 string flag, unused
// 55, unused
- uint32 spellfamily; // 56
+ uint32 spellfamily; // 56
// 57, unused
+ uint32 CinematicSequence; // 58 id from CinematicSequences.dbc
+ uint32 addon; // 59 (0 - original race, 1 - tbc addon, ...)
};
struct ChrRacesEntry
@@ -161,7 +639,7 @@ struct ChrRacesEntry
// 6-7 unused
uint32 TeamID; // 8 (7-Alliance 1-Horde)
// 9-12 unused
- uint32 startmovie; // 13 id from CinematicCamera.dbc
+ uint32 CinematicSequence; // 13 id from CinematicSequences.dbc
char* name[16]; // 14-29 used for DBC language detection/selection
// 30 string flags, unused
//char* nameFemale[16]; // 31-46, if different from base (male) case
@@ -174,30 +652,51 @@ struct ChrRacesEntry
struct CreatureDisplayInfoEntry
{
- uint32 Displayid; // 0
- // 1-3,unused
- float scale; // 4
- // 5-13,unused
+ uint32 Displayid; // 0 m_ID
+ // 1 m_modelID
+ // 2 m_soundID
+ // 3 m_extendedDisplayInfoID
+ float scale; // 4 m_creatureModelScale
+ // 5 m_creatureModelAlpha
+ // 6-8 m_textureVariation[3]
+ // 9 m_portraitTextureName
+ // 10 m_sizeClass
+ // 11 m_bloodID
+ // 12 m_NPCSoundID
+ // 13 m_particleColorID
+ // 14 m_creatureGeosetData
+ // 15 m_objectEffectPackageID
};
struct CreatureFamilyEntry
{
- uint32 ID; // 0
- float minScale; // 1
- uint32 minScaleLevel; // 2 0/1
- float maxScale; // 3
- uint32 maxScaleLevel; // 4 0/60
- uint32 skillLine[2]; // 5-6
- uint32 petFoodMask; // 7
- char* Name[16]; // 8-23
- // 24 string flags, unused
- // 25 icon, unused
+ uint32 ID; // 0 m_ID
+ float minScale; // 1 m_minScale
+ uint32 minScaleLevel; // 2 m_minScaleLevel
+ float maxScale; // 3 m_maxScale
+ uint32 maxScaleLevel; // 4 m_maxScaleLevel
+ uint32 skillLine[2]; // 5-6 m_skillLine
+ uint32 petFoodMask; // 7 m_petFoodMask
+ int32 petTalentType; // 8 m_petTalentType
+ // 9 m_categoryEnumID
+ char* Name[16]; // 10-25 m_name_lang
+ // 26 string flags
+ // 27 m_iconFile
};
struct CreatureSpellDataEntry
{
- uint32 ID; // 0
- //uint32 spellId[4]; // 1-4 hunter pet learned spell (for later use)
+ uint32 ID; // 0 m_ID
+ //uint32 spellId[4]; // 1-4 m_spells[4]
+ //uint32 availability[4]; // 4-7 m_availability[4]
+};
+
+struct CreatureTypeEntry
+{
+ uint32 ID; // 0 m_ID
+ //char* Name[16]; // 1-16 name
+ // 17 string flags
+ //uint32 no_expirience; // 18 no exp? critters, non-combat pets, gas cloud.
};
struct DurabilityCostsEntry
@@ -214,41 +713,35 @@ struct DurabilityQualityEntry
struct EmotesTextEntry
{
- uint32 Id;
- uint32 textid;
+ uint32 Id;
+ uint32 textid;
};
struct FactionEntry
{
- uint32 ID; // 0
- int32 reputationListID; // 1
- uint32 BaseRepRaceMask[4]; // 2-5 Base reputation race masks (see enum Races)
- uint32 BaseRepClassMask[4]; // 6-9 Base reputation class masks (see enum Classes)
- int32 BaseRepValue[4]; // 10-13 Base reputation values
- uint32 ReputationFlags[4]; // 14-17 Default flags to apply
- uint32 team; // 18 enum Team
- char* name[16]; // 19-34
- // 35 string flags, unused
- //char* description[16]; // 36-51 unused
- // 52 string flags, unused
+ uint32 ID; // 0 m_ID
+ int32 reputationListID; // 1 m_reputationIndex
+ uint32 BaseRepRaceMask[4]; // 2-5 m_reputationRaceMask
+ uint32 BaseRepClassMask[4]; // 6-9 m_reputationClassMask
+ int32 BaseRepValue[4]; // 10-13 m_reputationBase
+ uint32 ReputationFlags[4]; // 14-17 m_reputationFlags
+ uint32 team; // 18 m_parentFactionID
+ char* name[16]; // 19-34 m_name_lang
+ // 35 string flags
+ //char* description[16]; // 36-51 m_description_lang
+ // 52 string flags
};
struct FactionTemplateEntry
{
- uint32 ID; // 0
- uint32 faction; // 1
- uint32 factionFlags; // 2 specific flags for that faction
- uint32 ourMask; // 3 if mask set (see FactionMasks) then faction included in masked team
- uint32 friendlyMask; // 4 if mask set (see FactionMasks) then faction friendly to masked team
- uint32 hostileMask; // 5 if mask set (see FactionMasks) then faction hostile to masked team
- uint32 enemyFaction1; // 6
- uint32 enemyFaction2; // 7
- uint32 enemyFaction3; // 8
- uint32 enemyFaction4; // 9
- uint32 friendFaction1; // 10
- uint32 friendFaction2; // 11
- uint32 friendFaction3; // 12
- uint32 friendFaction4; // 13
+ uint32 ID; // 0 m_ID
+ uint32 faction; // 1 m_faction
+ uint32 factionFlags; // 2 m_flags
+ uint32 ourMask; // 3 m_factionGroup
+ uint32 friendlyMask; // 4 m_friendGroup
+ uint32 hostileMask; // 5 m_enemyGroup
+ uint32 enemyFaction[4]; // 6 m_enemies[4]
+ uint32 friendFaction[4]; // 10 m_friend[4]
//------------------------------------------------------- end structure
// helpers
@@ -256,24 +749,40 @@ struct FactionTemplateEntry
{
if(ID == entry.ID)
return true;
- if(enemyFaction1 == entry.faction || enemyFaction2 == entry.faction || enemyFaction3 == entry.faction || enemyFaction4 == entry.faction )
- return false;
- if(friendFaction1 == entry.faction || friendFaction2 == entry.faction || friendFaction3 == entry.faction || friendFaction4 == entry.faction )
- return true;
+ if(entry.faction)
+ {
+ for(int i = 0; i < 4; ++i)
+ if (enemyFaction[i] == entry.faction)
+ return false;
+ for(int i = 0; i < 4; ++i)
+ if (friendFaction[i] == entry.faction)
+ return true;
+ }
return (friendlyMask & entry.ourMask) || (ourMask & entry.friendlyMask);
}
bool IsHostileTo(FactionTemplateEntry const& entry) const
{
if(ID == entry.ID)
return false;
- if(enemyFaction1 == entry.faction || enemyFaction2 == entry.faction || enemyFaction3 == entry.faction || enemyFaction4 == entry.faction )
- return true;
- if(friendFaction1 == entry.faction || friendFaction2 == entry.faction || friendFaction3 == entry.faction || friendFaction4 == entry.faction )
- return false;
+ if(entry.faction)
+ {
+ for(int i = 0; i < 4; ++i)
+ if (enemyFaction[i] == entry.faction)
+ return true;
+ for(int i = 0; i < 4; ++i)
+ if (friendFaction[i] == entry.faction)
+ return false;
+ }
return (hostileMask & entry.ourMask) != 0;
}
bool IsHostileToPlayers() const { return (hostileMask & FACTION_MASK_PLAYER) !=0; }
- bool IsNeutralToAll() const { return hostileMask == 0 && friendlyMask == 0 && enemyFaction1==0 && enemyFaction2==0 && enemyFaction3==0 && enemyFaction4==0; }
+ bool IsNeutralToAll() const
+ {
+ for(int i = 0; i < 4; ++i)
+ if (enemyFaction[i] != 0)
+ return false;
+ return hostileMask == 0 && friendlyMask == 0;
+ }
bool IsContestedGuardFaction() const { return (factionFlags & FACTION_TEMPLATE_FLAG_CONTESTED_GUARD)!=0; }
};
@@ -284,9 +793,29 @@ struct GemPropertiesEntry
uint32 color;
};
+struct GlyphPropertiesEntry
+{
+ uint32 Id;
+ uint32 SpellId;
+ uint32 TypeFlags;
+ uint32 Unk1; // GlyphIconId (SpellIcon.dbc)
+};
+
+struct GlyphSlotEntry
+{
+ uint32 Id;
+ uint32 TypeFlags;
+ uint32 Order;
+};
+
// All Gt* DBC store data for 100 levels, some by 100 per class/race
#define GT_MAX_LEVEL 100
+struct GtBarberShopCostBaseEntry
+{
+ float cost;
+};
+
struct GtCombatRatingsEntry
{
float ratio;
@@ -332,26 +861,74 @@ struct GtRegenMPPerSptEntry
float ratio;
};
+/* no used
+struct HolidayDescriptionsEntry
+{
+ uint32 ID; // 0, this is NOT holiday id
+ //char* name[16] // 1-16 m_name_lang
+ // 17 name flags
+};
+*/
+
+/* no used
+struct HolidayNamesEntry
+{
+ uint32 ID; // 0, this is NOT holiday id
+ //char* name[16] // 1-16 m_name_lang
+ // 17 name flags
+};
+*/
+
+struct HolidaysEntry
+{
+ uint32 ID; // 0, holiday id
+ //uint32 unk1; // 1
+ //uint32 unk2; // 2
+ //uint32 unk3[8] // 3-10, empty fields
+ //uint32 unk11[13] // 11-23, some unknown data (bit strings?)
+ //uint32 unk11[13] // 24-36, some empty fields (continue prev?)
+ //uint32 unk11[12] // 37-48, counters?
+ //uint32 holidayNameId; // 49, id for HolidayNames.dbc
+ //uint32 holidayDescriptionId; // 50, id for HolidayDescriptions.dbc
+ //uint32 unk51; // 51
+ //uint32 unk52; // 52
+ //uint32 unk53; // 53
+};
+
struct ItemEntry
{
- uint32 ID;
- uint32 DisplayId;
- uint32 InventoryType;
- uint32 Sheath;
+ uint32 ID; // 0
+ uint32 Class; // 1
+ //uint32 SubClass; // 2 some items have strnage subclasses
+ int32 Unk0; // 3
+ int32 Material; // 4
+ uint32 DisplayId; // 5
+ uint32 InventoryType; // 6
+ uint32 Sheath; // 7
};
struct ItemDisplayInfoEntry
{
- uint32 ID;
- uint32 randomPropertyChance;
+ uint32 ID; // 0 m_ID
+ // 1 m_modelName[2]
+ // 2 m_modelTexture[2]
+ // 3 m_inventoryIcon
+ // 4 m_geosetGroup[3]
+ // 5 m_flags
+ // 6 m_spellVisualID
+ // 7 m_groupSoundIndex
+ // 8 m_helmetGeosetVis[2]
+ // 9 m_texture[2]
+ // 10 m_itemVisual[8]
+ // 11 m_particleColorID
};
//struct ItemCondExtCostsEntry
//{
// uint32 ID;
-// uint32 condExtendedCost; // ItemPrototype::CondExtendedCost
-// uint32 itemextendedcostentry; // ItemPrototype::ExtendedCost
-// uint32 arenaseason; // arena season number(1-4)
+// uint32 condExtendedCost; // ItemPrototype::CondExtendedCost
+// uint32 itemextendedcostentry; // ItemPrototype::ExtendedCost
+// uint32 arenaseason; // arena season number(1-4)
//};
struct ItemExtendedCostEntry
@@ -364,49 +941,53 @@ struct ItemExtendedCostEntry
uint32 reqpersonalarenarating; // 13 required personal arena rating
};
+struct ItemLimitCategoryEntry
+{
+ uint32 ID; // 0 Id
+ //char* name[16] // 1-16 m_name_lang
+ // 17 name flags
+ uint32 maxCount; // max allowed equipped as item or in gem slot
+ //uint32 unk; // 1 for prismatic gems only...
+};
+
struct ItemRandomPropertiesEntry
{
- uint32 ID; // 0
- //char* internalName // 1 unused
- uint32 enchant_id[3]; // 2-4
- // 5-6 unused, 0 only values, reserved for additional enchantments?
- //char* nameSuffix[16] // 7-22, unused
- // 23 nameSufix flags, unused
+ uint32 ID; // 0 m_ID
+ //char* internalName // 1 m_Name
+ uint32 enchant_id[5]; // 2-6 m_Enchantment
+ //char* nameSuffix[16] // 7-22 m_name_lang
+ // 23 name flags
};
struct ItemRandomSuffixEntry
{
- uint32 ID; // 0
- //char* name[16] // 1-16 unused
- // 17, name flags, unused
- // 18 unused
- uint32 enchant_id[3]; // 19-21
- uint32 prefix[3]; // 22-24
+ uint32 ID; // 0 m_ID
+ //char* name[16] // 1-16 m_name_lang
+ // 17, name flags
+ // 18 m_internalName
+ uint32 enchant_id[5]; // 19-21 m_enchantment
+ uint32 prefix[5]; // 22-24 m_allocationPct
};
struct ItemSetEntry
{
- //uint32 id // 0 item set ID
- char* name[16]; // 1-16
+ //uint32 id // 0 m_ID
+ char* name[16]; // 1-16 m_name_lang
// 17 string flags, unused
- // 18-28 items from set, but not have all items listed, use ItemPrototype::ItemSet instead
- // 29-34 unused
- uint32 spells[8]; // 35-42
- uint32 items_to_triggerspell[8]; // 43-50
- uint32 required_skill_id; // 51
- uint32 required_skill_value; // 52
+ //uint32 itemId[17]; // 18-34 m_itemID
+ uint32 spells[8]; // 35-42 m_setSpellID
+ uint32 items_to_triggerspell[8]; // 43-50 m_setThreshold
+ uint32 required_skill_id; // 51 m_requiredSkill
+ uint32 required_skill_value; // 52 m_requiredSkillRank
};
struct LockEntry
{
- uint32 ID; // 0
- uint32 keytype[5]; // 1-5
- // 6-8, not used
- uint32 key[5]; // 9-13
- // 14-16, not used
- uint32 requiredminingskill; // 17
- uint32 requiredlockskill; // 18
- // 19-32, not used
+ uint32 ID; // 0 m_ID
+ uint32 Type[8]; // 1-8 m_Type
+ uint32 Index[8]; // 9-16 m_Index
+ uint32 Skill[8]; // 17-24 m_Skill
+ //uint32 Action[8]; // 25-32 m_Action
};
struct MailTemplateEntry
@@ -419,35 +1000,34 @@ struct MailTemplateEntry
struct MapEntry
{
- uint32 MapID; // 0
+ uint32 MapID; // 0
//char* internalname; // 1 unused
- uint32 map_type; // 2
- // 3 unused
- char* name[16]; // 4-19
+ uint32 map_type; // 2
+ // 3 0 or 1 for battlegrounds (not arenas)
+ char* name[16]; // 4-19
// 20 name flags, unused
- // 21-23 unused (something PvPZone related - levels?)
- // 24-26
- uint32 linked_zone; // 27 common zone for instance and continent map
- //char* hordeIntro // 28-43 text for PvP Zones
- // 44 intro text flags
- //char* allianceIntro // 45-60 text for PvP Zones
- // 46 intro text flags
- // 47-61 not used
- uint32 multimap_id; // 62
- // 63-65 not used
- //chat* unknownText1 // 66-81 unknown empty text fields, possible normal Intro text.
- // 82 text flags
- //chat* heroicIntroText // 83-98 heroic mode requirement text
- // 99 text flags
- //chat* unknownText2 // 100-115 unknown empty text fields
- // 116 text flags
- int32 entrance_map; // 117 map_id of entrance map
- float entrance_x; // 118 entrance x coordinate (if exist single entry)
- float entrance_y; // 119 entrance y coordinate (if exist single entry)
- uint32 resetTimeRaid; // 120
- uint32 resetTimeHeroic; // 121
- // 122-123
- uint32 addon; // 124 (0-original maps,1-tbc addon)
+ uint32 linked_zone; // 21 common zone for instance and continent map
+ //char* hordeIntro[16]; // 23-37 text for PvP Zones
+ // 38 intro text flags
+ //char* allianceIntro[16]; // 39-54 text for PvP Zones
+ // 55 intro text flags
+ uint32 multimap_id; // 56
+ // 57
+ //chat* unknownText1[16]; // 58-73 unknown empty text fields, possible normal Intro text.
+ // 74 text flags
+ //chat* heroicIntroText[16]; // 75-90 heroic mode requirement text
+ // 91 text flags
+ //chat* unknownText2[16]; // 92-107 unknown empty text fields
+ // 108 text flags
+ int32 entrance_map; // 109 map_id of entrance map
+ float entrance_x; // 110 entrance x coordinate (if exist single entry)
+ float entrance_y; // 111 entrance y coordinate (if exist single entry)
+ uint32 resetTimeRaid; // 112
+ uint32 resetTimeHeroic; // 113
+ // 114 all 0
+ // 115 -1, 0 and 720
+ uint32 addon; // 116 (0-original maps,1-tbc addon)
+ // 117 some kind of time?
// Helpers
uint32 Expansion() const { return addon; }
@@ -459,22 +1039,29 @@ struct MapEntry
bool IsBattleGround() const { return map_type == MAP_BATTLEGROUND; }
bool IsBattleArena() const { return map_type == MAP_ARENA; }
bool IsBattleGroundOrArena() const { return map_type == MAP_BATTLEGROUND || map_type == MAP_ARENA; }
- bool SupportsHeroicMode() const { return resetTimeHeroic && !resetTimeRaid; }
+ bool SupportsHeroicMode() const { return resetTimeHeroic != 0; }
bool HasResetTime() const { return resetTimeHeroic || resetTimeRaid; }
bool IsMountAllowed() const
{
return !IsDungeon() ||
- MapID==568 || MapID==309 || MapID==209 || MapID==534 ||
- MapID==560 || MapID==509 || MapID==269;
+ MapID==209 || MapID==269 || MapID==309 || // TanarisInstance, CavernsOfTime, Zul'gurub
+ MapID==509 || MapID==534 || MapID==560 || // AhnQiraj, HyjalPast, HillsbradPast
+ MapID==568 || MapID==580 || MapID==615 || // ZulAman, Sunwell Plateau, Obsidian Sanctrum
+ MapID==616; // Eye Of Eternity
+ }
+
+ bool IsContinent() const
+ {
+ return MapID == 0 || MapID == 1 || MapID == 530 || MapID == 571;
}
};
struct QuestSortEntry
{
- uint32 id; // 0, sort id
- //char* name[16]; // 1-16, unused
- // 17 name flags, unused
+ uint32 id; // 0 m_ID
+ //char* name[16]; // 1-16 m_SortName_lang
+ // 17 name flags
};
struct RandomPropertiesPointsEntry
@@ -486,172 +1073,198 @@ struct RandomPropertiesPointsEntry
uint32 UncommonPropertiesPoints[5]; // 12-16
};
+struct ScalingStatDistributionEntry
+{
+ uint32 Id;
+ uint32 StatMod[10];
+ uint32 Modifier[10];
+ uint32 MaxLevel;
+};
+
+struct ScalingStatValuesEntry
+{
+ uint32 Id;
+ uint32 Level;
+ uint32 Multiplier[17];
+};
+
//struct SkillLineCategoryEntry{
-// uint32 id; // 0 hidden key
-// char* name[16]; // 1 - 17 Category name
-// // 18 string flag
-// uint32 displayOrder; // Display order in character tab
+// uint32 id; // 0 m_ID
+// char* name[16]; // 1-17 m_name_lang
+// // 18 string flag
+// uint32 displayOrder; // 19 m_sortIndex
//};
//struct SkillRaceClassInfoEntry{
-// uint32 id; // 0
-// uint32 skillId; // 1 present some refrences to unknown skill
-// uint32 raceMask; // 2
-// uint32 classMask; // 3
-// uint32 flags; // 4 mask for some thing
-// uint32 reqLevel; // 5
-// uint32 skillTierId; // 6
-// uint32 skillCostID; // 7
+// uint32 id; // 0 m_ID
+// uint32 skillId; // 1 m_skillID
+// uint32 raceMask; // 2 m_raceMask
+// uint32 classMask; // 3 m_classMask
+// uint32 flags; // 4 m_flags
+// uint32 reqLevel; // 5 m_minLevel
+// uint32 skillTierId; // 6 m_skillTierID
+// uint32 skillCostID; // 7 m_skillCostIndex
//};
//struct SkillTiersEntry{
-// uint32 id; // 0
-// uint32 skillValue[16]; // 1-17 unknown possibly add value on learn?
-// uint32 maxSkillValue[16]; // Max value for rank
+// uint32 id; // 0 m_ID
+// uint32 skillValue[16]; // 1-17 m_cost
+// uint32 maxSkillValue[16]; // 18-32 m_valueMax
//};
struct SkillLineEntry
{
- uint32 id; // 0
- uint32 categoryId; // 1 (index from SkillLineCategory.dbc)
- //uint32 skillCostID; // 2 not used
- char* name[16]; // 3-18
- // 19 string flags, not used
- //char* description[16]; // 20-35, not used
- // 36 string flags, not used
- uint32 spellIcon; // 37
+ uint32 id; // 0 m_ID
+ int32 categoryId; // 1 m_categoryID
+ //uint32 skillCostID; // 2 m_skillCostsID
+ char* name[16]; // 3-18 m_displayName_lang
+ // 19 string flags
+ //char* description[16]; // 20-35 m_description_lang
+ // 36 string flags
+ uint32 spellIcon; // 37 m_spellIconID
+ //char* alternateVerb[16]; // 38-53 m_alternateVerb_lang
+ // 54 string flags
+ // 55 m_canLink
};
struct SkillLineAbilityEntry
{
- uint32 id; // 0, INDEX
- uint32 skillId; // 1
- uint32 spellId; // 2
- uint32 racemask; // 3
- uint32 classmask; // 4
- //uint32 racemaskNot; // 5 always 0 in 2.4.2
- //uint32 classmaskNot; // 6 always 0 in 2.4.2
- uint32 req_skill_value; // 7 for trade skill.not for training.
- uint32 forward_spellid; // 8
- uint32 learnOnGetSkill; // 9 can be 1 or 2 for spells learned on get skill
- uint32 max_value; // 10
- uint32 min_value; // 11
- // 12-13, unknown, always 0
- uint32 reqtrainpoints; // 14
+ uint32 id; // 0 m_ID
+ uint32 skillId; // 1 m_skillLine
+ uint32 spellId; // 2 m_spell
+ uint32 racemask; // 3 m_raceMask
+ uint32 classmask; // 4 m_classMask
+ //uint32 racemaskNot; // 5 m_excludeRace
+ //uint32 classmaskNot; // 6 m_excludeClass
+ uint32 req_skill_value; // 7 m_minSkillLineRank
+ uint32 forward_spellid; // 8 m_supercededBySpell
+ uint32 learnOnGetSkill; // 9 m_acquireMethod
+ uint32 max_value; // 10 m_trivialSkillLineRankHigh
+ uint32 min_value; // 11 m_trivialSkillLineRankLow
+ //uint32 characterPoints[2]; // 12-13 m_characterPoints[2]
};
struct SoundEntriesEntry
{
- uint32 Id; // 0, sound id
- //uint32 Type; // 1, sound type (10 generally for creature, etc)
- //char* InternalName; // 2, internal name, for use in lookup command for example
- //char* FileName[10]; // 3-12, file names
- //uint32 Unk13[10]; // 13-22, linked with file names?
- //char* Path; // 23
- // 24-28, unknown
+ uint32 Id; // 0 m_ID
+ //uint32 Type; // 1 m_soundType
+ //char* InternalName; // 2 m_name
+ //char* FileName[10]; // 3-12 m_File[10]
+ //uint32 Unk13[10]; // 13-22 m_Freq[10]
+ //char* Path; // 23 m_DirectoryBase
+ // 24 m_volumeFloat
+ // 25 m_flags
+ // 26 m_minDistance
+ // 27 m_distanceCutoff
+ // 28 m_EAXDef
};
struct SpellEntry
{
- uint32 Id; // 0 normally counted from 0 field (but some tools start counting from 1, check this before tool use for data view!)
- uint32 Category; // 1
- //uint32 castUI // 2 not used
- uint32 Dispel; // 3
- uint32 Mechanic; // 4
- uint32 Attributes; // 5
- uint32 AttributesEx; // 6
- uint32 AttributesEx2; // 7
- uint32 AttributesEx3; // 8
- uint32 AttributesEx4; // 9
- uint32 AttributesEx5; // 10
- //uint32 AttributesEx6; // 11 not used
- uint32 Stances; // 12
- uint32 StancesNot; // 13
- uint32 Targets; // 14
- uint32 TargetCreatureType; // 15
- uint32 RequiresSpellFocus; // 16
- uint32 FacingCasterFlags; // 17
- uint32 CasterAuraState; // 18
- uint32 TargetAuraState; // 19
- uint32 CasterAuraStateNot; // 20
- uint32 TargetAuraStateNot; // 21
- uint32 CastingTimeIndex; // 22
- uint32 RecoveryTime; // 23
- uint32 CategoryRecoveryTime; // 24
- uint32 InterruptFlags; // 25
- uint32 AuraInterruptFlags; // 26
- uint32 ChannelInterruptFlags; // 27
- uint32 procFlags; // 28
- uint32 procChance; // 29
- uint32 procCharges; // 30
- uint32 maxLevel; // 31
- uint32 baseLevel; // 32
- uint32 spellLevel; // 33
- uint32 DurationIndex; // 34
- uint32 powerType; // 35
- uint32 manaCost; // 36
- uint32 manaCostPerlevel; // 37
- uint32 manaPerSecond; // 38
- uint32 manaPerSecondPerLevel; // 39
- uint32 rangeIndex; // 40
- float speed; // 41
- //uint32 modalNextSpell; // 42
- uint32 StackAmount; // 43
- uint32 Totem[2]; // 44-45
- int32 Reagent[8]; // 46-53
- uint32 ReagentCount[8]; // 54-61
- int32 EquippedItemClass; // 62 (value)
- int32 EquippedItemSubClassMask; // 63 (mask)
- int32 EquippedItemInventoryTypeMask; // 64 (mask)
- uint32 Effect[3]; // 65-67
- int32 EffectDieSides[3]; // 68-70
- uint32 EffectBaseDice[3]; // 71-73
- float EffectDicePerLevel[3]; // 74-76
- float EffectRealPointsPerLevel[3]; // 77-79
- int32 EffectBasePoints[3]; // 80-82 (don't must be used in spell/auras explicitly, must be used cached Spell::m_currentBasePoints)
- uint32 EffectMechanic[3]; // 83-85
- uint32 EffectImplicitTargetA[3]; // 86-88
- uint32 EffectImplicitTargetB[3]; // 89-91
- uint32 EffectRadiusIndex[3]; // 92-94 - spellradius.dbc
- uint32 EffectApplyAuraName[3]; // 95-97
- uint32 EffectAmplitude[3]; // 98-100
- float EffectMultipleValue[3]; // 101-103
- uint32 EffectChainTarget[3]; // 104-106
- uint32 EffectItemType[3]; // 107-109
- int32 EffectMiscValue[3]; // 110-112
- int32 EffectMiscValueB[3]; // 113-115
- uint32 EffectTriggerSpell[3]; // 116-118
- float EffectPointsPerComboPoint[3]; // 119-121
- uint32 SpellVisual; // 122
- // 123 not used
- uint32 SpellIconID; // 124
- uint32 activeIconID; // 125
- //uint32 spellPriority; // 126
- char* SpellName[16]; // 127-142
- //uint32 SpellNameFlag; // 143
- char* Rank[16]; // 144-159
- //uint32 RankFlags; // 160
- //char* Description[16]; // 161-176 not used
- //uint32 DescriptionFlags; // 177 not used
- //char* ToolTip[16]; // 178-193 not used
- //uint32 ToolTipFlags; // 194 not used
- uint32 ManaCostPercentage; // 195
- uint32 StartRecoveryCategory; // 196
- uint32 StartRecoveryTime; // 197
- uint32 MaxTargetLevel; // 198
- uint32 SpellFamilyName; // 199
- uint64 SpellFamilyFlags; // 200+201
- uint32 MaxAffectedTargets; // 202
- uint32 DmgClass; // 203 defenseType
- uint32 PreventionType; // 204
- //uint32 StanceBarOrder; // 205 not used
- float DmgMultiplier[3]; // 206-208
- //uint32 MinFactionId; // 209 not used, and 0 in 2.4.2
- //uint32 MinReputation; // 210 not used, and 0 in 2.4.2
- //uint32 RequiredAuraVision; // 211 not used
- uint32 TotemCategory[2]; // 212-213
- uint32 AreaId; // 214
- uint32 SchoolMask; // 215 school mask
+ uint32 Id; // 0 m_ID
+ uint32 Category; // 1 m_category
+ uint32 Dispel; // 2 m_dispelType
+ uint32 Mechanic; // 3 m_mechanic
+ uint32 Attributes; // 4 m_attribute
+ uint32 AttributesEx; // 5 m_attributesEx
+ uint32 AttributesEx2; // 6 m_attributesExB
+ uint32 AttributesEx3; // 7 m_attributesExC
+ uint32 AttributesEx4; // 8 m_attributesExD
+ uint32 AttributesEx5; // 9 m_attributesExE
+ //uint32 AttributesEx6; // 10 m_attributesExF not used
+ uint32 Stances; // 11 m_shapeshiftMask
+ uint32 StancesNot; // 12 m_shapeshiftExclude
+ uint32 Targets; // 13 m_targets
+ uint32 TargetCreatureType; // 14 m_targetCreatureType
+ uint32 RequiresSpellFocus; // 15 m_requiresSpellFocus
+ uint32 FacingCasterFlags; // 16 m_facingCasterFlags
+ uint32 CasterAuraState; // 17 m_casterAuraState
+ uint32 TargetAuraState; // 18 m_targetAuraState
+ uint32 CasterAuraStateNot; // 19 m_excludeCasterAuraState
+ uint32 TargetAuraStateNot; // 20 m_excludeTargetAuraState
+ uint32 casterAuraSpell; // 21 m_casterAuraSpell
+ uint32 targetAuraSpell; // 22 m_targetAuraSpell
+ uint32 excludeCasterAuraSpell; // 23 m_excludeCasterAuraSpell
+ uint32 excludeTargetAuraSpell; // 24 m_excludeTargetAuraSpell
+ uint32 CastingTimeIndex; // 25 m_castingTimeIndex
+ uint32 RecoveryTime; // 26 m_recoveryTime
+ uint32 CategoryRecoveryTime; // 27 m_categoryRecoveryTime
+ uint32 InterruptFlags; // 28 m_interruptFlags
+ uint32 AuraInterruptFlags; // 29 m_auraInterruptFlags
+ uint32 ChannelInterruptFlags; // 30 m_channelInterruptFlags
+ uint32 procFlags; // 31 m_procTypeMask
+ uint32 procChance; // 32 m_procChance
+ uint32 procCharges; // 33 m_procCharges
+ uint32 maxLevel; // 34 m_maxLevel
+ uint32 baseLevel; // 35 m_baseLevel
+ uint32 spellLevel; // 36 m_spellLevel
+ uint32 DurationIndex; // 37 m_durationIndex
+ uint32 powerType; // 38 m_powerType
+ uint32 manaCost; // 39 m_manaCost
+ uint32 manaCostPerlevel; // 40 m_manaCostPerLevel
+ uint32 manaPerSecond; // 41 m_manaPerSecond
+ uint32 manaPerSecondPerLevel; // 42 m_manaPerSecondPerLeve
+ uint32 rangeIndex; // 43 m_rangeIndex
+ float speed; // 44 m_speed
+ //uint32 modalNextSpell; // 45 m_modalNextSpell not used
+ uint32 StackAmount; // 46 m_cumulativeAura
+ uint32 Totem[2]; // 47-48 m_totem
+ int32 Reagent[8]; // 49-56 m_reagent
+ uint32 ReagentCount[8]; // 57-64 m_reagentCount
+ int32 EquippedItemClass; // 65 m_equippedItemClass (value)
+ int32 EquippedItemSubClassMask; // 66 m_equippedItemSubclass (mask)
+ int32 EquippedItemInventoryTypeMask; // 67 m_equippedItemInvTypes (mask)
+ uint32 Effect[3]; // 68-70 m_effect
+ int32 EffectDieSides[3]; // 71-73 m_effectDieSides
+ uint32 EffectBaseDice[3]; // 74-76 m_effectBaseDice
+ float EffectDicePerLevel[3]; // 77-79 m_effectDicePerLevel
+ float EffectRealPointsPerLevel[3]; // 80-82 m_effectRealPointsPerLevel
+ int32 EffectBasePoints[3]; // 83-85 m_effectBasePoints (don't must be used in spell/auras explicitly, must be used cached Spell::m_currentBasePoints)
+ uint32 EffectMechanic[3]; // 86-88 m_effectMechanic
+ uint32 EffectImplicitTargetA[3]; // 89-91 m_implicitTargetA
+ uint32 EffectImplicitTargetB[3]; // 92-94 m_implicitTargetB
+ uint32 EffectRadiusIndex[3]; // 95-97 m_effectRadiusIndex - spellradius.dbc
+ uint32 EffectApplyAuraName[3]; // 98-100 m_effectAura
+ uint32 EffectAmplitude[3]; // 101-103 m_effectAuraPeriod
+ float EffectMultipleValue[3]; // 104-106 m_effectAmplitude
+ uint32 EffectChainTarget[3]; // 107-109 m_effectChainTargets
+ uint32 EffectItemType[3]; // 110-112 m_effectItemType
+ int32 EffectMiscValue[3]; // 113-115 m_effectMiscValue
+ int32 EffectMiscValueB[3]; // 116-118 m_effectMiscValueB
+ uint32 EffectTriggerSpell[3]; // 119-121 m_effectTriggerSpell
+ float EffectPointsPerComboPoint[3]; // 122-124 m_effectPointsPerCombo
+ flag96 EffectSpellClassMask[3]; //
+ uint32 SpellVisual[2]; // 134-135 m_spellVisualID
+ uint32 SpellIconID; // 136 m_spellIconID
+ uint32 activeIconID; // 137 m_activeIconID
+ //uint32 spellPriority; // 138 not used
+ char* SpellName[16]; // 139-154 m_name_lang
+ //uint32 SpellNameFlag; // 155 not used
+ char* Rank[16]; // 156-171 m_nameSubtext_lang
+ //uint32 RankFlags; // 172 not used
+ //char* Description[16]; // 173-188 m_description_lang not used
+ //uint32 DescriptionFlags; // 189 not used
+ //char* ToolTip[16]; // 190-205 m_auraDescription_lang not used
+ //uint32 ToolTipFlags; // 206 not used
+ uint32 ManaCostPercentage; // 207 m_manaCostPct
+ uint32 StartRecoveryCategory; // 208 m_startRecoveryCategory
+ uint32 StartRecoveryTime; // 209 m_startRecoveryTime
+ uint32 MaxTargetLevel; // 210 m_maxTargetLevel
+ uint32 SpellFamilyName; // 211 m_spellClassSet
+ flag96 SpellFamilyFlags; // 212-214
+ uint32 MaxAffectedTargets; // 215 m_maxTargets
+ uint32 DmgClass; // 216 m_defenseType
+ uint32 PreventionType; // 217 m_preventionType
+ //uint32 StanceBarOrder; // 218 m_stanceBarOrder not used
+ float DmgMultiplier[3]; // 219-221 m_effectChainAmplitude
+ //uint32 MinFactionId; // 222 m_minFactionID not used
+ //uint32 MinReputation; // 223 m_minReputation not used
+ //uint32 RequiredAuraVision; // 224 m_requiredAuraVision not used
+ uint32 TotemCategory[2]; // 225-226 m_requiredTotemCategoryID
+ int32 AreaGroupId; // 227 m_requiredAreaGroupId
+ uint32 SchoolMask; // 228 m_schoolMask
+ uint32 runeCostID; // 229 m_runeCostID
+ //uint32 spellMissileID; // 230 m_spellMissileID not used
private:
// prevent creating custom entries (copy data from original in fact)
@@ -688,16 +1301,33 @@ struct SpellThreatEntry
struct SpellRadiusEntry
{
uint32 ID;
- float Radius;
- float Radius2;
+ float radiusHostile;
+ //uint32 Unk //always 0
+ float radiusFriend;
};
struct SpellRangeEntry
{
uint32 ID;
- float minRange;
- float maxRange;
+ float minRangeHostile;
+ float minRangeFriend;
+ float maxRangeHostile;
+ float maxRangeFriend; //friend means unattackable unit here
uint32 type;
+ //char* Name[16]; // 7-23 unused
+ // 24 string flags, unused
+ //char* Name2[16]; // 25-40 unused
+ // 41 string flags, unused
+};
+
+struct SpellRuneCostEntry
+{
+ uint32 ID; // 0
+ uint32 RuneCost[3]; // 1-3 (0=blood, 1=frost, 2=unholy)
+ uint32 runePowerGain; // 4
+
+ bool NoRuneCost() const { return RuneCost[0] == 0 && RuneCost[1] == 0 && RuneCost[2] == 0; }
+ bool NoRunicPowerGain() const { return runePowerGain == 0; }
};
struct SpellShapeshiftEntry
@@ -732,26 +1362,31 @@ struct SpellDurationEntry
struct SpellItemEnchantmentEntry
{
- uint32 ID; // 0
- uint32 type[3]; // 1-3
- uint32 amount[3]; // 4-6
- //uint32 amount2[3] // 7-9 always same as similar `amount` value
- uint32 spellid[3]; // 10-12
- char* description[16]; // 13-29
- // 30 description flags
- uint32 aura_id; // 31
- uint32 slot; // 32
- uint32 GemID; // 33
- uint32 EnchantmentCondition; // 34
+ uint32 ID; // 0 m_ID
+ //uint32 charges; // 1 m_charges
+ uint32 type[3]; // 2-4 m_effect[3]
+ 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-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
{
- uint32 ID;
- uint8 Color[5];
- uint8 Comparator[5];
- uint8 CompareColor[5];
- uint32 Value[5];
+ uint32 ID; // 0 m_ID
+ uint8 Color[5]; // 1-5 m_lt_operandType[5]
+ //uint32 LT_Operand[5]; // 6-10 m_lt_operand[5]
+ uint8 Comparator[5]; // 11-15 m_operator[5]
+ uint8 CompareColor[5]; // 15-20 m_rt_operandType[5]
+ uint32 Value[5]; // 21-25 m_rt_operand[5]
+ //uint8 Logic[5] // 25-30 m_logic[5]
};
struct StableSlotPricesEntry
@@ -760,6 +1395,16 @@ struct StableSlotPricesEntry
uint32 Price;
};
+/*struct SummonPropertiesEntry
+{
+ uint32 Id; // 0
+ uint32 Group; // 1, 0 - can't be controlled?, 1 - something guardian?, 2 - pet?, 3 - something controllable?, 4 - taxi/mount?
+ uint32 Unk2; // 2, 14 rows > 0
+ uint32 Type; // 3, see enum
+ uint32 Slot; // 4, 0-6
+ uint32 Flags; // 5
+};*/
+
struct TalentEntry
{
uint32 TalentID; // 0
@@ -771,53 +1416,59 @@ struct TalentEntry
uint32 DependsOn; // 13 index in Talent.dbc (TalentEntry)
// 14-15 not used
uint32 DependsOnRank; // 16
- // 17-19 not used
- uint32 DependsOnSpell; // 20 req.spell
+ // 17-18 not used
+ //uint32 unk1; // 19, 0 or 1
+ //uint32 unk2; // 20, all 0
+ //uint32 unkFlags1; // 21, related to hunter pet talents
+ //uint32 unkFlags2; // 22, related to hunter pet talents
};
struct TalentTabEntry
{
- uint32 TalentTabID; // 0
- //char* name[16]; // 1-16, unused
+ uint32 TalentTabID; // 0
+ //char* name[16]; // 1-16, unused
//uint32 nameFlags; // 17, unused
//unit32 spellicon; // 18
// 19 not used
- uint32 ClassMask; // 20
- uint32 tabpage; // 21
- //char* internalname; // 22
+ uint32 ClassMask; // 20
+ uint32 petTalentMask; // 21
+ uint32 tabpage; // 22
+ //char* internalname; // 23
};
struct TaxiNodesEntry
{
- uint32 ID; // 0
- uint32 map_id; // 1
- float x; // 2
- float y; // 3
- float z; // 4
- //char* name[16]; // 5-21
- // 22 string flags, unused
- uint32 horde_mount_type; // 23
- uint32 alliance_mount_type; // 24
+ uint32 ID; // 0 m_ID
+ uint32 map_id; // 1 m_ContinentID
+ float x; // 2 m_x
+ float y; // 3 m_y
+ float z; // 4 m_z
+ //char* name[16]; // 5-21 m_Name_lang
+ // 22 string flags
+ uint32 MountCreatureID[2]; // 23-24 m_MountCreatureID[2]
};
struct TaxiPathEntry
{
- uint32 ID;
- uint32 from;
- uint32 to;
- uint32 price;
+ uint32 ID; // 0 m_ID
+ uint32 from; // 1 m_FromTaxiNode
+ uint32 to; // 2 m_ToTaxiNode
+ uint32 price; // 3 m_Cost
};
struct TaxiPathNodeEntry
{
- uint32 path;
- uint32 index;
- uint32 mapid;
- float x;
- float y;
- float z;
- uint32 actionFlag;
- uint32 delay;
+ // 0 m_ID
+ uint32 path; // 1 m_PathID
+ uint32 index; // 2 m_NodeIndex
+ uint32 mapid; // 3 m_ContinentID
+ float x; // 4 m_LocX
+ float y; // 5 m_LocY
+ float z; // 6 m_LocZ
+ uint32 actionFlag; // 7 m_flags
+ uint32 delay; // 8 m_delay
+ // 9 m_arrivalEventID
+ // 10 m_departureEventID
};
struct TotemCategoryEntry
@@ -829,16 +1480,100 @@ struct TotemCategoryEntry
uint32 categoryMask; // 19 (compatibility mask for same type: different for totems, compatible from high to low for rods)
};
+struct VehicleEntry
+{
+ uint32 m_ID; // 0
+ uint32 m_flags; // 1
+ float m_turnSpeed; // 2
+ float m_pitchSpeed; // 3
+ float m_pitchMin; // 4
+ float m_pitchMax; // 5
+ uint32 m_seatID[8]; // 6-13
+ float m_mouseLookOffsetPitch; // 14
+ float m_cameraFadeDistScalarMin; // 15
+ float m_cameraFadeDistScalarMax; // 16
+ float m_cameraPitchOffset; // 17
+ int m_powerType[3]; // 18-20
+ int m_powerToken[3]; // 21-23
+ float m_facingLimitRight; // 24
+ float m_facingLimitLeft; // 25
+ float m_msslTrgtTurnLingering; // 26
+ float m_msslTrgtPitchLingering; // 27
+ float m_msslTrgtMouseLingering; // 28
+ float m_msslTrgtEndOpacity; // 29
+ float m_msslTrgtArcSpeed; // 30
+ float m_msslTrgtArcRepeat; // 31
+ float m_msslTrgtArcWidth; // 32
+ float m_msslTrgtImpactRadius[2]; // 33-34
+ char* m_msslTrgtArcTexture; // 35
+ char* m_msslTrgtImpactTexture; // 36
+ char* m_msslTrgtImpactModel[2]; // 37-38
+ float m_cameraYawOffset; // 39
+ uint32 m_uiLocomotionType; // 40
+ float m_msslTrgtImpactTexRadius; // 41
+ uint32 m_uiSeatIndicatorType; // 42
+};
+
+struct VehicleSeatEntry
+{
+ uint32 m_ID; // 0
+ uint32 m_flags; // 1
+ int32 m_attachmentID; // 2
+ float m_attachmentOffsetX; // 3
+ float m_attachmentOffsetY; // 4
+ float m_attachmentOffsetZ; // 5
+ float m_enterPreDelay; // 6
+ float m_enterSpeed; // 7
+ float m_enterGravity; // 8
+ float m_enterMinDuration; // 9
+ float m_enterMaxDuration; // 10
+ float m_enterMinArcHeight; // 11
+ float m_enterMaxArcHeight; // 12
+ int32 m_enterAnimStart; // 13
+ int32 m_enterAnimLoop; // 14
+ int32 m_rideAnimStart; // 15
+ int32 m_rideAnimLoop; // 16
+ int32 m_rideUpperAnimStart; // 17
+ int32 m_rideUpperAnimLoop; // 18
+ float m_exitPreDelay; // 19
+ float m_exitSpeed; // 20
+ float m_exitGravity; // 21
+ float m_exitMinDuration; // 22
+ float m_exitMaxDuration; // 23
+ float m_exitMinArcHeight; // 24
+ float m_exitMaxArcHeight; // 25
+ int32 m_exitAnimStart; // 26
+ int32 m_exitAnimLoop; // 27
+ int32 m_exitAnimEnd; // 28
+ float m_passengerYaw; // 29
+ float m_passengerPitch; // 30
+ float m_passengerRoll; // 31
+ int32 m_passengerAttachmentID; // 32
+ int32 m_vehicleEnterAnim; // 33
+ int32 m_vehicleExitAnim; // 34
+ int32 m_vehicleRideAnimLoop; // 35
+ int32 m_vehicleEnterAnimBone; // 36
+ int32 m_vehicleExitAnimBone; // 37
+ int32 m_vehicleRideAnimLoopBone; // 38
+ float m_vehicleEnterAnimDelay; // 39
+ float m_vehicleExitAnimDelay; // 40
+ uint32 m_vehicleAbilityDisplay; // 41
+ uint32 m_enterUISoundID; // 42
+ uint32 m_exitUISoundID; // 43
+ int32 m_uiSkin; // 44
+ uint32 m_flagsB; // 45
+};
+
struct WorldMapAreaEntry
{
- //uint32 ID; // 0
- uint32 map_id; // 1
- uint32 area_id; // 2 index (continent 0 areas ignored)
- //char* internal_name // 3
- float y1; // 4
- float y2; // 5
- float x1; // 6
- float x2; // 7
+ //uint32 ID; // 0
+ uint32 map_id; // 1
+ uint32 area_id; // 2 index (continent 0 areas ignored)
+ //char* internal_name // 3
+ float y1; // 4
+ float y2; // 5
+ float x1; // 6
+ float x2; // 7
int32 virtual_map_id; // 8 -1 (map_id have correct map) other: virtual map where zone show (map_id - where zone in fact internally)
};
@@ -853,6 +1588,12 @@ struct WorldSafeLocsEntry
// 21 name flags, unused
};
+struct WorldMapOverlayEntry
+{
+ uint32 ID; // 0
+ uint32 areatableID; // 2
+};
+
// GCC have alternative #pragma pack() syntax and old gcc version not support pack(pop), also any gcc version not support it at some platform
#if defined( __GNUC__ )
#pragma pack()
@@ -898,7 +1639,7 @@ struct TaxiPathNode
typedef std::vector<TaxiPathNode> TaxiPathNodeList;
typedef std::vector<TaxiPathNodeList> TaxiPathNodesByPath;
-#define TaxiMaskSize 16
+#define TaxiMaskSize 12
typedef uint32 TaxiMask[TaxiMaskSize];
#endif
diff --git a/src/shared/Database/DBCfmt.cpp b/src/shared/Database/DBCfmt.cpp
index 14cf6486933..62a69610ebd 100644
--- a/src/shared/Database/DBCfmt.cpp
+++ b/src/shared/Database/DBCfmt.cpp
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
+ * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
- * Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
+ * 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
@@ -10,37 +10,42 @@
*
* 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
+ * 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
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-const char AreaTableEntryfmt[]="iiinixxxxxissssssssssssssssxixxxxxx";
-const char AuctionHouseEntryfmt[]="niiixxxxxxxxxxxxxxxxx";
+const char Achievementfmt[]="niixxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxiixixxxxxxxxxxxxxxxxxxxi";
+const char AchievementCriteriafmt[]="niiiiiiiixxxxxxxxxxxxxxxxxiixix";
+const char AreaTableEntryfmt[]="iiinixxxxxissssssssssssssssxixxxxxxx";
+const char AreaGroupEntryfmt[]="niiiiiii";
const char AreaTriggerEntryfmt[]="niffffffff";
+const char AuctionHouseEntryfmt[]="niiixxxxxxxxxxxxxxxxx";
const char BankBagSlotPricesEntryfmt[]="ni";
-const char BattlemasterListEntryfmt[]="niiixxxxxiiiixxssssssssssssssssxx";
-const char CharStartOutfitEntryfmt[]="diiiiiiiiiiiiixxxxxxxxxxxxxxxxxxxxxxxxxxx";
-// 3*12 new item fields in 3.0.x
-//const char CharStartOutfitEntryfmt[]="diiiiiiiiiiiiiiiiiiiiiiiiixxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
+const char BarberShopStyleEntryfmt[]="nixxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxiii";
+const char BattlemasterListEntryfmt[]="niiiiiiiiiiiixxxssssssssssssssssxx";
+const char CharStartOutfitEntryfmt[]="diiiiiiiiiiiiiiiiiiiiiiiiixxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
const char CharTitlesEntryfmt[]="nxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxi";
const char ChatChannelsEntryfmt[]="iixssssssssssssssssxxxxxxxxxxxxxxxxxx";
// ChatChannelsEntryfmt, index not used (more compact store)
-//const char ChrClassesEntryfmt[]="nxixxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxix";
-const char ChrClassesEntryfmt[]="nxixssssssssssssssssxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxix";
+const char ChrClassesEntryfmt[]="nxixxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxixii";
const char ChrRacesEntryfmt[]="nxixiixxixxxxissssssssssssssssxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxi";
-const char CreatureDisplayInfofmt[]="nxxxfxxxxxxxxx";
-const char CreatureFamilyfmt[]="nfifiiiissssssssssssssssxx";
+const char CreatureDisplayInfofmt[]="nxxxfxxxxxxxxxxx";
+const char CreatureFamilyfmt[]="nfifiiiiixssssssssssssssssxx";
const char CreatureSpellDatafmt[]="nxxxxxxxx";
+const char CreatureTypefmt[]="nxxxxxxxxxxxxxxxxxx";
const char DurabilityCostsfmt[]="niiiiiiiiiiiiiiiiiiiiiiiiiiiii";
const char DurabilityQualityfmt[]="nf";
const char EmoteEntryfmt[]="nxixxxxxxxxxxxxxxxx";
const char FactionEntryfmt[]="niiiiiiiiiiiiiiiiiissssssssssssssssxxxxxxxxxxxxxxxxxx";
const char FactionTemplateEntryfmt[]="niiiiiiiiiiiii";
const char GemPropertiesEntryfmt[]="nixxi";
+const char GlyphPropertiesfmt[]="niii";
+const char GlyphSlotfmt[]="nii";
+const char GtBarberShopCostBasefmt[]="f";
const char GtCombatRatingsfmt[]="f";
const char GtChanceToMeleeCritBasefmt[]="f";
const char GtChanceToMeleeCritfmt[]="f";
@@ -50,37 +55,46 @@ const char GtOCTRegenHPfmt[]="f";
//const char GtOCTRegenMPfmt[]="f";
const char GtRegenHPPerSptfmt[]="f";
const char GtRegenMPPerSptfmt[]="f";
-const char Itemfmt[]="niii";
+const char Holidaysfmt[]="nxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
+const char Itemfmt[]="nixiiiii";
//const char ItemDisplayTemplateEntryfmt[]="nxxxxxxxxxxixxxxxxxxxxx";
//const char ItemCondExtCostsEntryfmt[]="xiii";
-const char ItemExtendedCostEntryfmt[]="niiiiiiiiiiiii";
-const char ItemRandomPropertiesfmt[]="nxiiixxxxxxxxxxxxxxxxxxx";
-const char ItemRandomSuffixfmt[]="nxxxxxxxxxxxxxxxxxxiiiiii";
+const char ItemExtendedCostEntryfmt[]="niiiiiiiiiiiiix";
+const char ItemLimitCategoryEntryfmt[]="nxxxxxxxxxxxxxxxxxix";
+const char ItemRandomPropertiesfmt[]="nxiiiiixxxxxxxxxxxxxxxxx";
+const char ItemRandomSuffixfmt[]="nxxxxxxxxxxxxxxxxxxiiiiiiiiii";
const char ItemSetEntryfmt[]="dssssssssssssssssxxxxxxxxxxxxxxxxxxiiiiiiiiiiiiiiiiii";
-const char LockEntryfmt[]="niiiiixxxiiiiixxxiixxxxxxxxxxxxxx";
+const char LockEntryfmt[]="niiiiiiiiiiiiiiiiiiiiiiiixxxxxxxx";
const char MailTemplateEntryfmt[]="nxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
-const char MapEntryfmt[]="nxixssssssssssssssssxxxxxxxixxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxixxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxiffiixxi";
+const char MapEntryfmt[]="nxixssssssssssssssssxixxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxixxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxiffiixxix";
const char QuestSortEntryfmt[]="nxxxxxxxxxxxxxxxxx";
const char RandomPropertiesPointsfmt[]="niiiiiiiiiiiiiii";
-const char SkillLinefmt[]="nixssssssssssssssssxxxxxxxxxxxxxxxxxxi";
-const char SkillLineAbilityfmt[]="niiiixxiiiiixxi";
+const char ScalingStatDistributionfmt[]="niiiiiiiiiiiiiiiiiiiii";
+const char ScalingStatValuesfmt[]="iniiiiiiiiiiiiiiiii";
+const char SkillLinefmt[]="nixssssssssssssssssxxxxxxxxxxxxxxxxxxixxxxxxxxxxxxxxxxxx";
+const char SkillLineAbilityfmt[]="niiiixxiiiiixx";
const char SoundEntriesfmt[]="nxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
const char SpellCastTimefmt[]="nixx";
const char SpellDurationfmt[]="niii";
-const char SpellEntryfmt[]="nixiiiiiiiixiiiiiiiiiiiiiiiiiiiiiiiiiiiiifxiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiffffffiiiiiiiiiiiiiiiiiiiiifffiiiiiiiiiiiiiiifffixiixssssssssssssssssxssssssssssssssssxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxiiiiiiiiiixfffxxxiiii";
+const char SpellEntryfmt[]="niiiiiiiiixiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiifxiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiffffffiiiiiiiiiiiiiiiiiiiiifffiiiiiiiiiiiiiiifffiiiiiiiiiiiiixssssssssssssssssxssssssssssssssssxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxiiiiiiiiiiixfffxxxiiiiix";
const char SpellFocusObjectfmt[]="nxxxxxxxxxxxxxxxxx";
-const char SpellItemEnchantmentfmt[]="niiiiiixxxiiissssssssssssssssxiiii";
+const char SpellItemEnchantmentfmt[]="nxiiiiiixxxiiissssssssssssssssxiiiixx";
const char SpellItemEnchantmentConditionfmt[]="nbbbbbxxxxxbbbbbbbbbbiiiiiXXXXX";
const char SpellRadiusfmt[]="nfxf";
-const char SpellRangefmt[]="nffixxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
+const char SpellRangefmt[]="nffffixxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
+const char SpellRuneCostfmt[]="niiii";
const char SpellShapeshiftfmt[]="nxxxxxxxxxxxxxxxxxxiixixxxxxxxxxxxx";
const char StableSlotPricesfmt[] = "ni";
-const char TalentEntryfmt[]="niiiiiiiixxxxixxixxxi";
-const char TalentTabEntryfmt[]="nxxxxxxxxxxxxxxxxxxxiix";
+//const char SummonPropertiesfmt[] = "niiiii";
+const char TalentEntryfmt[]="niiiiiiiixxxxixxixxxxxx";
+const char TalentTabEntryfmt[]="nxxxxxxxxxxxxxxxxxxxiiix";
const char TaxiNodesEntryfmt[]="nifffxxxxxxxxxxxxxxxxxii";
const char TaxiPathEntryfmt[]="niii";
const char TaxiPathNodeEntryfmt[]="diiifffiixx";
const char TotemCategoryEntryfmt[]="nxxxxxxxxxxxxxxxxxii";
-const char WorldMapAreaEntryfmt[]="xinxffffi";
+const char VehicleEntryfmt[]="niffffiiiiiiiiffffiiiiiifffffffffffssssfifi";
+const char VehicleSeatEntryfmt[]="niiffffffffffiiiiiifffffffiiifffiiiiiiiffiiiii";
+const char WorldMapAreaEntryfmt[]="xinxffffix";
const char WorldSafeLocsEntryfmt[]="nifffxxxxxxxxxxxxxxxxx";
+const char WorldMapOverlayEntryfmt[]="nxixxxxxxxxxxxxxx";
diff --git a/src/shared/Database/Database.cpp b/src/shared/Database/Database.cpp
index 7110fe44c54..07ece3b0cd9 100644
--- a/src/shared/Database/Database.cpp
+++ b/src/shared/Database/Database.cpp
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
+ * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
- * Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
+ * 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
diff --git a/src/shared/Database/Database.h b/src/shared/Database/Database.h
index c2ee9349979..92a1c991dcc 100644
--- a/src/shared/Database/Database.h
+++ b/src/shared/Database/Database.h
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
+ * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
- * Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
+ * 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
@@ -33,7 +33,7 @@ class SqlQueryHolder;
typedef UNORDERED_MAP<ZThread::ThreadImpl*, SqlTransaction*> TransactionQueues;
typedef UNORDERED_MAP<ZThread::ThreadImpl*, SqlResultQueue*> QueryQueues;
-#define MAX_QUERY_LEN 1024
+#define MAX_QUERY_LEN 32*1024
class TRINITY_DLL_SPEC Database
{
diff --git a/src/shared/Database/DatabaseEnv.h b/src/shared/Database/DatabaseEnv.h
index 664459473af..9366d1e0070 100644
--- a/src/shared/Database/DatabaseEnv.h
+++ b/src/shared/Database/DatabaseEnv.h
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
+ * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
- * Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
+ * 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
diff --git a/src/shared/Database/DatabaseImpl.h b/src/shared/Database/DatabaseImpl.h
index 5ab4ec04a65..3d3c53f0873 100644
--- a/src/shared/Database/DatabaseImpl.h
+++ b/src/shared/Database/DatabaseImpl.h
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
+ * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
- * Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
+ * 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
diff --git a/src/shared/Database/DatabaseMysql.cpp b/src/shared/Database/DatabaseMysql.cpp
index 72da1090a85..e7babedddfe 100644
--- a/src/shared/Database/DatabaseMysql.cpp
+++ b/src/shared/Database/DatabaseMysql.cpp
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
+ * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
- * Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
+ * 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
diff --git a/src/shared/Database/DatabaseMysql.h b/src/shared/Database/DatabaseMysql.h
index 1826a08f2aa..2fa157e75a5 100644
--- a/src/shared/Database/DatabaseMysql.h
+++ b/src/shared/Database/DatabaseMysql.h
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
+ * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
- * Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
+ * 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
diff --git a/src/shared/Database/DatabasePostgre.cpp b/src/shared/Database/DatabasePostgre.cpp
index 25b5a58b863..502808b7933 100644
--- a/src/shared/Database/DatabasePostgre.cpp
+++ b/src/shared/Database/DatabasePostgre.cpp
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
+ * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
- * Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
+ * 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
diff --git a/src/shared/Database/DatabasePostgre.h b/src/shared/Database/DatabasePostgre.h
index 6dc0c509869..c7242add572 100644
--- a/src/shared/Database/DatabasePostgre.h
+++ b/src/shared/Database/DatabasePostgre.h
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
+ * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
- * Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
+ * 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
diff --git a/src/shared/Database/DatabaseSqlite.cpp b/src/shared/Database/DatabaseSqlite.cpp
index a7a4a2a9847..b5def933723 100644
--- a/src/shared/Database/DatabaseSqlite.cpp
+++ b/src/shared/Database/DatabaseSqlite.cpp
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
+ * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
- * Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
+ * 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
diff --git a/src/shared/Database/DatabaseSqlite.h b/src/shared/Database/DatabaseSqlite.h
index 32d49d0124b..c84b59eea80 100644
--- a/src/shared/Database/DatabaseSqlite.h
+++ b/src/shared/Database/DatabaseSqlite.h
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
+ * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
- * Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
+ * 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
diff --git a/src/shared/Database/Field.cpp b/src/shared/Database/Field.cpp
index a7817d9a630..9a1fbfa5178 100644
--- a/src/shared/Database/Field.cpp
+++ b/src/shared/Database/Field.cpp
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
+ * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
- * Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
+ * 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
diff --git a/src/shared/Database/Field.h b/src/shared/Database/Field.h
index 3e5f26376bb..da6a865c6f2 100644
--- a/src/shared/Database/Field.h
+++ b/src/shared/Database/Field.h
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
+ * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
- * Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
+ * 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
diff --git a/src/shared/Database/Makefile.am b/src/shared/Database/Makefile.am
index 20cb2c87875..b030fca9b7e 100644
--- a/src/shared/Database/Makefile.am
+++ b/src/shared/Database/Makefile.am
@@ -1,6 +1,6 @@
-# Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
+# Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
#
-# Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
+# 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
@@ -9,19 +9,19 @@
#
# 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
+# 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
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
## Process this file with automake to produce Makefile.in
## Sub-directories to parse
## CPP flags for includes, defines, etc.
-AM_CPPFLAGS = $(MYSQL_INCLUDES) $(POSTGRE_INCLUDES) -I$(top_builddir)/src/shared -I$(srcdir) -I$(srcdir)/../../../dep/include -I$(srcdir)/../../framework -I$(srcdir)/../../shared -I$(srcdir)/../../../dep/include/g3dlite
+AM_CPPFLAGS = $(TRINI_INCLUDES) -I$(top_builddir)/src/shared -I$(srcdir) -I$(srcdir)/../../../dep/include -I$(srcdir)/../../framework -I$(srcdir)/../../shared -I$(srcdir)/../../../dep/include/g3dlite
## Build MaNGOS shared library and its parts as convenience library.
# All libraries will be convenience libraries. Might be changed to shared
@@ -43,6 +43,7 @@ libmangosdatabase_a_SOURCES = \
DatabasePostgre.h \
DatabaseSqlite.cpp \
DatabaseSqlite.h \
+ DBCEnums.h \
Field.cpp \
Field.h \
MySQLDelayThread.h \
@@ -56,6 +57,7 @@ libmangosdatabase_a_SOURCES = \
QueryResultSqlite.h \
SQLStorage.cpp \
SQLStorage.h \
+ SQLStorageImpl.h \
SqlDelayThread.cpp \
SqlDelayThread.h \
SqlOperations.cpp \
diff --git a/src/shared/Database/MySQLDelayThread.h b/src/shared/Database/MySQLDelayThread.h
index 14cf1a64617..fcebe3fbd35 100644
--- a/src/shared/Database/MySQLDelayThread.h
+++ b/src/shared/Database/MySQLDelayThread.h
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
+ * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
- * Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
+ * 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
diff --git a/src/shared/Database/PGSQLDelayThread.h b/src/shared/Database/PGSQLDelayThread.h
index 19941464cca..8d219bd9c1e 100644
--- a/src/shared/Database/PGSQLDelayThread.h
+++ b/src/shared/Database/PGSQLDelayThread.h
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
+ * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
- * Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
+ * 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
diff --git a/src/shared/Database/QueryResult.h b/src/shared/Database/QueryResult.h
index 32e47c0959f..01da45ed281 100644
--- a/src/shared/Database/QueryResult.h
+++ b/src/shared/Database/QueryResult.h
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
+ * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
- * Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
+ * 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
diff --git a/src/shared/Database/QueryResultMysql.cpp b/src/shared/Database/QueryResultMysql.cpp
index d995b9f2473..5bc11ae308f 100644
--- a/src/shared/Database/QueryResultMysql.cpp
+++ b/src/shared/Database/QueryResultMysql.cpp
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
+ * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
- * Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
+ * 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
diff --git a/src/shared/Database/QueryResultMysql.h b/src/shared/Database/QueryResultMysql.h
index 3131bd4bbe4..06b1353c12e 100644
--- a/src/shared/Database/QueryResultMysql.h
+++ b/src/shared/Database/QueryResultMysql.h
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
+ * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
- * Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
+ * 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
diff --git a/src/shared/Database/QueryResultPostgre.cpp b/src/shared/Database/QueryResultPostgre.cpp
index def1b0061e5..500ca053885 100644
--- a/src/shared/Database/QueryResultPostgre.cpp
+++ b/src/shared/Database/QueryResultPostgre.cpp
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
+ * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
- * Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
+ * 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
diff --git a/src/shared/Database/QueryResultPostgre.h b/src/shared/Database/QueryResultPostgre.h
index 61311728f2d..30d69114dc6 100644
--- a/src/shared/Database/QueryResultPostgre.h
+++ b/src/shared/Database/QueryResultPostgre.h
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
+ * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
- * Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
+ * 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
diff --git a/src/shared/Database/QueryResultSqlite.cpp b/src/shared/Database/QueryResultSqlite.cpp
index a041232f600..06a02d1db59 100644
--- a/src/shared/Database/QueryResultSqlite.cpp
+++ b/src/shared/Database/QueryResultSqlite.cpp
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
+ * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
- * Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
+ * 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
diff --git a/src/shared/Database/QueryResultSqlite.h b/src/shared/Database/QueryResultSqlite.h
index b2622f96707..5dc3287b385 100644
--- a/src/shared/Database/QueryResultSqlite.h
+++ b/src/shared/Database/QueryResultSqlite.h
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
+ * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
- * Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
+ * 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
diff --git a/src/shared/Database/SQLStorage.cpp b/src/shared/Database/SQLStorage.cpp
index 0eeefbf10ca..83649e77641 100644
--- a/src/shared/Database/SQLStorage.cpp
+++ b/src/shared/Database/SQLStorage.cpp
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
+ * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
- * Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
+ * 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
@@ -27,20 +27,20 @@ extern DatabasePostgre WorldDatabase;
extern DatabaseMysql WorldDatabase;
#endif
-const char CreatureInfosrcfmt[]="iiiiiisssiiiiiiiiiiffiffiiiiiiiiiiiffiiiiiiiiiiiiiiiiiiisiilliiis";
-const char CreatureInfodstfmt[]="iiiiiisssiiiiiiiiiiffiffiiiiiiiiiiiffiiiiiiiiiiiiiiiiiiisiilliiii";
+const char CreatureInfosrcfmt[]="iiiiiisssiiiiiiiiiiffiffiiiiiiiiiiiffiiiiiiiiiiiiiiiiiiiiiiisiifflliiis";
+const char CreatureInfodstfmt[]="iiiiiisssiiiiiiiiiiffiffiiiiiiiiiiiffiiiiiiiiiiiiiiiiiiiiiiisiifflliiii";
const char CreatureDataAddonInfofmt[]="iiiiiiiis";
const char CreatureModelfmt[]="iffbi";
const char CreatureInfoAddonInfofmt[]="iiiiiiiis";
-const char EquipmentInfofmt[]="iiiiiiiiii";
+const char EquipmentInfofmt[]="iiii";
const char GameObjectInfosrcfmt[]="iiissiifiiiiiiiiiiiiiiiiiiiiiiiis";
const char GameObjectInfodstfmt[]="iiissiifiiiiiiiiiiiiiiiiiiiiiiiii";
-const char ItemPrototypesrcfmt[]="iiiisiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiffiffiffiffiffiiiiiiiiiifiiifiiiiiifiiiiiifiiiiiifiiiiiifiiiisiiiiiiiiiiiiiiiiiiiiiiiiifsiiiii";
-const char ItemPrototypedstfmt[]="iiiisiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiffiffiffiffiffiiiiiiiiiifiiifiiiiiifiiiiiifiiiiiifiiiiiifiiiisiiiiiiiiiiiiiiiiiiiiiiiiifiiiiii";
+const char ItemPrototypesrcfmt[]="iiiisiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiffiffiffiffiffiiiiiiiiiifiiifiiiiiifiiiiiifiiiiiifiiiiiifiiiisiiiiiiiiiiiiiiiiiiiiiiiiifiisiiii";
+const char ItemPrototypedstfmt[]="iiiisiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiffiffiffiffiffiiiiiiiiiifiiifiiiiiifiiiiiifiiiiiifiiiiiifiiiisiiiiiiiiiiiiiiiiiiiiiiiiifiiiiiii";
const char PageTextfmt[]="isi";
const char SpellThreatfmt[]="ii";
-const char InstanceTemplatesrcfmt[]="iiiiiffffs";
-const char InstanceTemplatedstfmt[]="iiiiiffffi";
+const char InstanceTemplatesrcfmt[]="iiiiiiffffs";
+const char InstanceTemplatedstfmt[]="iiiiiiffffi";
SQLStorage sCreatureStorage(CreatureInfosrcfmt, CreatureInfodstfmt, "entry","creature_template");
SQLStorage sCreatureDataAddonStorage(CreatureDataAddonInfofmt,"guid","creature_addon");
diff --git a/src/shared/Database/SQLStorage.h b/src/shared/Database/SQLStorage.h
index 43e34532607..1b5b9d5dcf1 100644
--- a/src/shared/Database/SQLStorage.h
+++ b/src/shared/Database/SQLStorage.h
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
+ * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
- * Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
+ * 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
diff --git a/src/shared/Database/SQLStorageImpl.h b/src/shared/Database/SQLStorageImpl.h
index 82ff0beb60e..b7927851fef 100644
--- a/src/shared/Database/SQLStorageImpl.h
+++ b/src/shared/Database/SQLStorageImpl.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2005-2008 MaNGOS <http://getmangos.com/>
+ * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
* 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
@@ -22,13 +22,13 @@
template<class T>
template<class S, class D>
-void SQLStorageLoaderBase<T>::convert(uint32 field_pos, S src, D &dst)
+void SQLStorageLoaderBase<T>::convert(uint32 /*field_pos*/, S src, D &dst)
{
dst = D(src);
}
template<class T>
-void SQLStorageLoaderBase<T>::convert_str_to_str(uint32 field_pos, char *src, char *&dst)
+void SQLStorageLoaderBase<T>::convert_str_to_str(uint32 /*field_pos*/, char *src, char *&dst)
{
if(!src)
{
@@ -45,7 +45,7 @@ void SQLStorageLoaderBase<T>::convert_str_to_str(uint32 field_pos, char *src, ch
template<class T>
template<class S>
-void SQLStorageLoaderBase<T>::convert_to_str(uint32 field_pos, S src, char * & dst)
+void SQLStorageLoaderBase<T>::convert_to_str(uint32 /*field_pos*/, S /*src*/, char * & dst)
{
dst = new char[1];
*dst = 0;
@@ -53,7 +53,7 @@ void SQLStorageLoaderBase<T>::convert_to_str(uint32 field_pos, S src, char * & d
template<class T>
template<class D>
-void SQLStorageLoaderBase<T>::convert_from_str(uint32 field_pos, char * src, D& dst)
+void SQLStorageLoaderBase<T>::convert_from_str(uint32 /*field_pos*/, char * /*src*/, D& dst)
{
dst = 0;
}
diff --git a/src/shared/Database/SqlDelayThread.cpp b/src/shared/Database/SqlDelayThread.cpp
index 16d5146fc53..27f58510a0a 100644
--- a/src/shared/Database/SqlDelayThread.cpp
+++ b/src/shared/Database/SqlDelayThread.cpp
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
+ * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
- * Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
+ * 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
diff --git a/src/shared/Database/SqlDelayThread.h b/src/shared/Database/SqlDelayThread.h
index 4c77c122f1e..cbae0c1e5eb 100644
--- a/src/shared/Database/SqlDelayThread.h
+++ b/src/shared/Database/SqlDelayThread.h
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
+ * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
- * Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
+ * 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
@@ -42,7 +42,7 @@ class SqlDelayThread : public ZThread::Runnable
SqlDelayThread(Database* db);
///< Put sql statement to delay queue
- inline bool Delay(SqlOperation* sql) { m_sqlQueue.add(sql); return true; }
+ bool Delay(SqlOperation* sql) { m_sqlQueue.add(sql); return true; }
virtual void Stop(); ///< Stop event
virtual void run(); ///< Main Thread loop
diff --git a/src/shared/Database/SqlOperations.cpp b/src/shared/Database/SqlOperations.cpp
index c11c5b9269d..68f5759a85e 100644
--- a/src/shared/Database/SqlOperations.cpp
+++ b/src/shared/Database/SqlOperations.cpp
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
+ * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
- * Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
+ * 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
diff --git a/src/shared/Database/SqlOperations.h b/src/shared/Database/SqlOperations.h
index 1a0d3c78d1b..61eef4bb7c4 100644
--- a/src/shared/Database/SqlOperations.h
+++ b/src/shared/Database/SqlOperations.h
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
+ * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
- * Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
+ * 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
diff --git a/src/shared/Database/dbcfile.cpp b/src/shared/Database/dbcfile.cpp
index 9b363dbff8d..1de121bb17d 100644
--- a/src/shared/Database/dbcfile.cpp
+++ b/src/shared/Database/dbcfile.cpp
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
+ * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
- * Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
+ * 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
@@ -39,23 +39,35 @@ bool DBCFile::Load(const char *filename, const char *fmt)
delete [] data;
data=NULL;
}
+
FILE * f=fopen(filename,"rb");
if(!f)return false;
- fread(&header,4,1,f); // Number of records
+ if(fread(&header,4,1,f)!=1) // Number of records
+ return false;
+
EndianConvert(header);
if(header!=0x43424457)
- {
- //printf("not dbc file");
return false; //'WDBC'
- }
- fread(&recordCount,4,1,f); // Number of records
+
+ if(fread(&recordCount,4,1,f)!=1) // Number of records
+ return false;
+
EndianConvert(recordCount);
- fread(&fieldCount,4,1,f); // Number of fields
+
+ if(fread(&fieldCount,4,1,f)!=1) // Number of fields
+ return false;
+
EndianConvert(fieldCount);
- fread(&recordSize,4,1,f); // Size of a record
+
+ if(fread(&recordSize,4,1,f)!=1) // Size of a record
+ return false;
+
EndianConvert(recordSize);
- fread(&stringSize,4,1,f); // String size
+
+ if(fread(&stringSize,4,1,f)!=1) // String size
+ return false;
+
EndianConvert(stringSize);
fieldsOffset = new uint32[fieldCount];
@@ -71,7 +83,10 @@ bool DBCFile::Load(const char *filename, const char *fmt)
data = new unsigned char[recordSize*recordCount+stringSize];
stringTable = data + recordSize*recordCount;
- fread(data,recordSize*recordCount+stringSize,1,f);
+
+ if(fread(data,recordSize*recordCount+stringSize,1,f)!=1)
+ return false;
+
fclose(f);
return true;
}
diff --git a/src/shared/Database/dbcfile.h b/src/shared/Database/dbcfile.h
index aa36f6003dc..e94417b4371 100644
--- a/src/shared/Database/dbcfile.h
+++ b/src/shared/Database/dbcfile.h
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
+ * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
- * Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
+ * 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
diff --git a/src/shared/Errors.h b/src/shared/Errors.h
index 7203f1c5420..b7bd19a1d94 100644
--- a/src/shared/Errors.h
+++ b/src/shared/Errors.h
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
+ * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
- * Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
+ * 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
diff --git a/src/shared/Log.cpp b/src/shared/Log.cpp
index d042be82b77..2d756f65159 100644
--- a/src/shared/Log.cpp
+++ b/src/shared/Log.cpp
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
+ * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
- * Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
+ * 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
@@ -245,6 +245,8 @@ void Log::Initialize()
m_logFilter |= LOG_FILTER_CREATURE_MOVES;
if(sConfig.GetBoolDefault("LogFilter_VisibilityChanges", true))
m_logFilter |= LOG_FILTER_VISIBILITY_CHANGES;
+ if(sConfig.GetBoolDefault("LogFilter_AchievementUpdates", true))
+ m_logFilter |= LOG_FILTER_ACHIEVEMENT_UPDATES;
// Char log settings
m_charLog_Dump = sConfig.GetBoolDefault("CharLogDump", false);
diff --git a/src/shared/Log.h b/src/shared/Log.h
index ab8c24571fb..6913cc3c12c 100644
--- a/src/shared/Log.h
+++ b/src/shared/Log.h
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
+ * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
- * Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
+ * 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
@@ -31,7 +31,8 @@ enum LogFilters
{
LOG_FILTER_TRANSPORT_MOVES = 1,
LOG_FILTER_CREATURE_MOVES = 2,
- LOG_FILTER_VISIBILITY_CHANGES = 4
+ LOG_FILTER_VISIBILITY_CHANGES = 4,
+ LOG_FILTER_ACHIEVEMENT_UPDATES= 8
};
enum Color
diff --git a/src/shared/Makefile.am b/src/shared/Makefile.am
index 3a86f148521..6b99351cb26 100644
--- a/src/shared/Makefile.am
+++ b/src/shared/Makefile.am
@@ -1,6 +1,6 @@
-# Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
+# Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
#
-# Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
+# 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
@@ -18,96 +18,40 @@
## Process this file with automake to produce Makefile.in
-## TODO move vmaps in src dir instead of src/shared
-
## Sub-directories to parse
-SUBDIRS = vmap
+SUBDIRS = Auth Config Database vmap
+
+## CPP flags for includes, defines, etc.
+AM_CPPFLAGS = $(TRINI_INCLUDES) -I$(top_builddir)/src/shared -I$(srcdir) -I$(srcdir)/../../dep/include -I$(srcdir)/../framework -I$(srcdir)/../shared -I$(srcdir)/../../dep/include/g3dlite -DSYSCONFDIR=\"$(sysconfdir)/\"
+## AM_CPPFLAGS += -I$(srcdir)/../game -I$(srcdir)/../realmd
## Build MaNGOS shared library and its parts as convenience library.
# All libraries will be convenience libraries. Might be changed to shared
# later.
-noinst_LIBRARIES = libshared.a
-
-libshared_a_CPPFLAGS = \
-$(MYSQL_INCLUDES) \
-$(POSTGRE_INCLUDES) \
-$(TRINI_INCLUDES) \
--I$(top_srcdir)/dep/include \
--I$(top_srcdir)/src/framework
+noinst_LIBRARIES = libmangosshared.a
# libmangosshared library will later be reused by ...
-libshared_a_SOURCES = \
-$(srcdir)/Base.cpp \
-$(srcdir)/Base.h \
-$(srcdir)/ByteBuffer.h \
-$(srcdir)/Common.cpp \
-$(srcdir)/Common.h \
-$(srcdir)/Errors.h \
-$(srcdir)/Log.cpp \
-$(srcdir)/Log.h \
-$(srcdir)/Mthread.cpp \
-$(srcdir)/Mthread.h \
-$(srcdir)/ProgressBar.cpp \
-$(srcdir)/ProgressBar.h \
-$(srcdir)/Timer.h \
-$(srcdir)/Util.cpp \
-$(srcdir)/Util.h \
-$(srcdir)/WorldPacket.h \
-$(srcdir)/SystemConfig.h \
-$(srcdir)../game/IRCConf.h \
-$(srcdir)/Auth/AuthCrypt.cpp \
-$(srcdir)/Auth/AuthCrypt.h \
-$(srcdir)/Auth/BigNumber.cpp \
-$(srcdir)/Auth/BigNumber.h \
-$(srcdir)/Auth/Hmac.cpp \
-$(srcdir)/Auth/Hmac.h \
-$(srcdir)/Auth/Sha1.cpp \
-$(srcdir)/Auth/Sha1.h \
-$(srcdir)/Auth/md5.c \
-$(srcdir)/Auth/md5.h \
-$(srcdir)/Config/dotconfpp/dotconfpp.cpp \
-$(srcdir)/Config/dotconfpp/dotconfpp.h \
-$(srcdir)/Config/dotconfpp/mempool.cpp \
-$(srcdir)/Config/dotconfpp/mempool.h \
-$(srcdir)/Config/Config.cpp \
-$(srcdir)/Config/Config.h \
-$(srcdir)/Config/ConfigEnv.h \
-$(srcdir)/Database/DBCStores.cpp \
-$(srcdir)/Database/DBCStores.h \
-$(srcdir)/Database/DBCStructure.h \
-$(srcdir)/Database/DBCfmt.cpp \
-$(srcdir)/Database/Database.cpp \
-$(srcdir)/Database/Database.h \
-$(srcdir)/Database/DatabaseEnv.h \
-$(srcdir)/Database/DatabaseImpl.h \
-$(srcdir)/Database/DatabaseMysql.cpp \
-$(srcdir)/Database/DatabasePostgre.cpp \
-$(srcdir)/Database/DatabaseMysql.h \
-$(srcdir)/Database/DatabasePostgre.h \
-$(srcdir)/Database/DatabaseSqlite.cpp \
-$(srcdir)/Database/DatabaseSqlite.h \
-$(srcdir)/Database/Field.cpp \
-$(srcdir)/Database/Field.h \
-$(srcdir)/Database/MySQLDelayThread.h \
-$(srcdir)/Database/PGSQLDelayThread.h \
-$(srcdir)/Database/QueryResult.h \
-$(srcdir)/Database/QueryResultMysql.cpp \
-$(srcdir)/Database/QueryResultMysql.h \
-$(srcdir)/Database/QueryResultPostgre.cpp \
-$(srcdir)/Database/QueryResultPostgre.h \
-$(srcdir)/Database/QueryResultSqlite.cpp \
-$(srcdir)/Database/QueryResultSqlite.h \
-$(srcdir)/Database/SQLStorage.cpp \
-$(srcdir)/Database/SQLStorage.h \
-$(srcdir)/Database/SqlDelayThread.cpp \
-$(srcdir)/Database/SqlDelayThread.h \
-$(srcdir)/Database/SqlOperations.cpp \
-$(srcdir)/Database/SqlOperations.h \
-$(srcdir)/Database/dbcfile.cpp \
-$(srcdir)/Database/dbcfile.h \
-$(srcdir)/revision.h
-
+libmangosshared_a_SOURCES = \
+ Base.cpp \
+ Base.h \
+ ByteBuffer.h \
+ Common.cpp \
+ Common.h \
+ Errors.h \
+ Log.cpp \
+ Log.h \
+ MemoryLeaks.cpp \
+ MemoryLeaks.h \
+ ProgressBar.cpp \
+ ProgressBar.h \
+ Timer.h \
+ Util.cpp \
+ Util.h \
+ WorldPacket.h \
+ revision_nr.h \
+ revision.h
+# Get revision (git or svn)
# Get HG revision
REVISION_FILE = revision.h
@@ -123,16 +67,16 @@ $(REVISION_FILE) : $(top_builddir)/src/tools/genrevision/genrevision FORCE
## Additional files to include when running 'make dist'
# Disabled packet logger
EXTRA_DIST = \
- PacketLog.cpp \
- PacketLog.h
+ PacketLog.cpp \
+ PacketLog.h
# System configuration
EXTRA_DIST += \
- SystemConfig.h
+ SystemConfig.h
# System Win32 files
EXTRA_DIST += \
- ServiceWin32.cpp \
- ServiceWin32.h \
- WheatyExceptionReport.cpp \
- WheatyExceptionReport.h
+ ServiceWin32.cpp \
+ ServiceWin32.h \
+ WheatyExceptionReport.cpp \
+ WheatyExceptionReport.h
diff --git a/src/shared/MemoryLeaks.cpp b/src/shared/MemoryLeaks.cpp
new file mode 100644
index 00000000000..ef7e36c3b57
--- /dev/null
+++ b/src/shared/MemoryLeaks.cpp
@@ -0,0 +1,32 @@
+/*
+ * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
+ *
+ * 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
+ */
+
+#include "MemoryLeaks.h"
+#include "Policies/SingletonImp.h"
+
+INSTANTIATE_SINGLETON_1( MemoryManager ) ;
+
+MemoryManager::MemoryManager( )
+{
+ #if COMPILER == MICROSOFT
+ // standard leak check initialization
+ //_CrtSetDbgFlag( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF);
+ // uncomment to disable Visual Leak Detector from code
+ //VLDDisable();
+ #endif
+}
diff --git a/src/shared/MemoryLeaks.h b/src/shared/MemoryLeaks.h
new file mode 100644
index 00000000000..fcea1f557b1
--- /dev/null
+++ b/src/shared/MemoryLeaks.h
@@ -0,0 +1,48 @@
+/*
+ * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
+ *
+ * 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 TRINITYSERVER_MEMORY_H
+#define TRINITYSERVER_MEMORY_H
+
+#include "Platform/CompilerDefs.h"
+
+#if COMPILER == COMPILER_MICROSOFT
+
+#ifndef _WIN64
+// Visual Leak Detector support enabled
+//#include <vld/vld.h>
+// standard Visual Studio leak check disabled,
+//# define _CRTDBG_MAP_ALLOC
+//# include <stdlib.h>
+//# include <crtdbg.h>
+#else
+# define _CRTDBG_MAP_ALLOC
+# include <stdlib.h>
+# include <crtdbg.h>
+#endif
+
+#endif
+
+
+#include "Policies/Singleton.h"
+
+struct MemoryManager : public Trinity::Singleton < MemoryManager >
+{
+ MemoryManager();
+};
+#endif
diff --git a/src/shared/PacketLog.cpp b/src/shared/PacketLog.cpp
index aa9fd2dc348..96c9727e7fa 100644
--- a/src/shared/PacketLog.cpp
+++ b/src/shared/PacketLog.cpp
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
+ * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
- * Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
+ * 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
diff --git a/src/shared/PacketLog.h b/src/shared/PacketLog.h
index 30fb7da15b9..49ac72ebc4b 100644
--- a/src/shared/PacketLog.h
+++ b/src/shared/PacketLog.h
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
+ * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
- * Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
+ * 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
diff --git a/src/shared/ProgressBar.cpp b/src/shared/ProgressBar.cpp
index f5a45b9d862..b72118ad804 100644
--- a/src/shared/ProgressBar.cpp
+++ b/src/shared/ProgressBar.cpp
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
+ * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
- * Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
+ * 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
diff --git a/src/shared/ProgressBar.h b/src/shared/ProgressBar.h
index 3f217f228fe..50c5c7d11e5 100644
--- a/src/shared/ProgressBar.h
+++ b/src/shared/ProgressBar.h
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
+ * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
- * Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
+ * 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
diff --git a/src/shared/ServiceWin32.cpp b/src/shared/ServiceWin32.cpp
index d384884529a..bdc2a371297 100644
--- a/src/shared/ServiceWin32.cpp
+++ b/src/shared/ServiceWin32.cpp
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
+ * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
- * Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
+ * 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
diff --git a/src/shared/ServiceWin32.h b/src/shared/ServiceWin32.h
index d046acdcef4..18a52c396ea 100644
--- a/src/shared/ServiceWin32.h
+++ b/src/shared/ServiceWin32.h
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
+ * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
- * Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
+ * 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
diff --git a/src/shared/SystemConfig.h b/src/shared/SystemConfig.h
index 6b4471e792d..9d154b863d0 100644
--- a/src/shared/SystemConfig.h
+++ b/src/shared/SystemConfig.h
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
+ * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
- * Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
+ * Copyright (C) 2008-2009 Trinity <http://www.trinitycore.org/>
*
*
* This program is free software; you can redistribute it and/or modify
@@ -28,7 +28,7 @@
#include "revision.h"
-#define _PACKAGENAME "TrinityCore "
+#define _PACKAGENAME "TrinityCore2 "
#define _CODENAME "YUME"
#if TRINITY_ENDIAN == TRINITY_BIGENDIAN
diff --git a/src/shared/SystemConfig.h.in b/src/shared/SystemConfig.h.in
new file mode 100644
index 00000000000..85bbd8e19f0
--- /dev/null
+++ b/src/shared/SystemConfig.h.in
@@ -0,0 +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 TRINITY_SYSTEMCONFIG_H
+#define TRINITY_SYSTEMCONFIG_H
+
+#ifndef _PACKAGENAME
+#define _PACKAGENAME "TrinityCore2 "
+#endif
+
+#include "Platform/Define.h"
+#include "revision.h" //-----here u are ------ _REVISION is the magic key
+
+#ifndef _VERSION
+#if PLATFORM == PLATFORM_WINDOWS
+# define _VERSION(REVD,REVT,REVN,REVH) "0.13.0-DEV" " (" REVD " " REVT " Revision " REVN " - " REVH ")"
+#else
+# define _VERSION(REVD,REVT,REVN,REVH) "@VERSION@" " (" REVD " " REVT " Revision " REVN " - " REVH ")"
+#endif
+#endif
+
+// Format is YYYYMMDDRR where RR is the change in the conf file
+// for that day.
+#ifndef _MANGOSDCONFVERSION
+# define _MANGOSDCONFVERSION 2008022901
+#endif
+#ifndef _REALMDCONFVERSION
+# define _REALMDCONFVERSION 2007062001
+#endif
+
+#if MANGOS_ENDIAN == MANGOS_BIGENDIAN
+# define _ENDIAN_STRING "big-endian"
+#else
+# define _ENDIAN_STRING "little-endian"
+#endif
+
+// The path to config files
+#ifndef SYSCONFDIR
+# define SYSCONFDIR ""
+#endif
+
+#if PLATFORM == PLATFORM_WINDOWS
+# ifdef _WIN64
+# define _ENDIAN_PLATFORM "Win64 (" _ENDIAN_STRING ")"
+# else
+# define _ENDIAN_PLATFORM "Win32 (" _ENDIAN_STRING ")"
+# endif
+# define _MANGOSD_CONFIG SYSCONFDIR"mangosd.conf"
+# define _REALMD_CONFIG SYSCONFDIR"realmd.conf"
+#else
+# define _ENDIAN_PLATFORM "Unix (" _ENDIAN_STRING ")"
+# define _MANGOSD_CONFIG SYSCONFDIR"mangosd.conf"
+# define _REALMD_CONFIG SYSCONFDIR"realmd.conf"
+#endif
+
+
+#define DEFAULT_PLAYER_LIMIT 100
+#define DEFAULT_WORLDSERVER_PORT 8085 //8129
+#define DEFAULT_REALMSERVER_PORT 3724
+#define DEFAULT_SOCKET_SELECT_TIME 10000
+#endif
diff --git a/src/shared/Timer.h b/src/shared/Timer.h
index 81b6bb58465..82f5be161d9 100644
--- a/src/shared/Timer.h
+++ b/src/shared/Timer.h
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
+ * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
- * Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
+ * 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
diff --git a/src/shared/Util.cpp b/src/shared/Util.cpp
index 26d2275ec2a..767b65e441c 100644
--- a/src/shared/Util.cpp
+++ b/src/shared/Util.cpp
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
+ * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
- * Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
+ * 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
@@ -36,27 +36,27 @@ static MTRandTSS mtRand;
int32 irand (int32 min, int32 max)
{
- return int32 (mtRand.get ().randInt (max - min)) + min;
+ return int32 (mtRand.get ().randInt (max - min)) + min;
}
uint32 urand (uint32 min, uint32 max)
{
- return mtRand.get ().randInt (max - min) + min;
+ return mtRand.get ().randInt (max - min) + min;
}
int32 rand32 ()
{
- return mtRand.get ().randInt ();
+ return mtRand.get ().randInt ();
}
double rand_norm(void)
{
- return mtRand.get ().randExc ();
+ return mtRand.get ().randExc ();
}
double rand_chance (void)
{
- return mtRand.get ().randExc (100.0);
+ return mtRand.get ().randExc (100.0);
}
Tokens StrSplit(const std::string &src, const std::string &sep)
@@ -254,8 +254,9 @@ bool Utf8toWStr(char const* utf8str, size_t csize, wchar_t* wstr, size_t& wsize)
size_t len = utf8::distance(utf8str,utf8str+csize);
if(len > wsize)
{
+ if(wsize > 0)
+ wstr[0] = L'\0';
wsize = 0;
- wstr = L"";
return false;
}
@@ -265,8 +266,9 @@ bool Utf8toWStr(char const* utf8str, size_t csize, wchar_t* wstr, size_t& wsize)
}
catch(std::exception)
{
+ if(wsize > 0)
+ wstr[0] = L'\0';
wsize = 0;
- wstr = L"";
return false;
}
diff --git a/src/shared/Util.h b/src/shared/Util.h
index 98e60f83319..adfbdad620a 100644
--- a/src/shared/Util.h
+++ b/src/shared/Util.h
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
+ * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
- * Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
+ * 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
@@ -287,20 +287,20 @@ bool consoleToUtf8(const std::string& conStr,std::string& utf8str);
bool Utf8FitTo(const std::string& str, std::wstring search);
#if PLATFORM == PLATFORM_WINDOWS
-#define UTF8PRINTF(OUT,FRM,RESERR) \
-{ \
- char temp_buf[6000]; \
- va_list ap; \
- va_start(ap, FRM); \
- size_t temp_len = vsnprintf(temp_buf,6000,FRM,ap); \
- va_end(ap); \
- \
- wchar_t wtemp_buf[6000]; \
- size_t wtemp_len = 6000-1; \
+#define UTF8PRINTF(OUT,FRM,RESERR) \
+{ \
+ char temp_buf[32*1024]; \
+ va_list ap; \
+ va_start(ap, FRM); \
+ size_t temp_len = vsnprintf(temp_buf,32*1024,FRM,ap); \
+ va_end(ap); \
+ \
+ wchar_t wtemp_buf[32*1024]; \
+ size_t wtemp_len = 32*1024-1; \
if(!Utf8toWStr(temp_buf,temp_len,wtemp_buf,wtemp_len)) \
- return RESERR; \
+ return RESERR; \
CharToOemBuffW(&wtemp_buf[0],&temp_buf[0],wtemp_len+1);\
- fprintf(OUT,temp_buf); \
+ fprintf(OUT,temp_buf); \
}
#else
#define UTF8PRINTF(OUT,FRM,RESERR) \
@@ -317,3 +317,231 @@ uint32 CreatePIDFile(const std::string& filename);
#endif
+//handler for operations on large flags
+#ifndef _FLAG96
+#define _FLAG96
+
+class flag96
+{
+private:
+ uint32 part[3];
+public:
+ flag96(uint32 p1=0,uint32 p2=0,uint32 p3=0)
+ {
+ part[0]=p1;
+ part[1]=p2;
+ part[2]=p3;
+ }
+
+ inline bool IsEqual(uint32 p1=0, uint32 p2=0, uint32 p3=0) const
+ {
+ return (
+ part[0]==p1 &&
+ part[1]==p2 &&
+ part[2]==p3);
+ };
+
+ inline bool HasFlag(uint32 p1=0, uint32 p2=0, uint32 p3=0) const
+ {
+ return (
+ part[0]&p1 ||
+ part[1]&p2 ||
+ part[2]&p3);
+ };
+
+ inline void Set(uint32 p1=0, uint32 p2=0, uint32 p3=0)
+ {
+ part[0]=p1;
+ part[1]=p2;
+ part[2]=p3;
+ };
+
+ template<class type>
+ inline bool operator < (type & right)
+ {
+ for (uint8 i=3;i>0;i--)
+ {
+ if (part[i-1]<right.part[i-1])
+ return 1;
+ else if (part[i-1]>right.part[i-1])
+ return 0;
+ }
+ return 0;
+ };
+
+ template<class type>
+ inline bool operator < (type & right) const
+ {
+ for (uint8 i=3;i>0;i--)
+ {
+ if (part[i-1]<right.part[i-1])
+ return 1;
+ else if (part[i-1]>right.part[i-1])
+ return 0;
+ }
+ return 0;
+ };
+
+ template<class type>
+ inline bool operator != (type & right)
+ {
+ if (part[0]!=right.part[0]
+ || part[1]!=right.part[1]
+ || part[2]!=right.part[2])
+ return true;
+ return false;
+ }
+
+ template<class type>
+ inline bool operator != (type & right) const
+ {
+ if (part[0]!=right.part[0]
+ || part[1]!=right.part[1]
+ || part[2]!=right.part[2])
+ return true;
+ return false;
+ };
+
+ template<class type>
+ inline bool operator == (type & right)
+ {
+ if (part[0]!=right.part[0]
+ || part[1]!=right.part[1]
+ || part[2]!=right.part[2])
+ return false;
+ return true;
+ };
+
+ template<class type>
+ inline bool operator == (type & right) const
+ {
+ if (part[0]!=right.part[0]
+ || part[1]!=right.part[1]
+ || part[2]!=right.part[2])
+ return false;
+ return true;
+ };
+
+ template<class type>
+ inline void operator = (type & right)
+ {
+ part[0]=right.part[0];
+ part[1]=right.part[1];
+ part[2]=right.part[2];
+ };
+
+ template<class type>
+ inline flag96 operator & (type & right)
+ {
+ flag96 ret(part[0] & right.part[0],part[1] & right.part[1],part[2] & right.part[2]);
+ return
+ ret;
+ };
+ template<class type>
+ inline flag96 operator & (type & right) const
+ {
+ flag96 ret(part[0] & right.part[0],part[1] & right.part[1],part[2] & right.part[2]);
+ return
+ ret;
+ };
+
+ template<class type>
+ inline void operator &= (type & right)
+ {
+ *this=*this & right;
+ };
+
+ template<class type>
+ inline flag96 operator | (type & right)
+ {
+ flag96 ret(part[0] | right.part[0],part[1] | right.part[1],part[2] | right.part[2]);
+ return
+ ret;
+ };
+
+ template<class type>
+ inline flag96 operator | (type & right) const
+ {
+ flag96 ret(part[0] | right.part[0],part[1] | right.part[1],part[2] | right.part[2]);
+ return
+ ret;
+ };
+
+ template<class type>
+ inline void operator |= (type & right)
+ {
+ *this=*this | right;
+ };
+
+ inline void operator ~ ()
+ {
+ part[2]=~part[2];
+ part[1]=~part[1];
+ part[0]=~part[0];
+ };
+
+ template<class type>
+ inline flag96 operator ^ (type & right)
+ {
+ flag96 ret(part[0] ^ right.part[0],part[1] ^ right.part[1],part[2] ^ right.part[2]);
+ return
+ ret;
+ };
+
+ template<class type>
+ inline flag96 operator ^ (type & right) const
+ {
+ flag96 ret(part[0] ^ right.part[0],part[1] ^ right.part[1],part[2] ^ right.part[2]);
+ return
+ ret;
+ };
+
+ template<class type>
+ inline void operator ^= (type & right)
+ {
+ *this=*this^right;
+ };
+
+ inline operator bool() const
+ {
+ return(
+ part[0] != 0 ||
+ part[1] != 0 ||
+ part[2] != 0);
+ };
+
+ inline operator bool()
+ {
+ return(
+ part[0] != 0 ||
+ part[1] != 0 ||
+ part[2] != 0);
+ };
+
+ inline bool operator ! () const
+ {
+ return(
+ part[0] == 0 &&
+ part[1] == 0 &&
+ part[2] == 0);
+ };
+
+ inline bool operator ! ()
+ {
+ return(
+ part[0] == 0 &&
+ part[1] == 0 &&
+ part[2] == 0);
+ };
+
+ inline uint32 & operator[](uint8 el)
+ {
+ return (part[el]);
+ };
+
+ inline const uint32 & operator[](uint8 el) const
+ {
+ return (part[el]);
+ };
+};
+#endif
diff --git a/src/shared/WorldPacket.h b/src/shared/WorldPacket.h
index 8849b790f01..1eb3f12dd86 100644
--- a/src/shared/WorldPacket.h
+++ b/src/shared/WorldPacket.h
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
+ * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
- * Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
+ * 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
diff --git a/src/shared/vmap/BaseModel.cpp b/src/shared/vmap/BaseModel.cpp
index f4bf13bc558..2ffd5672218 100644
--- a/src/shared/vmap/BaseModel.cpp
+++ b/src/shared/vmap/BaseModel.cpp
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
+ * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
- * Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
+ * 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
diff --git a/src/shared/vmap/BaseModel.h b/src/shared/vmap/BaseModel.h
index 6c17f704692..098e1d9381b 100644
--- a/src/shared/vmap/BaseModel.h
+++ b/src/shared/vmap/BaseModel.h
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
+ * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
- * Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
+ * 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
diff --git a/src/shared/vmap/CoordModelMapping.cpp b/src/shared/vmap/CoordModelMapping.cpp
index 319e7bb8c31..c362101ffb4 100644
--- a/src/shared/vmap/CoordModelMapping.cpp
+++ b/src/shared/vmap/CoordModelMapping.cpp
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
+ * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
- * Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
+ * 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
diff --git a/src/shared/vmap/CoordModelMapping.h b/src/shared/vmap/CoordModelMapping.h
index cfaa600ee81..7c89f0e8a0f 100644
--- a/src/shared/vmap/CoordModelMapping.h
+++ b/src/shared/vmap/CoordModelMapping.h
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
+ * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
- * Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
+ * 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
diff --git a/src/shared/vmap/DebugCmdLogger.cpp b/src/shared/vmap/DebugCmdLogger.cpp
index 2552a16acc2..de656f4cfc5 100644
--- a/src/shared/vmap/DebugCmdLogger.cpp
+++ b/src/shared/vmap/DebugCmdLogger.cpp
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
+ * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
- * Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
+ * 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
diff --git a/src/shared/vmap/DebugCmdLogger.h b/src/shared/vmap/DebugCmdLogger.h
index a194d335381..5493ab6f332 100644
--- a/src/shared/vmap/DebugCmdLogger.h
+++ b/src/shared/vmap/DebugCmdLogger.h
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
+ * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
- * Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
+ * 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
diff --git a/src/shared/vmap/IVMapManager.h b/src/shared/vmap/IVMapManager.h
index 01aef4b9d4c..243a15aef73 100644
--- a/src/shared/vmap/IVMapManager.h
+++ b/src/shared/vmap/IVMapManager.h
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
+ * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
- * Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
+ * 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
diff --git a/src/shared/vmap/Makefile.am b/src/shared/vmap/Makefile.am
index 80b297f8def..483a926c907 100644
--- a/src/shared/vmap/Makefile.am
+++ b/src/shared/vmap/Makefile.am
@@ -1,6 +1,6 @@
-# Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
+# Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
#
-# Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
+# 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
@@ -9,50 +9,50 @@
#
# 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
+# 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
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
## Process this file with automake to produce Makefile.in
-noinst_LIBRARIES = libvmaps.a
+## Sub-directories to parse
-## Preprocessor flags
-libvmaps_a_CPPFLAGS = \
-$(TRINI_INCLUDES) \
--I$(top_srcdir)/dep/include \
--I$(top_srcdir)/dep/include/g3dlite
-
-libvmaps_a_SOURCES = \
-$(srcdir)/AABSPTree.h \
-$(srcdir)/BaseModel.cpp \
-$(srcdir)/BaseModel.h \
-$(srcdir)/CoordModelMapping.cpp \
-$(srcdir)/CoordModelMapping.h \
-$(srcdir)/DebugCmdLogger.cpp \
-$(srcdir)/DebugCmdLogger.h \
-$(srcdir)/IVMapManager.h \
-$(srcdir)/ManagedModelContainer.cpp \
-$(srcdir)/ManagedModelContainer.h \
-$(srcdir)/ModelContainer.cpp \
-$(srcdir)/ModelContainer.h \
-$(srcdir)/NodeValueAccess.h \
-$(srcdir)/ShortBox.h \
-$(srcdir)/ShortVector.h \
-$(srcdir)/SubModel.cpp \
-$(srcdir)/SubModel.h \
-$(srcdir)/TileAssembler.cpp \
-$(srcdir)/TileAssembler.h \
-$(srcdir)/TreeNode.cpp \
-$(srcdir)/TreeNode.h \
-$(srcdir)/VMapDefinitions.h \
-$(srcdir)/VMapFactory.cpp \
-$(srcdir)/VMapFactory.h \
-$(srcdir)/VMapManager.cpp \
-$(srcdir)/VMapManager.h \
-$(srcdir)/VMapTools.h
+## CPP flags for includes, defines, etc.
+AM_CPPFLAGS = $(TRINI_INCLUDES) -I$(top_builddir)/src/shared -I$(srcdir) -I$(srcdir)/../../../dep/include -I$(srcdir)/../../framework -I$(srcdir)/../../shared -I$(srcdir)/../../../dep/include/g3dlite
+## Build MaNGOS shared library and its parts as convenience library.
+# All libraries will be convenience libraries. Might be changed to shared
+# later.
+noinst_LIBRARIES = libmangosvmaps.a
+libmangosvmaps_a_SOURCES = \
+ AABSPTree.h \
+ BaseModel.cpp \
+ BaseModel.h \
+ CoordModelMapping.cpp \
+ CoordModelMapping.h \
+ DebugCmdLogger.cpp \
+ DebugCmdLogger.h \
+ IVMapManager.h \
+ ManagedModelContainer.cpp \
+ ManagedModelContainer.h \
+ ModelContainer.cpp \
+ ModelContainer.h \
+ NodeValueAccess.h \
+ ShortBox.h \
+ ShortVector.h \
+ SubModel.cpp \
+ SubModel.h \
+ TileAssembler.cpp \
+ TileAssembler.h \
+ TreeNode.cpp \
+ TreeNode.h \
+ VMapDefinitions.h \
+ VMapFactory.cpp \
+ VMapFactory.h \
+ VMapManager.cpp \
+ VMapManager.h \
+ VMapTools.h
diff --git a/src/shared/vmap/ManagedModelContainer.cpp b/src/shared/vmap/ManagedModelContainer.cpp
index 1362002bafd..c7bfefe7179 100644
--- a/src/shared/vmap/ManagedModelContainer.cpp
+++ b/src/shared/vmap/ManagedModelContainer.cpp
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
+ * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
- * Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
+ * 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
diff --git a/src/shared/vmap/ManagedModelContainer.h b/src/shared/vmap/ManagedModelContainer.h
index 33c675d0806..e6862f915c7 100644
--- a/src/shared/vmap/ManagedModelContainer.h
+++ b/src/shared/vmap/ManagedModelContainer.h
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
+ * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
- * Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
+ * 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
diff --git a/src/shared/vmap/ModelContainer.cpp b/src/shared/vmap/ModelContainer.cpp
index 9eb100161d8..4a722d2585b 100644
--- a/src/shared/vmap/ModelContainer.cpp
+++ b/src/shared/vmap/ModelContainer.cpp
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
+ * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
- * Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
+ * 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
diff --git a/src/shared/vmap/ModelContainer.h b/src/shared/vmap/ModelContainer.h
index 9613bf53d96..abc96261050 100644
--- a/src/shared/vmap/ModelContainer.h
+++ b/src/shared/vmap/ModelContainer.h
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
+ * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
- * Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
+ * 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
diff --git a/src/shared/vmap/NodeValueAccess.h b/src/shared/vmap/NodeValueAccess.h
index e14a6dba676..54fc5ee99b6 100644
--- a/src/shared/vmap/NodeValueAccess.h
+++ b/src/shared/vmap/NodeValueAccess.h
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
+ * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
- * Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
+ * 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
diff --git a/src/shared/vmap/ShortBox.h b/src/shared/vmap/ShortBox.h
index bffca0d806d..0e98677aa9e 100644
--- a/src/shared/vmap/ShortBox.h
+++ b/src/shared/vmap/ShortBox.h
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
+ * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
- * Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
+ * 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
diff --git a/src/shared/vmap/ShortVector.h b/src/shared/vmap/ShortVector.h
index f7dd0f74859..5f0fb7d9fd8 100644
--- a/src/shared/vmap/ShortVector.h
+++ b/src/shared/vmap/ShortVector.h
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
+ * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
- * Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
+ * 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
diff --git a/src/shared/vmap/SubModel.cpp b/src/shared/vmap/SubModel.cpp
index c6022d2ed69..370c80062d6 100644
--- a/src/shared/vmap/SubModel.cpp
+++ b/src/shared/vmap/SubModel.cpp
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
+ * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
- * Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
+ * 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
diff --git a/src/shared/vmap/SubModel.h b/src/shared/vmap/SubModel.h
index c52dc7f5c51..89ea9b91d7b 100644
--- a/src/shared/vmap/SubModel.h
+++ b/src/shared/vmap/SubModel.h
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
+ * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
- * Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
+ * 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
diff --git a/src/shared/vmap/TileAssembler.cpp b/src/shared/vmap/TileAssembler.cpp
index e6a1a6f448b..64d67205f68 100644
--- a/src/shared/vmap/TileAssembler.cpp
+++ b/src/shared/vmap/TileAssembler.cpp
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
+ * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
- * Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
+ * 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
@@ -75,12 +75,12 @@ namespace VMAP
addWorldAreaMapId(0); //Azeroth
addWorldAreaMapId(1); //Kalimdor
addWorldAreaMapId(530); //Expansion01
+ addWorldAreaMapId(571); //Expansion02
}
//=================================================================
std::string getModNameFromModPosName(const std::string& pModPosName)
{
-
size_t spos = pModPosName.find_first_of('#');
std::string modelFileName = pModPosName.substr(0,spos);
return(modelFileName);
@@ -142,7 +142,6 @@ namespace VMAP
//=================================================================
bool TileAssembler::convertWorld()
{
-
#ifdef _ASSEMBLER_DEBUG
# ifdef _DEBUG
::g_df = fopen("../TileAssembler_debug.txt", "wb");
diff --git a/src/shared/vmap/TileAssembler.h b/src/shared/vmap/TileAssembler.h
index a2fe8055fcf..d2183794a9e 100644
--- a/src/shared/vmap/TileAssembler.h
+++ b/src/shared/vmap/TileAssembler.h
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
+ * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
- * Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
+ * 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
diff --git a/src/shared/vmap/TreeNode.cpp b/src/shared/vmap/TreeNode.cpp
index 113199235bf..c884f9b3b1d 100644
--- a/src/shared/vmap/TreeNode.cpp
+++ b/src/shared/vmap/TreeNode.cpp
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
+ * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
- * Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
+ * 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
diff --git a/src/shared/vmap/TreeNode.h b/src/shared/vmap/TreeNode.h
index d71396487b9..1b9532001e5 100644
--- a/src/shared/vmap/TreeNode.h
+++ b/src/shared/vmap/TreeNode.h
@@ -1,7 +1,7 @@
/*
-* Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
+* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
-* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
+* 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
diff --git a/src/shared/vmap/VMapDefinitions.h b/src/shared/vmap/VMapDefinitions.h
index 0800bfbda88..fd28a91d515 100644
--- a/src/shared/vmap/VMapDefinitions.h
+++ b/src/shared/vmap/VMapDefinitions.h
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
+ * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
- * Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
+ * 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
diff --git a/src/shared/vmap/VMapFactory.cpp b/src/shared/vmap/VMapFactory.cpp
index 2dad2047189..5189f79daba 100644
--- a/src/shared/vmap/VMapFactory.cpp
+++ b/src/shared/vmap/VMapFactory.cpp
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
+ * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
- * Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
+ * 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
diff --git a/src/shared/vmap/VMapFactory.h b/src/shared/vmap/VMapFactory.h
index 9a4493d8817..f3375d723c1 100644
--- a/src/shared/vmap/VMapFactory.h
+++ b/src/shared/vmap/VMapFactory.h
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
+ * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
- * Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
+ * 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
diff --git a/src/shared/vmap/VMapManager.cpp b/src/shared/vmap/VMapManager.cpp
index 3b93b63086b..f5c2640be70 100644
--- a/src/shared/vmap/VMapManager.cpp
+++ b/src/shared/vmap/VMapManager.cpp
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
+ * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
- * Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
+ * 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
diff --git a/src/shared/vmap/VMapManager.h b/src/shared/vmap/VMapManager.h
index 8ece6de4652..bfeba3cfe67 100644
--- a/src/shared/vmap/VMapManager.h
+++ b/src/shared/vmap/VMapManager.h
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
+ * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
- * Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
+ * 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
diff --git a/src/shared/vmap/VMapTools.h b/src/shared/vmap/VMapTools.h
index 4961064d188..3af3a29310d 100644
--- a/src/shared/vmap/VMapTools.h
+++ b/src/shared/vmap/VMapTools.h
@@ -1,7 +1,7 @@
/*
-* Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
+* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
-* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
+* 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