[8019] Prevent npc spell click when player or target in combat.

This commit is contained in:
VladimirMangos 2009-06-15 02:46:42 +04:00
parent 5350dbafd9
commit 2061939428
2 changed files with 6 additions and 4 deletions

View file

@ -518,9 +518,11 @@ void WorldSession::HandleSpellClick( WorldPacket & recv_data )
uint64 guid;
recv_data >> guid;
Creature *unit = ObjectAccessor::GetCreatureOrPetOrVehicle(*_player, guid);
if (_player->isInCombat()) // client prevent click and set different icon at combat state
return;
if(!unit)
Creature *unit = ObjectAccessor::GetCreatureOrPetOrVehicle(*_player, guid);
if (!unit || unit->isInCombat()) // client prevent click and set different icon at combat state
return;
SpellClickInfoMapBounds clickPair = objmgr.GetSpellClickInfoMapBounds(unit->GetEntry());

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "8018"
#define REVISION_NR "8019"
#endif // __REVISION_NR_H__