[DiscordArchive] Could you count the amount of entries loaded from DB when inserting it into the vector?
[DiscordArchive] Could you count the amount of entries loaded from DB when inserting it into the vector?
Archived author: Revision • Posted: 2023-02-18T20:50:05.135000+00:00
Original source
Could you count the amount of entries loaded from DB when inserting it into the vector?
Archived author: Honey • Posted: 2023-02-18T20:50:20.226000+00:00
Original source
Trying to explain it:
```cpp
AddGossipItemFor(player, GOSSIP_ICON_CHAT, gossip, GOSSIP_SENDER_MAIN, 100000 + (1000 * category) + (100 * itemtype) + counter);
```
I code category, itemtype and counter into the action
Then i decode it in the next OnGossipSelect with the `while` loops.
Archived author: Revision • Posted: 2023-02-18T20:50:59.840000+00:00
Original source
The loop through the vector is fine, the way it's built.
Archived author: Revision • Posted: 2023-02-18T20:51:30.493000+00:00
Original source
I mean you can't improve the for part of it and I know it's not that specific line
Archived author: Revision • Posted: 2023-02-18T20:51:54.449000+00:00
Original source
I'm curious though if it adds the same entries more than once when pushing to the vector or if it's later
Archived author: Nyeriah • Posted: 2023-02-18T20:53:54.099000+00:00
Original source
I've identified an issue though
![[Image: image.png?ex=690c6222&is=690b10a2&hm=99b...c2e1ed804&]](https://cdn.discordapp.com/attachments/284323424032129024/1076607518232563892/image.png?ex=690c6222&is=690b10a2&hm=99b312382709709a472682c3594d2dc3de4d12eea80804ed5577975c2e1ed804&)
Archived author: Honey • Posted: 2023-02-18T20:53:54.843000+00:00
Original source
![[Image: image.png?ex=690c6222&is=690b10a2&hm=99b...c2e1ed804&]](https://cdn.discordapp.com/attachments/284323424032129024/1076607518232563892/image.png?ex=690c6222&is=690b10a2&hm=99b312382709709a472682c3594d2dc3de4d12eea80804ed5577975c2e1ed804&)
Archived author: Honey • Posted: 2023-02-18T20:53:58.521000+00:00
Original source
It is just doomed
Archived author: Nyeriah • Posted: 2023-02-18T20:54:09.776000+00:00
Original source
the vector needs to be cleared on reload config, else it will keep pilling up data
![[Image: image.png?ex=690c623a&is=690b10ba&hm=090...f4f25eece&]](https://cdn.discordapp.com/attachments/284323424032129024/1076607619873116301/image.png?ex=690c623a&is=690b10ba&hm=090fae57c5f656d64150bf09cd1f1068c6de56ae85d464d5df12399f4f25eece&)
Archived author: Honey • Posted: 2023-02-18T20:54:19.008000+00:00
Original source
![[Image: image.png?ex=690c623a&is=690b10ba&hm=090...f4f25eece&]](https://cdn.discordapp.com/attachments/284323424032129024/1076607619873116301/image.png?ex=690c623a&is=690b10ba&hm=090fae57c5f656d64150bf09cd1f1068c6de56ae85d464d5df12399f4f25eece&)