Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[RELEASE] Pokemon Dawn Src (German Pkmn XNA MMORPG Project)

凸(ಠ益ಠ)凸
Loyal Member
Joined
Jun 16, 2008
Messages
1,665
Reaction score
227
This shouldn't be a problem, a lot of servers are written in C++ while the clients are written in alternative languages, a good example would be the SmartFox server which is able to take connections from C#, AS3, JAVA and a range of other languages.

... I don't know what your pointing out, but i was pointing out that everyone was probably compiling it wrong.
 
Experienced Elementalist
Joined
May 28, 2012
Messages
289
Reaction score
51
Can somebody tell me how to compile the Server right please?
 
Newbie Spellweaver
Joined
May 11, 2009
Messages
95
Reaction score
8
You know the Solution?

I'm almost certain that error is from the NHib framework (whether it's being used in this project is could mean otherwise), just read the error properly and right at the bottom it says it right there, silly me!

Either way it's to do with the mapping in NHibernate, I haven't looked at the source and I don't have time to, but check out this blog post and you should be able to follow it back through the factory pattern, it should be in one of the concrete classes


I don't have time fix the problem but I did provide a possible and likely solution
 
Newbie Spellweaver
Joined
May 17, 2012
Messages
20
Reaction score
5
I found a way, to compile the Server. But in my opinion it is not a really nice way, to do it like this :eek:tt1:

The known Problem is the EffectIdentifiers Column, which is a IList<int>.

The problem is, that this is a list of ints, so that you have to create a new Class
Lets Call it EffectIdentifier

Code:
namespace Dawn.Engine.Data.Attacks
{
    public class EffectIdentifier : BaseData
    {
        public virtual int Identifier { get; set; }
    }
}

For that we also need a Mapping Class

Code:
using Dawn.Engine.Data.Attacks;
using FluentNHibernate.Mapping;

namespace Dawn.Engine.Data.Access.Mappings.Attacks
{
    public class EffectIdentifierMapping : ClassMap<EffectIdentifier>
    {
        public EffectIdentifierMapping()
        {
            Id(x => x.ID);
            Map(x => x.Identifier);
        }
    }
}

Now there are some places where you have to replace the old integer with the new

AttackAction.cs
Code:
foreach (EffectIdentifier effectIdentifier in this.Attack.Base.EffectIdentifiers)
{
            yield return this.EffectLinker.GetInstance(effectIdentifier.Identifier);
}

AttackData.cs
Code:
for (int i = 0; i < this.EffectIdentifiers.Count; i++)
{
        output.Write(this.EffectIdentifiers[i].Identifier);
}

...

