Skip to content

Commit

Permalink
[12599] Improve npc chat command.
Browse files Browse the repository at this point in the history
Now npc say hello $N will work as well as textemote and yell.
Also remove an uneeded test, Thank to Schmoozerd.
  • Loading branch information
Cyberium committed Jan 28, 2014
1 parent e1a4d56 commit a9eb440
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
6 changes: 3 additions & 3 deletions src/game/Level1.cpp
Expand Up @@ -52,7 +52,7 @@ bool ChatHandler::HandleNpcSayCommand(char* args)
return false;
}

pCreature->MonsterSay(args, LANG_UNIVERSAL);
pCreature->MonsterSay(args, LANG_UNIVERSAL, m_session->GetPlayer());

return true;
}
Expand All @@ -70,7 +70,7 @@ bool ChatHandler::HandleNpcYellCommand(char* args)
return false;
}

pCreature->MonsterYell(args, LANG_UNIVERSAL);
pCreature->MonsterYell(args, LANG_UNIVERSAL, m_session->GetPlayer());

return true;
}
Expand All @@ -90,7 +90,7 @@ bool ChatHandler::HandleNpcTextEmoteCommand(char* args)
return false;
}

pCreature->MonsterTextEmote(args, NULL);
pCreature->MonsterTextEmote(args, m_session->GetPlayer());

return true;
}
Expand Down
5 changes: 1 addition & 4 deletions src/game/Unit.cpp
Expand Up @@ -10046,11 +10046,8 @@ void Unit::ProcDamageAndSpellFor(bool isVictim, Unit* pTarget, uint32 procFlag,
// check if that aura is triggered by proc event (then it will be managed by proc handler)
if (!IsTriggeredAtSpellProcEvent(pTarget, itr->second, procSpell, procFlag, procExtra, attType, isVictim, spellProcEvent))
{
const SpellEntry* se = itr->second->GetSpellProto();
if (!se)
continue;

// spell seem not managed by proc system, although some case need to be handled
const SpellEntry* se = itr->second->GetSpellProto();

// check if the aura is interruptible by damage (not remove self added aura)
if (procSpell && procSpell->Id != se->Id && se->AuraInterruptFlags & AURA_INTERRUPT_FLAG_DAMAGE)
Expand Down
2 changes: 1 addition & 1 deletion src/shared/revision_nr.h
@@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "12598"
#define REVISION_NR "12599"
#endif // __REVISION_NR_H__

0 comments on commit a9eb440

Please sign in to comment.