diff options
| author | silinoron <none@none> | 2010-09-26 12:06:16 -0700 |
|---|---|---|
| committer | silinoron <none@none> | 2010-09-26 12:06:16 -0700 |
| commit | 64378832c8fd17ad19798a12ef3fccbc8505bbf2 (patch) | |
| tree | 8041258e2e8f9e498e5c08f2c5687996af0bfd84 /src | |
| parent | 072234824058b53e43f6778c5f853fb50bf881ba (diff) | |
Core: Some cleanup in AddonHandler.
--HG--
branch : trunk
Diffstat (limited to 'src')
| -rw-r--r-- | src/server/game/Server/Protocol/Handlers/AddonHandler.cpp | 85 |
1 files changed, 0 insertions, 85 deletions
diff --git a/src/server/game/Server/Protocol/Handlers/AddonHandler.cpp b/src/server/game/Server/Protocol/Handlers/AddonHandler.cpp index 13fbd266ea4..d416b5fa085 100644 --- a/src/server/game/Server/Protocol/Handlers/AddonHandler.cpp +++ b/src/server/game/Server/Protocol/Handlers/AddonHandler.cpp @@ -131,13 +131,6 @@ bool AddonHandler::BuildAddonPacket(WorldPacket *Source, WorldPacket *Target) uint32 count = 0; *Target << uint32(count); - /*for(uint32 i = 0; i < count; ++i) - { - uint32 - string (16 bytes) - string (16 bytes) - uint32 - }*/ if(AddOnPacked.rpos() != AddOnPacked.size()) sLog.outDebug("packet under read!"); @@ -149,81 +142,3 @@ bool AddonHandler::BuildAddonPacket(WorldPacket *Source, WorldPacket *Target) } return true; } - -/* Code use in 1.10.2 when client not ignore ban state sended for addons. Saved for reference if client switch to use server ban state information -void AddonHandler::BuildAddonPacket(WorldPacket* Source, WorldPacket* Target, uint32 Packetoffset) -{ - ByteBuffer AddOnPacked; - uLongf AddonRealSize; - uint32 CurrentPosition; - uint32 TempValue; - - *Source >> TempValue; //get real size of the packed structure - - AddonRealSize = TempValue; //temp value becouse ZLIB only excepts uLongf - - CurrentPosition = Source->rpos(); //get the position of the pointer in the structure - - AddOnPacked.resize(AddonRealSize); //resize target for zlib action - - if (!uncompress((uint8*)AddOnPacked.contents(), &AddonRealSize, (uint8*)(*Source).contents() + CurrentPosition, (*Source).size() - CurrentPosition)!= Z_OK) - { - bool* AddonAllowed = new bool; //handle addon check and enable-ing - - uint32 Unknown1; - uint8 Unknown0; - - AddOnPacked >> Unknown0; - AddOnPacked >> Unknown1; - - Target->Initialize(SMSG_ADDON_INFO); - - uint32 i = 5; //offset for addon extraction - while(i != AddOnPacked.size()) - { - std::string AddonNames; - AddOns* Addonstr = new AddOns; - uint8 unk6; - uint64 CRCCHECK; - AddOnPacked >> AddonNames >> CRCCHECK >> unk6; - - //sLog.outDebug("ADDON: Name:%s CRC:%x Unknown:%x",AddonNames.c_str(), CRCCHECK,unk6); - - Addonstr->Name = AddonNames; - Addonstr->CRC = CRCCHECK; - - //if not allowed but unknown added to list - if (GetAddonStatus(Addonstr, AddonAllowed)) // If addon is new - { - Addonstr->Enabled = m_Addon_Default; // by default new addons are set from Config file - *AddonAllowed = m_Addon_Default; // Set addon allowed on default value - _AddAddon(Addonstr); - sLog.outDetail("Found new Addon, Name:%s CRC:%x Unknown:%x",AddonNames.c_str(), CRCCHECK, unk6); - } - - if (CRCCHECK == 0x4C1C776D01LL) //If addon is Standard addon CRC - { - //value's standard Addons - *Target << uint8(0) << uint8(2) << uint8(1) << uint8(0) << uint32(0); - } - else if (*AddonAllowed) //if addon is Custom addons - //value's enable addon - *Target << uint8(0x00) << uint8(0x01) << uint8(0x00) << uint8(0x01); - else - //value's disable addom - *Target << uint8(0x00) << uint8(0x0) << uint8(0x00) << uint8(0x0); - - i += AddonNames.size() + 10; - } - *Target << uint8(0x0); - - //delete mem allocation - delete AddonAllowed; - } - else - { - //handle uncompress error - } -} -*/ - |
