[DiscordArchive] Err, that'll be for a spellscript with an event like OnCast()?
[DiscordArchive] Err, that'll be for a spellscript with an event like OnCast()?
Archived author: FiftyTifty • Posted: 2023-03-15T22:07:46.310000+00:00
Original source
Err, that'll be for a spellscript with an event like OnCast()?
Archived author: FiftyTifty • Posted: 2023-03-15T22:07:59.232000+00:00
Original source
Ooh. I'll take a look, see if I find something
Archived author: FiftyTifty • Posted: 2023-03-15T22:16:43.066000+00:00
Original source
This should be it? `sWorld->GetAllSessions();`
Archived author: FiftyTifty • Posted: 2023-03-15T22:17:50.557000+00:00
Original source
Though looking a bit more at WorldSession, I'm wondering if I should just edit WorldSession.cpp instead of workarounding with a script...
Archived author: FiftyTifty • Posted: 2023-03-15T22:40:06.743000+00:00
Original source
Think I got it.
```C++
WorldPacket data(SMSG_TIME_SYNC_REQ, 4);
data << iMilliseconds;
SessionMap Sessions = sWorld->GetAllSessions();
for (SessionMap::const_iterator sessionFound = Sessions.begin(); sessionFound != Sessions.end(); ++sessionFound)
{
sessionFound->second->SendPacket(&data);
}```