Guigui220D / buildoland-3

After BuildOLand 1, BuildOLand 2, here comes BuildOLand 3!
7 stars 1 forks source link

Override ECCPackets for different type of messages #62

Closed Guigui220D closed 4 years ago

Guigui220D commented 4 years ago

To avoid ill-formed packets and stay consistent. This class would prepare the headers and the content with the constructor, instead of the programmer having to prepare the packets like so :

ECCPacket set;

        set << Networking::StoC::InventoryUpdate;
        set << InventoryUpdates::StoC::SetStack;
        set << 0;   //We set the first slot of the inventory (hand)
        set << stack.getInt();