Skip to content

Commit

Permalink
Merge pull request #12 from harliq/Nudge
Browse files Browse the repository at this point in the history
Nudge
  • Loading branch information
harliq authored Jun 17, 2020
2 parents 98c7c98 + a674c5c commit 269e855
Show file tree
Hide file tree
Showing 11 changed files with 122 additions and 152 deletions.
41 changes: 24 additions & 17 deletions AceCreator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -351,11 +351,16 @@ public void LoadWindow()
ButtonOpenINI = view != null ? (HudButton)view["ButtonOpenINI"] : new HudButton();
ButtonOpenINI.Hit += new EventHandler(ButtonOpenINI_Click);


// ***** Help Tab *****
ButtonACCWiki = view != null ? (HudButton)view["ButtonACCWiki"] : new HudButton();
ButtonACCWiki.Hit += new EventHandler(ButtonACCWiki_Click);

// Making some stuff not seen
ButtonYotesWCIDLookUp.Visible = false;
ButtonACEWiki = view != null ? (HudButton)view["ButtonACEWiki"] : new HudButton();
ButtonACEWiki.Hit += new EventHandler(ButtonACEWiki_Click);

// *** Making some stuff not seen ***
// ButtonYotesWCIDLookUp.Visible = false;
ButtonCreateMob.Visible = false;

}
Expand Down Expand Up @@ -461,11 +466,7 @@ private void Current_ChatBoxMessage(object sender, ChatTextInterceptEventArgs e)

TextboxCurrentLandblock.Text = landblock;
}
//if (ChatMessages.GetParentGUID(e.Text, out string guid))
//{
// TextboxParentGUID = (HudTextBox)view["TextboxParentGUID"];
// TextboxParentGUID.Text = guid;
//}

}
catch (Exception ex)
{
Expand Down Expand Up @@ -789,16 +790,22 @@ public void LoadParentObjectsFile()

using (StreamWriter writer = new StreamWriter(filePath, false))
{
writer.WriteLine("1154 Linkable Monster Generator");
writer.WriteLine("4219 Linkable Monster Generator ( 7 Min. )");
writer.WriteLine("7923 Linkable Monster Generator ( 3 Min. )");
writer.WriteLine("7924 Linkable Monster Generator ( 5 Min. )");

writer.WriteLine("7925 Linkable Monster Generator ( 10 Min.)");
writer.WriteLine("7926 Linkable Monster Generator ( 20 Min.)");
writer.WriteLine("7932 Linkable Monster Generator ( 4 Min. )");
writer.WriteLine("21120 Linkable Monster Generator");
writer.WriteLine("24129 Linkable Monster Generator ( 2 Min.)");
// Monster Gens
writer.WriteLine("28282 Linkable Monster Generator - 10 Secs");
writer.WriteLine("15274 Linkable Monster Generator - 1 Min");
writer.WriteLine("24129 Linkable Monster Generator - 2 Min");
writer.WriteLine("07923 Linkable Monster Generator - 3 Min");
writer.WriteLine("07932 Linkable Monster Generator - 4 Min");
writer.WriteLine("07924 Linkable Monster Generator - 5 Min");
writer.WriteLine("04219 Linkable Monster Generator - 7 Min");
writer.WriteLine("07925 Linkable Monster Generator - 10 Min");
writer.WriteLine("03955 Linkable Monster Generator - 15 Min");
writer.WriteLine("07926 Linkable Monster Generator - 20 Min");
// Item Gens
writer.WriteLine("15759 Linkable Item Generator - 10 Secs");
writer.WriteLine("05085 Linkable Item Generator - 25 Secs");
writer.WriteLine("04142 Linkable Item Generator - 2 Min");

writer.Close();
}
}
Expand Down
1 change: 1 addition & 0 deletions AceCreator.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
<Compile Include="Globals.cs" />
<Compile Include="TabAdvanced.cs" />
<Compile Include="TabContent.cs" />
<Compile Include="TabHelp.cs" />
<Compile Include="TabLandBlock.cs" />
<Compile Include="Lib\DecalProxy.cs" />
<Compile Include="PluginCore.cs" />
Expand Down
2 changes: 1 addition & 1 deletion Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.3.4")]
[assembly: AssemblyFileVersion("1.8.6.0")]
[assembly: AssemblyFileVersion("2.0.0.0")]
9 changes: 3 additions & 6 deletions TabAdvanced.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,12 @@ public void ChoiceGenerator_Change(object sender, EventArgs e)
// Button Events
public void ButtonGetParentGUID_Click(object sender, EventArgs e)
{
Globals.ButtonCommand = "GetInfo";

try
{
WO = CoreManager.Current.WorldFilter[CoreManager.Current.Actions.CurrentSelection];
aceItem.name = WO.Name;
aceItem.id = WO.Id;
Globals.ButtonCommand = "/getinfo";
CommandWait(sender, e);

Globals.Host.Actions.RequestId(Globals.Host.Actions.CurrentSelection);
CoreManager.Current.WorldFilter.ChangeObject += GetInfoWaitForItemUpdate;
}
catch (Exception ex) { Util.LogError(ex); }
}
Expand Down
56 changes: 20 additions & 36 deletions TabContent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public void ButtonConvertJSON_Click(object sender, EventArgs e)
string tsplit = ((HudStaticText)ChoiceJSON[ChoiceJSON.Current]).Text;
TextboxCreateWCID = (HudTextBox)view["TextboxCreateWCID"];
Util.SendChatCommand(@"/import-json " + tsplit.Split(' ')[0]);
// Util.WriteToChat("Imported JSON= " + ((HudStaticText)ChoiceJSON[ChoiceJSON.Current]).Text);

