Core/Quest: Consistency, god damn..
(RequiredSourceItemIdCount -> RequiredSourceItemCount; quest_template did not change)
This commit is contained in:
@@ -14857,7 +14857,7 @@ void Player::RewardQuest(Quest const* quest, uint32 reward, Object* questGiver,
|
||||
{
|
||||
if (quest->RequiredSourceItemId[i])
|
||||
{
|
||||
uint32 count = quest->RequiredSourceItemIdCount[i];
|
||||
uint32 count = quest->RequiredSourceItemCount[i];
|
||||
DestroyItemCount(quest->RequiredSourceItemId[i], count ? count : 9999, true);
|
||||
}
|
||||
}
|
||||
@@ -15055,9 +15055,9 @@ void Player::FailQuest(uint32 questId)
|
||||
// Destroy items recieved on starting the quest.
|
||||
DestroyItemCount(quest->RequiredItemId[i], quest->RequiredItemCount[i], true, true);
|
||||
for (uint8 i = 0; i < QUEST_SOURCE_ITEM_IDS_COUNT; ++i)
|
||||
if (quest->RequiredSourceItemId[i] > 0 && quest->RequiredSourceItemIdCount[i] > 0)
|
||||
if (quest->RequiredSourceItemId[i] > 0 && quest->RequiredSourceItemCount[i] > 0)
|
||||
// Destroy items recieved during the quest.
|
||||
DestroyItemCount(quest->RequiredSourceItemId[i], quest->RequiredSourceItemIdCount[i], true, true);
|
||||
DestroyItemCount(quest->RequiredSourceItemId[i], quest->RequiredSourceItemCount[i], true, true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16117,9 +16117,9 @@ bool Player::HasQuestForItem(uint32 itemid) const
|
||||
return true;
|
||||
|
||||
// allows custom amount drop when not 0
|
||||
if (qinfo->RequiredSourceItemIdCount[j])
|
||||
if (qinfo->RequiredSourceItemCount[j])
|
||||
{
|
||||
if (GetItemCount(itemid, true) < qinfo->RequiredSourceItemIdCount[j])
|
||||
if (GetItemCount(itemid, true) < qinfo->RequiredSourceItemCount[j])
|
||||
return true;
|
||||
} else if (GetItemCount(itemid, true) < pProto->GetMaxStackSize())
|
||||
return true;
|
||||
|
||||
@@ -4036,10 +4036,10 @@ void ObjectMgr::LoadQuests()
|
||||
}
|
||||
else
|
||||
{
|
||||
if (qinfo->RequiredSourceItemIdCount[j]>0)
|
||||
if (qinfo->RequiredSourceItemCount[j]>0)
|
||||
{
|
||||
sLog->outErrorDb("Quest %u has `RequiredSourceItemId%d` = 0 but `RequiredSourceItemIdCount%d` = %u.",
|
||||
qinfo->GetQuestId(), j+1, j+1, qinfo->RequiredSourceItemIdCount[j]);
|
||||
sLog->outErrorDb("Quest %u has `RequiredSourceItemId%d` = 0 but `RequiredSourceItemCount%d` = %u.",
|
||||
qinfo->GetQuestId(), j+1, j+1, qinfo->RequiredSourceItemCount[j]);
|
||||
// no changes, quest ignore this data
|
||||
}
|
||||
}
|
||||
|
||||
@@ -109,7 +109,7 @@ Quest::Quest(Field* questRecord)
|
||||
RequiredSourceItemId[i] = questRecord[97+i].GetUInt32();
|
||||
|
||||
for (int i = 0; i < QUEST_SOURCE_ITEM_IDS_COUNT; ++i)
|
||||
RequiredSourceItemIdCount[i] = questRecord[101+i].GetUInt32();
|
||||
RequiredSourceItemCount[i] = questRecord[101+i].GetUInt32();
|
||||
|
||||
for (int i = 0; i < QUEST_ITEM_OBJECTIVES_COUNT; ++i)
|
||||
RequiredItemId[i] = questRecord[105+i].GetUInt32();
|
||||
|
||||
@@ -263,7 +263,7 @@ class Quest
|
||||
uint32 RequiredItemId[QUEST_ITEM_OBJECTIVES_COUNT];
|
||||
uint32 RequiredItemCount[QUEST_ITEM_OBJECTIVES_COUNT];
|
||||
uint32 RequiredSourceItemId[QUEST_SOURCE_ITEM_IDS_COUNT];
|
||||
uint32 RequiredSourceItemIdCount[QUEST_SOURCE_ITEM_IDS_COUNT];
|
||||
uint32 RequiredSourceItemCount[QUEST_SOURCE_ITEM_IDS_COUNT];
|
||||
int32 RequiredNpcOrGo[QUEST_OBJECTIVES_COUNT]; // >0 Creature <0 Gameobject
|
||||
uint32 RequiredNpcOrGoCount[QUEST_OBJECTIVES_COUNT];
|
||||
uint32 RequiredSpellCast[QUEST_OBJECTIVES_COUNT];
|
||||
|
||||
Reference in New Issue
Block a user