WowTime::AddDays
function · unassigned · primitive
- Address
0x6423c0· 198 bytes, up to0x642485- Signature
void __thiscall (WowTime *this, int32_t days, bool keepTime)- Meaning
- Moves a set date by a number of days through mktime and localtime, from local midnight plus an hour without keepTime
- Confidence
- verified, proof one
- Finding
- gametime/overview#time-record-helpers
- Test
gametime::add_days_difftest
Finding: Time record helpers in gametime: overview
A time record is seven dwords: minute, hour, weekday, day and month from 0, year from 2000, and a
two-bit field. 0x642300 sets the first six to −1 and the seventh to 0. 0x6424c0 returns
hour·60 + minute, 0 when either is negative. 0x6424e0(n) sets the hour to n / 60 and the minute
to the signed remainder. 0x6423c0(days, keepTime) leaves a record with a negative year, month or day
unchanged. Otherwise it gives mktime the date at 0:00, or at its hour and minute with keepTime,
adds days · 86400 seconds, and 3600 more without keepTime, and writes back localtime's year, month, day
and weekday, and its hour and minute with keepTime. 0x642c10 packs a
record through WowTime::WowEncodeTime.
The derivation is in the doc.
Callers 6
- 0x642500 unassigned
- 0x642540 unassigned
- GameTimeSetOffsets gametime
- GameTimeSet gametime
- GameTimeSync gametime
- GameTimeAdvanceMinute gametime
Callees 2
- CopyLocalTime unassigned
- _mktime crt
Calls and jumps by a bare address, from tables/calls.tsv.