TextboxCreateWCID.Text = tsplit.Split(' ')[0];
}
catch (Exception ex) { Util.LogError(ex); }
Expand All @@ -88,7 +88,7 @@ public void ButtonConvertSQL_Click(object sender, EventArgs e)
string tsplit = ((HudStaticText)ChoiceSQL[ChoiceSQL.Current]).Text;
TextboxCreateWCID = (HudTextBox)view["TextboxCreateWCID"];
Util.SendChatCommand(@"/import-sql " + tsplit.Split(' ')[0]);
// Util.WriteToChat("Imported SQL= " + ((HudStaticText)ChoiceSQL[ChoiceSQL.Current]).Text);

TextboxCreateWCID.Text = tsplit.Split(' ')[0];
}
catch (Exception ex) { Util.LogError(ex); }
Expand Down Expand Up @@ -165,22 +165,20 @@ public void ButtonExportSQL_Click(object sender, EventArgs e)
}
public void ButtonYotesWCIDLookUp_Click(object sender, EventArgs e)
{
WO = CoreManager.Current.WorldFilter[CoreManager.Current.Actions.CurrentSelection];
Util.WriteToChat(WO.Id.ToString());

//Globals.ButtonCommand = "YotesLookup";
//try
//{
// WO = CoreManager.Current.WorldFilter[CoreManager.Current.Actions.CurrentSelection];
// aceItem.name = WO.Name;
// aceItem.id = WO.Id;

// Globals.Host.Actions.RequestId(Globals.Host.Actions.CurrentSelection);
// CoreManager.Current.WorldFilter.ChangeObject += GetInfoWaitForItemUpdate;
// Util.WriteToChat(Globals.YotesWCID);
Globals.ButtonCommand = "YotesLookup";
try
{
WO = CoreManager.Current.WorldFilter[CoreManager.Current.Actions.CurrentSelection];
aceItem.name = WO.Name;
aceItem.id = WO.Id;

Globals.Host.Actions.RequestId(Globals.Host.Actions.CurrentSelection);
CoreManager.Current.WorldFilter.ChangeObject += GetInfoWaitForItemUpdate;
Util.WriteToChat(Globals.YotesWCID);

//}
//catch (Exception ex) { Util.LogError(ex); }
}
catch (Exception ex) { Util.LogError(ex); }

}

Expand Down Expand Up @@ -208,13 +206,8 @@ public void ButtonRemoveInstace_Click(object sender, EventArgs e)
try
{
Globals.ButtonCommand = "/removeinst";
CommandWait(sender, e);

WO = CoreManager.Current.WorldFilter[CoreManager.Current.Actions.CurrentSelection];
aceItem.name = WO.Name;
aceItem.id = WO.Id;

Globals.Host.Actions.RequestId(Globals.Host.Actions.CurrentSelection);
CoreManager.Current.WorldFilter.ChangeObject += DeleteItemWaitForItemUpdate;
}
catch (Exception ex) { Util.LogError(ex); }

Expand All @@ -226,9 +219,7 @@ public void ButtonMyLocation_Click(object sender, EventArgs e)
try
{
Util.SendChatCommand("/loc");
// LabelCurrentLandblock = (HudStaticText)view["LabelCurrentLandblock"];
// var myLandCell = CoreManager.Current.Actions.Landcell;
// LabelCurrentLandblock.Text = CoreManager.Current.Actions.Landcell.ToString("X");

}
catch (Exception ex) { Util.LogError(ex); }

