This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
uint32 testChars; | |
const uint32 numTests = 1024; | |
ByteBuffer buff[numTests]; | |
ByteBuffer buffOld[numTests]; | |
ByteBufferNew buffNew[numTests]; | |
for (int n = 0; n < 20; ++n) | |
{ | |
for (int m = 0; m < numTests; ++m) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
uint32 testChars; | |
const uint32 numTests = 1024; | |
ByteBuffer buff[numTests]; | |
ByteBuffer buffOld[numTests]; | |
ByteBufferNew buffNew[numTests]; | |
for (int n = 0; n < 20; ++n) | |
{ | |
for (int m = 0; m < numTests; ++m) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/server/game/Entities/Object/Updates/UpdateData.cpp b/src/server/game/Entities/Object/Updates/UpdateData.cpp | |
index dfca5a7990..c2c8164f40 100644 | |
--- a/src/server/game/Entities/Object/Updates/UpdateData.cpp | |
+++ b/src/server/game/Entities/Object/Updates/UpdateData.cpp | |
@@ -129,7 +129,7 @@ bool UpdateData::BuildPacket(WorldPacket* packet) | |
if (destsize == 0) | |
return false; | |
- packet->resize(destsize + sizeof(uint32)); | |
+ packet->wpos(destsize + sizeof(uint32)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/server/game/Entities/Object/Updates/UpdateMask.h b/src/server/game/Entities/Object/Updates/UpdateMask.h | |
index 7243f36ed1..952d35c83d 100644 | |
--- a/src/server/game/Entities/Object/Updates/UpdateMask.h | |
+++ b/src/server/game/Entities/Object/Updates/UpdateMask.h | |
@@ -49,17 +49,21 @@ class UpdateMask | |
void AppendToPacket(ByteBuffer* data) | |
{ | |
- for (uint32 i = 0; i < GetBlockCount(); ++i) | |
+ uint32 multiplier; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const uint32 testChars = 1024; | |
const uint32 numTests = 50; | |
ByteBuffer buff[numTests]; | |
ByteBuffer buff2[numTests]; | |
UpdateMask updateMask[numTests]; | |
for (int n = 0; n < 10; ++n) | |
{ | |
for (int m = 0; m < numTests; ++m) | |
{ | |
updateMask[m].SetCount(testChars * 8); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void AppendToPacketNew(ByteBuffer* data) | |
{ | |
uint32 multiplier; | |
const uint32 blockCount = GetBlockCount(); | |
for (uint32 i = 0; i < blockCount; ++i) | |
{ | |
multiplier = CLIENT_UPDATE_MASK_BITS * i; | |
uint32 newData = _bits[multiplier]; | |
*data << newData + (_bits[multiplier] ? (newData << 1) : 0); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
uint8 testChars = 507; | |
for (int m = 0; m < 50; ++m) | |
{ | |
UpdateMask updateMask; | |
ByteBuffer buff; | |
ByteBuffer buff2; | |
updateMask.SetCount(testChars *8); | |
for (int i = 0; i < testChars; ++i) | |
{ | |
char c = (rand() % 26) + 65; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void AppendToPacketNew(ByteBuffer* data) | |
{ | |
// new method. | |
const uint32 endCount = GetBlockCount() * CLIENT_UPDATE_MASK_BITS; | |
for (uint32 i = 0; i < endCount; i += CLIENT_UPDATE_MASK_BITS) | |
{ | |
ClientUpdateMaskType mask = 0; | |
if (_bits[i + 0]) mask |= 0x00000001; | |
if (_bits[i + 1]) mask |= 0x00000002; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for (int m = 0; m < 10; ++m) | |
{ | |
UpdateMask* updateMask = new UpdateMask[50]; | |
ByteBuffer* buff = new ByteBuffer[50]; | |
ByteBuffer* buff2 = new ByteBuffer[50]; | |
for (int l = 0; l < 50; ++l) | |
{ | |
buff2[l].reserve(255 * 8); | |
buff[l].reserve(255 * 8); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/server/game/Chat/ChatLink.cpp b/src/server/game/Chat/ChatLink.cpp | |
index 8cacfdcefa..4c0fc8294b 100644 | |
--- a/src/server/game/Chat/ChatLink.cpp | |
+++ b/src/server/game/Chat/ChatLink.cpp | |
@@ -244,7 +244,7 @@ bool QuestChatLink::ValidateName(char* buffer, char const* context) | |
{ | |
ChatLink::ValidateName(buffer, context); | |
- bool res = (_quest->GetTitle() == buffer); | |
+ bool res = (_quest->GetTitle(sObjectMgr->GetDBCLocaleIndex()) == buffer); |