for (int i = 0; i < count; i++)
{
         this.EffectIdentifiers.Add(new EffectIdentifier() { Identifier = input.ReadInt32()
}

Some other problems.
ExtensionManager.cs
Code:
public ISerializable Deserialize(BinaryInput input)
{
  [B]  if (input.BaseStream.Position < input.BaseStream.Length)
        {[/B]
           int count = input.ReadInt32();
           for (int i = 0; i < count; i++)
           {
                    int key = input.ReadInt32();
                    Extension value = Serializer.Deserialize<Extension>(input);

                    this.values.Add(key, value);
            }
  [B]}[/B]
      return this;
}

I hope it will help and someone else will find a better way of doing this
 
Joined
Nov 1, 2008
Messages
587
Reaction score
83
I found a way, to compile the Server. But in my opinion it is not a really nice way, to do it like this :eek:tt1:

The known Problem is the EffectIdentifiers Column, which is a IList<int>.

The problem is, that this is a list of ints, so that you have to create a new Class
Lets Call it EffectIdentifier

Code:
namespace Dawn.Engine.Data.Attacks
{
    public class EffectIdentifier : BaseData
    {
        public virtual int Identifier { get; set; }
    }
}

For that we also need a Mapping Class

Code:
using Dawn.Engine.Data.Attacks;
using FluentNHibernate.Mapping;

namespace Dawn.Engine.Data.Access.Mappings.Attacks
{
    public class EffectIdentifierMapping : ClassMap<EffectIdentifier>
    {
        public EffectIdentifierMapping()
        {
            Id(x => x.ID);
            Map(x => x.Identifier);
        }
    }
}

Now there are some places where you have to replace the old integer with the new

AttackAction.cs
Code:
foreach (EffectIdentifier effectIdentifier in this.Attack.Base.EffectIdentifiers)
{
            yield return this.EffectLinker.GetInstance(effectIdentifier.Identifier);
}

AttackData.cs
Code:
for (int i = 0; i < this.EffectIdentifiers.Count; i++)
{
        output.Write(this.EffectIdentifiers[i].Identifier);
}

...

for (int i = 0; i < count; i++)
{
         this.EffectIdentifiers.Add(new EffectIdentifier() { Identifier = input.ReadInt32()
}

Some other problems.
ExtensionManager.cs
Code:
public ISerializable Deserialize(BinaryInput input)
{
  [B]  if (input.BaseStream.Position < input.BaseStream.Length)
        {[/B]
           int count = input.ReadInt32();
           for (int i = 0; i < count; i++)
           {
                    int key = input.ReadInt32();
                    Extension value = Serializer.Deserialize<Extension>(input);

                    this.values.Add(key, value);
            }
  [B]}[/B]
      return this;
}

I hope it will help and someone else will find a better way of doing this

Can you share compiled server ?
 
Newbie Spellweaver
Joined
May 17, 2012
Messages
20
Reaction score
5
The compiled server


But there are some other problems...
E.g. The Database is not filled ...

EDIT:
i've forgotten to mention that i've changed the username of the database to "root2"
 
Experienced Elementalist
Joined
May 28, 2012
Messages
289
Reaction score
51
Thank you for sharing, but you can create a new database...? All Tables etc. should be in the source, am i right?..
 
Newbie Spellweaver
Joined
May 17, 2012
Messages
20
Reaction score
5
The Database will be created on running the "Dawn.Testing.NHibernate".
 
Experienced Elementalist
Joined
May 28, 2012
Messages
289
Reaction score
51
I found a way, to compile the Server. But in my opinion it is not a really nice way, to do it like this :eek:tt1:

The known Problem is the EffectIdentifiers Column, which is a IList<int>.

The problem is, that this is a list of ints, so that you have to create a new Class
Lets Call it EffectIdentifier

Code:
namespace Dawn.Engine.Data.Attacks
{
    public class EffectIdentifier : BaseData
    {
        public virtual int Identifier { get; set; }
    }
}

For that we also need a Mapping Class

Code:
using Dawn.Engine.Data.Attacks;
using FluentNHibernate.Mapping;

namespace Dawn.Engine.Data.Access.Mappings.Attacks
{
    public class EffectIdentifierMapping : ClassMap<EffectIdentifier>
    {
        public EffectIdentifierMapping()
        {
            Id(x => x.ID);
            Map(x => x.Identifier);
        }
    }
}

Now there are some places where you have to replace the old integer with the new

AttackAction.cs
Code:
foreach (EffectIdentifier effectIdentifier in this.Attack.Base.EffectIdentifiers)
{
            yield return this.EffectLinker.GetInstance(effectIdentifier.Identifier);
}

AttackData.cs
Code:
for (int i = 0; i < this.EffectIdentifiers.Count; i++)
{
        output.Write(this.EffectIdentifiers[i].Identifier);
}

...

for (int i = 0; i < count; i++)
{
         this.EffectIdentifiers.Add(new EffectIdentifier() { Identifier = input.ReadInt32()
}

Some other problems.
ExtensionManager.cs
Code:
public ISerializable Deserialize(BinaryInput input)
{
  [B]  if (input.BaseStream.Position < input.BaseStream.Length)
        {[/B]
           int count = input.ReadInt32();
           for (int i = 0; i < count; i++)
           {
                    int key = input.ReadInt32();
                    Extension value = Serializer.Deserialize<Extension>(input);

                    this.values.Add(key, value);
            }
  [B]}[/B]
      return this;
}

I hope it will help and someone else will find a better way of doing this

What name for the Mapping Class, cause when i create the class, it apperars many erros..:D
 
Last edited:
Newbie Spellweaver
Joined
May 17, 2012
Messages
20
Reaction score
5
Classname "EffectIdentifier".
You have to create it at "Dawn.Engine.Data.Attacks"
Code:
namespace Dawn.Engine.Data.Attacks
{
    public class EffectIdentifier : BaseData
    {
        public virtual int Identifier { get; set; }
    }
}

Classname: "EffectIdentifierMapping"
You have to create it at "Dawn.Engine.Data.Access.Mappings.Attacks"

Code:
using Dawn.Engine.Data.Attacks;
using FluentNHibernate.Mapping;

namespace Dawn.Engine.Data.Access.Mappings.Attacks
{
    public class EffectIdentifierMapping : ClassMap<EffectIdentifier>
    {
        public EffectIdentifierMapping()
        {
            Id(x => x.ID);
            Map(x => x.Identifier);
        }
    }
}

I hope it will help ;)
 
凸(ಠ益ಠ)凸
Loyal Member
Joined
Jun 16, 2008
Messages
1,665
Reaction score
227
Anyone got it working?
 
Experienced Elementalist
Joined
May 28, 2012
Messages
289
Reaction score
51
The Server is working, but my computer sucks -.- i cant create a mysql database with username: root2 :( damn computers :D!
 
凸(ಠ益ಠ)凸
Loyal Member
Joined
Jun 16, 2008
Messages
1,665
Reaction score
227
can you release the edited source so we can edit the database to our needs, or dump the sql file.
 
Last edited:
Experienced Elementalist
Joined
May 28, 2012
Messages
289
Reaction score
51
The database is inside/creates the server right...?
 
Newbie Spellweaver
Joined
May 17, 2012
Messages
20
Reaction score
5
The Database will be created, but in my opinion there are missing some tables.
Here is the donwload link



i've added a Configuration file for the database connection ;)

EDIT: link fixed
 
Last edited:
Banned
Banned
Joined
Dec 20, 2011
Messages
462
Reaction score
30
Has anyone actually made a server out of this? Or atleast go it to work?
 
Experienced Elementalist
Joined
May 28, 2012
Messages
289
Reaction score
51
Server error appears: this.listener.Start(); Socketexception was unhandled -.-
 
Last edited:
Back
Top