[DiscordArchive] But I am a bit confused by the structure of the packet...
[DiscordArchive] But I am a bit confused by the structure of the packet...
Archived author: Tea • Posted: 2025-09-09T13:44:53.169000+00:00
Original source
<https://github.com/TrinityCore/TrinityCore/blob/master/src/server/game/Time/WowTime.cpp#L23> this
Archived author: Tea • Posted: 2025-09-09T13:45:30.875000+00:00
Original source
you dont want to do this in lua directly anyway in case a future patch changes packet structure
Archived author: Tea • Posted: 2025-09-09T13:45:55.292000+00:00
Original source
make a new binding func that just takes year,month,day,hour,minute params and send packet from there
Archived author: Vel • Posted: 2025-09-09T13:47:20.624000+00:00
Original source
Yeah, I know this can happen. But can be easily fixed then in that case. I am not really good at C++. Just enough to hotfix something in Eluna but that's it... This would make even bigger issue for me.
Archived author: Tea • Posted: 2025-09-09T13:53:54.845000+00:00
Original source
i mean, its just this
```cpp
int SetGameTime(Eluna* E, Player* player)
{
WorldPackets::Misc::LoginSetTimeSpeed loginSetTimeSpeed;
loginSetTimeSpeed.NewSpeed = 0.01666667f;
loginSetTimeSpeed.GameTime.SetYear(GET_PARAM_FROM_ELUNA - 2000);
loginSetTimeSpeed.GameTime.SetMonth(GET_PARAM_FROM_ELUNA);
loginSetTimeSpeed.GameTime.SetMonthDay(GET_PARAM_FROM_ELUNA);
loginSetTimeSpeed.GameTime.SetHour(GET_PARAM_FROM_ELUNA);
loginSetTimeSpeed.GameTime.SetMinute(GET_PARAM_FROM_ELUNA);
loginSetTimeSpeed.ServerTime = *GameTime::GetWowTime(); // or loginSetTimeSpeed.ServerTime = loginSetTimeSpeed.GameTime;
player->SendDirectMessage(loginSetTimeSpeed.Write());
return 0;
}
```
Archived author: Tea • Posted: 2025-09-09T13:54:14.001000+00:00
Original source
you should know how to do the GET_PARAM_FROM_ELUNA thing