re: [Release] zTeam Season 8 Episode 2 (Source)
Quote:
Originally Posted by
gustavobm
The following code solves (i guess) 95% of Premium System problems. What is missing? A way to block user connection when the premium time is over, i hope someone could help.
JoinServerDB.cpp:
Obs: Just replace this two functions in your JoinServerDB.cpp
Why remove user from premium data, and not set as normal player?
re: [Release] zTeam Season 8 Episode 2 (Source)
Quote:
Originally Posted by
SmileYzn
Why remove user from premium data, and not set as normal player?
There isnt a "normal player" in premium data, so the "fix" prevent users to be removed...
Another way is to change the ExpireDate to future date and paycode to 0.. Like this:
Quote:
void RemoveBill(char* szId){
char szQuery[256];
sprintf(szQuery,"UPDATE MEMB_INFO set PayCode='0', ExpireDate=DATEADD(year,5,GETDATE()) WHERE memb___id = '%s'",szId);
g_JoinServerConnectDB.Exec(szQuery);
And the problem is fixed too..
re: [Release] zTeam Season 8 Episode 2 (Source)
Quote:
Originally Posted by
rusolp
There isnt a "normal player" in premium data, so the "fix" prevent users to be removed...
Another way is to change the ExpireDate to future date and paycode to 0.. Like this:
And the problem is fixed too..
If you use this fix, is more easy when instert a new account, update premium data with 0.
re: [Release] zTeam Season 8 Episode 2 (Source)
The problem is (and i don't know why) when it runs a Query to select user info in PremiumData and the result of ExpireDate is NULL for some reason gameserver crash (maybe it doesn't accept NULL values for datetime) what i did was insert user info if it's not there and avoid to remove the info if the ExpireDate (LeftTime) is < 0.
It was the only way that i found that not causes problems in game with "Your premium access..."
re: [Release] zTeam Season 8 Episode 2 (Source)
Quote:
Originally Posted by
gustavobm
The problem is (and i don't know why) when it runs a Query to select user info in PremiumData and the result of ExpireDate is NULL for some reason gameserver crash (maybe it doesn't accept NULL values for datetime) what i did was insert user info if it's not there and avoid to remove the info if the ExpireDate (LeftTime) is < 0.
It was the only way that i found that not causes problems in game with "Your premium access..."
Try changing the query so that ExpireDate isn't NULL, just pass through a date value with a year of 9999 or something as a default. Maybe that could work for you.
re: [Release] zTeam Season 8 Episode 2 (Source)
What client version are you guys using?
re: [Release] zTeam Season 8 Episode 2 (Source)
Quote:
Originally Posted by
fallenfate
Try changing the query so that ExpireDate isn't NULL, just pass through a date value with a year of 9999 or something as a default. Maybe that could work for you.
No omg, you can simple deal with the null value in code.
I mean check when is null value.
If GS is crashing is not in MultiServer the problem, but at GS that received a null packet.
re: [Release] zTeam Season 8 Episode 2 (Source)
Quote:
Originally Posted by
SmileYzn
No omg, you can simple deal with the null value in code.
I mean check when is null value.
If GS is crashing is not in MultiServer the problem, but at GS that received a null packet.
Beautiful words
re: [Release] zTeam Season 8 Episode 2 (Source)
I don't actually have the issue, I thought gustavo was saying your fix didn't work so I was just offering an alternative. Relax guys, ;).
re: [Release] zTeam Season 8 Episode 2 (Source)
Quote:
Originally Posted by
fallenfate
I don't actually have the issue, I thought gustavo was saying your fix didn't work so I was just offering an alternative. Relax guys, ;).
I tested this too and not have crashes.
re: [Release] zTeam Season 8 Episode 2 (Source)
Yeah no worries, I was just saying I misunderstood his post, so I tried to help with an alternate method, that's all.
Anyway, happy compiling to everyone, :D.
re: [Release] zTeam Season 8 Episode 2 (Source)
Quote:
Originally Posted by
fallenfate
Yeah no worries, I was just saying I misunderstood his post, so I tried to help with an alternate method, that's all.
Anyway, happy compiling to everyone, :D.
Thanks matte, I am checking whole MultiServer since you can run 2 DataServers at once.
But is lacking some packets, someone can help?
re: [Release] zTeam Season 8 Episode 2 (Source)
any one already fix the ancient+JOH?
re: [Release] zTeam Season 8 Episode 2 (Source)
Quote:
Originally Posted by
clerigz
any one already fix the ancient+JOH?
Friend, when this happens? You can describle it?
re: [Release] zTeam Season 8 Episode 2 (Source)
Quote:
Originally Posted by
SmileYzn
Friend, when this happens? You can describle it?
when you put JOH in any ancient items you will not see the harmony option in your ancient items and it will be successfully..