Hello warriors, this last weekend, a problem occurred with the siege (War) of Dratan, below the reason of the happened below.
On 09/24/2018, guild leader LaVendetta changed the time and day of the siege by the NPC.
Log of the exact time of the modification of the time.
2018-09-24 13: 57: 42,861 INFO [Log.cpp: 148] - WAR CASTLE: SET WAR TIME> xBlackJok3r: xBlackJok3r: ************: 2018: 9: 29: 17 : 6
17 = At 17:00 Canadian time (Server before the update of 09/29/2018, it was Canada time, this was due to the host migration that occurred on 9/14/2018, the modification of the time not done before because we did not notice what happened before)
6 = The day of the week, 6 being equal to Saturday.
When correcting the time of the server (Placing back the Brasília time), the war began at 18:00 hours (Brasilia time), with Canadian time being 1 hour late compared to Brasilia time.
But why should it happen again on Sunday?
Saturday 6th, Sunday was the 7th, which was defined by us in our source code for the Dratan War (Photo of the source code below), then the siege taking place on the 6th (Saturday) , the system automatically marked the next siege for Sunday.
As the leader of the castle has the right to choose the time and day of the siege, the siege that will be considered valid will be the time chosen by him, that is, that occurred at 18:00 hours on Saturday.
What can be done to prevent this from happening again?
Looking at the source code, we noticed an error in our version (we use LC_USA), because of this, the war occurred on day 6, was automatically set for day 7, we applied the modification, on day 6, it will be automatically set for the next week.
Problems with website:
Our website uses Php and MySQL to communicate with the game database, and it uses English as the default language. On account of this, we resolved by the name Saturday and Sunday, manually, for believing that no player would go through the siege to occur on Saturday.
Modification so that the website does not show the wrong day again:
Before updating to today's source code, we used the PhP code below for site-to-server communication:
date (H: i ', $ get_castle2 [' a_next_war_time '])
H = One-hour 24-hour format with zero left
i = Minutes with zero left
Noting that the letter that should represent the day of the week is absent, that is, we superficially set the day to be displayed, even if the war were to take place on Wednesday, the site would always display Saturday for Merac and Sunday for Dratan.
D or L: We could use D or L to set the day exactly, but we do not like that idea, because it always displays the name in English, which would not be nice to players who do not understand English.
If you have questions about the format parameters mentioned above:
We have made a modification on the website, which will display the date and time of Siege in more detail, only the word Greenwich Mean Time (GMT) was manually set.
Note: Prints taken from the source code of the game / site and test server.
We apologize for the inconvenience and appreciate your understanding.
If you want to be sure of what we are saying is true, just compile a public source code, and define it as LC_USA, set the Dratan war to occur on Sundays (7), and for it to occur on Saturday.
Or simply because of the war to take place on Friday (With GM / ADM command), it will automatically be set to Saturday again.
To fix this in LC_USA, simply by if (next <7) or set LC_USA just above.
Warning:
"11. Attack or raise false reports about the game or its administration.
First occurrence: 365 day lockout or -40 levels and removal of event items (Including Gold).
Second occurrence: Permanent. Negotiate for another punishment: No"
Regards,
Last Chaos Brasil