[11262] Revert "[11261] Check gaps in quest RewChoiceItem* data."

This reverts commit a2d5f153c2d0256ad943a48442535730894e5d5e.

Only 1.x client have this problem.
This commit is contained in:
VladimirMangos 2011-03-18 01:20:11 +03:00
parent 5fce047e69
commit 24545a6162
2 changed files with 2 additions and 13 deletions

View file

@ -4083,8 +4083,7 @@ void ObjectMgr::LoadQuests()
} }
} }
bool choice_found = false; for(int j = 0; j < QUEST_REWARD_CHOICES_COUNT; ++j )
for(int j = QUEST_REWARD_CHOICES_COUNT-1; j >=0; --j )
{ {
if (uint32 id = qinfo->RewChoiceItemId[j]) if (uint32 id = qinfo->RewChoiceItemId[j])
{ {
@ -4094,8 +4093,6 @@ void ObjectMgr::LoadQuests()
qinfo->GetQuestId(),j+1,id,id); qinfo->GetQuestId(),j+1,id,id);
qinfo->RewChoiceItemId[j] = 0; // no changes, quest will not reward this qinfo->RewChoiceItemId[j] = 0; // no changes, quest will not reward this
} }
else
choice_found = true;
if (!qinfo->RewChoiceItemCount[j]) if (!qinfo->RewChoiceItemCount[j])
{ {
@ -4104,14 +4101,6 @@ void ObjectMgr::LoadQuests()
// no changes, quest can't be done // 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) else if (qinfo->RewChoiceItemCount[j]>0)
{ {
sLog.outErrorDb("Quest %u has `RewChoiceItemId%d` = 0 but `RewChoiceItemCount%d` = %u.", sLog.outErrorDb("Quest %u has `RewChoiceItemId%d` = 0 but `RewChoiceItemCount%d` = %u.",

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 "11261" #define REVISION_NR "11262"
#endif // __REVISION_NR_H__ #endif // __REVISION_NR_H__