mirror of
https://github.com/mangosfour/server.git
synced 2026-01-01 16:37:12 +00:00
[0159] Update quest system.
TODO: - implement currency requirements/rewards - skill rewards - skill learned requirements. - not show quests with RewSkill to players which do not have that skill Signed-off-by: Yaki Khadafi <ElSolDolLo@gmail.com>
This commit is contained in:
parent
f6cc5b2c9d
commit
3ceed0edfb
16 changed files with 1273 additions and 842 deletions
|
|
@ -138,12 +138,38 @@ Quest::Quest(Field* questRecord)
|
|||
QuestStartScript = questRecord[139].GetUInt32();
|
||||
QuestCompleteScript = questRecord[140].GetUInt32();
|
||||
|
||||
ReqSpellLearned = questRecord[141].GetUInt32();
|
||||
PortraitGiver = questRecord[142].GetUInt32();
|
||||
PortraitTurnIn = questRecord[143].GetUInt32();
|
||||
|
||||
PortraitGiverText = questRecord[144].GetCppString();
|
||||
PortraitGiverName = questRecord[145].GetCppString();
|
||||
PortraitTurnInText = questRecord[146].GetCppString();
|
||||
PortraitTurnInName = questRecord[147].GetCppString();
|
||||
|
||||
for (int i = 0; i < QUEST_REQUIRED_CURRENCY_COUNT; ++i)
|
||||
ReqCurrencyId[i] = questRecord[148 + i].GetUInt32();
|
||||
for (int i = 0; i < QUEST_REQUIRED_CURRENCY_COUNT; ++i)
|
||||
ReqCurrencyCount[i] = questRecord[152 + i].GetUInt32();
|
||||
|
||||
for (int i = 0; i < QUEST_REWARD_CURRENCY_COUNT; ++i)
|
||||
RewCurrencyId[i] = questRecord[156 + i].GetUInt32();
|
||||
for (int i = 0; i < QUEST_REWARD_CURRENCY_COUNT; ++i)
|
||||
RewCurrencyCount[i] = questRecord[160 + i].GetUInt32();
|
||||
|
||||
RewSkill = questRecord[164].GetUInt32();
|
||||
RewSkillValue = questRecord[165].GetUInt32();
|
||||
|
||||
SoundAcceptId = questRecord[166].GetUInt32();
|
||||
SoundTurnInId = questRecord[167].GetUInt32();
|
||||
|
||||
m_isActive = true;
|
||||
|
||||
m_reqitemscount = 0;
|
||||
m_reqCreatureOrGOcount = 0;
|
||||
m_rewitemscount = 0;
|
||||
m_rewchoiceitemscount = 0;
|
||||
m_reqCurrencyCount = 0;
|
||||
|
||||
for (int i = 0; i < QUEST_ITEM_OBJECTIVES_COUNT; ++i)
|
||||
{
|
||||
|
|
@ -168,6 +194,12 @@ Quest::Quest(Field* questRecord)
|
|||
if (RewChoiceItemId[i])
|
||||
++m_rewchoiceitemscount;
|
||||
}
|
||||
|
||||
for (int i = 0; i < QUEST_REWARD_CURRENCY_COUNT; ++i)
|
||||
{
|
||||
if (RewCurrencyId[i])
|
||||
++m_reqCurrencyCount;
|
||||
}
|
||||
}
|
||||
|
||||
uint32 Quest::XPValue(Player* pPlayer) const
|
||||
|
|
@ -294,3 +326,4 @@ uint32 Quest::CalculateRewardHonor(uint32 level) const
|
|||
|
||||
return honor;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue