1
0

recover hotbar selected slot after reconnect (#4249)

1. implement protocol message SendHeldItemChange
2. add save / load inventory equipped item slot in JSON
3. send held item slot message after player connect to server

Fixes #4189
This commit is contained in:
changyong guo
2018-07-23 06:23:33 +08:00
committed by peterbell10
parent 7b431bed51
commit 3e802932a6
12 changed files with 79 additions and 0 deletions

View File

@@ -89,6 +89,7 @@ public:
sendExplosion,
sendGameMode,
sendHealth,
sendHeldItemChange,
sendInventorySlot,
sendJoinGame,
sendKeepAlive,
@@ -160,6 +161,7 @@ public:
virtual void SendExplosion (double a_BlockX, double a_BlockY, double a_BlockZ, float a_Radius, const cVector3iArray & a_BlocksAffected, const Vector3d & a_PlayerMotion) = 0;
virtual void SendGameMode (eGameMode a_GameMode) = 0;
virtual void SendHealth (void) = 0;
virtual void SendHeldItemChange (int a_ItemIndex) = 0;
virtual void SendHideTitle (void) = 0;
virtual void SendInventorySlot (char a_WindowID, short a_SlotNum, const cItem & a_Item) = 0;
virtual void SendKeepAlive (UInt32 a_PingID) = 0;