[DiscordArchive] will that work?
[DiscordArchive] will that work?
{Archived author: MR.MUSTACHE • Posted: 2019-04-28T22:13:27.716000+00:00
Original source
ok compiling
```cpp
class checkQueue : public WorldScript
{
public:
checkQueue() : WorldScript("checkQueue")
{
}
void OnUpdate(uint32 diff) override
{
for (auto it = m_queue.begin(); it != m_queue.end()
{
Player* player = ObjectAccessor::FindPlayer(*it);
if (!player) {
it = m_queue.erase(it);;
}
else {
++it;
}
}
}
private:
char msg[500];
};
```
Archived author: MR.MUSTACHE • Posted: 2019-04-28T22:13:33.301000+00:00
Original source
thanks ^,.,^
Archived author: Rochet2 • Posted: 2019-04-28T22:16:06.555000+00:00
Original source
btw, OnLogout triggers even on alt+f4. Not sure though on that delay that there has been talk about that player can stay in game somehow for 1 minute or something even if logged out, so may be that logout happens only after such a delay occurs.
Archived author: MR.MUSTACHE • Posted: 2019-04-28T22:20:14.613000+00:00
Original source
hmm yea and if the script tries to teleport him during that "passive in game" , it will probably crash because the game client is not active
Archived author: Rochet2 • Posted: 2019-04-28T22:22:00.798000+00:00
Original source
I dont think so. test and see : ]
Archived author: MR.MUSTACHE • Posted: 2019-04-28T22:23:12.706000+00:00
Original source
waiting core to load
Archived author: MR.MUSTACHE • Posted: 2019-04-28T22:23:21.803000+00:00
Original source
but with debug compile, it is really really slow
Archived author: MR.MUSTACHE • Posted: 2019-04-28T22:24:06.493000+00:00
Original source
but at least it shows me some hints when I attach the process
Archived author: MR.MUSTACHE • Posted: 2019-04-28T22:24:10.118000+00:00
Original source
never used Debug before
Archived author: MR.MUSTACHE • Posted: 2019-04-28T22:24:23.656000+00:00
Original source
btw, I watched your tutorial for debugging