Core: SOme code cleanup, more to follow.
This commit is contained in:
+17
-17
@@ -239,7 +239,7 @@ namespace Game
|
||||
|
||||
public void LoadQuestObjective(SQLFields fields)
|
||||
{
|
||||
QuestObjective obj = new QuestObjective();
|
||||
QuestObjective obj = new();
|
||||
obj.QuestID = fields.Read<uint>(0);
|
||||
obj.Id = fields.Read<uint>(1);
|
||||
obj.Type = (QuestObjectiveType)fields.Read<byte>(2);
|
||||
@@ -618,7 +618,7 @@ namespace Game
|
||||
public uint RewardMoneyDifficulty;
|
||||
public float RewardMoneyMultiplier;
|
||||
public uint RewardBonusMoney;
|
||||
public List<QuestRewardDisplaySpell> RewardDisplaySpell = new List<QuestRewardDisplaySpell>();
|
||||
public List<QuestRewardDisplaySpell> RewardDisplaySpell = new();
|
||||
public uint RewardSpell { get; set; }
|
||||
public uint RewardHonor;
|
||||
public uint RewardKillHonor;
|
||||
@@ -664,7 +664,7 @@ namespace Game
|
||||
public int Expansion;
|
||||
public int ManagedWorldStateID;
|
||||
public int QuestSessionBonus;
|
||||
public List<QuestObjective> Objectives = new List<QuestObjective>();
|
||||
public List<QuestObjective> Objectives = new();
|
||||
public string LogTitle = "";
|
||||
public string LogDescription = "";
|
||||
public string QuestDescription = "";
|
||||
@@ -711,7 +711,7 @@ namespace Game
|
||||
public QuestSpecialFlags SpecialFlags; // custom flags, not sniffed/WDB
|
||||
public uint ScriptId;
|
||||
|
||||
public List<uint> DependentPreviousQuests = new List<uint>();
|
||||
public List<uint> DependentPreviousQuests = new();
|
||||
public QueryQuestInfoResponse QueryData;
|
||||
|
||||
uint _rewChoiceItemsCount;
|
||||
@@ -748,35 +748,35 @@ namespace Game
|
||||
|
||||
public class QuestGreetingLocale
|
||||
{
|
||||
public StringArray Greeting = new StringArray((int)Locale.Total);
|
||||
public StringArray Greeting = new((int)Locale.Total);
|
||||
}
|
||||
|
||||
public class QuestTemplateLocale
|
||||
{
|
||||
public StringArray LogTitle = new StringArray((int)Locale.Total);
|
||||
public StringArray LogDescription = new StringArray((int)Locale.Total);
|
||||
public StringArray QuestDescription = new StringArray((int)Locale.Total);
|
||||
public StringArray AreaDescription = new StringArray((int)Locale.Total);
|
||||
public StringArray PortraitGiverText = new StringArray((int)Locale.Total);
|
||||
public StringArray PortraitGiverName = new StringArray((int)Locale.Total);
|
||||
public StringArray PortraitTurnInText = new StringArray((int)Locale.Total);
|
||||
public StringArray PortraitTurnInName = new StringArray((int)Locale.Total);
|
||||
public StringArray QuestCompletionLog = new StringArray((int)Locale.Total);
|
||||
public StringArray LogTitle = new((int)Locale.Total);
|
||||
public StringArray LogDescription = new((int)Locale.Total);
|
||||
public StringArray QuestDescription = new((int)Locale.Total);
|
||||
public StringArray AreaDescription = new((int)Locale.Total);
|
||||
public StringArray PortraitGiverText = new((int)Locale.Total);
|
||||
public StringArray PortraitGiverName = new((int)Locale.Total);
|
||||
public StringArray PortraitTurnInText = new((int)Locale.Total);
|
||||
public StringArray PortraitTurnInName = new((int)Locale.Total);
|
||||
public StringArray QuestCompletionLog = new((int)Locale.Total);
|
||||
}
|
||||
|
||||
public class QuestRequestItemsLocale
|
||||
{
|
||||
public StringArray CompletionText = new StringArray((int)Locale.Total);
|
||||
public StringArray CompletionText = new((int)Locale.Total);
|
||||
}
|
||||
|
||||
public class QuestObjectivesLocale
|
||||
{
|
||||
public StringArray Description = new StringArray((int)Locale.Total);
|
||||
public StringArray Description = new((int)Locale.Total);
|
||||
}
|
||||
|
||||
public class QuestOfferRewardLocale
|
||||
{
|
||||
public StringArray RewardText = new StringArray((int)Locale.Total);
|
||||
public StringArray RewardText = new((int)Locale.Total);
|
||||
}
|
||||
|
||||
public struct QuestRewardDisplaySpell
|
||||
|
||||
@@ -54,7 +54,7 @@ namespace Game
|
||||
|
||||
public static void DeleteFromDB(ObjectGuid guid)
|
||||
{
|
||||
SQLTransaction trans = new SQLTransaction();
|
||||
SQLTransaction trans = new();
|
||||
|
||||
PreparedStatement stmt = DB.Characters.GetPreparedStatement(CharStatements.DEL_CHAR_QUESTSTATUS_OBJECTIVES_CRITERIA);
|
||||
stmt.AddValue(0, guid.GetCounter());
|
||||
@@ -109,7 +109,7 @@ namespace Game
|
||||
if (criteria.Entry.StartTimer != 0 && date + criteria.Entry.StartTimer < now)
|
||||
continue;
|
||||
|
||||
CriteriaProgress progress = new CriteriaProgress();
|
||||
CriteriaProgress progress = new();
|
||||
progress.Counter = counter;
|
||||
progress.Date = date;
|
||||
progress.Changed = false;
|
||||
@@ -209,7 +209,7 @@ namespace Game
|
||||
{
|
||||
foreach (var pair in _criteriaProgress)
|
||||
{
|
||||
CriteriaUpdate criteriaUpdate = new CriteriaUpdate();
|
||||
CriteriaUpdate criteriaUpdate = new();
|
||||
|
||||
criteriaUpdate.CriteriaID = pair.Key;
|
||||
criteriaUpdate.Quantity = pair.Value.Counter;
|
||||
@@ -242,7 +242,7 @@ namespace Game
|
||||
|
||||
public override void SendCriteriaUpdate(Criteria criteria, CriteriaProgress progress, uint timeElapsed, bool timedCompleted)
|
||||
{
|
||||
CriteriaUpdate criteriaUpdate = new CriteriaUpdate();
|
||||
CriteriaUpdate criteriaUpdate = new();
|
||||
|
||||
criteriaUpdate.CriteriaID = criteria.Id;
|
||||
criteriaUpdate.Quantity = progress.Counter;
|
||||
@@ -260,7 +260,7 @@ namespace Game
|
||||
|
||||
public override void SendCriteriaProgressRemoved(uint criteriaId)
|
||||
{
|
||||
CriteriaDeleted criteriaDeleted = new CriteriaDeleted();
|
||||
CriteriaDeleted criteriaDeleted = new();
|
||||
criteriaDeleted.CriteriaID = criteriaId;
|
||||
SendPacket(criteriaDeleted);
|
||||
}
|
||||
@@ -328,6 +328,6 @@ namespace Game
|
||||
|
||||
|
||||
Player _owner;
|
||||
List<uint> _completedObjectives = new List<uint>();
|
||||
List<uint> _completedObjectives = new();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user