mirror of
https://github.com/mangosfour/server.git
synced 2025-12-17 07:37:03 +00:00
[8019] Prevent npc spell click when player or target in combat.
This commit is contained in:
parent
5350dbafd9
commit
2061939428
2 changed files with 6 additions and 4 deletions
|
|
@ -518,9 +518,11 @@ void WorldSession::HandleSpellClick( WorldPacket & recv_data )
|
||||||
uint64 guid;
|
uint64 guid;
|
||||||
recv_data >> 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;
|
return;
|
||||||
|
|
||||||
SpellClickInfoMapBounds clickPair = objmgr.GetSpellClickInfoMapBounds(unit->GetEntry());
|
SpellClickInfoMapBounds clickPair = objmgr.GetSpellClickInfoMapBounds(unit->GetEntry());
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "8018"
|
#define REVISION_NR "8019"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue