Siege Time?

01/09/2020 18:15 LuciferMorningStar666#1
Hello. I am having a lot head aches about this Siege Time, I added the PMA_GW to make the GuildCombat.txt editable (Not really sure if does).

But every time I restart the Server, the Siege Time Changes.
Here is the codes I did.

Quote:
#ifdef __PMA_GW
CTime CGuildCombat::GetNextGuildCobmatTime() // __PMA_GW
{
CTime tCurrentTime = CTime::GetCurrentTime();
CTime tTemp;
CTime tNextCombat = NULL;

for( DWORD i = 0; i < __AutoOpen.size() ; i++)
{
tTemp = tCurrentTime;
tTemp += CTimeSpan( __AutoOpen[i].nDay-tCurrentTime.GetDayOfWeek()-1, __AutoOpen[i].nHour-tCurrentTime.GetHour(), __AutoOpen[i].nMinute-tCurrentTime.GetMinute(), 0 );
if( tTemp > tCurrentTime && (tTemp < tNextCombat || tNextCombat == NULL) )
tNextCombat = tTemp;
}
return tNextCombat;
}
#else
CTime CGuildCombat::GetNextGuildCobmatTime()
Quote:
AUTO_OPEN_IDC
{
1 20 30 // Sunday 07:00 9am America Time
2 20 30 // Monday 07:00 9am America Time
3 20 30 // Tuesday 07:00 9am America Time
4 20 30 // Wednesday 07:00 9am America Time
5 20 30 // Thursday 07:00 9am America Time
6 20 30 // Friday 07:00 9am America Time
7 20 30 // Saturday 07:00 9am America Time
}
01/26/2020 08:22 Naltalah#2
The solution to this is frankly pretty retarded to guess.

Change this
Code:
__AutoOpen[i].nDay-tCurrentTime.GetDayOfWeek()-1
to this

Code:
__AutoOpen[i].nDay - (tCurrentTime.GetDayOfWeek()-1)
PS: And that's why you don't just take from another source and then post to epvp to get free tech support. :pimp: