Skip to content

Commit 87c7760

Browse files
committed
rename ClassBase -> ClassDescriptor
1 parent 31d9468 commit 87c7760

File tree

23 files changed

+72
-72
lines changed

23 files changed

+72
-72
lines changed

Framework/Intersect.Framework.Core/Descriptors/GameObjectType.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public enum GameObjectType
1212
[GameObjectInfo(typeof(AnimationDescriptor), "animations")]
1313
Animation = 0,
1414

15-
[GameObjectInfo(typeof(ClassBase), "classes")]
15+
[GameObjectInfo(typeof(ClassDescriptor), "classes")]
1616
Class,
1717

1818
[GameObjectInfo(typeof(ItemBase), "items")]

Framework/Intersect.Framework.Core/GameObjects/ClassBase.cs renamed to Framework/Intersect.Framework.Core/GameObjects/ClassDescriptor.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
namespace Intersect.GameObjects;
1111

12-
public partial class ClassBase : DatabaseObject<ClassBase>, IFolderable
12+
public partial class ClassDescriptor : DatabaseObject<ClassDescriptor>, IFolderable
1313
{
1414
public const long DEFAULT_BASE_EXPERIENCE = 100;
1515

@@ -128,7 +128,7 @@ public IReadOnlyDictionary<Stat, int> StatIncreaseLookup
128128
public long[] VitalRegen { get; set; } = new long[Enum.GetValues<Vital>().Length];
129129

130130
[JsonConstructor]
131-
public ClassBase(Guid id) : base(id)
131+
public ClassDescriptor(Guid id) : base(id)
132132
{
133133
Name = "New Class";
134134

@@ -139,7 +139,7 @@ public ClassBase(Guid id) : base(id)
139139
}
140140

141141
//Parameterless constructor for EF
142-
public ClassBase()
142+
public ClassDescriptor()
143143
{
144144
Name = "New Class";
145145

Intersect (Core)/Network/Packets/Client/CreateCharacterPacket.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public override Dictionary<string, SanitizedValue<object>> Sanitize()
3434

3535
var sanitizer = new Sanitizer();
3636

37-
var classDescriptor = ClassBase.Get(ClassId);
37+
var classDescriptor = ClassDescriptor.Get(ClassId);
3838
if (classDescriptor != null)
3939
{
4040
Sprite = sanitizer.Clamp(nameof(Sprite), Sprite, 0, classDescriptor.Sprites?.Count ?? 0);

Intersect.Client.Core/Entities/Entity.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2224,7 +2224,7 @@ protected virtual void LoadAnimationTexture(string textureName, SpriteAnimations
22242224
break;
22252225

22262226
case SpriteAnimations.Attack:
2227-
if (this is Player player && ClassBase.TryGet(player.Class, out var classDescriptor))
2227+
if (this is Player player && ClassDescriptor.TryGet(player.Class, out var classDescriptor))
22282228
{
22292229
textureOverride = classDescriptor.AttackSpriteOverride;
22302230
}

Intersect.Client.Core/Entities/Player.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2350,7 +2350,7 @@ public override int CalculateAttackTime()
23502350
ItemBase? weapon = null;
23512351
var attackTime = base.CalculateAttackTime();
23522352

2353-
var cls = ClassBase.Get(Class);
2353+
var cls = ClassDescriptor.Get(Class);
23542354
if (cls != null && cls.AttackSpeedModifier == 1) //Static
23552355
{
23562356
attackTime = cls.AttackSpeedValue;

Intersect.Client.Core/Interface/Game/Character/CharacterWindow.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public partial class CharacterWindow
6969
public int Y;
7070

7171
//Extra Buffs
72-
ClassBase mPlayer;
72+
ClassDescriptor mPlayer;
7373

7474
Label mHpRegen;
7575

@@ -218,7 +218,7 @@ public void Update()
218218

219219
mCharacterName.Text = Globals.Me.Name;
220220
mCharacterLevelAndClass.Text = Strings.Character.LevelAndClass.ToString(
221-
Globals.Me.Level, ClassBase.GetName(Globals.Me.Class)
221+
Globals.Me.Level, ClassDescriptor.GetName(Globals.Me.Class)
222222
);
223223

224224
//Load Portrait
@@ -406,7 +406,7 @@ public void Update()
406406
/// </summary>
407407
public void UpdateExtraBuffs()
408408
{
409-
mPlayer = ClassBase.Get(Globals.Me?.Class ?? Guid.Empty);
409+
mPlayer = ClassDescriptor.Get(Globals.Me?.Class ?? Guid.Empty);
410410

411411
//Getting HP and Mana Regen
412412
if (mPlayer != null)

Intersect.Client.Core/Interface/Menu/CharacterCreationWindow.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ protected override void EnsureInitialized()
212212

213213
_classCombobox.ClearItems();
214214

215-
var classDescriptors = ClassBase.Lookup.Values.OfType<ClassBase>()
215+
var classDescriptors = ClassDescriptor.Lookup.Values.OfType<ClassDescriptor>()
216216
.Where(classDescriptor => !classDescriptor.Locked)
217217
.ToArray();
218218

@@ -368,14 +368,14 @@ private void UpdateDisplay()
368368
}
369369
}
370370

371-
private ClassBase? GetClass()
371+
private ClassDescriptor? GetClass()
372372
{
373373
if (_classCombobox.SelectedItem == null)
374374
{
375375
return null;
376376
}
377377

378-
return ClassBase.Lookup.Values.OfType<ClassBase>().FirstOrDefault(
378+
return ClassDescriptor.Lookup.Values.OfType<ClassDescriptor>().FirstOrDefault(
379379
descriptor =>
380380
!descriptor.Locked &&
381381
string.Equals(_classCombobox.SelectedItem.Text, descriptor.Name, StringComparison.Ordinal)

Intersect.Editor/Forms/Editors/Events/CommandPrinter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1225,7 +1225,7 @@ private static string GetCommandText(OpenCraftingTableCommand command, MapInstan
12251225

12261226
private static string GetCommandText(SetClassCommand command, MapInstance map)
12271227
{
1228-
return Strings.EventCommandList.setclass.ToString(ClassBase.GetName(command.ClassId));
1228+
return Strings.EventCommandList.setclass.ToString(ClassDescriptor.GetName(command.ClassId));
12291229
}
12301230

12311231
private static string GetCommandText(StartQuestCommand command, MapInstance map)

Intersect.Editor/Forms/Editors/Events/Event Commands/EventCommand_ConditionalBranch.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,7 @@ private void UpdateFormElements(ConditionTypes type)
468468
case ConditionTypes.ClassIs:
469469
grpClass.Show();
470470
cmbClass.Items.Clear();
471-
cmbClass.Items.AddRange(ClassBase.Names);
471+
cmbClass.Items.AddRange(ClassDescriptor.Names);
472472

473473
break;
474474
case ConditionTypes.KnowsSpell:
@@ -1269,7 +1269,7 @@ private void SetupFormValues(HasItemCondition condition)
12691269

12701270
private void SetupFormValues(ClassIsCondition condition)
12711271
{
1272-
cmbClass.SelectedIndex = ClassBase.ListIndex(condition.ClassId);
1272+
cmbClass.SelectedIndex = ClassDescriptor.ListIndex(condition.ClassId);
12731273
}
12741274

12751275
private void SetupFormValues(KnowsSpellCondition condition)
@@ -1467,7 +1467,7 @@ private void SaveFormValues(HasItemCondition condition)
14671467

14681468
private void SaveFormValues(ClassIsCondition condition)
14691469
{
1470-
condition.ClassId = ClassBase.IdFromList(cmbClass.SelectedIndex);
1470+
condition.ClassId = ClassDescriptor.IdFromList(cmbClass.SelectedIndex);
14711471
}
14721472

14731473
private void SaveFormValues(KnowsSpellCondition condition)

Intersect.Editor/Forms/Editors/Events/Event Commands/EventCommand_SetClass.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ public EventCommandSetClass(SetClassCommand refCommand, FrmEvent editor)
1919
mEventEditor = editor;
2020
InitLocalization();
2121
cmbClass.Items.Clear();
22-
cmbClass.Items.AddRange(ClassBase.Names);
23-
cmbClass.SelectedIndex = ClassBase.ListIndex(mMyCommand.ClassId);
22+
cmbClass.Items.AddRange(ClassDescriptor.Names);
23+
cmbClass.SelectedIndex = ClassDescriptor.ListIndex(mMyCommand.ClassId);
2424
}
2525

2626
private void InitLocalization()
@@ -35,7 +35,7 @@ private void btnSave_Click(object sender, EventArgs e)
3535
{
3636
if (cmbClass.SelectedIndex > -1)
3737
{
38-
mMyCommand.ClassId = ClassBase.IdFromList(cmbClass.SelectedIndex);
38+
mMyCommand.ClassId = ClassDescriptor.IdFromList(cmbClass.SelectedIndex);
3939
}
4040

4141
mEventEditor.FinishCommandEdit();

0 commit comments

Comments
 (0)