Merge branch 'azerothcore:master' into Playerbot

This commit is contained in:
ZhengPeiRu21
2022-12-29 12:20:26 -07:00
committed by GitHub
30 changed files with 173 additions and 29 deletions
@@ -653,7 +653,6 @@ void WorldSession::HandleCharDeleteOpcode(WorldPacket& recvData)
sCalendarMgr->RemoveAllPlayerEventsAndInvites(guid);
Player::DeleteFromDB(guid.GetCounter(), GetAccountId(), true, false);
sCharacterCache->DeleteCharacterCacheEntry(guid, name);
SendCharDelete(CHAR_DELETE_SUCCESS);
}
+10 -1
View File
@@ -93,7 +93,16 @@ void WorldSession::HandleAutostoreLootItemOpcode(WorldPacket& recvData)
loot = &creature->loot;
}
player->StoreLootItem(lootSlot, loot);
InventoryResult msg;
LootItem* lootItem = player->StoreLootItem(lootSlot, loot, msg);
if (msg != EQUIP_ERR_OK && lguid.IsItem() && loot->loot_type != LOOT_CORPSE)
{
lootItem->is_looted = true;
loot->NotifyItemRemoved(lootItem->itemIndex);
loot->unlootedCount--;
player->SendItemRetrievalMail(lootItem->itemid, lootItem->count);
}
// If player is removing the last LootItem, delete the empty container.
if (loot->isLooted() && lguid.IsItem())
+1 -1
View File
@@ -851,7 +851,7 @@ void WorldSession::HandleUpdateAccountData(WorldPacket& recv_data)
LOG_DEBUG("network", "UAD: type {}, time {}, decompressedSize {}", type, timestamp, decompressedSize);
if (type > NUM_ACCOUNT_DATA_TYPES)
if (type >= NUM_ACCOUNT_DATA_TYPES)
return;
if (decompressedSize == 0) // erase