Forums WoW Modding Support Archives Azerothcore Discord Archives [DiscordArchive] What slots does it want?

[DiscordArchive] What slots does it want?

[DiscordArchive] What slots does it want?

Pages (3): Previous 1 2 3 Next
rektbyfaith
Administrator
0
01-21-2023, 07:52 PM
#11
Archived author: Foe • Posted: 2023-01-21T19:52:59.946000+00:00
Original source

```C++
// in bank bags
for (uint8 i = BANK_SLOT_BAG_START; i < BANK_SLOT_BAG_END; i++)
{
if (Bag* bag = GetBagByPos(i))
{
for (uint32 j = 0; j < bag->GetBagSize(); j++)```
rektbyfaith
01-21-2023, 07:52 PM #11

Archived author: Foe • Posted: 2023-01-21T19:52:59.946000+00:00
Original source

```C++
// in bank bags
for (uint8 i = BANK_SLOT_BAG_START; i < BANK_SLOT_BAG_END; i++)
{
if (Bag* bag = GetBagByPos(i))
{
for (uint32 j = 0; j < bag->GetBagSize(); j++)```

rektbyfaith
Administrator
0
01-21-2023, 07:54 PM
#12
Archived author: Foe • Posted: 2023-01-21T19:54:13.395000+00:00
Original source

where j would be the correct item pos in sub-bags
rektbyfaith
01-21-2023, 07:54 PM #12

Archived author: Foe • Posted: 2023-01-21T19:54:13.395000+00:00
Original source

where j would be the correct item pos in sub-bags

rektbyfaith
Administrator
0
01-21-2023, 07:54 PM
#13
Archived author: Foe • Posted: 2023-01-21T19:54:31.212000+00:00
Original source

if (Item* item = bag->GetItemByPos(j))
rektbyfaith
01-21-2023, 07:54 PM #13

Archived author: Foe • Posted: 2023-01-21T19:54:31.212000+00:00
Original source

if (Item* item = bag->GetItemByPos(j))

rektbyfaith
Administrator
0
01-21-2023, 08:31 PM
#14
Archived author: Bench • Posted: 2023-01-21T20:31:37.690000+00:00
Original source

So what I'm getting from this is that StoreNewItem doesn't work for what I'm trying to use it for
rektbyfaith
01-21-2023, 08:31 PM #14

Archived author: Bench • Posted: 2023-01-21T20:31:37.690000+00:00
Original source

So what I'm getting from this is that StoreNewItem doesn't work for what I'm trying to use it for

rektbyfaith
Administrator
0
01-21-2023, 08:35 PM
#15
Archived author: Foe • Posted: 2023-01-21T20:35:27.752000+00:00
Original source

```C++
// declare destination value
ItemPosCountVec dest;

// create new item
Item* pNewItem = Item::CreateItem(item, count, this, false, randomPropertyId);

// check whether an item can be stored in said slot, also returns the correct destination variable
InventoryResult msg = CanBankItem(dstbag, dstslot, dest, pNewItem, false);
if (msg != EQUIP_ERR_OK)
{
return;
}
// store new item
BankItem(dest, pNewItem, true);
```
rektbyfaith
01-21-2023, 08:35 PM #15

Archived author: Foe • Posted: 2023-01-21T20:35:27.752000+00:00
Original source

```C++
// declare destination value
ItemPosCountVec dest;

// create new item
Item* pNewItem = Item::CreateItem(item, count, this, false, randomPropertyId);

// check whether an item can be stored in said slot, also returns the correct destination variable
InventoryResult msg = CanBankItem(dstbag, dstslot, dest, pNewItem, false);
if (msg != EQUIP_ERR_OK)
{
return;
}
// store new item
BankItem(dest, pNewItem, true);
```

rektbyfaith
Administrator
0
01-21-2023, 08:35 PM
#16
Archived author: Foe • Posted: 2023-01-21T20:35:31.415000+00:00
Original source

That should work
rektbyfaith
01-21-2023, 08:35 PM #16

Archived author: Foe • Posted: 2023-01-21T20:35:31.415000+00:00
Original source

That should work

rektbyfaith
Administrator
0
01-21-2023, 08:38 PM
#17
Archived author: Foe • Posted: 2023-01-21T20:38:42.844000+00:00
Original source

There, edited it a bit
rektbyfaith
01-21-2023, 08:38 PM #17

Archived author: Foe • Posted: 2023-01-21T20:38:42.844000+00:00
Original source

There, edited it a bit

rektbyfaith
Administrator
0
01-21-2023, 08:39 PM
#18
Archived author: Bench • Posted: 2023-01-21T20:39:38.508000+00:00
Original source

I'll give it a test in a bit, thank you
rektbyfaith
01-21-2023, 08:39 PM #18

Archived author: Bench • Posted: 2023-01-21T20:39:38.508000+00:00
Original source

I'll give it a test in a bit, thank you

rektbyfaith
Administrator
0
01-21-2023, 08:39 PM
#19
Archived author: Foe • Posted: 2023-01-21T20:39:50.948000+00:00
Original source

But you have to create the new item from an item template or something and then store it with BankItem
rektbyfaith
01-21-2023, 08:39 PM #19

Archived author: Foe • Posted: 2023-01-21T20:39:50.948000+00:00
Original source

But you have to create the new item from an item template or something and then store it with BankItem

rektbyfaith
Administrator
0
01-21-2023, 08:39 PM
#20
Archived author: Foe • Posted: 2023-01-21T20:39:57.787000+00:00
Original source

Instead of StoreNewItem
rektbyfaith
01-21-2023, 08:39 PM #20

Archived author: Foe • Posted: 2023-01-21T20:39:57.787000+00:00
Original source

Instead of StoreNewItem

Pages (3): Previous 1 2 3 Next
Recently Browsing
 1 Guest(s)
Recently Browsing
 1 Guest(s)