Register for your free account! | Forgot your password?

You last visited: Today at 19:51

  • Please register to post and access all features, it's quick, easy and FREE!

 

[Release] Project Phoenix (Patch 5187)

Reply
 
Old   #31

 
elite*gold: 0
Join Date: Jul 2011
Posts: 6,536
Received Thanks: 3,170
Quote:
Originally Posted by KraHen View Post
I`d never host my own web server, paid hosts are the way to go for me (comes out cheaper for me actually, lol), but that is a valid point. For local stuff though I still prefer it.
XAMPP is basically the same thing, and you can even put it on a portable flash drive. More importantly, it's constantly updated. It's what I use for fast development from anywhere. On my main development computer though, I use the full, official MySQL server.



Spirited is offline  
Thanks
2 Users
Old   #32
 
elite*gold: 0
Join Date: Feb 2013
Posts: 5
Received Thanks: 3
can i ask few questions :

i tried to work for the update this project

then i updates that you have made :

acc server pw cryptographer
and the authentication packet
game server cryptographer
Key Exchange

always i using breakpoint !!

can you explain to me is this all that stuff

any way when i login give me that msg "Failed To Login : Server are not configured correctly"
and


regards


JasonSx is offline  
Old   #33
 
elite*gold: 0
Join Date: Mar 2013
Posts: 209
Received Thanks: 247
Sick
divi<3 is offline  
Old   #34
 
elite*gold: 0
Join Date: Oct 2007
Posts: 50
Received Thanks: 0
i created a account in acc table : Account: adrian , Password:123 and client saying me wrong id or pass


semil is offline  
Old   #35
 
elite*gold: 0
Join Date: Jul 2014
Posts: 402
Received Thanks: 533
Your ConcurrentRandom class is a joke. Declaring the fields in your class as "volatile" doesn't magically make your class thread safe, stupid. What a silly "software engineer" you are.
Best Coder 2014 is offline  
Thanks
1 User
Old   #36
 
elite*gold: 0
Join Date: Dec 2012
Posts: 1,546
Received Thanks: 799
Quote:
Originally Posted by Best Coder 2014 View Post
Your ConcurrentRandom class is a joke. Declaring the fields in your class as "volatile" doesn't magically make your class thread safe, stupid. What a silly "software engineer" you are.
This.

Besides it's not even concurrency either.

The only way to actually achieve a thread-safe random is a singleton initialized random class where all calls are thread-locked.

A random algorithm should never be called simultaneously.

Code:
/// <summary>
	/// A thread-safe random generator.
	/// </summary>
	public class RandomGenerator : Random
	{
		/// <summary>
		/// The random generator.
		/// </summary>
		private static readonly RandomGenerator randomGenerator = new RandomGenerator();
		
		/// <summary>
		/// Gets the random generator.
		/// </summary>
		public static RandomGenerator Generator
		{
			get { return randomGenerator; }
		}
		
		/// <summary>
		/// Creates a new instance of RandomGenerator.
		/// </summary>
		private RandomGenerator()
		{
			System.Threading.Interlocked.CompareExchange(ref _syncRoot, new object(), null);
		}
		
		/// <summary>
		/// The synchronization root.
		/// </summary>
		private object _syncRoot;
		
		/// <summary>
		/// Gets the synchronization root.
		/// </summary>
		internal object SyncRoot
		{
			get { return _syncRoot; }
		}

		/// <summary>
		/// Gets a random generated number.
		/// </summary>
		/// <returns>Returns the random generated number.</returns>
		public override int Next()
		{
			lock (SyncRoot)
				return base.Next();
		}
		
		/// <summary>
		/// Gets a random generated number.
		/// </summary>
		/// <param name="maxVal">The max value of the random generated number.</param>
		/// <returns>Returns the random generated number.</returns>
		public override int Next(int maxVal)
		{
			lock (SyncRoot)
				return base.Next(maxVal);
		}
		
		/// <summary>
		/// Gets a random generated number.
		/// </summary>
		/// <param name="minVal">The max value of the random generated number.</param>
		/// <param name="maxVal">The min value of the random generated number.</param>
		/// <returns>Returns the random generated number.</returns>
		public override int Next(int minVal, int maxVal)
		{
			lock (SyncRoot)
				return base.Next(minVal, maxVal);
		}
		
		public override void NextBytes(byte[] buffer)
		{
			lock (SyncRoot)
				base.NextBytes(buffer);
		}
		
		public object NextEnum(Type EnumType)
		{
			Array array = Enum.GetValues(EnumType);
			return array.GetValue(Next(0, array.Length));
		}
	}
Super Aids is offline  
Old   #37
 
elite*gold: 0
Join Date: Jul 2014
Posts: 402
Received Thanks: 533
Quote:
Originally Posted by Super Aids View Post
This.

Besides it's not even concurrency either.

The only way to actually achieve a thread-safe random is a singleton initialized random class where all calls are thread-locked.

A random algorithm should never be called simultaneously.
Or you could just use thread-local variables, then there's no locking needed.
Best Coder 2014 is offline  
Old   #38
Im Ruhestand







 
elite*gold: 20
The Black Market: 402/0/0
Join Date: Aug 2014
Posts: 29,633
Received Thanks: 2,881
#restored & reopened
wshbr is offline  
Thanks
1 User
Old   #39

 
elite*gold: 0
Join Date: Jul 2011
Posts: 6,536
Received Thanks: 3,170
Quote:
Originally Posted by Best Coder 2014 View Post
Or you could just use thread-local variables, then there's no locking needed.
You're right. That should be changed.
And thanks wshbr for restoring the thread.
Spirited is offline  
Old   #40
 
elite*gold: 0
Join Date: Dec 2008
Posts: 46
Received Thanks: 1
I followed your steps and got everything up and running yet when I run my client it consistently gives me the message "server maintenance" any idea what I'm missing?
killerdiggs is offline  
Old   #41

 
elite*gold: 0
Join Date: Jul 2011
Posts: 6,536
Received Thanks: 3,170
Quote:
Originally Posted by killerdiggs View Post
I followed your steps and got everything up and running yet when I run my client it consistently gives me the message "server maintenance" any idea what I'm missing?
Intermittently or you cannot connect?
Spirited is offline  
Old   #42
 
elite*gold: 0
Join Date: Dec 2008
Posts: 46
Received Thanks: 1
Quote:
Originally Posted by Spirited View Post
Intermittently or you cannot connect?
It doesn't even attempt to connect I have all three servers up and running but when I run the 5187 client it almost immediately says server maintenance.

I changed the loaderset.ini ip to my local and still nothing.
killerdiggs is offline  
Old   #43

 
elite*gold: 0
Join Date: Jul 2011
Posts: 6,536
Received Thanks: 3,170
Quote:
Originally Posted by killerdiggs View Post
It doesn't even attempt to connect I have all three servers up and running but when I run the 5187 client it almost immediately says server maintenance.

I changed the loaderset.ini ip to my local and still nothing.
I'm not really supporting this project anymore, but have you tried to see if it connects using breakpoints? That way, you can see if it's the client just not connecting or the server being misconfigured.
Spirited is offline  
Thanks
1 User
Old   #44
 
elite*gold: 0
Join Date: Jul 2009
Posts: 458
Received Thanks: 164
The source works and I'm pretty sure about it xD mine was based on it.


pintinho12 is offline  
Reply



« Previous Thread | Next Thread »

Similar Threads
Public Source Development: Project Phoenix
Hey everyone, I was told that the next time I create a thread about this project, I should just make it a development thread... so here it is....
18 Replies - CO2 PServer - Discussions / Questions
5187-5200 Packet collection?
Hey, ImmuneOne's 5187 source doesn't include all the packets, Does anyone have an old source around with most of the packets for that patch? I...
2 Replies - CO2 PServer - Discussions / Questions
New itemtype,StrRes.ini patch 5187
New ItemType Patch 5187 Weapons Examples:- EmperorKatana. >> Refiend Katana EmperorKatana. >> Unique Katana EmperorKatana. >> Elite Katana ...
52 Replies - CO2 Exploits, Hacks & Tools
Phoenix Project finally released for closed beta testers?
Wie manche noch wissen wurde vor einiger zeit ein S4-Privatserver projekt namens Phoenix angekündigt, die Beta sollte am 14. Oktober stattfinden,...
6 Replies - S4 League
Phoenix Project
Extra sorry for English translation, again big fail by Google ~ PS : Explore mode accept 64 players max actually (with buggy for list of...
14 Replies - S4 League



All times are GMT +1. The time now is 19:51.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Abuse
Copyright ©2017 elitepvpers All Rights Reserved.