Core: header cleanup, split realmlist, boost compatibility, cotire, remove stormlib/zlib and stormlib/bzip2 and instead use dep sources
This commit is contained in:
1 parent
7fff6c424f
commit
5ff847159c
1243 files changed
+29780
-36517
No files matched your search
@@ -16,19 +16,21 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "Common.h"
|
||||
#include "WorldPacket.h"
|
||||
#include "WorldSession.h"
|
||||
#include "World.h"
|
||||
#include "ObjectAccessor.h"
|
||||
#include "Log.h"
|
||||
#include "Player.h"
|
||||
#include "Item.h"
|
||||
#include "Spell.h"
|
||||
#include "SocialMgr.h"
|
||||
#include "Language.h"
|
||||
#include "AccountMgr.h"
|
||||
#include "Common.h"
|
||||
#include "DatabaseEnv.h"
|
||||
#include "Item.h"
|
||||
#include "Language.h"
|
||||
#include "Log.h"
|
||||
#include "ObjectAccessor.h"
|
||||
#include "Player.h"
|
||||
#include "SocialMgr.h"
|
||||
#include "Spell.h"
|
||||
#include "SpellMgr.h"
|
||||
#include "TradeData.h"
|
||||
#include "World.h"
|
||||
#include "WorldPacket.h"
|
||||
|
||||
void WorldSession::SendTradeStatus(TradeStatusInfo const& info)
|
||||
{
|
||||
@@ -214,8 +216,8 @@ void WorldSession::moveItems(Item* myItems[], Item* hisItems[])
|
||||
{
|
||||
ItemPosCountVec traderDst;
|
||||
ItemPosCountVec playerDst;
|
||||
bool traderCanTrade = (myItems[i] == NULL || trader->CanStoreItem(NULL_BAG, NULL_SLOT, traderDst, myItems[i], false) == EQUIP_ERR_OK);
|
||||
bool playerCanTrade = (hisItems[i] == NULL || _player->CanStoreItem(NULL_BAG, NULL_SLOT, playerDst, hisItems[i], false) == EQUIP_ERR_OK);
|
||||
bool traderCanTrade = (myItems[i] == nullptr || trader->CanStoreItem(NULL_BAG, NULL_SLOT, traderDst, myItems[i], false) == EQUIP_ERR_OK);
|
||||
bool playerCanTrade = (hisItems[i] == nullptr || _player->CanStoreItem(NULL_BAG, NULL_SLOT, playerDst, hisItems[i], false) == EQUIP_ERR_OK);
|
||||
if (traderCanTrade && playerCanTrade)
|
||||
{
|
||||
// Ok, if trade item exists and can be stored
|
||||
@@ -298,7 +300,7 @@ static void setAcceptTradeMode(TradeData* myTrade, TradeData* hisTrade, Item* *m
|
||||
if (Item* item = myTrade->GetItem(TradeSlots(i)))
|
||||
{
|
||||
TC_LOG_DEBUG("network", "player trade item %u bag: %u slot: %u", item->GetGUID().GetCounter(), item->GetBagSlot(), item->GetSlot());
|
||||
//Can return NULL
|
||||
//Can return nullptr
|
||||
myItems[i] = item;
|
||||
myItems[i]->SetInTrade();
|
||||
}
|
||||
@@ -342,8 +344,8 @@ void WorldSession::HandleAcceptTradeOpcode(WorldPacket& /*recvPacket*/)
|
||||
if (!his_trade)
|
||||
return;
|
||||
|
||||
Item* myItems[TRADE_SLOT_TRADED_COUNT] = { NULL, NULL, NULL, NULL, NULL, NULL };
|
||||
Item* hisItems[TRADE_SLOT_TRADED_COUNT] = { NULL, NULL, NULL, NULL, NULL, NULL };
|
||||
Item* myItems[TRADE_SLOT_TRADED_COUNT] = { nullptr, nullptr, nullptr, nullptr, nullptr, nullptr };
|
||||
Item* hisItems[TRADE_SLOT_TRADED_COUNT] = { nullptr, nullptr, nullptr, nullptr, nullptr, nullptr };
|
||||
|
||||
// set before checks for propertly undo at problems (it already set in to client)
|
||||
my_trade->SetAccepted(true);
|
||||
@@ -437,10 +439,10 @@ void WorldSession::HandleAcceptTradeOpcode(WorldPacket& /*recvPacket*/)
|
||||
{
|
||||
setAcceptTradeMode(my_trade, his_trade, myItems, hisItems);
|
||||
|
||||
Spell* my_spell = NULL;
|
||||
Spell* my_spell = nullptr;
|
||||
SpellCastTargets my_targets;
|
||||
|
||||
Spell* his_spell = NULL;
|
||||
Spell* his_spell = nullptr;
|
||||
SpellCastTargets his_targets;
|
||||
|
||||
// not accept if spell can't be cast now (cheating)
|
||||
@@ -609,9 +611,9 @@ void WorldSession::HandleAcceptTradeOpcode(WorldPacket& /*recvPacket*/)
|
||||
// cleanup
|
||||
clearAcceptTradeMode(my_trade, his_trade);
|
||||
delete _player->m_trade;
|
||||
_player->m_trade = NULL;
|
||||
_player->m_trade = nullptr;
|
||||
delete trader->m_trade;
|
||||
trader->m_trade = NULL;
|
||||
trader->m_trade = nullptr;
|
||||
|
||||
// desynchronized with the other saves here (SaveInventoryAndGoldToDB() not have own transaction guards)
|
||||
SQLTransaction trans = CharacterDatabase.BeginTransaction();
|
||||
@@ -890,5 +892,5 @@ void WorldSession::HandleClearTradeItemOpcode(WorldPacket& recvPacket)
|
||||
if (tradeSlot >= TRADE_SLOT_COUNT)
|
||||
return;
|
||||
|
||||
my_trade->SetItem(TradeSlots(tradeSlot), NULL);
|
||||
my_trade->SetItem(TradeSlots(tradeSlot), nullptr);
|
||||
}
|
||||
Reference in new issue
Block a user