aboutsummaryrefslogtreecommitdiff
path: root/src/game/ObjectMgr.cpp
diff options
context:
space:
mode:
authorn0n4m3 <none@none>2010-04-14 12:43:42 +0400
committern0n4m3 <none@none>2010-04-14 12:43:42 +0400
commite3e5ca62270f010d5dbc2c160db22cbffa6dc94b (patch)
treea60290ce37faf031fbe705121e7efa446f77c846 /src/game/ObjectMgr.cpp
parent61e71986f076f636619380da8e800f084b4465f5 (diff)
Drop not needed table 'item_text', add new column 'text' in table 'item_instance'. Original patch by Vladimir.
--HG-- branch : trunk
Diffstat (limited to 'src/game/ObjectMgr.cpp')
-rw-r--r--src/game/ObjectMgr.cpp52
1 files changed, 0 insertions, 52 deletions
diff --git a/src/game/ObjectMgr.cpp b/src/game/ObjectMgr.cpp
index 9cf28c3c482..beb4ca2839e 100644
--- a/src/game/ObjectMgr.cpp
+++ b/src/game/ObjectMgr.cpp
@@ -4795,41 +4795,6 @@ void ObjectMgr::LoadGossipScripts()
// checks are done in LoadGossipMenuItems
}
-void ObjectMgr::LoadItemTexts()
-{
- QueryResult_AutoPtr result = CharacterDatabase.Query("SELECT id, text FROM item_text");
-
- uint32 count = 0;
-
- if (!result)
- {
- barGoLink bar(1);
- bar.step();
-
- sLog.outString();
- sLog.outString(">> Loaded %u item pages", count);
- return;
- }
-
- barGoLink bar(result->GetRowCount());
-
- Field* fields;
- do
- {
- bar.step();
-
- fields = result->Fetch();
-
- mItemTexts[ fields[0].GetUInt32() ] = fields[1].GetCppString();
-
- ++count;
-
- } while (result->NextRow());
-
- sLog.outString();
- sLog.outString(">> Loaded %u item texts", count);
-}
-
void ObjectMgr::LoadPageTexts()
{
sPageTextStore.Free(); // for reload case
@@ -5986,10 +5951,6 @@ void ObjectMgr::SetHighestGuids()
if (result)
m_mailid = (*result)[0].GetUInt32()+1;
- result = CharacterDatabase.Query("SELECT MAX(id) FROM item_text");
- if (result)
- m_ItemTextId = (*result)[0].GetUInt32()+1;
-
result = CharacterDatabase.Query("SELECT MAX(guid) FROM corpse");
if (result)
m_hiCorpseGuid = (*result)[0].GetUInt32()+1;
@@ -6057,19 +6018,6 @@ uint32 ObjectMgr::GenerateMailID()
return m_mailid++;
}
-void ObjectMgr::CreateItemText(uint32 guid, std::string text)
-{
- // insert new item text to container
- mItemTexts[ guid ] = text;
-
- // save new item text
- CharacterDatabase.escape_string(text);
-
- std::ostringstream query;
- query << "INSERT INTO item_text (id,text) VALUES ( '" << guid << "', '" << text << "')";
- CharacterDatabase.Execute(query.str().c_str()); //needs to be run this way, because mail body may be more than 1024 characters
-}
-
uint32 ObjectMgr::GenerateLowGuid(HighGuid guidhigh)
{
switch(guidhigh)