[9702] Drop now redundent item_text table.

* In beggining bad news: at 3.3.3 switch has been forgoted item_instance.data field chnage.
  In result items with texts (mail copy in to inventory, some other) lost text content.
* That why in current commit item_text droped without convertion. In result all itesm with texts
  will lost text. Sorry for this as i think small porblem :(
* Now text stored in item itself.
This commit is contained in:
VladimirMangos 2010-04-09 01:50:18 +04:00
parent 53486545b5
commit 24f2d03485
17 changed files with 85 additions and 152 deletions

View file

@ -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;