[Release] Project Phoenix (Patch 5187)

07/05/2014 08:50 Spirited#31
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.
11/05/2014 18:35 JasonSx#32
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
[Only registered and activated users can see links. Click Here To Register...]

regards
11/07/2014 02:46 divi<3#33
Sick
11/07/2014 17:33 semil#34
i created a account in acc table : Account: adrian , Password:123 and client saying me wrong id or pass
11/29/2014 15:43 Best Coder 2014#35
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.
11/30/2014 05:27 Super Aids#36
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));
		}
	}
11/30/2014 19:41 Best Coder 2014#37
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.
11/06/2017 14:27 wshbr#38
#restored & reopened
11/06/2017 16:16 Spirited#39
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.
12/06/2017 00:04 killerdiggs#40
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?
12/06/2017 02:28 Spirited#41
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?
12/07/2017 18:23 killerdiggs#42
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.
12/07/2017 19:20 Spirited#43
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.
12/08/2017 02:05 pintinho12#44
The source works and I'm pretty sure about it xD mine was based on it.
04/07/2018 16:25 a7med6677#45
Plz anyone upload database again because it's destroyed