The-Cataclysm-Preservation-Project / TrinityCore

Archived repository for WoW 4.3.4.15595. The project will be reworked for Cataclysm Classic as an official new branch of TrinityCore at https://github.com/TrinityCore/TrinityCore
GNU General Public License v2.0
237 stars 97 forks source link

Core/Opcodes: optimization related to SMSG_PARTY_COMMAND_RESULT #428

Closed sanctum32 closed 11 months ago

sanctum32 commented 11 months ago

Changes proposed:

This PR applies optimization to SMSG_PARTY_COMMAND_RESULT. Also in this PR i did old school optimization and removed non necessary convert from int -> uint8 -> uint32 (int -> uint32 should be done).

Base issue is created by opcode risizing

Issues addressed: Fixes #

To notice this issue, try to trigger party chat commands or actions via interface (invite/remove)

Tests performed: (Does it build, tested in-game, etc)

To test this properly, try to use /invite , use some random name, this should give error that player cannot be found atleast. Try this before this PR changes and after changes

Known issues and TODO list:

Ovahlord commented 11 months ago

The party command result field types are defined in client magic and must not be meddled with. The actual issue is is that instead of using ByteBuffer::resize ByteBuffer::reserve should be used.

Ovahlord commented 11 months ago

try again with the referenced commit please