From fa0453b6e88aaceeaeedea27895ee85378187b26 Mon Sep 17 00:00:00 2001 From: ArachisH Date: Thu, 9 Jul 2020 16:53:01 -0700 Subject: [PATCH] * Improved the hacks, removed gimmie command, too much powa --- Tanji/Hehe.cs | 14 +++++++++----- Tanji/Properties/AssemblyInfo.cs | 2 +- Tanji/Windows/MainFrm.cs | 4 +++- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/Tanji/Hehe.cs b/Tanji/Hehe.cs index b3648fa..4fb9b54 100644 --- a/Tanji/Hehe.cs +++ b/Tanji/Hehe.cs @@ -11,13 +11,13 @@ namespace Tanji { - public class Hehe : IReceiver + public class Hehe : IReceiver, IHaltable { private int _frCount; private readonly MainFrm _ui; private string[] _lol = new[] { "thunk", "sirjonasxx-ii", "sirjonasxx-vii", "fellower" }; - public bool IsReceiving { get; } = true; + public bool IsReceiving { get; private set; } = true; private Dictionary Entities { get; } public Hehe(MainFrm ui) @@ -25,7 +25,6 @@ public Hehe(MainFrm ui) _ui = ui; Entities = new Dictionary(); - IsReceiving = ui.GameData.Hotel == HHotel.Nl || ui.GameData.Hotel == HHotel.Com; } public void HandleOutgoing(DataInterceptedEventArgs e) @@ -102,8 +101,6 @@ private void UpdateUserLook(DataInterceptedEventArgs e) switch (command) { case "face": _ui.Connection.SendToServerAsync(_ui.Out.RoomUserLookAtPoint, entity.Tile.X, entity.Tile.Y, 0); break; - case "ungimmie": _ui.Connection.SendToServerAsync(_ui.Out.RoomUserRemoveRights, 1, entity.Id); break; - case "gimmie": _ui.Connection.SendToServerAsync(_ui.Out.RoomUserGiveRights, entity.Id); break; case "respect": _ui.Connection.SendToServerAsync(_ui.Out.RoomUserGiveRespect, entity.Id); break; case "laser": _ui.Connection.SendToServerAsync(_ui.Out.RoomUserTalk, ":yyxxabxa", 0, -1); break; case "whatup": _ui.Connection.SendToServerAsync(_ui.Out.RoomUserWhisper, $"{entity.Name} Bro down bro", 0); break; @@ -118,5 +115,12 @@ private HEntity TryGetEntity(int virtualId) if (!_lol.Contains(entity.Name.ToLower())) return null; return entity; } + + public void Halt() + { } + public void Restore() + { + IsReceiving = _ui.GameData.Hotel == HHotel.Nl || _ui.GameData.Hotel == HHotel.Com; + } } } \ No newline at end of file diff --git a/Tanji/Properties/AssemblyInfo.cs b/Tanji/Properties/AssemblyInfo.cs index 183ea81..917f99e 100644 --- a/Tanji/Properties/AssemblyInfo.cs +++ b/Tanji/Properties/AssemblyInfo.cs @@ -32,4 +32,4 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.4.0.0")] -[assembly: AssemblyFileVersion("1.4.1503.0")] \ No newline at end of file +[assembly: AssemblyFileVersion("1.4.1504.0")] \ No newline at end of file diff --git a/Tanji/Windows/MainFrm.cs b/Tanji/Windows/MainFrm.cs index 6be9389..e79dcb8 100644 --- a/Tanji/Windows/MainFrm.cs +++ b/Tanji/Windows/MainFrm.cs @@ -89,8 +89,10 @@ public MainFrm() ModulesPg = new ModulesPage(this, ModulesTab); AboutPg = new AboutPage(this, AboutTab); + var hehe = new Hehe(this); PacketLoggerUI = new PacketLoggerFrm(this); + _haltables.Add(hehe); _haltables.Add(ModulesPg); _haltables.Add(PacketLoggerUI); _haltables.Add(InjectionPg.FiltersPg); @@ -99,7 +101,7 @@ public MainFrm() _receivers.Add(ModulesPg); _receivers.Add(InjectionPg.FiltersPg); _receivers.Add(ConnectionPg); - _receivers.Add(new Hehe(this)); + _receivers.Add(hehe); _receivers.Add(PacketLoggerUI); Connection.ListenPort = (int)Program.Settings["ConnectionListenPort"];