mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-24 10:56:38 +01:00
Core/SmartAI: Allow calling talk action on targeted creature even if scripted object itself is not a creature
This commit is contained in:
@@ -160,9 +160,6 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
||||
{
|
||||
case SMART_ACTION_TALK:
|
||||
{
|
||||
if (!me)
|
||||
break;
|
||||
|
||||
ObjectList* targets = GetTargets(e, unit);
|
||||
Creature* talker = me;
|
||||
Player* targetPlayer = NULL;
|
||||
@@ -185,6 +182,9 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
||||
delete targets;
|
||||
}
|
||||
|
||||
if (!talker)
|
||||
break;
|
||||
|
||||
mTalkerEntry = talker->GetEntry();
|
||||
mLastTextID = e.action.talk.textGroupID;
|
||||
mTextTimer = e.action.talk.duration;
|
||||
|
||||
Reference in New Issue
Block a user