Class GameClient

java.lang.Object
zombie.network.GameClient

public class GameClient extends Object
  • Field Details

    • instance

      public static final GameClient instance
    • DEFAULT_PORT

      public static final int DEFAULT_PORT
      See Also:
    • client

      public static boolean client
    • clientSave

      public static boolean clientSave
    • connection

      public static UdpConnection connection
    • count

      public static int count
    • ip

      public static String ip
    • serverName

      public static String serverName
    • localIP

      public static String localIP
    • password

      public static String password
    • googleKey

      public static String googleKey
    • allChatMuted

      public static boolean allChatMuted
    • username

      public static String username
    • serverPassword

      public static String serverPassword
    • useSteamRelay

      public static boolean useSteamRelay
    • authType

      public static int authType
    • udpEngine

      public UdpEngine udpEngine
    • id

      public byte id
    • timeSinceKeepAlive

      public float timeSinceKeepAlive
    • port

      public static int port
    • playerConnectSent

      public boolean playerConnectSent
    • checksum

      public static String checksum
    • checksumValid

      public static boolean checksumValid
    • pingsList

      public static List<Long> pingsList
    • gameMap

      public static String gameMap
    • fastForward

      public static boolean fastForward
    • loadedCells

      public static final ClientServerMap[] loadedCells
    • DEBUG_PING

      public static final int DEBUG_PING
      See Also:
    • coopInvite

      public static boolean coopInvite
    • connectedPlayers

      public final ArrayList<IsoPlayer> connectedPlayers
    • idMapDirty

      public boolean idMapDirty
    • sendZombieWithoutNeighbor

      public static final int sendZombieWithoutNeighbor
      See Also:
    • sendZombieWithNeighbor

      public static final int sendZombieWithNeighbor
      See Also:
    • sendZombieTimer

      public final UpdateLimit sendZombieTimer
    • sendZombieRequestsTimer

      public final UpdateLimit sendZombieRequestsTimer
    • steamID

      public static long steamID
    • positions

      public static final Map<Short,Vector2> positions
    • serverSpawnRegions

      public se.krka.kahlua.vm.KahluaTable serverSpawnRegions
    • connected

      public boolean connected
    • timeSinceLastUpdate

      public int timeSinceLastUpdate
    • ping

      public int ping
    • serverPredictedAhead

      public static float serverPredictedAhead
    • IDToPlayerMap

      public static final HashMap<Short, IsoPlayer> IDToPlayerMap
    • IDToZombieMap

      public static final gnu.trove.map.hash.TShortObjectHashMap<IsoZombie> IDToZombieMap
    • ingame

      public static boolean ingame
    • askPing

      public static boolean askPing
    • askCustomizationData

      public static boolean askCustomizationData
    • sendQR

      public static boolean sendQR
    • serverMods

      public final ArrayList<String> serverMods
    • erosionConfig

      public ErosionConfig erosionConfig
    • startAuth

      public static Calendar startAuth
    • poisonousBerry

      public static String poisonousBerry
    • poisonousMushroom

      public static String poisonousMushroom
  • Constructor Details

    • GameClient

      public GameClient()
  • Method Details

    • getPlayerByOnlineID

      public IsoPlayer getPlayerByOnlineID(short id)
    • init

      public void init()
    • startClient

      public void startClient()
    • generateSecretKey

      public String generateSecretKey()
    • getGoogleAuthenticatorBarCode

      public String getGoogleAuthenticatorBarCode(String secretKey, String account, String issuer)
    • getQR

      public String getQR(String name, String key)
    • Shutdown

      public void Shutdown()
    • update

      public void update()
    • smashWindow

      public void smashWindow(IsoWindow isoWindow)
    • removeBrokenGlass

      public void removeBrokenGlass(IsoWindow isoWindow)
    • delayPacket

      public void delayPacket(int x, int y, int z)
    • receiveAddBrokenGlass

      public static void receiveAddBrokenGlass(ByteBuffer bb, short packetType)
    • sendBrokenGlass

      public static void sendBrokenGlass(IsoGridSquare sq)
    • sendPlayerDamage

      public static void sendPlayerDamage(IsoPlayer player)
    • sendBigWaterSplash

      public static void sendBigWaterSplash(int x, int y, float dx, float dy)
    • receiveBigWaterSplash

      public static void receiveBigWaterSplash(ByteBuffer bb, short packetType)
    • sendFishingDataRequest

      public static void sendFishingDataRequest()
    • receiveFishingData

      public static void receiveFishingData(ByteBuffer bb, short packetType)
    • IsClientPaused

      public static boolean IsClientPaused()
    • setIsClientPaused

      public static void setIsClientPaused(boolean val)
    • receiveChatMessageToPlayer

      public static void receiveChatMessageToPlayer(ByteBuffer bb, short packetType)
    • receivePlayerConnectedToChat

      public static void receivePlayerConnectedToChat(ByteBuffer bb, short packetType)
    • receivePlayerJoinChat

      public static void receivePlayerJoinChat(ByteBuffer bb, short packetType)
    • receiveInvMngRemoveItem

      public static void receiveInvMngRemoveItem(ByteBuffer bb, short packetType)
    • receiveInvMngGetItem

      public static void receiveInvMngGetItem(ByteBuffer bb, short packetType) throws IOException
      Throws:
      IOException
    • receiveInvMngReqItem

      public static void receiveInvMngReqItem(ByteBuffer bb, short packetType) throws IOException
      Throws:
      IOException
    • invMngRequestItem

      public static void invMngRequestItem(int itemId, String itemType, short playerID, String username)
    • invMngRequestRemoveItem

      public static void invMngRequestRemoveItem(int itemId, short playerID, String username)
    • invMngRequestUpdateItem

      public static void invMngRequestUpdateItem(InventoryItem item, short playerID)
    • receiveSyncFaction

      public static void receiveSyncFaction(ByteBuffer bb, short packetType)
    • receiveChangeTextColor

      public static void receiveChangeTextColor(ByteBuffer bb, short packetType)
    • receivePlaySoundEveryPlayer

      public static void receivePlaySoundEveryPlayer(ByteBuffer bb, short packetType)
    • receiveAddAlarm

      public static void receiveAddAlarm(ByteBuffer bb, short packetType)
    • receiveToxicBuilding

      public static void receiveToxicBuilding(ByteBuffer bb, short packetType)
    • receiveSyncDoorKey

      public static void receiveSyncDoorKey(ByteBuffer bb, short packetType)
    • sendAddXp

      public void sendAddXp(IsoPlayer otherPlayer, PerkFactory.Perk perk, float amount, boolean noMultiplier)
    • sendGetAnimalTracks

      public void sendGetAnimalTracks(IsoGameCharacter character)
    • sendChangeSafety

      public static void sendChangeSafety(Safety safety)
    • addDisconnectPacket

      public void addDisconnectPacket(int packet)
    • connectionLost

      public void connectionLost()
    • SendCommandToServer

      public static void SendCommandToServer(String command)
    • receiveStopRain

      public static void receiveStopRain(ByteBuffer bb, short packetType)
    • receiveWeather

      public static void receiveWeather(ByteBuffer bb, short packetType)
    • receiveWorldMapPlayerPosition

      public static void receiveWorldMapPlayerPosition(ByteBuffer bb, short packetType)
    • receiveWorldMap

      public static void receiveWorldMap(ByteBuffer bb, short packetType) throws IOException
      Throws:
      IOException
    • setRequest

      public void setRequest(GameClient.RequestState request)
    • GameLoadingRequestData

      public void GameLoadingRequestData()
    • receiveSendCustomColor

      public static void receiveSendCustomColor(ByteBuffer bb, short packetType)
    • receiveUpdateItemSprite

      public static void receiveUpdateItemSprite(ByteBuffer bb, short packetType)
    • getServerSpawnRegions

      public se.krka.kahlua.vm.KahluaTable getServerSpawnRegions()
    • sendZombieHit

      public static void sendZombieHit(IsoZombie wielder, IsoPlayer target)
    • sendAnimalHitPlayer

      public static void sendAnimalHitPlayer(IsoGameCharacter wielder, IsoMovingObject target, float damage, boolean ignoreDamage)
    • sendAnimalHitAnimal

      public static void sendAnimalHitAnimal(IsoGameCharacter wielder, IsoMovingObject target, float damage, boolean ignoreDamage)
    • sendZombieHitThumpable

      public static void sendZombieHitThumpable(IsoGameCharacter wielder, IsoObject thumpable)
    • sendAnimalHitThumpable

      public static void sendAnimalHitThumpable(IsoGameCharacter wielder)
    • sendForageItemFound

      public static void sendForageItemFound(IsoPlayer player, String type, float amount)
    • sendPlayerHit

      public static void sendPlayerHit(IsoGameCharacter wielder, IsoObject target, HandWeapon weapon, float damage, boolean ignoreDamage, float range, boolean isCriticalHit, boolean helmetFall, boolean hitHead)
    • sendVehicleHit

      public static void sendVehicleHit(IsoPlayer wielder, IsoGameCharacter target, BaseVehicle vehicle, float damage, boolean isTargetHitFromBehind, int vehicleDamage, float vehicleSpeed, boolean isVehicleHitFromBehind)
    • sendEatBody

      public static void sendEatBody(IsoZombie zombie, IsoMovingObject target)
    • receiveEatBody

      public static void receiveEatBody(ByteBuffer bb, short packetType)
    • receiveSyncRadioData

      public static void receiveSyncRadioData(ByteBuffer bb, short packetType)
    • sendWorldSound

      public void sendWorldSound(WorldSoundManager.WorldSound sound)
    • sendLoginQueueRequest

      public void sendLoginQueueRequest()
    • sendLoginQueueDone

      public void sendLoginQueueDone(long dt)
    • canSeePlayerStats

      public static boolean canSeePlayerStats()
    • sendPersonalColor

      public void sendPersonalColor(IsoPlayer player)
    • sendChangedPlayerStats

      public void sendChangedPlayerStats(IsoPlayer otherPlayer)
    • receiveChangePlayerStats

      public static void receiveChangePlayerStats(ByteBuffer bb, short packetType)
    • sendPlayerConnect

      public void sendPlayerConnect(IsoPlayer player)
    • sendCreatePlayer

      public static void sendCreatePlayer(byte playerIndex)
    • sendPlayer2

      public void sendPlayer2(IsoPlayer isoPlayer)
    • sendPlayer

      public void sendPlayer(IsoPlayer isoPlayer)
    • heartBeat

      public void heartBeat()
    • getZombie

      public static IsoZombie getZombie(short id)
    • sendPlayerExtraInfo

      public static void sendPlayerExtraInfo(IsoPlayer p)
    • setResetID

      public void setResetID(int resetId)
    • loadResetID

      public void loadResetID()
    • getPlayers

      public ArrayList<IsoPlayer> getPlayers()
    • receiveSyncIsoObject

      public static void receiveSyncIsoObject(ByteBuffer bb, short packetType)
    • receivePlayerTimeout

      public static void receivePlayerTimeout(short playerID)
    • disconnect

      public void disconnect(boolean doResetDisconnectTimer)
    • resetDisconnectTimer

      public void resetDisconnectTimer()
    • getReconnectCountdownTimer

      public String getReconnectCountdownTimer()
    • canConnect

      public boolean canConnect()
    • addIncoming

      public void addIncoming(short id, ByteBuffer bb)
    • doDisconnect

      public void doDisconnect(String string)
    • removeZombieFromCache

      public void removeZombieFromCache(IsoZombie z)
    • sendWorldMessage

      public void sendWorldMessage(String line)
    • doConnect

      public void doConnect(String user, String pass, String serverIP, String localIP, String port, String serverPassword, String serverName, boolean useSteamRelay, int authType)
    • doConnect

      public void doConnect(String user, String pass, String serverIP, String localIP, String port, String serverPassword, String serverName, boolean useSteamRelay, int authType, String googleKey)
    • doConnectCoop

      public void doConnectCoop(String serverSteamID)
    • receiveAddAmbient

      public static void receiveAddAmbient(ByteBuffer bb, short packetType)
    • sendClientCommand

      public void sendClientCommand(IsoPlayer player, String module, String command, se.krka.kahlua.vm.KahluaTable args)
    • sendClientCommandV

      public void sendClientCommandV(IsoPlayer player, String module, String command, Object... objects)
    • sendAttachedItem

      public void sendAttachedItem(IsoGameCharacter character, String location, InventoryItem item)
    • sendVisual

      public void sendVisual(IsoPlayer player)
    • receiveBloodSplatter

      public static void receiveBloodSplatter(ByteBuffer bb, short packetType)
    • receiveZombieSound

      public static void receiveZombieSound(ByteBuffer bb, short packetType)
    • eatFood

      public void eatFood(IsoPlayer player, Food food, float percentage)
    • drink

      public void drink(IsoPlayer player, float drink)
    • addToItemSendBuffer

      public void addToItemSendBuffer(IsoObject parent, ItemContainer container, InventoryItem item)
    • addToItemRemoveSendBuffer

      public void addToItemRemoveSendBuffer(IsoObject parent, ItemContainer container, InventoryItem item)
    • sendAddedRemovedItems

      public void sendAddedRemovedItems(boolean force)
    • checkAddedRemovedItems

      public void checkAddedRemovedItems(IsoObject aboutToRemove)
    • sendRemoveItemFromContainer

      public static void sendRemoveItemFromContainer(ItemContainer container, InventoryItem item)
    • sendItemStats

      public void sendItemStats(InventoryItem item)
    • PlayWorldSound

      public void PlayWorldSound(String name, int x, int y, byte z)
    • StopSound

      public void StopSound(IsoMovingObject object, String soundName, boolean trigger)
    • startLocalServer

      public void startLocalServer() throws Exception
      Throws:
      Exception
    • sendPing

      public static void sendPing()
    • getPlayerFromUsername

      public IsoPlayer getPlayerFromUsername(String username)
    • destroy

      public static void destroy(IsoObject obj)
    • sendStopFire

      public static void sendStopFire(IsoGridSquare sq)
    • receiveRadioDeviceDataState

      public static void receiveRadioDeviceDataState(ByteBuffer bb, short packetType)
    • sendRadioServerDataRequest

      public static void sendRadioServerDataRequest()
    • receiveRadioServerData

      public static void receiveRadioServerData(ByteBuffer bb, short packetType)
    • receiveRadioPostSilence

      public static void receiveRadioPostSilence(ByteBuffer bb, short packetType)
    • sendIsoWaveSignal

      public static void sendIsoWaveSignal(int sourceX, int sourceY, int channel, String msg, String guid, String codes, float r, float g, float b, int signalStrength, boolean isTV)
    • sendPlayerListensChannel

      public static void sendPlayerListensChannel(int channel, boolean listenmode, boolean isTV)
    • sendCompost

      public static void sendCompost(IsoCompost isoCompost)
    • requestUserlog

      public void requestUserlog(String username)
    • addUserlog

      public void addUserlog(String user, String type, String text)
    • removeUserlog

      public void removeUserlog(String user, String type, String text)
    • addWarningPoint

      public void addWarningPoint(String user, String reason, int amount)
    • getConnectedPlayers

      public ArrayList<IsoPlayer> getConnectedPlayers()
    • sendNonPvpZone

      public static void sendNonPvpZone(NonPvpZone nonPvpZone, boolean remove)
    • sendFaction

      public static void sendFaction(Faction faction, boolean remove)
    • sendFactionInvite

      public static void sendFactionInvite(Faction faction, IsoPlayer host, String invited)
    • acceptFactionInvite

      public static void acceptFactionInvite(Faction faction, String host)
    • getBannedIPs

      public static void getBannedIPs()
    • getBannedSteamIDs

      public static void getBannedSteamIDs()
    • sendItemListNet

      public static boolean sendItemListNet(IsoPlayer sender, ArrayList<InventoryItem> items, IsoPlayer receiver, String sessionID, String custom)
    • receiveSendItemListNet

      public static void receiveSendItemListNet(ByteBuffer bb, short packetType)
    • requestTrading

      public void requestTrading(IsoPlayer you, IsoPlayer other)
    • acceptTrading

      public void acceptTrading(IsoPlayer you, IsoPlayer other, boolean accept)
    • tradingUISendAddItem

      public void tradingUISendAddItem(IsoPlayer you, IsoPlayer other, InventoryItem item)
    • tradingUISendRemoveItem

      public void tradingUISendRemoveItem(IsoPlayer you, IsoPlayer other, InventoryItem item)
    • tradingUISendUpdateState

      public void tradingUISendUpdateState(IsoPlayer you, IsoPlayer other, int state)
    • receiveSpawnRegion

      public static void receiveSpawnRegion(ByteBuffer bb, short packetType)
    • receiveClimateManagerPacket

      public static void receiveClimateManagerPacket(ByteBuffer bb, short packetType)
    • receiveIsoRegionServerPacket

      public static void receiveIsoRegionServerPacket(ByteBuffer bb, short packetType)
    • sendIsoRegionDataRequest

      public static void sendIsoRegionDataRequest()
    • sendSandboxOptionsToServer

      public void sendSandboxOptionsToServer(SandboxOptions options)
    • receiveSandboxOptions

      public static void receiveSandboxOptions(ByteBuffer bb, short packetType)
    • receiveChunkObjectState

      public static void receiveChunkObjectState(ByteBuffer bb, short packetType)
    • receivePlayerLeaveChat

      public static void receivePlayerLeaveChat(ByteBuffer bb, short packetType)
    • receiveInitPlayerChat

      public static void receiveInitPlayerChat(ByteBuffer bb, short packetType)
    • receiveAddChatTab

      public static void receiveAddChatTab(ByteBuffer bb, short packetType)
    • receiveRemoveChatTab

      public static void receiveRemoveChatTab(ByteBuffer bb, short packetType)
    • receivePlayerNotFound

      public static void receivePlayerNotFound(ByteBuffer bb, short packetType)
    • sendPerks

      public static void sendPerks(IsoPlayer player)
    • receiveSyncPerks

      public static void receiveSyncPerks(ByteBuffer bb, short packetType)
    • sendWeight

      public static void sendWeight(IsoPlayer player)
    • receiveSyncWeight

      public static void receiveSyncWeight(ByteBuffer bb, short packetType)
    • sendEquippedRadioFreq

      public static void sendEquippedRadioFreq(IsoPlayer plyr)
    • receiveSyncEquippedRadioFreq

      public static void receiveSyncEquippedRadioFreq(ByteBuffer bb, short packetType)
    • sendSneezingCoughing

      public static void sendSneezingCoughing(IsoPlayer player, int sneezingCoughing, byte sneezeVar)
    • rememberPlayerPosition

      public static void rememberPlayerPosition(IsoPlayer player, float x, float y)
    • sortBrowserList

      public static se.krka.kahlua.vm.KahluaTable sortBrowserList(se.krka.kahlua.j2se.KahluaTableImpl table, String sortType, boolean sortDown, se.krka.kahlua.j2se.KahluaTableImpl filterTable)