* It was wasting CPU power as cell-level locking is not needed.
* Future multithreading will be on map-level.
* CellLock was just a 'proxy' between Cell and CellPair and in some cases carried redundant data.
* Some minor cleanup in Cell::Visit/Map::Visit.
CHECK_PACKET_SIZE was pretty error prone; once it was forgotten mangosd
could crash due to the asserts in ByteBuffer.h. That was exploitable by
malicious players.
Furthermore, there were duplicate checks: Additionally to
CHECK_PACKET_SIZE, the ByteBuffer assertions keept an eye
on not exceeding the packet boundaries - just to crash the server for
sure in such a case.
To prevent memory leaks or other undesirable states, please read in
every handler all variables _before_ doing any concrete handling.
Patch is tested, but can cause problems / unexpected behaviour.
TODO: set raid leader of battleground raid to raid leader who entered BG
TODO: when player leaves group, he is removed from GroupQueueInfo, and for him is created new GroupQueueInfo in normal queue.
Signed-off-by: Triply <triply@getmangos.com>
Before overflow has been possible at 4294967295 lols for example.
ACHIEVEMENT_CRITERIA_TYPE_DO_EMOTE in many cases require check special conditions and targets.
For this allow call it from scripts:
* Add Player::UpdateAchievementCriteria functiona ccessable from scripts
* In emote case it allowed call in form player->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_DO_EMOTE, text_emote_id, achievement_id, target_unit_ptr);