diff options
author | n0n4m3 <none@none> | 2010-04-14 12:43:42 +0400 |
---|---|---|
committer | n0n4m3 <none@none> | 2010-04-14 12:43:42 +0400 |
commit | e3e5ca62270f010d5dbc2c160db22cbffa6dc94b (patch) | |
tree | a60290ce37faf031fbe705121e7efa446f77c846 /src/game/Mail.cpp | |
parent | 61e71986f076f636619380da8e800f084b4465f5 (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/Mail.cpp')
-rw-r--r-- | src/game/Mail.cpp | 27 |
1 files changed, 2 insertions, 25 deletions
diff --git a/src/game/Mail.cpp b/src/game/Mail.cpp index 0942e3a306f..14096fa796f 100644 --- a/src/game/Mail.cpp +++ b/src/game/Mail.cpp @@ -643,29 +643,6 @@ void WorldSession::HandleGetMailList(WorldPacket & recv_data) _player->UpdateNextMailTimeAndUnreads(); } -///this function is called when client needs mail message body, or when player clicks on item which has ITEM_FIELD_ITEM_TEXT_ID > 0 -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 << objmgr.GetItemText(item->GetGUIDLow()); // max 8000 - } - else - { - data << uint8(1); // no text - } - SendPacket(&data); -} - //used when player copies mail body to his inventory void WorldSession::HandleMailCreateTextItem(WorldPacket & recv_data) { @@ -704,10 +681,10 @@ void WorldSession::HandleMailCreateTextItem(WorldPacket & recv_data) return; } - objmgr.CreateItemText(bodyItem->GetGUIDLow(), mailTemplateEntry->content[GetSessionDbcLocale()]); + bodyItem->SetText(mailTemplateEntry->content[GetSessionDbcLocale()]); } else - objmgr.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); |