[10592] Make GO type 2 activate/deactivate

As with similar GO's that are not interactable (gameobject_template.flags|4) as default, GO's of type 2 becomes active when player can take a quest (or deliver quest).

Signed-off-by: NoFantasy <nofantasy@nf.no>
This commit is contained in:
NoFantasy 2010-10-08 20:48:23 +02:00
parent 8bb27ebd8e
commit 795c3e1f2f
4 changed files with 48 additions and 3 deletions

View file

@ -7720,6 +7720,21 @@ void ObjectMgr::LoadGameObjectForQuests()
switch(goInfo->type)
{
case GAMEOBJECT_TYPE_QUESTGIVER:
{
if (mGOQuestRelations.find(go_entry) != mGOQuestRelations.end())
{
mGameObjectForQuestSet.insert(go_entry);
++count;
}
else if (mGOQuestInvolvedRelations.find(go_entry) != mGOQuestInvolvedRelations.end())
{
mGameObjectForQuestSet.insert(go_entry);
++count;
}
break;
}
case GAMEOBJECT_TYPE_CHEST:
{
// scan GO chest with loot including quest items