mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-13 12:14:16 +01:00
fix: remove fate tracking features
This commit is contained in:
parent
574a831444
commit
4d906923a2
2 changed files with 0 additions and 104 deletions
|
|
@ -144,18 +144,6 @@ namespace Dalamud {
|
||||||
HelpMessage = "Shows list of commands available."
|
HelpMessage = "Shows list of commands available."
|
||||||
});
|
});
|
||||||
|
|
||||||
CommandManager.AddHandler("/fatewatchadd", new CommandInfo(OnFateWatchAdd) {
|
|
||||||
HelpMessage = "Add a fate to your watch list by name. Usage: /fatewatchadd <name of fate>"
|
|
||||||
});
|
|
||||||
|
|
||||||
CommandManager.AddHandler("/fatewatchlist", new CommandInfo(OnFateWatchList) {
|
|
||||||
HelpMessage = "List fates you're currently watching."
|
|
||||||
});
|
|
||||||
|
|
||||||
CommandManager.AddHandler("/fatewatchremove", new CommandInfo(OnFateWatchRemove) {
|
|
||||||
HelpMessage = "Remove a fate from your watch list. Usage: /fatewatchremove <name of fate>"
|
|
||||||
});
|
|
||||||
|
|
||||||
CommandManager.AddHandler("/xlmute", new CommandInfo(OnBadWordsAdd) {
|
CommandManager.AddHandler("/xlmute", new CommandInfo(OnBadWordsAdd) {
|
||||||
HelpMessage = "Mute a word or sentence from appearing in chat. Usage: /xlmute <word or sentence>"
|
HelpMessage = "Mute a word or sentence from appearing in chat. Usage: /xlmute <word or sentence>"
|
||||||
});
|
});
|
||||||
|
|
@ -236,62 +224,6 @@ namespace Dalamud {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnFateWatchAdd(string command, string arguments) {
|
|
||||||
if (this.Configuration.Fates == null)
|
|
||||||
this.Configuration.Fates = new List<DalamudConfiguration.FateInfo>();
|
|
||||||
|
|
||||||
dynamic candidates = XivApi.Search(arguments, "Fate").GetAwaiter().GetResult();
|
|
||||||
|
|
||||||
if (candidates.Results.Count == 0) {
|
|
||||||
Framework.Gui.Chat.Print("No fates found using that name.");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
var fateInfo = new DalamudConfiguration.FateInfo {
|
|
||||||
Id = candidates.Results[0].ID,
|
|
||||||
Name = candidates.Results[0].Name
|
|
||||||
};
|
|
||||||
|
|
||||||
this.Configuration.Fates.Add(fateInfo);
|
|
||||||
|
|
||||||
this.Configuration.Save(this.StartInfo.ConfigurationPath);
|
|
||||||
|
|
||||||
Framework.Gui.Chat.Print($"Added fate \"{fateInfo.Name}\".");
|
|
||||||
}
|
|
||||||
|
|
||||||
private void OnFateWatchList(string command, string arguments) {
|
|
||||||
if (this.Configuration.Fates == null)
|
|
||||||
this.Configuration.Fates = new List<DalamudConfiguration.FateInfo>();
|
|
||||||
|
|
||||||
if (this.Configuration.Fates.Count == 0) {
|
|
||||||
Framework.Gui.Chat.Print("No fates on your watchlist.");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.Configuration.Save(this.StartInfo.ConfigurationPath);
|
|
||||||
|
|
||||||
foreach (var fate in this.Configuration.Fates)
|
|
||||||
Framework.Gui.Chat.Print($"Fate {fate.Id}: {fate.Name}");
|
|
||||||
}
|
|
||||||
|
|
||||||
private void OnFateWatchRemove(string command, string arguments) {
|
|
||||||
if (this.Configuration.Fates == null)
|
|
||||||
this.Configuration.Fates = new List<DalamudConfiguration.FateInfo>();
|
|
||||||
|
|
||||||
dynamic candidates = XivApi.Search(arguments, "Fate").GetAwaiter().GetResult();
|
|
||||||
|
|
||||||
if (candidates.Results.Count == 0) {
|
|
||||||
Framework.Gui.Chat.Print("No fates found using that name.");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.Configuration.Fates.RemoveAll(x => x.Id == candidates.Results[0].ID);
|
|
||||||
|
|
||||||
this.Configuration.Save(this.StartInfo.ConfigurationPath);
|
|
||||||
|
|
||||||
Framework.Gui.Chat.Print($"Removed fate \"{candidates.Results[0].Name}\".");
|
|
||||||
}
|
|
||||||
|
|
||||||
private void OnBadWordsAdd(string command, string arguments) {
|
private void OnBadWordsAdd(string command, string arguments) {
|
||||||
if (this.Configuration.BadWords == null)
|
if (this.Configuration.BadWords == null)
|
||||||
this.Configuration.BadWords = new List<string>();
|
this.Configuration.BadWords = new List<string>();
|
||||||
|
|
|
||||||
|
|
@ -29,38 +29,6 @@ namespace Dalamud.Game.Network {
|
||||||
private void OnZonePacket(IntPtr dataPtr) {
|
private void OnZonePacket(IntPtr dataPtr) {
|
||||||
var opCode = (ZoneOpCode) Marshal.ReadInt16(dataPtr, 2);
|
var opCode = (ZoneOpCode) Marshal.ReadInt16(dataPtr, 2);
|
||||||
|
|
||||||
/*
|
|
||||||
if (opCode == ZoneOpCode.RetainerSaleItemId) {
|
|
||||||
var itemId = Marshal.ReadInt32(dataPtr + 16);
|
|
||||||
var amount = Marshal.ReadByte(dataPtr + 32);
|
|
||||||
var isHq = false;
|
|
||||||
|
|
||||||
if (itemId > 1000000) {
|
|
||||||
itemId -= 1000000;
|
|
||||||
isHq = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
Task.Run(() => this.dalamud.BotManager.ProcessRetainerSale(itemId, amount, isHq));
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (opCode == ZoneOpCode.FateSpawn) {
|
|
||||||
if (this.dalamud.Configuration.Fates == null)
|
|
||||||
return;
|
|
||||||
|
|
||||||
var data = new byte[64];
|
|
||||||
Marshal.Copy(dataPtr, data, 0, 64);
|
|
||||||
|
|
||||||
var fateId = data[16];
|
|
||||||
if (this.dalamud.Configuration.Fates.Any(x => x.Id == fateId) &&
|
|
||||||
this.dalamud.BotManager.IsConnected)
|
|
||||||
Task.Run(() => this.dalamud.BotManager.ProcessFate(fateId));
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
if (opCode == ZoneOpCode.CfNotifyPop) {
|
if (opCode == ZoneOpCode.CfNotifyPop) {
|
||||||
var data = new byte[64];
|
var data = new byte[64];
|
||||||
Marshal.Copy(dataPtr, data, 0, 64);
|
Marshal.Copy(dataPtr, data, 0, 64);
|
||||||
|
|
@ -198,10 +166,6 @@ namespace Dalamud.Game.Network {
|
||||||
|
|
||||||
private enum ZoneOpCode {
|
private enum ZoneOpCode {
|
||||||
CfNotifyPop = 0x2B0,
|
CfNotifyPop = 0x2B0,
|
||||||
CfNotify = 0x8F,
|
|
||||||
RetainerSaleItemId = 0x13F, // TODO these are probably not accurate
|
|
||||||
RetainerSaleFinish = 0x138,
|
|
||||||
FateSpawn = 0x226,
|
|
||||||
MarketTaxRates = 0x185,
|
MarketTaxRates = 0x185,
|
||||||
MarketBoardItemRequestStart = 0x23A,
|
MarketBoardItemRequestStart = 0x23A,
|
||||||
MarketBoardOfferings = 0x390,
|
MarketBoardOfferings = 0x390,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue