[9634] Remove fields 'data' and 'zone' from corpse table.

Signed-off-by: hunuza <hunuza@gmail.com>
This commit is contained in:
hunuza 2010-03-28 13:09:23 +02:00
parent 6c553bf226
commit d85e4228f1
12 changed files with 106 additions and 81 deletions

View file

@ -81,6 +81,23 @@ Tokens StrSplit(const std::string &src, const std::string &sep)
return r;
}
uint32 GetUInt32ValueFromArray(Tokens const& data, uint16 index)
{
if(index >= data.size())
return 0;
return (uint32)atoi(data[index].c_str());
}
float GetFloatValueFromArray(Tokens const& data, uint16 index)
{
float result;
uint32 temp = GetUInt32ValueFromArray(data,index);
memcpy(&result, &temp, sizeof(result));
return result;
}
void stripLineInvisibleChars(std::string &str)
{
static std::string invChars = " \t\7\n";

View file

@ -27,6 +27,8 @@
typedef std::vector<std::string> Tokens;
Tokens StrSplit(const std::string &src, const std::string &sep);
uint32 GetUInt32ValueFromArray(Tokens const& data, uint16 index);
float GetFloatValueFromArray(Tokens const& data, uint16 index);
void stripLineInvisibleChars(std::string &src);

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "9633"
#define REVISION_NR "9634"
#endif // __REVISION_NR_H__

View file

@ -1,6 +1,6 @@
#ifndef __REVISION_SQL_H__
#define __REVISION_SQL_H__
#define REVISION_DB_CHARACTERS "required_9632_01_characters_characters"
#define REVISION_DB_CHARACTERS "required_9634_01_characters_corpse"
#define REVISION_DB_MANGOS "required_9622_01_mangos_gameobject"
#define REVISION_DB_REALMD "required_9010_01_realmd_realmlist"
#endif // __REVISION_SQL_H__