[DiscordArchive] you added a counter?
[DiscordArchive] you added a counter?
Archived author: Honey • Posted: 2023-02-18T20:31:56.514000+00:00
Original source
you added a counter?
Archived author: Kitzunu • Posted: 2023-02-18T20:32:21.712000+00:00
Original source
clicked one gossip and it crashed
Archived author: Kitzunu • Posted: 2023-02-18T20:32:21.998000+00:00
Original source
<:kek:1065379143887372398>
tring name = proto->Name1;Archived author: Kitzunu • Posted: 2023-02-18T20:32:32.352000+00:00
Original source
```cpp
for (int i = 0; i < sZoneDifficulty->ZoneDifficultyRewards[category][counter].size(); ++i)
{
LOG_ERROR("sql", "ITERATING THROUGH {}", i);
/* // hackfix because this auto iterates twice for no reason.
if (first == 0)
{
first = sZoneDifficulty->ZoneDifficultyRewards[category][counter][i].Entry;
}
else if (first == sZoneDifficulty->ZoneDifficultyRewards[category][counter][i].Entry)
{
break;
} */
LOG_INFO("sql", "Adding gossip option for entry {}", sZoneDifficulty->ZoneDifficultyRewards[category][counter][i].Entry);
ItemTemplate const* proto = sObjectMgr->GetItemTemplate(sZoneDifficulty->ZoneDifficultyRewards[category][counter][i].Entry);
std:
tring name = proto->Name1;
if (ItemLocale const* leftIl = sObjectMgr->GetItemLocale(sZoneDifficulty->ZoneDifficultyRewards[category][counter][i].Entry))
{
ObjectMgr::GetLocaleString(leftIl->Name, player->GetSession()->GetSessionDbcLocale(), name);
}
AddGossipItemFor(player, GOSSIP_ICON_CHAT, name, GOSSIP_SENDER_MAIN, (1000 * category) + (100 * counter) + i);
}
}
```
Archived author: Kitzunu • Posted: 2023-02-18T20:32:36.006000+00:00
Original source
this is what I got
Archived author: Kitzunu • Posted: 2023-02-18T20:32:46.026000+00:00
Original source
all i changed was commenting out the hack and adding the error
Archived author: Honey • Posted: 2023-02-18T20:33:15.696000+00:00
Original source
i commiteted a crashfix meanwhile, let me see if i had pushed it
Archived author: Honey • Posted: 2023-02-18T20:33:17.161000+00:00
Original source
BUT
Archived author: Honey • Posted: 2023-02-18T20:33:28.833000+00:00
Original source
if it iterates once, the vector is filled twice
Archived author: Honey • Posted: 2023-02-18T20:34:28.671000+00:00
Original source
Line 199 fills the vector. Thre's a log after it. It doesn't happen twice.