Skip to content

Commit

Permalink
[11262] Revert "[11261] Check gaps in quest RewChoiceItem* data."
Browse files Browse the repository at this point in the history
This reverts commit a2d5f15.

Only 1.x client have this problem.
  • Loading branch information
VladimirMangos committed Mar 17, 2011
1 parent a2d5f15 commit 714d48a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
13 changes: 1 addition & 12 deletions src/game/ObjectMgr.cpp
Expand Up @@ -4083,8 +4083,7 @@ void ObjectMgr::LoadQuests()
}
}

bool choice_found = false;
for(int j = QUEST_REWARD_CHOICES_COUNT-1; j >=0; --j )
for(int j = 0; j < QUEST_REWARD_CHOICES_COUNT; ++j )
{
if (uint32 id = qinfo->RewChoiceItemId[j])
{
Expand All @@ -4094,8 +4093,6 @@ void ObjectMgr::LoadQuests()
qinfo->GetQuestId(),j+1,id,id);
qinfo->RewChoiceItemId[j] = 0; // no changes, quest will not reward this
}
else
choice_found = true;

if (!qinfo->RewChoiceItemCount[j])
{
Expand All @@ -4104,14 +4101,6 @@ void ObjectMgr::LoadQuests()
// no changes, quest can't be done
}
}
else if (choice_found) // client crash if have gap in item reward choices
{
sLog.outErrorDb("Quest %u has `RewChoiceItemId%d` = 0 but `RewChoiceItemId%d` = %u, client can crash at like data.",
qinfo->GetQuestId(),j+1,j+2,qinfo->RewChoiceItemId[j+1]);
// fill gap by clone later filled choice
qinfo->RewChoiceItemId[j] = qinfo->RewChoiceItemId[j+1];
qinfo->RewChoiceItemCount[j] = qinfo->RewChoiceItemCount[j+1];
}
else if (qinfo->RewChoiceItemCount[j]>0)
{
sLog.outErrorDb("Quest %u has `RewChoiceItemId%d` = 0 but `RewChoiceItemCount%d` = %u.",
Expand Down
2 changes: 1 addition & 1 deletion src/shared/revision_nr.h
@@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "11261"
#define REVISION_NR "11262"
#endif // __REVISION_NR_H__

0 comments on commit 714d48a

Please sign in to comment.