From a5af50c293d87a21632c2811577c7b1838f6974f Mon Sep 17 00:00:00 2001 From: "admin@omencraft.com" Date: Wed, 2 Nov 2011 20:40:39 +0000 Subject: Added New/Invaid State and Thunderbolt packets. For testing purposes it now rains whenever a player opens a workbench and stops when they pen a chest. The rain start/stop in only sent to the sole clientopening the items. git-svn-id: http://mc-server.googlecode.com/svn/trunk@47 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/packets/cPacket_NewInvalidState.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 source/packets/cPacket_NewInvalidState.h (limited to 'source/packets/cPacket_NewInvalidState.h') diff --git a/source/packets/cPacket_NewInvalidState.h b/source/packets/cPacket_NewInvalidState.h new file mode 100644 index 000000000..a83cb8080 --- /dev/null +++ b/source/packets/cPacket_NewInvalidState.h @@ -0,0 +1,24 @@ +#pragma once + +#include "cPacket.h" +#include "PacketID.h" + + +class cPacket_NewInvalidState : public cPacket +{ +public: + cPacket_NewInvalidState() + : m_Reason( 0 ) + , m_GameMode( 0 ) + { m_PacketID = E_NEW_INVALID_STATE;} + cPacket_NewInvalidState( const cPacket_NewInvalidState & a_Copy ); + virtual cPacket* Clone() const { return new cPacket_NewInvalidState(*this); } + + bool Parse(cSocket & a_Socket); + bool Send(cSocket & a_Socket); + + char m_Reason; // 0 = Invalid Bed, 1 = Begin Raining, 2 End Raining, 3 = Change Gamemode + char m_GameMode; // Used only when reason = 3. 0 is survival, 1 is creative. + + static const unsigned int c_Size = 1 + 1 + 1; +}; -- cgit v1.2.3