Core/Misc: ported cryptography updates and all that entrails from 335/master and killed bnetserver
This commit is contained in:
1 parent
a576c8328b
commit
64b77e359d
413 files changed
+8953
-56006
No files matched your search
@@ -20,6 +20,7 @@
|
||||
|
||||
#include "Define.h"
|
||||
#include "ByteConverter.h"
|
||||
#include <array>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <cstring>
|
||||
@@ -486,6 +487,12 @@ class TC_SHARED_API ByteBuffer
|
||||
_rpos += len;
|
||||
}
|
||||
|
||||
template <size_t Size>
|
||||
void read(std::array<uint8, Size>& arr)
|
||||
{
|
||||
read(arr.data(), Size);
|
||||
}
|
||||
|
||||
void readPackGUID(uint64& guid)
|
||||
{
|
||||
if (rpos() + 1 > size())
|
||||
@@ -590,6 +597,12 @@ class TC_SHARED_API ByteBuffer
|
||||
append(buffer.contents(), buffer.wpos());
|
||||
}
|
||||
|
||||
template <size_t Size>
|
||||
void append(std::array<uint8, Size> const& arr)
|
||||
{
|
||||
append(arr.data(), Size);
|
||||
}
|
||||
|
||||
// can be used in SMSG_MONSTER_MOVE opcode
|
||||
void appendPackXYZ(float x, float y, float z)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user