Modcraft - The community dedicated to quality WoW modding!
Wrath of the Lich King Modding => Serverside Modding => Topic started by: loked on December 05, 2014, 12:36:51 am
-
Hi everybody! I'm there because I've a important question for my 3.3.5 Trinity server.
For more cycles of days and nights, I want an accelerated time but I have no idea where and how can I change this. If anyone has any information to help me, that would be awesome.
P.S. : Sorry if my english is bad.
-
My previous research indicates it's hardcoded into the client. You can change the time the sun and moon rise and set, but not accelerate it per se.
-
Fuh, really? Game time is taken from server and server takes it from its machine's system time. You might want to look at that. But don't ask where will you find this in core, I am no core developer.
-
SMSG_LOGIN_SETTIMESPEED - controls timespeed of game, server time.
See where it is handled in emulator and add value to it
WorldPacket data(SMSG_LOGIN_SETTIMESPEED, 4+4+4);
data << uint32( MAKE_GAME_TIME() );
data << float(0.0166666669777748f) * 2.0f // Makes Normal Game Speed x2 faster
data << uint32(0); // 3.1.2
-
Thanks Eatos! This is run and work really nice.
But, now I've a new problem...when a player connects, the game time start with local time. Is there a specific value for change it? If you have an idea.
I think what I search is in World.cpp or not?
-
SMSG_LOGIN_SETTIMESPEED - controls timespeed of game, server time.
See where it is handled in emulator and add value to it
WorldPacket data(SMSG_LOGIN_SETTIMESPEED, 4+4+4);
data << uint32( MAKE_GAME_TIME() );
data << float(0.0166666669777748f) * 2.0f // Makes Normal Game Speed x2 faster
data << uint32(0); // 3.1.2
Can't wait to compile and try this. If it works, then I love you long time.
-
SMSG_LOGIN_SETTIMESPEED - controls timespeed of game, server time.
See where it is handled in emulator and add value to it
WorldPacket data(SMSG_LOGIN_SETTIMESPEED, 4+4+4);
data << uint32( MAKE_GAME_TIME() );
data << float(0.0166666669777748f) * 2.0f // Makes Normal Game Speed x2 faster
data << uint32(0); // 3.1.2
This works, e.g: my code for 20 minute day starting at 7am:
-- Set time to 7am
local p = CreatePacket(66, 12)
p:WriteULong(GetHungerGamesInitialTime()) -- time
p:WriteFloat(1.20000024) -- speed
p:WriteULong(0)
count = count + 1
rPlr:SendPacket(p)
-
What bugs does it give you? Someone earlier indicated a bug that would allow different players to be at different times of day depending on when they logged in as it goes out of sync.