Npcs won't respond to hails if they can't see you.

This commit is contained in:
Paul Coene 2015-04-30 08:00:36 -04:00
parent 2c4ca77ffc
commit a1960d4a4a

View File

@ -1051,12 +1051,12 @@ void Client::ChannelMessageReceived(uint8 chan_num, uint8 language, uint8 lang_s
if(quest_manager.ProximitySayInUse())
entity_list.ProcessProximitySay(message, this, language);
if (GetTarget() != 0 && GetTarget()->IsNPC()) {
if (GetTarget() != 0 && GetTarget()->IsNPC() &&
!IsInvisible(GetTarget())) {
if(!GetTarget()->CastToNPC()->IsEngaged()) {
CheckLDoNHail(GetTarget());
CheckEmoteHail(GetTarget(), message);
if(DistanceSquaredNoZ(m_Position, GetTarget()->GetPosition()) <= 200) {
NPC *tar = GetTarget()->CastToNPC();
parse->EventNPC(EVENT_SAY, tar->CastToNPC(), this, message, language);