Skip to content

Commit

Permalink
[10591] Simplify LoadGameObjectForQuests for case GO type 3
Browse files Browse the repository at this point in the history
Signed-off-by: NoFantasy <nofantasy@nf.no>
  • Loading branch information
kamikazetg authored and NoFantasy committed Oct 8, 2010
1 parent 57a1719 commit 194f429
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
12 changes: 3 additions & 9 deletions src/game/ObjectMgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7720,19 +7720,13 @@ void ObjectMgr::LoadGameObjectForQuests()

switch(goInfo->type)
{
// scan GO chest with loot including quest items
case GAMEOBJECT_TYPE_CHEST:
{
// scan GO chest with loot including quest items
uint32 loot_id = goInfo->GetLootId();

// always activate to quest, GO may not have loot
if (goInfo->chest.questId)
{
mGameObjectForQuestSet.insert(go_entry);
++count;
}
// find quest loot for GO
else if (LootTemplates_Gameobject.HaveQuestLootFor(loot_id))
// always activate to quest, GO may not have loot, OR find if GO has loot for quest.
if (goInfo->chest.questId || LootTemplates_Gameobject.HaveQuestLootFor(loot_id))
{
mGameObjectForQuestSet.insert(go_entry);
++count;
Expand Down
2 changes: 1 addition & 1 deletion src/shared/revision_nr.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "10590"
#define REVISION_NR "10591"
#endif // __REVISION_NR_H__

0 comments on commit 194f429

Please sign in to comment.