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

@@ -176,6 +176,7 @@ public: // tolua_export
void SendExplosion (double a_BlockX, double a_BlockY, double a_BlockZ, float a_Radius, const cVector3iArray & a_BlocksAffected, const Vector3d & a_PlayerMotion);
void SendGameMode (eGameMode a_GameMode);
void SendHealth (void);
void SendHeldItemChange (int a_ItemIndex);
void SendHideTitle (void); // tolua_export
void SendInventorySlot (char a_WindowID, short a_SlotNum, const cItem & a_Item);
void SendLeashEntity (const cEntity & a_Entity, const cEntity & a_EntityLeashedTo);