forked from WCell/WCell
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
More database conversions, also more todo items added and commented o…
…ut DBDrop command as this needs to be implmented in a fluent hibernate manner
- Loading branch information
Showing
18 changed files
with
219 additions
and
120 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
Services/WCell.RealmServer/Database/Entities/ReputationRecord.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using WCell.Constants.Factions; | ||
using WCell.Database; | ||
|
||
namespace WCell.RealmServer.Database.Entities | ||
{ | ||
public class ReputationRecord | ||
{ | ||
public long RecordId | ||
{ | ||
get; | ||
set; | ||
} | ||
|
||
public long OwnerId | ||
{ | ||
get; | ||
set; | ||
} | ||
|
||
public FactionReputationIndex ReputationIndex | ||
{ | ||
get; | ||
set; | ||
} | ||
|
||
public int Value | ||
{ | ||
get; | ||
set; | ||
} | ||
|
||
public ReputationFlags Flags | ||
{ | ||
get; | ||
set; | ||
} | ||
|
||
public static IEnumerable<ReputationRecord> Load(long chrRecordId) | ||
{ | ||
return RealmWorldDBMgr.DatabaseProvider.FindAll<ReputationRecord>(x => x.OwnerId == chrRecordId); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
Services/WCell.RealmServer/Database/Mappings/GuildMemberMap.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using FluentNHibernate; | ||
using FluentNHibernate.Mapping; | ||
using WCell.RealmServer.Database.Entities; | ||
|
||
namespace WCell.RealmServer.Database.Mappings | ||
{ | ||
public class GuildMemberMap : ClassMap<GuildMember> | ||
{ | ||
public GuildMemberMap() | ||
{ | ||
Id(x => x.CharacterLowId).GeneratedBy.Assigned(); | ||
Map(x => Reveal.Member<GuildMember>("_name")).Not.Nullable().Column("Name"); | ||
Map(x => Reveal.Member<GuildMember>("_lastLevel")).Not.Nullable().Column("LastLvl"); | ||
Map(x => Reveal.Member<GuildMember>("_lastLogin")).Not.Nullable().Column("LastLogin"); | ||
Map(x => Reveal.Member<GuildMember>("_lastZoneId")).Not.Nullable().Column("LastZone"); | ||
Map(x => Reveal.Member<GuildMember>("_class")).Not.Nullable().Column("Class"); | ||
Map(x => Reveal.Member<GuildMember>("_rankId")).Not.Nullable().Column("Rank"); | ||
Map(x => Reveal.Member<GuildMember>("m_GuildId")).Not.Nullable().Column("GuildId"); | ||
Map(x => Reveal.Member<GuildMember>("_publicNote")).Column("PublicNote"); | ||
Map(x => Reveal.Member<GuildMember>("_officerNote")).Column("OfficerNote"); | ||
Map(x => Reveal.Member<GuildMember>("_remainingMoneyAllowance")).Column("BankRemainingMoneyAllowance"); | ||
Map(x => Reveal.Member<GuildMember>("_moneyAllowanceResetTime")).Not.Nullable().Column("BankMoneyAllowanceResetTime"); | ||
} | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
Services/WCell.RealmServer/Database/Mappings/InstanceBindingMap.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
using FluentNHibernate; | ||
using FluentNHibernate.Mapping; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using WCell.RealmServer.Instances; | ||
|
||
namespace WCell.RealmServer.Database.Mappings | ||
{ | ||
public class InstanceBindingMap : ClassMap<InstanceBinding> | ||
{ | ||
public InstanceBindingMap() | ||
{ | ||
Id(x => x.MapId); | ||
Id(x => Reveal.Member<int>("_InstanceId")); | ||
Map(x => x.DifficultyIndex).Not.Nullable(); | ||
Map(x => x.BindTime).Not.Nullable(); | ||
|
||
|
||
} | ||
} | ||
} |
Oops, something went wrong.