diff --git a/sql/characters.sql b/sql/characters.sql index e974a3c8f..374925577 100644 --- a/sql/characters.sql +++ b/sql/characters.sql @@ -21,7 +21,7 @@ DROP TABLE IF EXISTS `character_db_version`; CREATE TABLE `character_db_version` ( - `required_9692_02_characters_mail` bit(1) default NULL + `required_9702_01_characters_item` bit(1) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Last applied sql update to DB'; -- @@ -1368,6 +1368,7 @@ CREATE TABLE `item_instance` ( `guid` int(11) unsigned NOT NULL default '0', `owner_guid` int(11) unsigned NOT NULL default '0', `data` longtext, + `text` longtext, PRIMARY KEY (`guid`), KEY `idx_owner_guid` (`owner_guid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='Item System'; @@ -1381,26 +1382,6 @@ LOCK TABLES `item_instance` WRITE; /*!40000 ALTER TABLE `item_instance` ENABLE KEYS */; UNLOCK TABLES; --- --- Table structure for table `item_text` --- - -DROP TABLE IF EXISTS `item_text`; -CREATE TABLE `item_text` ( - `id` int(11) unsigned NOT NULL default '0', - `text` longtext, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Item System'; - --- --- Dumping data for table `item_text` --- - -LOCK TABLES `item_text` WRITE; -/*!40000 ALTER TABLE `item_text` DISABLE KEYS */; -/*!40000 ALTER TABLE `item_text` ENABLE KEYS */; -UNLOCK TABLES; - -- -- Table structure for table `mail` -- diff --git a/sql/updates/9702_01_characters_item.sql b/sql/updates/9702_01_characters_item.sql new file mode 100644 index 000000000..182f7d558 --- /dev/null +++ b/sql/updates/9702_01_characters_item.sql @@ -0,0 +1,9 @@ +ALTER TABLE character_db_version CHANGE COLUMN required_9692_02_characters_mail required_9702_01_characters_item bit; + + +ALTER TABLE `item_instance` + ADD COLUMN `text` longtext AFTER `data`; + +-- indexes in any case broken and lost after 3.3.3 switch. +DROP TABLE IF EXISTS `item_text`; + diff --git a/sql/updates/Makefile.am b/sql/updates/Makefile.am index 97e3c7c2b..4270084c1 100644 --- a/sql/updates/Makefile.am +++ b/sql/updates/Makefile.am @@ -109,6 +109,7 @@ pkgdata_DATA = \ 9692_01_characters_mail.sql \ 9692_02_characters_mail.sql \ 9692_03_mangos_spell_proc_event.sql \ + 9702_01_characters_item.sql \ README ## Additional files to include when running 'make dist' @@ -198,4 +199,5 @@ EXTRA_DIST = \ 9692_01_characters_mail.sql \ 9692_02_characters_mail.sql \ 9692_03_mangos_spell_proc_event.sql \ + 9702_01_characters_item.sql \ README diff --git a/src/game/AuctionHouseMgr.cpp b/src/game/AuctionHouseMgr.cpp index c3572c0f4..20b4429da 100644 --- a/src/game/AuctionHouseMgr.cpp +++ b/src/game/AuctionHouseMgr.cpp @@ -279,8 +279,8 @@ void AuctionHouseMgr::SendAuctionExpiredMail( AuctionEntry * auction ) void AuctionHouseMgr::LoadAuctionItems() { - // data needs to be at first place for Item::LoadFromDB - QueryResult *result = CharacterDatabase.Query( "SELECT data,itemguid,item_template FROM auctionhouse JOIN item_instance ON itemguid = guid" ); + // data needs to be at first place for Item::LoadFromDB 0 1 2 3 + QueryResult *result = CharacterDatabase.Query( "SELECT data,text,itemguid,item_template FROM auctionhouse JOIN item_instance ON itemguid = guid" ); if( !result ) { @@ -301,8 +301,8 @@ void AuctionHouseMgr::LoadAuctionItems() bar.step(); fields = result->Fetch(); - uint32 item_guid = fields[1].GetUInt32(); - uint32 item_template = fields[2].GetUInt32(); + uint32 item_guid = fields[2].GetUInt32(); + uint32 item_template = fields[3].GetUInt32(); ItemPrototype const *proto = ObjectMgr::GetItemPrototype(item_template); diff --git a/src/game/Bag.h b/src/game/Bag.h index ac57858ef..160128648 100644 --- a/src/game/Bag.h +++ b/src/game/Bag.h @@ -56,7 +56,7 @@ class Bag : public Item // overwrite virtual Item::SaveToDB void SaveToDB(); // overwrite virtual Item::LoadFromDB - bool LoadFromDB(uint32 guid, uint64 owner_guid, QueryResult *result = NULL); + bool LoadFromDB(uint32 guid, uint64 owner_guid, QueryResult *result); // overwrite virtual Item::DeleteFromDB void DeleteFromDB(); diff --git a/src/game/CharacterHandler.cpp b/src/game/CharacterHandler.cpp index 1a3dcf5b1..87b10639c 100644 --- a/src/game/CharacterHandler.cpp +++ b/src/game/CharacterHandler.cpp @@ -81,7 +81,7 @@ bool LoginQueryHolder::Initialize() res &= SetPQuery(PLAYER_LOGIN_QUERY_LOADDAILYQUESTSTATUS,"SELECT quest FROM character_queststatus_daily WHERE guid = '%u'", GUID_LOPART(m_guid)); res &= SetPQuery(PLAYER_LOGIN_QUERY_LOADWEKLYQUESTSTATUS,"SELECT quest FROM character_queststatus_weekly WHERE guid = '%u'", GUID_LOPART(m_guid)); res &= SetPQuery(PLAYER_LOGIN_QUERY_LOADREPUTATION, "SELECT faction,standing,flags FROM character_reputation WHERE guid = '%u'", GUID_LOPART(m_guid)); - res &= SetPQuery(PLAYER_LOGIN_QUERY_LOADINVENTORY, "SELECT data,bag,slot,item,item_template FROM character_inventory JOIN item_instance ON character_inventory.item = item_instance.guid WHERE character_inventory.guid = '%u' ORDER BY bag,slot", GUID_LOPART(m_guid)); + res &= SetPQuery(PLAYER_LOGIN_QUERY_LOADINVENTORY, "SELECT data,text,bag,slot,item,item_template FROM character_inventory JOIN item_instance ON character_inventory.item = item_instance.guid WHERE character_inventory.guid = '%u' ORDER BY bag,slot", GUID_LOPART(m_guid)); res &= SetPQuery(PLAYER_LOGIN_QUERY_LOADACTIONS, "SELECT spec,button,action,type FROM character_action WHERE guid = '%u' ORDER BY button", GUID_LOPART(m_guid)); res &= SetPQuery(PLAYER_LOGIN_QUERY_LOADSOCIALLIST, "SELECT friend,flags,note FROM character_social WHERE guid = '%u' LIMIT 255", GUID_LOPART(m_guid)); res &= SetPQuery(PLAYER_LOGIN_QUERY_LOADHOMEBIND, "SELECT map,zone,position_x,position_y,position_z FROM character_homebind WHERE guid = '%u'", GUID_LOPART(m_guid)); @@ -100,7 +100,7 @@ bool LoginQueryHolder::Initialize() res &= SetPQuery(PLAYER_LOGIN_QUERY_LOADSKILLS, "SELECT skill, value, max FROM character_skills WHERE guid = '%u'", GUID_LOPART(m_guid)); res &= SetPQuery(PLAYER_LOGIN_QUERY_LOADGLYPHS, "SELECT spec, slot, glyph FROM character_glyphs WHERE guid='%u'", GUID_LOPART(m_guid)); res &= SetPQuery(PLAYER_LOGIN_QUERY_LOADMAILS, "SELECT id,messageType,sender,receiver,subject,body,has_items,expire_time,deliver_time,money,cod,checked,stationery,mailTemplateId FROM mail WHERE receiver = '%u' ORDER BY id DESC", GUID_LOPART(m_guid)); - res &= SetPQuery(PLAYER_LOGIN_QUERY_LOADMAILEDITEMS, "SELECT data, mail_id, item_guid, item_template FROM mail_items JOIN item_instance ON item_guid = guid WHERE receiver = '%u'", GUID_LOPART(m_guid)); + res &= SetPQuery(PLAYER_LOGIN_QUERY_LOADMAILEDITEMS, "SELECT data, text, mail_id, item_guid, item_template FROM mail_items JOIN item_instance ON item_guid = guid WHERE receiver = '%u'", GUID_LOPART(m_guid)); return res; } diff --git a/src/game/Guild.cpp b/src/game/Guild.cpp index d447d5e57..c9ea0497e 100644 --- a/src/game/Guild.cpp +++ b/src/game/Guild.cpp @@ -1120,18 +1120,18 @@ void Guild::LoadGuildBankFromDB() delete result; // data needs to be at first place for Item::LoadFromDB - // 0 1 2 3 4 - result = CharacterDatabase.PQuery("SELECT data, TabId, SlotId, item_guid, item_entry FROM guild_bank_item JOIN item_instance ON item_guid = guid WHERE guildid='%u' ORDER BY TabId", m_Id); + // 0 1 2 3 4 5 + result = CharacterDatabase.PQuery("SELECT data, text, TabId, SlotId, item_guid, item_entry FROM guild_bank_item JOIN item_instance ON item_guid = guid WHERE guildid='%u' ORDER BY TabId", m_Id); if (!result) return; do { Field *fields = result->Fetch(); - uint8 TabId = fields[1].GetUInt8(); - uint8 SlotId = fields[2].GetUInt8(); - uint32 ItemGuid = fields[3].GetUInt32(); - uint32 ItemEntry = fields[4].GetUInt32(); + uint8 TabId = fields[2].GetUInt8(); + uint8 SlotId = fields[3].GetUInt8(); + uint32 ItemGuid = fields[4].GetUInt32(); + uint32 ItemEntry = fields[5].GetUInt32(); if (TabId >= m_PurchasedTabs || TabId >= GUILD_BANK_MAX_TABS) { diff --git a/src/game/Item.cpp b/src/game/Item.cpp index 16398af4c..d19dbb6b4 100644 --- a/src/game/Item.cpp +++ b/src/game/Item.cpp @@ -297,21 +297,26 @@ void Item::SaveToDB() { case ITEM_NEW: { + std::string text = m_text; + CharacterDatabase.escape_string(text); CharacterDatabase.PExecute( "DELETE FROM item_instance WHERE guid = '%u'", guid ); std::ostringstream ss; - ss << "INSERT INTO item_instance (guid,owner_guid,data) VALUES (" << guid << "," << GUID_LOPART(GetOwnerGUID()) << ",'"; + ss << "INSERT INTO item_instance (guid,owner_guid,data,text) VALUES (" << guid << "," << GUID_LOPART(GetOwnerGUID()) << ",'"; for(uint16 i = 0; i < m_valuesCount; ++i ) ss << GetUInt32Value(i) << " "; - ss << "' )"; + ss << "', '" << text << "')"; CharacterDatabase.Execute( ss.str().c_str() ); } break; case ITEM_CHANGED: { + std::string text = m_text; + CharacterDatabase.escape_string(text); std::ostringstream ss; ss << "UPDATE item_instance SET data = '"; for(uint16 i = 0; i < m_valuesCount; ++i ) ss << GetUInt32Value(i) << " "; - ss << "', owner_guid = '" << GUID_LOPART(GetOwnerGUID()) << "' WHERE guid = '" << guid << "'"; + ss << "', owner_guid = '" << GUID_LOPART(GetOwnerGUID()); + ss << "', text = '" << text << "' WHERE guid = '" << guid << "'"; CharacterDatabase.Execute( ss.str().c_str() ); @@ -320,8 +325,6 @@ void Item::SaveToDB() } break; case ITEM_REMOVED: { - //if (GetUInt32Value(ITEM_FIELD_ITEM_TEXT_ID) > 0 ) - // CharacterDatabase.PExecute("DELETE FROM item_text WHERE id = '%u'", GetUInt32Value(ITEM_FIELD_ITEM_TEXT_ID)); CharacterDatabase.PExecute("DELETE FROM item_instance WHERE guid = '%u'", guid); if(HasFlag(ITEM_FIELD_FLAGS, ITEM_FLAGS_WRAPPED)) CharacterDatabase.PExecute("DELETE FROM character_gifts WHERE item_guid = '%u'", GetGUIDLow()); diff --git a/src/game/Item.h b/src/game/Item.h index fcf64188f..b5e47ec56 100644 --- a/src/game/Item.h +++ b/src/game/Item.h @@ -244,7 +244,7 @@ class MANGOS_DLL_SPEC Item : public Object bool IsBindedNotWith(Player const* player) const; bool IsBoundByEnchant() const; virtual void SaveToDB(); - virtual bool LoadFromDB(uint32 guid, uint64 owner_guid, QueryResult *result = NULL); + virtual bool LoadFromDB(uint32 guid, uint64 owner_guid, QueryResult *result); virtual void DeleteFromDB(); void DeleteFromInventoryDB(); @@ -293,6 +293,9 @@ class MANGOS_DLL_SPEC Item : public Object uint32 GetEnchantmentDuration(EnchantmentSlot slot) const { return GetUInt32Value(ITEM_FIELD_ENCHANTMENT_1_1 + slot*MAX_ENCHANTMENT_OFFSET + ENCHANTMENT_DURATION_OFFSET);} uint32 GetEnchantmentCharges(EnchantmentSlot slot) const { return GetUInt32Value(ITEM_FIELD_ENCHANTMENT_1_1 + slot*MAX_ENCHANTMENT_OFFSET + ENCHANTMENT_CHARGES_OFFSET);} + std::string const& GetText() const { return m_text; } + void SetText(std::string const& text) { m_text = text; } + void SendTimeUpdate(Player* owner); void UpdateDuration(Player* owner, uint32 diff); @@ -326,6 +329,7 @@ class MANGOS_DLL_SPEC Item : public Object void RemoveFromClientUpdateList(); void BuildUpdateData(UpdateDataMapType& update_players); private: + std::string m_text; uint8 m_slot; Bag *m_container; ItemUpdateState uState; diff --git a/src/game/ItemHandler.cpp b/src/game/ItemHandler.cpp index 2af6113e8..c46551782 100644 --- a/src/game/ItemHandler.cpp +++ b/src/game/ItemHandler.cpp @@ -1371,3 +1371,30 @@ void WorldSession::HandleItemRefundInfoRequest(WorldPacket& recv_data) // item refund system not implemented yet } + +/** + * Handles the packet sent by the client when requesting information about item text. + * + * This function is called when player clicks on item which has some flag set + */ +void WorldSession::HandleItemTextQuery(WorldPacket & recv_data ) +{ + uint64 itemGuid; + recv_data >> itemGuid; + + sLog.outDebug("CMSG_ITEM_TEXT_QUERY item guid: %u", GUID_LOPART(itemGuid)); + + WorldPacket data(SMSG_ITEM_TEXT_QUERY_RESPONSE, (4+10)); // guess size + + if(Item *item = _player->GetItemByGuid(itemGuid)) + { + data << uint8(0); // has text + data << uint64(itemGuid); // item guid + data << item->GetText(); + } + else + { + data << uint8(1); // no text + } + SendPacket(&data); +} diff --git a/src/game/Mail.cpp b/src/game/Mail.cpp index 858245aac..24f554010 100644 --- a/src/game/Mail.cpp +++ b/src/game/Mail.cpp @@ -666,34 +666,6 @@ void WorldSession::HandleGetMailList(WorldPacket & recv_data ) _player->UpdateNextMailTimeAndUnreads(); } -/** - * Handles the packet sent by the client when requesting information about the body of a mail. - * - * This function is called when client needs mail message body, - * or when player clicks on item which has some flag set - */ -void WorldSession::HandleItemTextQuery(WorldPacket & recv_data ) -{ - uint64 itemGuid; - recv_data >> itemGuid; - - sLog.outDebug("CMSG_ITEM_TEXT_QUERY item guid: %u", GUID_LOPART(itemGuid)); - - WorldPacket data(SMSG_ITEM_TEXT_QUERY_RESPONSE, (4+10)); // guess size - - if(Item *item = _player->GetItemByGuid(itemGuid)) - { - data << uint8(0); // has text - data << uint64(itemGuid); // item guid - data << sObjectMgr.GetItemText(item->GetGUIDLow()); // max 8000 - } - else - { - data << uint8(1); // no text - } - SendPacket(&data); -} - /** * Handles the packet sent by the client when he copies the body a mail to his inventory. * @@ -738,14 +710,15 @@ void WorldSession::HandleMailCreateTextItem(WorldPacket & recv_data ) return; } - sObjectMgr.CreateItemText(bodyItem->GetGUIDLow(), mailTemplateEntry->content[GetSessionDbcLocale()]); + bodyItem->SetText(mailTemplateEntry->content[GetSessionDbcLocale()]); } else - sObjectMgr.CreateItemText(bodyItem->GetGUIDLow(), m->body); + bodyItem->SetText(m->body); bodyItem->SetUInt32Value(ITEM_FIELD_CREATOR, m->sender); bodyItem->SetFlag(ITEM_FIELD_FLAGS, ITEM_FLAGS_WRAPPER | ITEM_FLAGS_REFUNDABLE_2 | ITEM_FLAGS_UNK1); + sLog.outDetail("HandleMailCreateTextItem mailid=%u", mailId); ItemPosCountVec dest; diff --git a/src/game/ObjectMgr.cpp b/src/game/ObjectMgr.cpp index b810aec05..dfa8f33b7 100644 --- a/src/game/ObjectMgr.cpp +++ b/src/game/ObjectMgr.cpp @@ -4564,43 +4564,6 @@ void ObjectMgr::LoadGossipScripts() // checks are done in LoadGossipMenuItems } -void ObjectMgr::LoadItemTexts() -{ - QueryResult *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( (int)result->GetRowCount() ); - - Field* fields; - do - { - bar.step(); - - fields = result->Fetch(); - - mItemTexts[ fields[0].GetUInt32() ] = fields[1].GetCppString(); - - ++count; - - } while ( result->NextRow() ); - - delete result; - - sLog.outString(); - sLog.outString( ">> Loaded %u item texts", count ); -} - void ObjectMgr::LoadPageTexts() { sPageTextStore.Free(); // for reload case @@ -5800,19 +5763,6 @@ void ObjectMgr::SetHighestGuids() } } -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) diff --git a/src/game/ObjectMgr.h b/src/game/ObjectMgr.h index 8031b7471..386fac241 100644 --- a/src/game/ObjectMgr.h +++ b/src/game/ObjectMgr.h @@ -628,7 +628,6 @@ class ObjectMgr void LoadTavernAreaTriggers(); void LoadGameObjectForQuests(); - void LoadItemTexts(); void LoadPageTexts(); void LoadPlayerInfo(); @@ -680,16 +679,6 @@ class ObjectMgr uint32 GenerateMailID() { return m_MailIds.Generate(); } uint32 GeneratePetNumber() { return m_PetNumbers.Generate(); } - void CreateItemText(uint32 guid, std::string text); - std::string GetItemText( uint32 id ) - { - ItemTextMap::const_iterator itr = mItemTexts.find( id ); - if ( itr != mItemTexts.end() ) - return itr->second; - else - return "There is no info for this item"; - } - typedef std::multimap ExclusiveQuestGroups; ExclusiveQuestGroups mExclusiveQuestGroups; @@ -925,7 +914,6 @@ class ObjectMgr typedef UNORDERED_MAP GossipTextMap; typedef UNORDERED_MAP QuestAreaTriggerMap; - typedef UNORDERED_MAP ItemTextMap; typedef std::set TavernAreaTriggerSet; typedef std::set GameObjectForQuestSet; @@ -933,8 +921,6 @@ class ObjectMgr GuildMap mGuildMap; ArenaTeamMap mArenaTeamMap; - ItemTextMap mItemTexts; - QuestAreaTriggerMap mQuestAreaTriggerMap; TavernAreaTriggerSet mTavernAreaTriggerSet; GameObjectForQuestSet mGameObjectForQuestSet; diff --git a/src/game/Player.cpp b/src/game/Player.cpp index 0d47b7352..e8a5b0ca4 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -4080,15 +4080,16 @@ void Player::DeleteFromDB(uint64 playerguid, uint32 accountId, bool updateRealmC if(has_items) { // data needs to be at first place for Item::LoadFromDB - QueryResult *resultItems = CharacterDatabase.PQuery("SELECT data,item_guid,item_template FROM mail_items JOIN item_instance ON item_guid = guid WHERE mail_id='%u'", mail_id); + // 0 1 2 3 + QueryResult *resultItems = CharacterDatabase.PQuery("SELECT data,text,item_guid,item_template FROM mail_items JOIN item_instance ON item_guid = guid WHERE mail_id='%u'", mail_id); if(resultItems) { do { Field *fields2 = resultItems->Fetch(); - uint32 item_guidlow = fields2[1].GetUInt32(); - uint32 item_template = fields2[2].GetUInt32(); + uint32 item_guidlow = fields2[2].GetUInt32(); + uint32 item_template = fields2[3].GetUInt32(); ItemPrototype const* itemProto = ObjectMgr::GetItemPrototype(item_template); if(!itemProto) @@ -15542,7 +15543,7 @@ void Player::LoadCorpse() void Player::_LoadInventory(QueryResult *result, uint32 timediff) { - //QueryResult *result = CharacterDatabase.PQuery("SELECT data,bag,slot,item,item_template FROM character_inventory JOIN item_instance ON character_inventory.item = item_instance.guid WHERE character_inventory.guid = '%u' ORDER BY bag,slot", GetGUIDLow()); + //QueryResult *result = CharacterDatabase.PQuery("SELECT data,text,bag,slot,item,item_template FROM character_inventory JOIN item_instance ON character_inventory.item = item_instance.guid WHERE character_inventory.guid = '%u' ORDER BY bag,slot", GetGUIDLow()); std::map bagMap; // fast guid lookup for bags //NOTE: the "order by `bag`" is important because it makes sure //the bagMap is filled before items in the bags are loaded @@ -15560,10 +15561,10 @@ void Player::_LoadInventory(QueryResult *result, uint32 timediff) do { Field *fields = result->Fetch(); - uint32 bag_guid = fields[1].GetUInt32(); - uint8 slot = fields[2].GetUInt8(); - uint32 item_guid = fields[3].GetUInt32(); - uint32 item_id = fields[4].GetUInt32(); + uint32 bag_guid = fields[2].GetUInt32(); + uint8 slot = fields[3].GetUInt8(); + uint32 item_guid = fields[4].GetUInt32(); + uint32 item_id = fields[5].GetUInt32(); ItemPrototype const * proto = ObjectMgr::GetItemPrototype(item_id); @@ -15709,17 +15710,17 @@ void Player::_LoadInventory(QueryResult *result, uint32 timediff) void Player::_LoadMailedItems(QueryResult *result) { // data needs to be at first place for Item::LoadFromDB - // 0 1 2 3 - // "SELECT data, mail_id, item_guid, item_template FROM mail_items JOIN item_instance ON item_guid = guid WHERE receiver = '%u'", GUID_LOPART(m_guid) + // 0 1 2 3 4 + // "SELECT data, text, mail_id, item_guid, item_template FROM mail_items JOIN item_instance ON item_guid = guid WHERE receiver = '%u'", GUID_LOPART(m_guid) if(!result) return; do { Field *fields = result->Fetch(); - uint32 mail_id = fields[1].GetUInt32(); - uint32 item_guid_low = fields[2].GetUInt32(); - uint32 item_template = fields[3].GetUInt32(); + uint32 mail_id = fields[2].GetUInt32(); + uint32 item_guid_low = fields[3].GetUInt32(); + uint32 item_template = fields[4].GetUInt32(); Mail* mail = GetMail(mail_id); if(!mail) diff --git a/src/game/World.cpp b/src/game/World.cpp index 00ada7a56..2d7b3523e 100644 --- a/src/game/World.cpp +++ b/src/game/World.cpp @@ -980,9 +980,6 @@ void World::SetInitialWorldSettings() sLog.outString( "Loading Items..." ); // must be after LoadRandomEnchantmentsTable and LoadPageTexts sObjectMgr.LoadItemPrototypes(); - sLog.outString( "Loading Item Texts..." ); - sObjectMgr.LoadItemTexts(); - sLog.outString( "Loading Creature Model Based Info Data..." ); sObjectMgr.LoadCreatureModelInfo(); diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index b77a9bad8..98b520fef 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "9701" + #define REVISION_NR "9702" #endif // __REVISION_NR_H__ diff --git a/src/shared/revision_sql.h b/src/shared/revision_sql.h index 8d9169cad..8fec2ef11 100644 --- a/src/shared/revision_sql.h +++ b/src/shared/revision_sql.h @@ -1,6 +1,6 @@ #ifndef __REVISION_SQL_H__ #define __REVISION_SQL_H__ - #define REVISION_DB_CHARACTERS "required_9692_02_characters_mail" + #define REVISION_DB_CHARACTERS "required_9702_01_characters_item" #define REVISION_DB_MANGOS "required_9692_03_mangos_spell_proc_event" #define REVISION_DB_REALMD "required_9010_01_realmd_realmlist" #endif // __REVISION_SQL_H__