Fixed some issues with incorrectly reading varbit values

Fixed Dwarf Cannon quest
Improved varp/varbit interface and handling
This commit is contained in:
Ceikry
2023-06-06 09:31:16 +00:00
committed by Ryan
parent f613fb13cd
commit bd12800cca
163 changed files with 1006 additions and 1358 deletions
@@ -9,6 +9,7 @@ import java.io.PrintWriter;
import java.io.StringWriter;
import java.util.HashMap;
import java.util.Map;
import core.game.bots.AIPlayer;
import static core.api.ContentAPIKt.log;
@@ -85,6 +86,7 @@ public final class PacketRepository {
*/
@SuppressWarnings({ "rawtypes", "unchecked" })
public static void send(Class<? extends OutgoingPacket> clazz, Context context) {
if(context.getPlayer() instanceof AIPlayer) return;
if(context.getPlayer().getSession() == null) return;
OutgoingPacket p = OUTGOING_PACKETS.get(clazz);
if (p == null) {