Hey, I'm doing a new system and it requires a Query consult to avoid compile every time I need to add a new ID to the array, so I made a db and I'm getting the data.
I write:
Inside: BattlegrounHandler.cpp
& Player.cpp
BUT!!... When I start the server (it compiles good), I access to my acc and if I wanna create a new player or access to the world with my curren player, Trinity WorldServer.exe crashes.
(Yes, If a delete this code, WorldServer don't crash).
Can u help me? Thanks
I write:
Code:
Item* item = _player->GetItemByPos(INVENTORY_SLOT_BAG_0, i);
QueryResult itemdb = CharacterDatabase.PQuery("SELECT (`id`) FROM `items_prohibidos` WHERE `id`='%s'", item->GetEntry());
Inside: BattlegrounHandler.cpp
Code:
void WorldSession::HandleBattleFieldPortOpcode(WorldPacket &recvData)
& Player.cpp
Code:
InventoryResult Player::CanEquipItem(uint8 slot, uint16 &dest, Item* pItem, bool swap, bool not_loading) const
BUT!!... When I start the server (it compiles good), I access to my acc and if I wanna create a new player or access to the world with my curren player, Trinity WorldServer.exe crashes.
(Yes, If a delete this code, WorldServer don't crash).
Can u help me? Thanks