From 67b52a2294c84e278baf35f364c31249d1202f88 Mon Sep 17 00:00:00 2001 From: VladimirMangos Date: Thu, 30 Jul 2009 12:31:57 +0400 Subject: [PATCH 1/3] [8278] Update packet size checks in WorldSocket::HandleAuthSession to 3.x state. --- src/game/WorldSocket.cpp | 4 ++-- src/shared/revision_nr.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/game/WorldSocket.cpp b/src/game/WorldSocket.cpp index 737f28631..95e93c417 100644 --- a/src/game/WorldSocket.cpp +++ b/src/game/WorldSocket.cpp @@ -755,7 +755,7 @@ int WorldSocket::HandleAuthSession (WorldPacket& recvPacket) BigNumber K; - if (recvPacket.size () < (4 + 4 + 1 + 4 + 20)) + if (recvPacket.size () < (4 + 4 + 1 + 4 + 4 + 20)) { sLog.outError ("WorldSocket::HandleAuthSession: wrong packet size"); return -1; @@ -767,7 +767,7 @@ int WorldSocket::HandleAuthSession (WorldPacket& recvPacket) recvPacket >> account; recvPacket >> unk3; - if (recvPacket.size () < (4 + 4 + (account.size () + 1) + 4 + 20)) + if (recvPacket.size () < (4 + 4 + (account.size () + 1) + 4 + 4 + 20)) { sLog.outError ("WorldSocket::HandleAuthSession: wrong packet size second check"); return -1; diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index b320708c0..28097587c 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "8277" + #define REVISION_NR "8278" #endif // __REVISION_NR_H__ From 93b0ccfe0b5e606757555376dbd026477059edfe Mon Sep 17 00:00:00 2001 From: nos4r2zod Date: Thu, 30 Jul 2009 14:05:23 +0400 Subject: [PATCH 2/3] [8279] Fixed hunter aspets, paladin auras and DK presence detection for SpellSpecific. Signed-off-by: VladimirMangos --- src/game/SpellMgr.cpp | 14 ++++++-------- src/shared/revision_nr.h | 2 +- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp index 806fdc259..7e820e4bb 100644 --- a/src/game/SpellMgr.cpp +++ b/src/game/SpellMgr.cpp @@ -172,7 +172,7 @@ SpellSpecific GetSpellSpecific(uint32 spellId) return SPELL_STING; // only hunter aspects have this (but not all aspects in hunter family) - if( spellInfo->SpellFamilyFlags & UI64LIT(0x0044000000380000) || spellInfo->SpellFamilyFlags2 & 0x00003010) + if( spellInfo->SpellFamilyFlags & UI64LIT(0x0044000000380000) || spellInfo->SpellFamilyFlags2 & 0x00001010) return SPELL_ASPECT; if( spellInfo->SpellFamilyFlags2 & 0x00000002 ) @@ -191,12 +191,10 @@ SpellSpecific GetSpellSpecific(uint32 spellId) if ((spellInfo->SpellFamilyFlags & UI64LIT(0x00000820180400)) && (spellInfo->AttributesEx3 & 0x200)) return SPELL_JUDGEMENT; - for (int i = 0; i < 3; ++i) - { - // only paladin auras have this (for palaldin class family) - if (spellInfo->Effect[i] == SPELL_EFFECT_APPLY_AREA_AURA_RAID) - return SPELL_AURA; - } + // only paladin auras have this (for palaldin class family) + if( spellInfo->SpellFamilyFlags2 & 0x00000020 ) + return SPELL_AURA; + break; } case SPELLFAMILY_SHAMAN: @@ -211,7 +209,7 @@ SpellSpecific GetSpellSpecific(uint32 spellId) return spellmgr.GetSpellElixirSpecific(spellInfo->Id); case SPELLFAMILY_DEATHKNIGHT: - if ((spellInfo->Attributes & 0x10) && (spellInfo->AttributesEx2 & 0x10) && (spellInfo->AttributesEx4 & 0x200000)) + if (spellInfo->Category == 47) return SPELL_PRESENCE; break; } diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 28097587c..c4cb43896 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "8278" + #define REVISION_NR "8279" #endif // __REVISION_NR_H__ From 253d39de21795464fcffe26d49845d8a97dca13e Mon Sep 17 00:00:00 2001 From: Ambal Date: Thu, 30 Jul 2009 18:07:56 +0400 Subject: [PATCH 3/3] [8280] Avoid grid loading loading at packet broadcasts. If player in range then related grid loaded, if not loaded then player not in range and no reason for loading. Signed-off-by: VladimirMangos --- src/game/Map.cpp | 2 ++ src/shared/revision_nr.h | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/game/Map.cpp b/src/game/Map.cpp index 90780690e..a43712d25 100644 --- a/src/game/Map.cpp +++ b/src/game/Map.cpp @@ -483,6 +483,7 @@ void Map::MessageBroadcast(Player *player, WorldPacket *msg, bool to_self) Cell cell(p); cell.data.Part.reserved = ALL_DISTRICT; + cell.SetNoCreate(); if( !loaded(GridPair(cell.data.Part.grid_x, cell.data.Part.grid_y)) ) return; @@ -528,6 +529,7 @@ void Map::MessageDistBroadcast(Player *player, WorldPacket *msg, float dist, boo Cell cell(p); cell.data.Part.reserved = ALL_DISTRICT; + cell.SetNoCreate(); if( !loaded(GridPair(cell.data.Part.grid_x, cell.data.Part.grid_y)) ) return; diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index c4cb43896..70f81a669 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "8279" + #define REVISION_NR "8280" #endif // __REVISION_NR_H__