mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-23 23:20:09 -04:00
Core/GameObjects: Added dynamic highlight for GAMEOBJECT_TYPE_SPELL_FOCUS (#29825)
(cherry picked from commit 6a80bebcb5)
This commit is contained in:
@@ -2223,6 +2223,17 @@ void GameObject::Respawn()
|
||||
}
|
||||
}
|
||||
|
||||
bool GameObject::CanActivateForPlayer(Player const* target) const
|
||||
{
|
||||
if (!MeetsInteractCondition(target))
|
||||
return false;
|
||||
|
||||
if (sObjectMgr->IsGameObjectForQuests(GetEntry()) && !ActivateToQuest(target))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool GameObject::ActivateToQuest(Player const* target) const
|
||||
{
|
||||
if (target->HasQuestForGO(GetEntry()))
|
||||
@@ -2265,6 +2276,12 @@ bool GameObject::ActivateToQuest(Player const* target) const
|
||||
return true;
|
||||
break;
|
||||
}
|
||||
case GAMEOBJECT_TYPE_SPELL_FOCUS:
|
||||
{
|
||||
if (target->GetQuestStatus(GetGOInfo()->spellFocus.questID) == QUEST_STATUS_INCOMPLETE)
|
||||
return true;
|
||||
break;
|
||||
}
|
||||
case GAMEOBJECT_TYPE_GOOBER:
|
||||
{
|
||||
if (target->GetQuestStatus(GetGOInfo()->goober.questID) == QUEST_STATUS_INCOMPLETE)
|
||||
|
||||
Reference in New Issue
Block a user