[10591] Simplify LoadGameObjectForQuests for case GO type 3

Signed-off-by: NoFantasy <nofantasy@nf.no>
This commit is contained in:
kamikazetg 2010-10-08 12:44:03 +02:00 committed by NoFantasy
parent 66555530a8
commit 8bb27ebd8e
2 changed files with 4 additions and 10 deletions

View file

@ -7720,19 +7720,13 @@ void ObjectMgr::LoadGameObjectForQuests()
switch(goInfo->type) switch(goInfo->type)
{ {
// scan GO chest with loot including quest items
case GAMEOBJECT_TYPE_CHEST: case GAMEOBJECT_TYPE_CHEST:
{ {
// scan GO chest with loot including quest items
uint32 loot_id = goInfo->GetLootId(); uint32 loot_id = goInfo->GetLootId();
// always activate to quest, GO may not have loot // always activate to quest, GO may not have loot, OR find if GO has loot for quest.
if (goInfo->chest.questId) if (goInfo->chest.questId || LootTemplates_Gameobject.HaveQuestLootFor(loot_id))
{
mGameObjectForQuestSet.insert(go_entry);
++count;
}
// find quest loot for GO
else if (LootTemplates_Gameobject.HaveQuestLootFor(loot_id))
{ {
mGameObjectForQuestSet.insert(go_entry); mGameObjectForQuestSet.insert(go_entry);
++count; ++count;

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__ #ifndef __REVISION_NR_H__
#define __REVISION_NR_H__ #define __REVISION_NR_H__
#define REVISION_NR "10590" #define REVISION_NR "10591"
#endif // __REVISION_NR_H__ #endif // __REVISION_NR_H__