Map local guids 6.x -> 4.3.4
Ported the following commits: https://github.com/TrinityCore/TrinityCore/commit/ca83e14f8b141fab0a13e08f48fca6c1ace0c4c7 https://github.com/TrinityCore/TrinityCore/commit/ee1c1b97be4492ecabe8b15ea6323fc37e4eaa8c https://github.com/TrinityCore/TrinityCore/commit/18e4ab6911468b829b0fc768e532a770263c3717 https://github.com/TrinityCore/TrinityCore/commit/bf37446b3c2ed73b4d3aa9e227d3eff5c53b378b https://github.com/TrinityCore/TrinityCore/commit/cb854a2b7bb7bd96cf9c4d1daf3789f797bf4db8
This commit is contained in:
1 parent
694c89d76d
commit
b3ea9fbbe5
163 files changed
+2448
-2328
No files matched your search
@@ -160,7 +160,7 @@ void WorldSession::HandleSendMail(WorldPacket& recvData)
|
||||
{
|
||||
TC_LOG_INFO("network", "Player %u is sending mail to %s (GUID: not existed!) with subject %s "
|
||||
"and body %s includes %u items, " UI64FMTD " copper and " UI64FMTD " COD copper with unk1 = %u, unk2 = %u",
|
||||
player->GetGUIDLow(), receiverName.c_str(), subject.c_str(), body.c_str(),
|
||||
player->GetGUID().GetCounter(), receiverName.c_str(), subject.c_str(), body.c_str(),
|
||||
items_count, money, COD, stationery, package);
|
||||
player->SendMailResult(0, MAIL_SEND, MAIL_ERR_RECIPIENT_NOT_FOUND);
|
||||
return;
|
||||
@@ -168,7 +168,7 @@ void WorldSession::HandleSendMail(WorldPacket& recvData)
|
||||
|
||||
TC_LOG_INFO("network", "Player %u is sending mail to %s (%s) with subject %s and body %s "
|
||||
"includes %u items, " UI64FMTD " copper and " UI64FMTD " COD copper with unk1 = %u, unk2 = %u",
|
||||
player->GetGUIDLow(), receiverName.c_str(), receiverGuid.ToString().c_str(), subject.c_str(),
|
||||
player->GetGUID().GetCounter(), receiverName.c_str(), receiverGuid.ToString().c_str(), subject.c_str(),
|
||||
body.c_str(), items_count, money, COD, stationery, package);
|
||||
|
||||
if (player->GetGUID() == receiverGuid)
|
||||
@@ -349,7 +349,7 @@ void WorldSession::HandleSendMail(WorldPacket& recvData)
|
||||
if (log)
|
||||
{
|
||||
sLog->outCommand(GetAccountId(), "GM %s (GUID: %u) (Account: %u) mail item: %s (Entry: %u Count: %u) "
|
||||
"to: %s (%s) (Account: %u)", GetPlayerName().c_str(), GetGuidLow(), GetAccountId(),
|
||||
"to: %s (%s) (Account: %u)", GetPlayerName().c_str(), GetGUIDLow(), GetAccountId(),
|
||||
item->GetTemplate()->Name1.c_str(), item->GetEntry(), item->GetCount(),
|
||||
receiverName.c_str(), receiverGuid.ToString().c_str(), receiverAccountId);
|
||||
}
|
||||
@@ -371,7 +371,7 @@ void WorldSession::HandleSendMail(WorldPacket& recvData)
|
||||
if (log && money > 0)
|
||||
{
|
||||
sLog->outCommand(GetAccountId(), "GM %s (GUID: %u) (Account: %u) mail money: " UI64FMTD " to: %s (%s) (Account: %u)",
|
||||
GetPlayerName().c_str(), GetGuidLow(), GetAccountId(), money, receiverName.c_str(), receiverGuid.ToString().c_str(), receiverAccountId);
|
||||
GetPlayerName().c_str(), GetGUIDLow(), GetAccountId(), money, receiverName.c_str(), receiverGuid.ToString().c_str(), receiverAccountId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -553,7 +553,7 @@ void WorldSession::HandleMailTakeItem(WorldPacket& recvData)
|
||||
|
||||
if (m->COD > 0) //if there is COD, take COD money from player and send them to sender by mail
|
||||
{
|
||||
ObjectGuid sender_guid(HIGHGUID_PLAYER, m->sender);
|
||||
ObjectGuid sender_guid(HighGuid::Player, m->sender);
|
||||
Player* receiver = ObjectAccessor::FindConnectedPlayer(sender_guid);
|
||||
|
||||
uint32 sender_accId = 0;
|
||||
@@ -593,7 +593,7 @@ void WorldSession::HandleMailTakeItem(WorldPacket& recvData)
|
||||
m->COD = 0;
|
||||
m->state = MAIL_STATE_CHANGED;
|
||||
player->m_mailsUpdated = true;
|
||||
player->RemoveMItem(it->GetGUIDLow());
|
||||
player->RemoveMItem(it->GetGUID().GetCounter());
|
||||
|
||||
uint32 count = it->GetCount(); // save counts before store and possible merge with deleting
|
||||
it->SetState(ITEM_UNCHANGED); // need to set this state, otherwise item cannot be removed later, if neccessary
|
||||
@@ -707,7 +707,7 @@ void WorldSession::HandleGetMailList(WorldPacket& recvData)
|
||||
switch ((*itr)->messageType)
|
||||
{
|
||||
case MAIL_NORMAL: // sender guid
|
||||
data << ObjectGuid(HIGHGUID_PLAYER, (*itr)->sender);
|
||||
data << ObjectGuid(HighGuid::Player, (*itr)->sender);
|
||||
break;
|
||||
case MAIL_CREATURE:
|
||||
case MAIL_GAMEOBJECT:
|
||||
@@ -734,7 +734,7 @@ void WorldSession::HandleGetMailList(WorldPacket& recvData)
|
||||
// item index (0-6?)
|
||||
data << uint8(i);
|
||||
// item guid low?
|
||||
data << uint32((item ? item->GetGUIDLow() : 0));
|
||||
data << uint32((item ? item->GetGUID().GetCounter() : 0));
|
||||
// entry
|
||||
data << uint32((item ? item->GetEntry() : 0));
|
||||
for (uint8 j = 0; j < MAX_INSPECTED_ENCHANTMENT_SLOT; ++j)
|
||||
@@ -794,7 +794,7 @@ void WorldSession::HandleMailCreateTextItem(WorldPacket& recvData)
|
||||
}
|
||||
|
||||
Item* bodyItem = new Item; // This is not bag and then can be used new Item.
|
||||
if (!bodyItem->Create(sObjectMgr->GenerateLowGuid(HIGHGUID_ITEM), MAIL_BODY_ITEM_TEMPLATE, player))
|
||||
if (!bodyItem->Create(sObjectMgr->GetGenerator<HighGuid::Item>().Generate(), MAIL_BODY_ITEM_TEMPLATE, player))
|
||||
{
|
||||
delete bodyItem;
|
||||
return;
|
||||
@@ -816,7 +816,7 @@ void WorldSession::HandleMailCreateTextItem(WorldPacket& recvData)
|
||||
bodyItem->SetText(m->body);
|
||||
|
||||
if (m->messageType == MAIL_NORMAL)
|
||||
bodyItem->SetGuidValue(ITEM_FIELD_CREATOR, ObjectGuid(HIGHGUID_PLAYER, m->sender));
|
||||
bodyItem->SetGuidValue(ITEM_FIELD_CREATOR, ObjectGuid(HighGuid::Player, m->sender));
|
||||
|
||||
bodyItem->SetFlag(ITEM_FIELD_FLAGS, ITEM_FLAG_MAIL_TEXT_MASK);
|
||||
|
||||
@@ -871,7 +871,7 @@ void WorldSession::HandleQueryNextMailTime(WorldPacket& /*recvData*/)
|
||||
if (sentSenders.count(m->sender))
|
||||
continue;
|
||||
|
||||
data << uint64(m->messageType == MAIL_NORMAL ? ObjectGuid(HIGHGUID_PLAYER, m->sender) : ObjectGuid::Empty); // player guid
|
||||
data << uint64(m->messageType == MAIL_NORMAL ? ObjectGuid(HighGuid::Player, m->sender) : ObjectGuid::Empty); // player guid
|
||||
data << uint32(m->messageType != MAIL_NORMAL ? m->sender : 0); // non-player entries
|
||||
data << uint32(m->messageType);
|
||||
data << uint32(m->stationery);
|
||||
|
||||
Reference in new issue
Block a user