Merge pull request #15497 from ShinDarth/335-misc
[3.3.5] Low priority changes after latest backports
This commit is contained in:
commit
0eea8d686b
7 files changed
+181
-149
No files matched your search
@@ -29,21 +29,21 @@ Quest::Quest(Field* questRecord)
|
||||
ZoneOrSort = questRecord[4].GetInt16();
|
||||
Type = questRecord[5].GetUInt16();
|
||||
SuggestedPlayers = questRecord[6].GetUInt8();
|
||||
LimitTime = questRecord[7].GetUInt32();
|
||||
RequiredRaces = questRecord[8].GetUInt16();
|
||||
TimeAllowed = questRecord[7].GetUInt32();
|
||||
AllowableRaces = questRecord[8].GetUInt16();
|
||||
RequiredFactionId1 = questRecord[9].GetUInt16();
|
||||
RequiredFactionId2 = questRecord[10].GetUInt16();
|
||||
RequiredFactionValue1 = questRecord[11].GetInt32();
|
||||
RequiredFactionValue2 = questRecord[12].GetInt32();
|
||||
NextQuestIdChain = questRecord[13].GetUInt32();
|
||||
RewardXPId = questRecord[14].GetUInt8();
|
||||
RewardOrRequiredMoney = questRecord[15].GetInt32();
|
||||
RewardMoneyMaxLevel = questRecord[16].GetUInt32();
|
||||
RewardSpell = questRecord[17].GetUInt32();
|
||||
RewardSpellCast = questRecord[18].GetInt32();
|
||||
RewardNextQuest = questRecord[13].GetUInt32();
|
||||
RewardXPDifficulty = questRecord[14].GetUInt8();
|
||||
RewardMoney = questRecord[15].GetInt32();
|
||||
RewardBonusMoney = questRecord[16].GetUInt32();
|
||||
RewardDisplaySpell = questRecord[17].GetUInt32();
|
||||
RewardSpell = questRecord[18].GetInt32();
|
||||
RewardHonor = questRecord[19].GetUInt32();
|
||||
RewardHonorMultiplier = questRecord[20].GetFloat();
|
||||
SourceItemId = questRecord[21].GetUInt32();
|
||||
RewardKillHonor = questRecord[20].GetFloat();
|
||||
StartItem = questRecord[21].GetUInt32();
|
||||
Flags = questRecord[22].GetUInt32();
|
||||
RewardTitleId = questRecord[23].GetUInt8();
|
||||
RequiredPlayerKills = questRecord[24].GetUInt8();
|
||||
@@ -69,14 +69,14 @@ Quest::Quest(Field* questRecord)
|
||||
RewardFactionValueIdOverride[i] = questRecord[49+i*3].GetInt32();
|
||||
}
|
||||
|
||||
PointMapId = questRecord[62].GetUInt16();
|
||||
PointX = questRecord[63].GetFloat();
|
||||
PointY = questRecord[64].GetFloat();
|
||||
PointOption = questRecord[65].GetUInt32();
|
||||
POIContinent = questRecord[62].GetUInt16();
|
||||
POIx = questRecord[63].GetFloat();
|
||||
POIy = questRecord[64].GetFloat();
|
||||
POIPriority = questRecord[65].GetUInt32();
|
||||
Title = questRecord[66].GetString();
|
||||
Objectives = questRecord[67].GetString();
|
||||
Details = questRecord[68].GetString();
|
||||
EndText = questRecord[69].GetString();
|
||||
AreaDescription = questRecord[69].GetString();
|
||||
CompletedText = questRecord[70].GetString();
|
||||
|
||||
for (int i = 0; i < QUEST_OBJECTIVES_COUNT; ++i)
|
||||
@@ -86,10 +86,10 @@ Quest::Quest(Field* questRecord)
|
||||
RequiredNpcOrGoCount[i] = questRecord[75+i].GetUInt16();
|
||||
|
||||
for (int i = 0; i < QUEST_SOURCE_ITEM_IDS_COUNT; ++i)
|
||||
RequiredSourceItemId[i] = questRecord[79+i].GetUInt32();
|
||||
ItemDrop[i] = questRecord[79+i].GetUInt32();
|
||||
|
||||
for (int i = 0; i < QUEST_SOURCE_ITEM_IDS_COUNT; ++i)
|
||||
RequiredSourceItemCount[i] = questRecord[83+i].GetUInt16();
|
||||
ItemDropQuantity[i] = questRecord[83+i].GetUInt16();
|
||||
|
||||
for (int i = 0; i < QUEST_ITEM_OBJECTIVES_COUNT; ++i)
|
||||
RequiredItemId[i] = questRecord[87+i].GetUInt32();
|
||||
@@ -172,7 +172,7 @@ void Quest::LoadQuestTemplateAddon(Field* fields)
|
||||
RequiredMaxRepFaction = fields[12].GetUInt16();
|
||||
RequiredMinRepValue = fields[13].GetInt32();
|
||||
RequiredMaxRepValue = fields[14].GetInt32();
|
||||
SourceItemIdCount = fields[15].GetUInt8();
|
||||
StartItemCount = fields[15].GetUInt8();
|
||||
SpecialFlags = fields[16].GetUInt8();
|
||||
|
||||
if (SpecialFlags & QUEST_SPECIAL_FLAGS_AUTO_ACCEPT)
|
||||
@@ -194,7 +194,7 @@ uint32 Quest::XPValue(Player* player) const
|
||||
else if (diffFactor > 10)
|
||||
diffFactor = 10;
|
||||
|
||||
uint32 xp = diffFactor * xpentry->Exp[RewardXPId] / 10;
|
||||
uint32 xp = diffFactor * xpentry->Exp[RewardXPDifficulty] / 10;
|
||||
if (xp <= 100)
|
||||
xp = 5 * ((xp + 2) / 5);
|
||||
else if (xp <= 500)
|
||||
@@ -213,11 +213,11 @@ uint32 Quest::XPValue(Player* player) const
|
||||
int32 Quest::GetRewOrReqMoney() const
|
||||
{
|
||||
// RequiredMoney: the amount is the negative copper sum.
|
||||
if (RewardOrRequiredMoney <= 0)
|
||||
return RewardOrRequiredMoney;
|
||||
if (RewardMoney <= 0)
|
||||
return RewardMoney;
|
||||
|
||||
// RewardMoney: the positive amount
|
||||
return int32(RewardOrRequiredMoney * sWorld->getRate(RATE_MONEY_QUEST));
|
||||
return int32(RewardMoney * sWorld->getRate(RATE_MONEY_QUEST));
|
||||
}
|
||||
|
||||
uint32 Quest::GetRewMoneyMaxLevel() const
|
||||
@@ -227,7 +227,7 @@ uint32 Quest::GetRewMoneyMaxLevel() const
|
||||
return 0;
|
||||
|
||||
// Else, return the rewarded copper sum modified by the rate
|
||||
return uint32(RewardMoneyMaxLevel * sWorld->getRate(RATE_MONEY_MAX_LEVEL_QUEST));
|
||||
return uint32(RewardBonusMoney * sWorld->getRate(RATE_MONEY_MAX_LEVEL_QUEST));
|
||||
}
|
||||
|
||||
bool Quest::IsAutoAccept() const
|
||||
|
||||
Reference in new issue
Block a user