Package zombie.network
Class GameClient
java.lang.Object
zombie.network.GameClient
public class GameClient
extends java.lang.Object
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
accessLevel
static boolean
allChatMuted
static boolean
askPing
static boolean
bClient
boolean
bConnected
static boolean
bCoopInvite
static boolean
bFastForward
static boolean
bIngame
boolean
bPlayerConnectSent
static java.lang.String
checksum
static boolean
checksumValid
static UdpConnection
connection
static int
count
static int
DEFAULT_PORT
ErosionConfig
erosionConfig
static java.lang.String
GameMap
byte
ID
boolean
idMapDirty
static java.util.HashMap
IDToPlayerMap
static GameClient
instance
static java.lang.String
ip
static java.lang.String
localIP
IsoObjectSyncRequests
objectSyncReq
static java.lang.String
password
int
ping
static java.util.List
pingsList
java.util.HashMap
PlayerToBody
static java.lang.String
poisonousBerry
static java.lang.String
poisonousMushroom
static int
port
java.util.ArrayList
RecentlyDied
java.util.ArrayList
ServerMods
static java.lang.String
serverPassword
static float
ServerPredictedAhead
KahluaTable
ServerSpawnRegions
static java.util.Calendar
startAuth
float
timeSinceKeepAlive
int
TimeSinceLastUpdate
UdpEngine
udpEngine
static java.lang.String
username
-
Constructor Summary
Constructors Constructor Description GameClient()
-
Method Summary
Modifier and Type Method Description static void
acceptFactionInvite(Faction faction, java.lang.String host)
void
acceptTrading(IsoPlayer you, IsoPlayer other, boolean accept)
void
addDisconnectPacket(int packet)
void
addIncoming(short id, java.nio.ByteBuffer bb)
void
AddItemToMap(java.nio.ByteBuffer bb)
void
addLevelUpPoint(IsoPlayer otherPlayer)
static void
addTicket(java.lang.String author, java.lang.String message, int ticketID)
void
addToItemRemoveSendBuffer(IsoObject parent, ItemContainer container, InventoryItem item)
void
addToItemSendBuffer(IsoObject parent, ItemContainer container, InventoryItem item)
void
addUserlog(java.lang.String user, java.lang.String type, java.lang.String text)
void
addWarningPoint(java.lang.String user, java.lang.String reason, int amount)
static boolean
canModifyPlayerStats()
static boolean
canSeePlayerStats()
static void
checksumServer()
void
chunkDetails(ByteBufferReader bb)
void
connectionLost()
void
createZombie(java.nio.ByteBuffer bb)
static void
destroy(IsoObject obj)
void
disconnect()
void
doConnect(java.lang.String user, java.lang.String pass, java.lang.String serverIP, java.lang.String localIP, java.lang.String port, java.lang.String serverPassword)
void
doConnectCoop(java.lang.String serverSteamID)
void
doDisconnect(java.lang.String string)
void
doneLogin()
void
drink(IsoPlayer player, float drink)
void
eatFood(IsoPlayer player, Food food, float percentage)
void
equip(IsoPlayer player, int i, InventoryItem item)
void
executeQuery(java.lang.String query)
void
GameLoadingRequestData()
java.util.ArrayList
getConnectedPlayers()
static void
getCustomModData()
void
getDBSchema()
IsoPlayer
getPlayerFromUsername(java.lang.String username)
java.util.ArrayList
getPlayers()
KahluaTable
getServerSpawnRegions()
void
getTableResult(java.lang.String tableName, int numberPerPages)
static void
getTickets(java.lang.String author)
static IsoZombie
getZombie(short id)
void
heartBeat()
void
init()
static void
invMngRequestItem(long itemId, java.lang.String itemType, IsoPlayer player)
static void
invMngRequestRemoveItem(long itemId, IsoPlayer player)
static boolean
IsClientPaused()
void
loadingChunk(int wx, int wy)
void
loadResetID()
void
playerTimeout(java.nio.ByteBuffer bb)
void
PlayWorldSound(java.lang.String name, boolean loop, int x, int y, int z, boolean doWorldSound)
void
receiveConnectionDetails(java.nio.ByteBuffer bb)
static void
receivePing(java.nio.ByteBuffer buf)
void
receivePlayerConnect(java.nio.ByteBuffer bb)
boolean
receivePlayerConnectWhileLoading(java.nio.ByteBuffer bb)
void
receivePlayerInfo(java.nio.ByteBuffer bb)
static void
receiveRadioDeviceDataState(java.nio.ByteBuffer bb)
void
receiveZombieInfo(java.nio.ByteBuffer bb)
static void
registerZone(IsoMetaGrid.Zone zone, boolean transmitToOthers)
static void
removeSpecialObjectFromSquare(IsoObject obj)
static void
removeTicket(int ticketID)
void
removeUserlog(java.lang.String user, java.lang.String type, java.lang.String text)
void
removeZombieFromCache(IsoZombie z)
void
requestTrading(IsoPlayer you, IsoPlayer other)
void
requestUserlog(java.lang.String user)
void
scoreboardUpdate()
void
sendAdditionalPain(int onlineID, int i, float level)
void
sendAddXpFromPlayerStatsUI(IsoPlayer otherPlayer, PerkFactory.Perks perk, int amount, boolean doGlobalXP, boolean onlyGlobalXP)
void
sendBandage(int onlineID, int i, boolean bandaged, float bandageLife, boolean isAlcoholic, java.lang.String bandageType)
static void
sendBuildingStashToDo(java.lang.String stashName)
void
sendCataplasm(int onlineID, int i, float plantainFactor, float comfreyFactor, float garlicFactor)
void
sendChangedPlayerStats(IsoPlayer otherPlayer)
void
sendChat(java.lang.String line, byte type)
void
sendCleanBurn(int onlineID, int i)
void
sendClientCommand(java.lang.String module, java.lang.String command, java.lang.Object[] objects)
void
sendClientCommand(IsoPlayer player, java.lang.String module, java.lang.String command, KahluaTable args)
void
sendClothing(IsoPlayer player, int i, InventoryItem item)
static void
SendCommandToServer(java.lang.String command)
static void
sendCompost(IsoCompost isoCompost)
void
sendCustomColor(IsoObject item)
void
sendDeath(IsoPlayer player)
void
sendDisinfect(int onlineID, int i, float level)
static void
sendFaction(Faction faction, boolean remove)
static void
sendFactionInvite(Faction faction, IsoPlayer host, java.lang.String invited)
static void
sendFurnaceChange(BSFurnace furnace)
static void
sendGenerator(IsoGenerator generator)
static void
sendGetItemInvMng(long itemId)
static void
sendIsoWaveSignal(int sourceX, int sourceY, int channel, java.lang.String msg, java.lang.String codes, float r, float g, float b, int signalStrength, boolean isTV)
static boolean
sendItemListNet(IsoPlayer sender, java.util.ArrayList items, IsoPlayer receiver, java.lang.String sessionID, java.lang.String custom)
static void
sendNonPvpZone(NonPvpZone nonPvpZone, boolean remove)
void
sendPersonalColor(IsoPlayer player)
static void
sendPing()
void
sendPlayer(IsoPlayer isoPlayer)
void
sendPlayerConnect(IsoPlayer player)
static void
sendPlayerListensChannel(int channel, boolean listenmode, boolean isTV)
static void
sendRadioServerDataRequest()
void
sendRemoveBullet(int onlineID, int i, int doctorLevel)
void
sendRemoveGlass(int onlineID, int i)
static void
sendRequestInventory(IsoPlayer player)
static void
sendSafehouse(SafeHouse safehouse, boolean remove)
void
sendSplint(int onlineID, int i, boolean doIt, float factor, java.lang.String splintItem)
void
sendSteamProfileName(long steamID)
void
sendStitch(int onlineID, int i, boolean stitched, float time)
static void
sendStopFire(IsoGameCharacter chr)
static void
sendStopFire(IsoGridSquare sq)
void
sendSyncXp(IsoPlayer player)
static void
sendTeleport(IsoPlayer player, float x, float y, float z)
void
sendTransactionID(IsoPlayer player)
void
sendWeaponHit(IsoPlayer player, HandWeapon weapon, IsoObject object)
void
sendWorldMessage(java.lang.String line)
void
sendWorldSound(IsoObject source, int x, int y, int z, int radius, int volume, boolean stressHumans, float zombieIgnoreDist, float stressMod)
void
sendWoundInfection(int onlineID, int i, boolean infected)
void
setResetID(int resetID)
void
Shutdown()
void
smashWindow(IsoWindow isoWindow, int action)
void
startClient()
void
startLocalServer()
static void
SyncAlarmClock(java.nio.ByteBuffer bb)
static void
SyncCustomLightSwitchSettings(java.nio.ByteBuffer bb)
void
SyncIsoObject(java.nio.ByteBuffer bb)
void
SyncIsoObjectReq(java.nio.ByteBuffer bb)
static void
toggleSafety(IsoPlayer player)
void
tradingUISendAddItem(IsoPlayer you, IsoPlayer other, InventoryItem item)
void
tradingUISendRemoveItem(IsoPlayer you, IsoPlayer other, int index)
void
tradingUISendUpdateState(IsoPlayer you, IsoPlayer other, int state)
void
update()
void
wakeUpPlayer(IsoPlayer chr)
void
writePlayerConnectData(ByteBufferWriter b, IsoPlayer player)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
instance
-
DEFAULT_PORT
public static final int DEFAULT_PORT- See Also:
- Constant Field Values
-
bClient
public static boolean bClient -
connection
-
count
public static int count -
ip
public static java.lang.String ip -
localIP
public static java.lang.String localIP -
password
public static java.lang.String password -
allChatMuted
public static boolean allChatMuted -
username
public static java.lang.String username -
serverPassword
public static java.lang.String serverPassword -
udpEngine
-
accessLevel
public static java.lang.String accessLevel -
ID
public byte ID -
timeSinceKeepAlive
public float timeSinceKeepAlive -
port
public static int port -
PlayerToBody
public java.util.HashMap PlayerToBody -
bPlayerConnectSent
public boolean bPlayerConnectSent -
checksum
public static java.lang.String checksum -
checksumValid
public static boolean checksumValid -
pingsList
public static java.util.List pingsList -
GameMap
public static java.lang.String GameMap -
bFastForward
public static boolean bFastForward -
bCoopInvite
public static boolean bCoopInvite -
objectSyncReq
-
ServerSpawnRegions
-
RecentlyDied
public java.util.ArrayList RecentlyDied -
bConnected
public boolean bConnected -
TimeSinceLastUpdate
public int TimeSinceLastUpdate -
ping
public int ping -
ServerPredictedAhead
public static float ServerPredictedAhead -
IDToPlayerMap
public static java.util.HashMap IDToPlayerMap -
bIngame
public static boolean bIngame -
askPing
public static boolean askPing -
ServerMods
public java.util.ArrayList ServerMods -
erosionConfig
-
startAuth
public static java.util.Calendar startAuth -
poisonousBerry
public static java.lang.String poisonousBerry -
poisonousMushroom
public static java.lang.String poisonousMushroom -
idMapDirty
public boolean idMapDirty
-
-
Constructor Details
-
GameClient
public GameClient()
-
-
Method Details
-
init
public void init() -
startClient
public void startClient() -
Shutdown
public void Shutdown() -
update
public void update() -
smashWindow
-
getCustomModData
public static void getCustomModData() -
IsClientPaused
public static boolean IsClientPaused() -
invMngRequestItem
-
invMngRequestRemoveItem
-
checksumServer
public static void checksumServer() -
sendAddXpFromPlayerStatsUI
public void sendAddXpFromPlayerStatsUI(IsoPlayer otherPlayer, PerkFactory.Perks perk, int amount, boolean doGlobalXP, boolean onlyGlobalXP) -
addLevelUpPoint
-
sendSyncXp
-
sendTransactionID
-
addDisconnectPacket
public void addDisconnectPacket(int packet) -
connectionLost
public void connectionLost() -
SendCommandToServer
public static void SendCommandToServer(java.lang.String command) -
GameLoadingRequestData
public void GameLoadingRequestData() -
getServerSpawnRegions
-
toggleSafety
-
canSeePlayerStats
public static boolean canSeePlayerStats() -
canModifyPlayerStats
public static boolean canModifyPlayerStats() -
sendPersonalColor
-
sendChangedPlayerStats
-
writePlayerConnectData
-
sendPlayerConnect
-
sendPlayer
-
sendSteamProfileName
public void sendSteamProfileName(long steamID) -
heartBeat
public void heartBeat() -
getZombie
-
receiveZombieInfo
public void receiveZombieInfo(java.nio.ByteBuffer bb) -
receivePlayerInfo
public void receivePlayerInfo(java.nio.ByteBuffer bb) -
receiveConnectionDetails
public void receiveConnectionDetails(java.nio.ByteBuffer bb) -
setResetID
public void setResetID(int resetID) -
loadResetID
public void loadResetID() -
receivePlayerConnect
public void receivePlayerConnect(java.nio.ByteBuffer bb) -
receivePlayerConnectWhileLoading
public boolean receivePlayerConnectWhileLoading(java.nio.ByteBuffer bb) -
getPlayers
public java.util.ArrayList getPlayers() -
createZombie
public void createZombie(java.nio.ByteBuffer bb) -
loadingChunk
public void loadingChunk(int wx, int wy) -
chunkDetails
-
doneLogin
public void doneLogin() -
sendWeaponHit
-
SyncCustomLightSwitchSettings
public static void SyncCustomLightSwitchSettings(java.nio.ByteBuffer bb) -
SyncIsoObjectReq
public void SyncIsoObjectReq(java.nio.ByteBuffer bb) -
SyncIsoObject
public void SyncIsoObject(java.nio.ByteBuffer bb) -
SyncAlarmClock
public static void SyncAlarmClock(java.nio.ByteBuffer bb) -
AddItemToMap
public void AddItemToMap(java.nio.ByteBuffer bb) -
playerTimeout
public void playerTimeout(java.nio.ByteBuffer bb) -
disconnect
public void disconnect() -
addIncoming
public void addIncoming(short id, java.nio.ByteBuffer bb) -
doDisconnect
public void doDisconnect(java.lang.String string) -
removeZombieFromCache
-
equip
-
sendChat
public void sendChat(java.lang.String line, byte type) -
sendWorldMessage
public void sendWorldMessage(java.lang.String line) -
doConnect
public void doConnect(java.lang.String user, java.lang.String pass, java.lang.String serverIP, java.lang.String localIP, java.lang.String port, java.lang.String serverPassword) -
doConnectCoop
public void doConnectCoop(java.lang.String serverSteamID) -
scoreboardUpdate
public void scoreboardUpdate() -
sendWorldSound
public void sendWorldSound(IsoObject source, int x, int y, int z, int radius, int volume, boolean stressHumans, float zombieIgnoreDist, float stressMod) -
sendClientCommand
public void sendClientCommand(IsoPlayer player, java.lang.String module, java.lang.String command, KahluaTable args) -
sendClientCommand
public void sendClientCommand(java.lang.String module, java.lang.String command, java.lang.Object[] objects) -
sendClothing
-
sendCustomColor
-
sendBandage
public void sendBandage(int onlineID, int i, boolean bandaged, float bandageLife, boolean isAlcoholic, java.lang.String bandageType) -
sendStitch
public void sendStitch(int onlineID, int i, boolean stitched, float time) -
sendWoundInfection
public void sendWoundInfection(int onlineID, int i, boolean infected) -
sendDisinfect
public void sendDisinfect(int onlineID, int i, float level) -
sendSplint
public void sendSplint(int onlineID, int i, boolean doIt, float factor, java.lang.String splintItem) -
sendAdditionalPain
public void sendAdditionalPain(int onlineID, int i, float level) -
sendRemoveGlass
public void sendRemoveGlass(int onlineID, int i) -
sendRemoveBullet
public void sendRemoveBullet(int onlineID, int i, int doctorLevel) -
sendCleanBurn
public void sendCleanBurn(int onlineID, int i) -
eatFood
-
drink
-
sendDeath
-
addToItemSendBuffer
-
addToItemRemoveSendBuffer
public void addToItemRemoveSendBuffer(IsoObject parent, ItemContainer container, InventoryItem item) -
PlayWorldSound
public void PlayWorldSound(java.lang.String name, boolean loop, int x, int y, int z, boolean doWorldSound) -
startLocalServer
public void startLocalServer() throws java.lang.Exception- Throws:
java.lang.Exception
-
sendPing
public static void sendPing() -
receivePing
public static void receivePing(java.nio.ByteBuffer buf) -
registerZone
-
sendGenerator
-
removeSpecialObjectFromSquare
-
sendSafehouse
-
getPlayerFromUsername
-
destroy
-
sendTeleport
-
sendStopFire
-
sendStopFire
-
sendCataplasm
public void sendCataplasm(int onlineID, int i, float plantainFactor, float comfreyFactor, float garlicFactor) -
receiveRadioDeviceDataState
public static void receiveRadioDeviceDataState(java.nio.ByteBuffer bb) -
sendRadioServerDataRequest
public static void sendRadioServerDataRequest() -
sendIsoWaveSignal
public static void sendIsoWaveSignal(int sourceX, int sourceY, int channel, java.lang.String msg, java.lang.String codes, float r, float g, float b, int signalStrength, boolean isTV) -
sendPlayerListensChannel
public static void sendPlayerListensChannel(int channel, boolean listenmode, boolean isTV) -
sendFurnaceChange
-
sendCompost
-
requestUserlog
public void requestUserlog(java.lang.String user) -
addUserlog
public void addUserlog(java.lang.String user, java.lang.String type, java.lang.String text) -
removeUserlog
public void removeUserlog(java.lang.String user, java.lang.String type, java.lang.String text) -
addWarningPoint
public void addWarningPoint(java.lang.String user, java.lang.String reason, int amount) -
wakeUpPlayer
-
getDBSchema
public void getDBSchema() -
getTableResult
public void getTableResult(java.lang.String tableName, int numberPerPages) -
executeQuery
public void executeQuery(java.lang.String query) -
getConnectedPlayers
public java.util.ArrayList getConnectedPlayers() -
sendNonPvpZone
-
sendFaction
-
sendFactionInvite
-
acceptFactionInvite
-
addTicket
public static void addTicket(java.lang.String author, java.lang.String message, int ticketID) -
getTickets
public static void getTickets(java.lang.String author) -
removeTicket
public static void removeTicket(int ticketID) -
sendItemListNet
-
requestTrading
-
acceptTrading
-
tradingUISendAddItem
-
tradingUISendRemoveItem
-
tradingUISendUpdateState
-
sendBuildingStashToDo
public static void sendBuildingStashToDo(java.lang.String stashName) -
sendRequestInventory
-
sendGetItemInvMng
public static void sendGetItemInvMng(long itemId)
-