You think this just looks a bit like DOL? Well, click this link: https://code.google.com/p/waremu/source ... 2FDatabaseCode do look a bit like DOL on the basic needed C# classes (Player, World, Zone, Region, GameObject etc) but it really looks Empty !
The GPL allows you to do that... you just need to publish it under the same license, and give a copy of the GPL with it...Regardless, its extremely bad practice to knowingly copy and paste code without accredition.
#region Data tables
protected DataSet GetDataSet(string tableName)
{
if (!TableDatasets.ContainsKey(tableName))
return null;
return TableDatasets[tableName].DataSet;
}
protected void FillObjectWithRow<TObject>(ref TObject dataObject, DataRow row, bool reload)
where TObject : DataObject
{
bool relation = false;
string tableName = dataObject.TableName;
Type myType = dataObject.GetType();
string id = row[tableName + "_ID"].ToString();
MemberInfo[] myMembers = myType.GetMembers();
dataObject.ObjectId = id;
for (int i = 0; i < myMembers.Length; i++)
{
object[] myAttributes = GetRelationAttributes(myMembers[i]);
if (myAttributes.Length > 0)
{
//if(myAttributes[0] is Attributes.Relation)
//{
relation = true;
//}
}
else
{
object[] keyAttrib = myMembers[i].GetCustomAttributes(typeof(PrimaryKey), true);
myAttributes = myMembers[i].GetCustomAttributes(typeof(DataElement), true);
if (myAttributes.Length > 0 || keyAttrib.Length > 0)
{
object val = row[myMembers[i].Name];
if (val != null && !val.GetType().IsInstanceOfType(DBNull.Value))
{
if (myMembers[i] is PropertyInfo)
{
((PropertyInfo)myMembers[i]).SetValue(dataObject, val, null);
}
if (myMembers[i] is FieldInfo)
{
((FieldInfo)myMembers[i]).SetValue(dataObject, val);
}
}
}
}
}
dataObject.Dirty = false;
if (relation)
{
FillLazyObjectRelations(dataObject, true);
}
dataObject.IsPersisted = true;
}
protected void FillRowWithObject(DataObject dataObject, DataRow row)
{
bool relation = false;
Type myType = dataObject.GetType();
row[dataObject.TableName + "_ID"] = dataObject.ObjectId;
MemberInfo[] myMembers = myType.GetMembers();
for (int i = 0; i < myMembers.Length; i++)
{
object[] myAttributes = GetRelationAttributes(myMembers[i]);
object val = null;
if (myAttributes.Length > 0)
{
relation = true;
}
else
{
myAttributes = myMembers[i].GetCustomAttributes(typeof(DataElement), true);
object[] keyAttrib = myMembers[i].GetCustomAttributes(typeof(PrimaryKey), true);
if (myAttributes.Length > 0 || keyAttrib.Length > 0)
{
if (myMembers[i] is PropertyInfo)
{
val = ((PropertyInfo)myMembers[i]).GetValue(dataObject, null);
}
if (myMembers[i] is FieldInfo)
{
val = ((FieldInfo)myMembers[i]).GetValue(dataObject);
}
if (val != null)
{
row[myMembers[i].Name] = val;
}
}
}
//}
}
if (relation)
{
SaveObjectRelations(dataObject);
}
}
protected DataRow FindRowByKey(DataObject dataObject)
{
DataRow row;
string tableName = dataObject.TableName;
DataTable table = GetDataSet(tableName).Tables[tableName];
Type myType = dataObject.GetType();
string key = table.PrimaryKey[0].ColumnName;
if (key.Equals(tableName + "_ID"))
row = table.Rows.Find(dataObject.ObjectId);
else
{
MemberInfo[] keymember = myType.GetMember(key);
object val = null;
if (keymember[0] is PropertyInfo)
val = ((PropertyInfo)keymember[0]).GetValue(dataObject, null);
if (keymember[0] is FieldInfo)
val = ((FieldInfo)keymember[0]).GetValue(dataObject);
if (val != null)
row = table.Rows.Find(val);
else
return null;
}
return row;
}
#endregion
#region Data tables
protected DataSet GetDataSet(string tableName)
{
if (!TableDatasets.ContainsKey(tableName))
return null;
return TableDatasets[tableName].DataSet;
}
protected void FillObjectWithRow<TObject>(ref TObject dataObject, DataRow row, bool reload)
where TObject : DataObject
{
bool relation = false;
string tableName = dataObject.TableName;
Type myType = dataObject.GetType();
string id = row[tableName + "_ID"].ToString();
MemberInfo[] myMembers = myType.GetMembers();
dataObject.ObjectId = id;
for (int i = 0; i < myMembers.Length; i++)
{
object[] myAttributes = GetRelationAttributes(myMembers[i]);
if (myAttributes.Length > 0)
{
//if(myAttributes[0] is Attributes.Relation)
//{
relation = true;
//}
}
else
{
object[] keyAttrib = myMembers[i].GetCustomAttributes(typeof(PrimaryKey), true);
myAttributes = myMembers[i].GetCustomAttributes(typeof(DataElement), true);
if (myAttributes.Length > 0 || keyAttrib.Length > 0)
{
object val = row[myMembers[i].Name];
if (val != null && !val.GetType().IsInstanceOfType(DBNull.Value))
{
if (myMembers[i] is PropertyInfo)
{
((PropertyInfo)myMembers[i]).SetValue(dataObject, val, null);
}
if (myMembers[i] is FieldInfo)
{
((FieldInfo)myMembers[i]).SetValue(dataObject, val);
}
}
}
}
}
dataObject.Dirty = false;
if (relation)
{
FillLazyObjectRelations(dataObject, true);
}
dataObject.IsValid = true;
}
protected void FillRowWithObject(DataObject dataObject, DataRow row)
{
bool relation = false;
Type myType = dataObject.GetType();
row[dataObject.TableName + "_ID"] = dataObject.ObjectId;
MemberInfo[] myMembers = myType.GetMembers();
for (int i = 0; i < myMembers.Length; i++)
{
object[] myAttributes = GetRelationAttributes(myMembers[i]);
object val = null;
if (myAttributes.Length > 0)
{
relation = true;
}
else
{
myAttributes = myMembers[i].GetCustomAttributes(typeof(DataElement), true);
object[] keyAttrib = myMembers[i].GetCustomAttributes(typeof(PrimaryKey), true);
if (myAttributes.Length > 0 || keyAttrib.Length > 0)
{
if (myMembers[i] is PropertyInfo)
{
val = ((PropertyInfo)myMembers[i]).GetValue(dataObject, null);
}
if (myMembers[i] is FieldInfo)
{
val = ((FieldInfo)myMembers[i]).GetValue(dataObject);
}
if (val != null)
{
row[myMembers[i].Name] = val;
}
}
}
//}
}
if (relation)
{
SaveObjectRelations(dataObject);
}
}
protected DataRow FindRowByKey(DataObject dataObject)
{
DataRow row;
string tableName = dataObject.TableName;
System.Data.DataTable table = GetDataSet(tableName).Tables[tableName];
Type myType = dataObject.GetType();
string key = table.PrimaryKey[0].ColumnName;
if (key.Equals(tableName + "_ID"))
row = table.Rows.Find(dataObject.ObjectId);
else
{
MemberInfo[] keymember = myType.GetMember(key);
object val = null;
if (keymember[0] is PropertyInfo)
val = ((PropertyInfo)keymember[0]).GetValue(dataObject, null);
if (keymember[0] is FieldInfo)
val = ((FieldInfo)keymember[0]).GetValue(dataObject);
if (val != null)
row = table.Rows.Find(val);
else
return null;
}
return row;
}
#endregion
By 'bad practice' I mean in terms of honesty, not legalityThe GPL allows you to do that... you just need to publish it under the same license, and give a copy of the GPL with it...
Exactly what I feel, the lack of accredition is the part which stinks.Please don't misunderstand me, I have no problem they're using the db code but they removed/modified all things from the code that maybe could point to DOL.
I just want a tiny little thanks / credit for those people who really sit behind their monitors and wrote this code for their "baby" called Dawn of Light. It's disrespectful selling others work as my own. It's like in the WoW Emu community: copy&paste closed projects and sell it as my own coded emu.
http://social.bioware.com/forum/Gamepla ... 644-1.htmlThank you for your email and previous correspondence.
I wanted to get in touch to acknowledge that we have received this and that we are considering what the possibilities are for WAR going forward. I'm conscious that we haven't been in touch and I wanted to assure you that we are thinking about it. We have been moved by your dedication to the game and it has made us try to think if there are any other viable options.
Having said that I don't want to instil any false hope here - I think the likelihood of WAR continuing is pretty remote - EA are finished with it and GW are not a video game company, so the only possible option would be to have someone else run it, and that is likely to be too complicated to resolve with the various IP issues and the difficult commercial viability of the game. None the less, we do understand the passion the community has for the game, I have been an avid MMO fan myself for years, and we are trying a number of routes before we completely give up.
Again - please understand that right now WAR closes in Jan and that does not look at all likely to change, but we are trying and I will get back to you when I have any further news."
http://shinytoys.org/blog/war-in-a-bottleIf the right people at EA choose, they can put out one last build of the game client. There was one switch that said, “If this is a public build, force singleplayer mode OFF”. Change that to “ON”, hit Compile, and release the executable.
Oh-ho-ho man. Some people really do have no self-respect or honour do they? Oh man. This is just bloody brilliant. Guy posts link to emu but disregards the link to the source code. Then, asks for help on it from the guys the code was originally stolen from! I literally can't handle this. I mean, sure there are some people pricks but then there's this guy! He's the creep that somehow got invited to a party and ends up spiking the punch bowl and getting EVERYONE arrested!You think this just looks a bit like DOL? Well, click this link: https://code.google.com/p/waremu/source ... 2FDatabaseCode do look a bit like DOL on the basic needed C# classes (Player, World, Zone, Region, GameObject etc) but it really looks Empty !
Hello Dawn of WarhammerLight? Where are the credits to DOL for the original database code?
Return to “%s” Other Discussion
Users browsing this forum: No registered users and 1 guest