Skip to content

Commit

Permalink
Add newest commands and conditions.
Browse files Browse the repository at this point in the history
  • Loading branch information
brotalnia committed Apr 23, 2020
1 parent 170895f commit 1c61d60
Show file tree
Hide file tree
Showing 8 changed files with 262 additions and 131 deletions.
142 changes: 99 additions & 43 deletions ScriptEditor/DataFinderForms/FormConditionFinder.Designer.cs

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

32 changes: 27 additions & 5 deletions ScriptEditor/DataFinderForms/FormConditionFinder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ private void ResetAndHideConditionSpecificForms()
// CONDITION_HEALTH_PERCENT (41)
// CONDITION_MANA_PERCENT (42)
// CONDITION_PVP_RANK (51)
// CONDITION_DB_GUID (52)
txtWarEffortStage.Text = "";
cmbWarEffortComparison.SelectedIndex = 0;
frmConditionWarEffort.Visible = false;
Expand All @@ -151,6 +152,8 @@ private void ResetAndHideConditionSpecificForms()
// CONDITION_NEARBY_CREATURE (20)
btnNearbyCreatureId.Text = "-NONE-";
txtNearbyCreatureDistance.Text = "";
cmbNearbyCreatureDead.SelectedIndex = 0;
cmbNearbyCreatureNotSelf.SelectedIndex = 0;
frmConditionNearbyCreature.Visible = false;

// CONDITION_NEARBY_GAMEOBJECT (21)
Expand Down Expand Up @@ -273,7 +276,7 @@ private void ShowConditionSpecificForm(ConditionInfo selectedCondition)
}
case 13: // CONDITION_CANT_PATH_TO_VICTIM
{
lblConditionNotTooltip.Text = "Returns true if the source Creature cannot find a path to its victim. This condition has no additional parameters.";
lblConditionNotTooltip.Text = "Returns true if the source Unit cannot find a path to its victim. This condition has no additional parameters.";
break;
}
case 37: // CONDITION_LINE_OF_SIGHT
Expand Down Expand Up @@ -555,6 +558,7 @@ private void ShowConditionSpecificForm(ConditionInfo selectedCondition)
case 41: // CONDITION_HEALTH_PERCENT
case 42: // CONDITION_MANA_PERCENT
case 51: // CONDITION_PVP_RANK
case 52: // CONDITION_DB_GUID
{
switch (selectedCondition.Type)
{
Expand Down Expand Up @@ -638,7 +642,15 @@ private void ShowConditionSpecificForm(ConditionInfo selectedCondition)
lblWarEffortStage.Text = "Rank:";
break;
}
case 52: // CONDITION_DB_GUID
{
lblConditionWarEffortTooltip.Text = "Returns true if the source object's database guid matches the one specified.";
cmbWarEffortComparison.Visible = false;
lblWarEffortComparison.Visible = false;
lblWarEffortStage.Text = "Guid:";
break;
}
}
txtWarEffortStage.Text = selectedCondition.Value1.ToString();
cmbWarEffortComparison.SelectedIndex = (int)selectedCondition.Value2;
frmConditionWarEffort.Visible = true;
Expand Down Expand Up @@ -672,6 +684,8 @@ private void ShowConditionSpecificForm(ConditionInfo selectedCondition)
if (creatureId > 0)
btnNearbyCreatureId.Text = GameData.FindCreatureName(creatureId) + " (" + creatureId.ToString() + ")";
txtNearbyCreatureDistance.Text = selectedCondition.Value2.ToString();
cmbNearbyCreatureDead.SelectedIndex = (int)selectedCondition.Value3;
cmbNearbyCreatureNotSelf.SelectedIndex = (int)selectedCondition.Value4;
frmConditionNearbyCreature.Visible = true;
break;
}
Expand Down Expand Up @@ -1646,13 +1660,13 @@ private string GetClassNamesFromMask(uint mask)
classes.Add("Rogue");
if ((mask & 16) != 0)
classes.Add("Priest");
if ((mask & 32) != 0)
classes.Add("Shaman");
if ((mask & 64) != 0)
classes.Add("Mage");
classes.Add("Shaman");
if ((mask & 128) != 0)
classes.Add("Warlock");
classes.Add("Mage");
if ((mask & 256) != 0)
classes.Add("Warlock");
if ((mask & 1024) != 0)
classes.Add("Druid");

if (classes.Count > 0)
Expand Down Expand Up @@ -1707,6 +1721,14 @@ private void txtNearbyCreatureDistance_Leave(object sender, EventArgs e)
{
SetScriptFieldFromTextbox(txtNearbyCreatureDistance, "Value2");
}
private void cmbNearbyCreatureDead_SelectedIndexChanged(object sender, EventArgs e)
{
SetScriptFieldFromCombobox(cmbNearbyCreatureDead, "Value3", false);
}
private void cmbNearbyCreatureNotSelf_SelectedIndexChanged(object sender, EventArgs e)
{
SetScriptFieldFromCombobox(cmbNearbyCreatureNotSelf, "Value4", false);
}
// CONDITION_NEARBY_GAMEOBJECT
private void btnNearbyObjectId_Click(object sender, EventArgs e)
{
Expand Down
Loading

0 comments on commit 1c61d60

Please sign in to comment.