Skip to content

Commit 1a0df5f

Browse files
committed
Rename Objective to MissionObjective
1 parent 0252336 commit 1a0df5f

File tree

4 files changed

+31
-31
lines changed

4 files changed

+31
-31
lines changed

src/MHServerEmu.Games/Entities/Player.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ public void InitializeFromDBAccount(DBAccount account)
311311
{
312312
Mission mission = MissionManager.CreateMission(missionRef);
313313
mission.State = MissionState.Completed;
314-
mission.Objectives = Array.Empty<Objective>();
314+
mission.Objectives = Array.Empty<MissionObjective>();
315315
mission.Participants = new ulong[] { BaseData.EntityId };
316316
MissionManager.InsertMission(mission);
317317
}

src/MHServerEmu.Games/Missions/Mission.cs

+5-5
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public class Mission
2727
public TimeSpan TimeExpireCurrentState { get; set; }
2828
public PrototypeId PrototypeId { get; set; }
2929
public int Random { get; set; }
30-
public Objective[] Objectives { get; set; }
30+
public MissionObjective[] Objectives { get; set; }
3131
public ulong[] Participants { get; set; }
3232
public bool Suspended { get; set; }
3333

@@ -41,7 +41,7 @@ public Mission(CodedInputStream stream, BoolDecoder boolDecoder)
4141
PrototypeId = stream.ReadPrototypeRef<Prototype>();
4242
Random = stream.ReadRawInt32();
4343

44-
Objectives = new Objective[stream.ReadRawVarint64()];
44+
Objectives = new MissionObjective[stream.ReadRawVarint64()];
4545
for (int i = 0; i < Objectives.Length; i++)
4646
Objectives[i] = new(stream);
4747

@@ -53,7 +53,7 @@ public Mission(CodedInputStream stream, BoolDecoder boolDecoder)
5353
}
5454

5555
public Mission(MissionState state, TimeSpan timeExpireCurrentState, PrototypeId prototypeId,
56-
int random, Objective[] objectives, ulong[] participants, bool suspended)
56+
int random, MissionObjective[] objectives, ulong[] participants, bool suspended)
5757
{
5858
State = state;
5959
TimeExpireCurrentState = timeExpireCurrentState;
@@ -70,7 +70,7 @@ public Mission(PrototypeId prototypeId, int random)
7070
TimeExpireCurrentState = TimeSpan.Zero;
7171
PrototypeId = prototypeId;
7272
Random = random;
73-
Objectives = new Objective[] { new(0x0, MissionObjectiveState.Active, TimeSpan.Zero, Array.Empty<InteractionTag>(), 0x0, 0x0, 0x0, 0x0) };
73+
Objectives = new MissionObjective[] { new(0x0, MissionObjectiveState.Active, TimeSpan.Zero, Array.Empty<InteractionTag>(), 0x0, 0x0, 0x0, 0x0) };
7474
Participants = Array.Empty<ulong>();
7575
Suspended = false;
7676
}
@@ -92,7 +92,7 @@ public void Encode(CodedOutputStream stream, BoolEncoder boolEncoder)
9292
stream.WriteRawInt32(Random);
9393

9494
stream.WriteRawVarint64((ulong)Objectives.Length);
95-
foreach (Objective objective in Objectives) objective.Encode(stream);
95+
foreach (MissionObjective objective in Objectives) objective.Encode(stream);
9696

9797
stream.WriteRawVarint64((ulong)Participants.Length);
9898
foreach (ulong Participant in Participants) stream.WriteRawVarint64(Participant);

src/MHServerEmu.Games/Missions/Objective.cs src/MHServerEmu.Games/Missions/MissionObjective.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public enum MissionObjectiveState
1515
Skipped = 5
1616
}
1717

18-
public class Objective
18+
public class MissionObjective
1919
{
2020
public ulong ObjectivesIndex { get; set; }
2121
public ulong ObjectiveIndex { get; set; } // NetMessageMissionObjectiveUpdate
@@ -27,7 +27,7 @@ public class Objective
2727
public ulong FailCurrentCount { get; set; }
2828
public ulong FailRequiredCount { get; set; }
2929

30-
public Objective(CodedInputStream stream)
30+
public MissionObjective(CodedInputStream stream)
3131
{
3232
ObjectivesIndex = stream.ReadRawByte();
3333
ObjectiveIndex = stream.ReadRawByte();
@@ -44,7 +44,7 @@ public Objective(CodedInputStream stream)
4444
FailRequiredCount = stream.ReadRawVarint64();
4545
}
4646

47-
public Objective(ulong objectiveIndex, MissionObjectiveState objectiveState, TimeSpan objectiveStateExpireTime,
47+
public MissionObjective(ulong objectiveIndex, MissionObjectiveState objectiveState, TimeSpan objectiveStateExpireTime,
4848
InteractionTag[] interactedEntities, ulong currentCount, ulong requiredCount, ulong failCurrentCount,
4949
ulong failRequiredCount)
5050
{

0 commit comments

Comments
 (0)