Expand All @@ -240,12 +231,8 @@ public void ButtonDeleteItem_Click(object sender, EventArgs e)
try
{
Globals.ButtonCommand = "/delete";
WO = CoreManager.Current.WorldFilter[CoreManager.Current.Actions.CurrentSelection];
aceItem.name = WO.Name;
aceItem.id = WO.Id;
CommandWait(sender, e);

Globals.Host.Actions.RequestId(Globals.Host.Actions.CurrentSelection);
CoreManager.Current.WorldFilter.ChangeObject += DeleteItemWaitForItemUpdate;
}
catch (Exception ex) { Util.LogError(ex); }

Expand All @@ -263,15 +250,12 @@ public void ButtonRefreshFilesList_Click(object sender, EventArgs e)
}
public void ButtonGetInfo_Click(object sender, EventArgs e)
{
Globals.ButtonCommand = "GetInfo";

try
{
WO = CoreManager.Current.WorldFilter[CoreManager.Current.Actions.CurrentSelection];
aceItem.name = WO.Name;
aceItem.id = WO.Id;
Globals.ButtonCommand = "/getinfo";
CommandWait(sender, e);

Globals.Host.Actions.RequestId(Globals.Host.Actions.CurrentSelection);
CoreManager.Current.WorldFilter.ChangeObject += GetInfoWaitForItemUpdate;
}
catch (Exception ex) { Util.LogError(ex); }

Expand Down
35 changes: 35 additions & 0 deletions TabHelp.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
using System;
using System.Collections.Generic;
using System.Text;
using Decal.Adapter;
using VirindiViewService.Controls;


namespace AceCreator
{
public partial class AceCreator : PluginBase
{
public HudButton ButtonACCWiki { get; set; }
public HudButton ButtonACEWiki { get; set; }


public void ButtonACCWiki_Click(object sender, EventArgs e)
{
try
{
System.Diagnostics.Process.Start("https://github.com/harliq/AceCreator/wiki");

}
catch (Exception ex) { Util.LogError(ex); }
}
public void ButtonACEWiki_Click(object sender, EventArgs e)
{
try
{
System.Diagnostics.Process.Start("https://github.com/ACEmulator/ACE/wiki/Content-Creation");

}
catch (Exception ex) { Util.LogError(ex); }
}
}
}
10 changes: 1 addition & 9 deletions TabLandBlock.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,8 @@ public void ButtonImportLandblockJSON_Click(object sender, EventArgs e)
{
try
{
// string tsplit = ((HudStaticText)ChoiceLandblockJSON[ChoiceLandblockJSON.Current]).Text;
string wcid = ((HudStaticText)ChoiceLandblockJSON[ChoiceLandblockJSON.Current]).Text.Replace(".json", "");
// TextboxCreateWCID = (HudTextBox)view["TextboxCreateWCID"];
Util.SendChatCommand(@"/import-json " + wcid + " landblock");
// Util.WriteToChat("Imported JSON= " + ((HudStaticText)ChoiceJSON[ChoiceJSON.Current]).Text);
// TextboxCreateWCID.Text = tsplit.Split(' ')[0];
}
catch (Exception ex) { Util.LogError(ex); }
}
Expand All @@ -52,12 +48,8 @@ public void ButtonImportLandblockSQL_Click(object sender, EventArgs e)
{
try
{
// string tsplit = ((HudStaticText)ChoiceLandblockSQL[ChoiceLandblockSQL.Current]).Text;
string wcid = ((HudStaticText)ChoiceLandblockSQL[ChoiceLandblockSQL.Current]).Text.Replace(".sql", "");
//TextboxCreateWCID = (HudTextBox)view["TextboxCreateWCID"];
Util.SendChatCommand(@"/import-sql " + wcid + " landblock");
// Util.WriteToChat("Imported JSON= " + ((HudStaticText)ChoiceJSON[ChoiceJSON.Current]).Text);
// TextboxCreateWCID.Text = tsplit.Split(' ')[0];
}
catch (Exception ex) { Util.LogError(ex); }
}
Expand Down Expand Up @@ -116,7 +108,7 @@ public void ButtonGetCurrentLandblock_Click(object sender, EventArgs e)
}
public void ButtonExportLandblock_Click(object sender, EventArgs e)
{
// Globals.ButtonCommand = "/export-sql landblock " + TextboxCurrentLandblock.Text;

try
{
Util.SendChatCommand("/export-sql landblock " + TextboxCurrentLandblock.Text);
Expand Down
Loading

0 comments on commit 269e855

Please sign in to comment.