Skip to content

Commit

Permalink
Add new conditions and commands.
Browse files Browse the repository at this point in the history
  • Loading branch information
brotalnia committed Oct 26, 2020
1 parent 1e7e0fa commit aa2b987
Show file tree
Hide file tree
Showing 6 changed files with 201 additions and 4 deletions.
145 changes: 145 additions & 0 deletions ScriptEditor/DataFinderForms/FormConditionFinder.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

37 changes: 37 additions & 0 deletions ScriptEditor/DataFinderForms/FormConditionFinder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ private void AddControlsToLists()
conditionFormsList.Add(frmConditionInstanceData);
conditionFormsList.Add(frmConditionMapEventData);
conditionFormsList.Add(frmConditionMapEventTargets);
conditionFormsList.Add(frmConditionDbGuid);
conditionFormsList.Add(frmConditionLocalTime);
conditionFormsList.Add(frmConditionUnknown);
conditionTooltipsList.Clear();
conditionTooltipsList.Add(lblConditionNotTooltip);
Expand All @@ -61,6 +63,8 @@ private void AddControlsToLists()
conditionTooltipsList.Add(lblConditionInstanceDataTooltip);
conditionTooltipsList.Add(lblConditionMapEventDataTooltip);
conditionTooltipsList.Add(lblConditionMapEventTargetsTooltip);
conditionTooltipsList.Add(lblConditionDbGuidTooltip);
conditionTooltipsList.Add(lblConditionLocalTimeTooltip);
conditionTooltipsList.Add(lblConditionUnknownTooltip);
}
private ComboboxPair[] ConditionTeam_ComboOptions =
Expand Down Expand Up @@ -245,6 +249,13 @@ private void ResetAndHideConditionSpecificForms()
txtConditionDbGuid4.Text = "";
frmConditionDbGuid.Visible = false;

// CONDITION_LOCAL_TIME (53)
txtLocalTimeStartHour.Text = "";
txtLocalTimeStartMinutes.Text = "";
txtLocalTimeEndHour.Text = "";
txtLocalTimeEndMinutes.Text = "";
frmConditionLocalTime.Visible = false;

// Unknown Condition Id
txtUnknownValue1.Text = "";
txtUnknownValue2.Text = "";
Expand Down Expand Up @@ -818,6 +829,15 @@ private void ShowConditionSpecificForm(ConditionInfo selectedCondition)
frmConditionDbGuid.Visible = true;
break;
}
case 53: // CONDITION_LOCAL_TIME
{
txtLocalTimeStartHour.Text = selectedCondition.Value1.ToString();
txtLocalTimeStartMinutes.Text = selectedCondition.Value2.ToString();
txtLocalTimeEndHour.Text = selectedCondition.Value3.ToString();
txtLocalTimeEndMinutes.Text = selectedCondition.Value4.ToString();
frmConditionLocalTime.Visible = true;
break;
}
default:
{
txtUnknownValue1.Text = selectedCondition.Value1.ToString();
Expand Down Expand Up @@ -1827,6 +1847,23 @@ private void txtConditionDbGuid4_Leave(object sender, EventArgs e)
{
SetScriptFieldFromTextbox(txtConditionDbGuid4, "Value4");
}
// CONDITION_LOCAL_TIME
private void txtLocalTimeStartHour_Leave(object sender, EventArgs e)
{
SetScriptFieldFromTextbox(txtLocalTimeStartHour, "Value1");
}
private void txtLocalTimeStartMinutes_Leave(object sender, EventArgs e)
{
SetScriptFieldFromTextbox(txtLocalTimeStartMinutes, "Value2");
}
private void txtLocalTimeEndHour_Leave(object sender, EventArgs e)
{
SetScriptFieldFromTextbox(txtLocalTimeEndHour, "Value3");
}
private void txtLocalTimeEndMinutes_Leave(object sender, EventArgs e)
{
SetScriptFieldFromTextbox(txtLocalTimeEndMinutes, "Value4");
}
// Unknown Condition Id
private void txtUnknownValue1_Leave(object sender, EventArgs e)
{
Expand Down
4 changes: 2 additions & 2 deletions ScriptEditor/FormScriptEditor.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions ScriptEditor/FormScriptEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ public partial class FormScriptEditor : Form
"Load GameObject", // 82
"Quest Credit", // 83
"Set Gossip Menu", // 84
"Send AI Event", // 85
};

// Options for combo boxes.
Expand Down Expand Up @@ -760,6 +761,7 @@ private void ResetAndHideCommandSpecificForms()
// Set Random AI Phase (45)
// Set Range AI Phase (46)
// Set Server Variable (54)
// Send AI Event (85)
txtSetRandomPhase1.Text = "";
txtSetRandomPhase2.Text = "";
txtSetRandomPhase3.Text = "";
Expand Down Expand Up @@ -1770,6 +1772,7 @@ private void ShowCommandSpecificForm(ScriptAction selectedAction)
case 45: // Set Random AI Phase
case 46: // Set Range AI Phase
case 54: // Set Server Variable
case 85: // Send AI Event
{
txtSetRandomPhase1.Text = selectedAction.Datalong.ToString();
txtSetRandomPhase2.Text = selectedAction.Datalong2.ToString();
Expand Down Expand Up @@ -1810,6 +1813,17 @@ private void ShowCommandSpecificForm(ScriptAction selectedAction)
lblSetRandomPhase2.Text = "Value:";
break;
}
case 85: // Send AI Event
{
lblSetRandomPhaseTooltip.Text = "Notifies the source Creature's AI that an event took place.";
lblSetRandomPhase3.Visible = false;
lblSetRandomPhase4.Visible = false;
txtSetRandomPhase3.Visible = false;
txtSetRandomPhase4.Visible = false;
lblSetRandomPhase1.Text = "Event Id:";
lblSetRandomPhase2.Text = "Data:";
break;
}
}
lblSetRandomPhase1.Location = new Point(txtSetRandomPhase1.Location.X - lblSetRandomPhase1.Size.Width - 4, lblSetRandomPhase1.Location.Y);
lblSetRandomPhase2.Location = new Point(txtSetRandomPhase2.Location.X - lblSetRandomPhase2.Size.Width - 4, lblSetRandomPhase2.Location.Y);
Expand Down
1 change: 1 addition & 0 deletions ScriptEditor/GameData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1676,6 +1676,7 @@ static GameData()
ConditionNamesList.Add(new ComboboxPair("OBJECT_FIT_CONDITION", 50));
ConditionNamesList.Add(new ComboboxPair("PVP_RANK", 51));
ConditionNamesList.Add(new ComboboxPair("DB_GUID", 52));
ConditionNamesList.Add(new ComboboxPair("LOCAL_TIME", 53));

// Add skill names.
SkillsList.Add(new ComboboxPair("Frost", 6));
Expand Down
4 changes: 2 additions & 2 deletions ScriptEditor/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("7.7.0.0")]
[assembly: AssemblyFileVersion("7.7.0.0")]
[assembly: AssemblyVersion("7.8.0.0")]
[assembly: AssemblyFileVersion("7.8.0.0")]

0 comments on commit aa2b987

Please sign in to comment.