mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-06-12 07:24:37 +02:00
Added debug script for setting quest completion
This commit is contained in:
parent
c677479a03
commit
25f1b0fd95
3 changed files with 94 additions and 4 deletions
|
@ -1169,8 +1169,7 @@ namespace Meteor.Map.Actors
|
|||
|
||||
private void SendCompletedQuests(ushort from, ushort to)
|
||||
{
|
||||
Bitstream completed = questStateManager.GetCompletedBitstream();
|
||||
byte[] data = completed.GetSlice(from, to);
|
||||
byte[] data = questStateManager.GetCompletionSliceBytes(from, to);
|
||||
|
||||
SetActorPropetyPacket completedQuestWorkUpdate = new SetActorPropetyPacket(from, to, "playerWork/journal");
|
||||
completedQuestWorkUpdate.AddBitfield(Utils.MurmurHash2("playerWork.questScenarioComplete", 0), data);
|
||||
|
@ -1661,6 +1660,25 @@ namespace Meteor.Map.Actors
|
|||
return false;
|
||||
}
|
||||
|
||||
public bool IsQuestCompleted(uint id)
|
||||
{
|
||||
return questStateManager.IsQuestComplete(id);
|
||||
}
|
||||
|
||||
public void SetQuestComplete(uint id, bool flag)
|
||||
{
|
||||
if (flag)
|
||||
{
|
||||
Quest currentQuest = GetQuest(id);
|
||||
if (currentQuest != null)
|
||||
{
|
||||
CompleteQuest(currentQuest);
|
||||
return;
|
||||
}
|
||||
}
|
||||
questStateManager.ForceQuestCompleteFlag(id, flag);
|
||||
}
|
||||
|
||||
public Quest GetQuest(uint id)
|
||||
{
|
||||
for (int i = 0; i < questScenario.Length; i++)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue