I found a way, to compile the Server. But in my opinion it is not a really nice way, to do it like this
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