Core/Quests: Renamed unknown quest objective field

This commit is contained in:
Shauren
2016-08-28 17:07:59 +02:00
parent a52fd246ca
commit f99bb81402
5 changed files with 7 additions and 5 deletions

View File

@@ -0,0 +1 @@
ALTER TABLE `quest_objectives` CHANGE `UnkFloat` `ProgressBarWeight` float NOT NULL DEFAULT '0' AFTER `Flags`;

View File

@@ -3899,8 +3899,8 @@ void ObjectMgr::LoadQuests()
}
// Load `quest_objectives` order by descending storage index to reduce resizes
// 0 1 2 3 4 5 6 7 8
result = WorldDatabase.Query("SELECT ID, QuestID, Type, StorageIndex, ObjectID, Amount, Flags, UnkFloat, Description FROM quest_objectives ORDER BY StorageIndex DESC");
// 0 1 2 3 4 5 6 7 8
result = WorldDatabase.Query("SELECT ID, QuestID, Type, StorageIndex, ObjectID, Amount, Flags, ProgressBarWeight, Description FROM quest_objectives ORDER BY StorageIndex DESC");
if (!result)
{

View File

@@ -198,7 +198,7 @@ void Quest::LoadQuestObjective(Field* fields)
obj.ObjectID = fields[4].GetInt32();
obj.Amount = fields[5].GetInt32();
obj.Flags = fields[6].GetUInt32();
obj.UnkFloat = fields[7].GetFloat();
obj.ProgressBarWeight = fields[7].GetFloat();
obj.Description = fields[8].GetString();
Objectives.push_back(obj);

View File

@@ -233,6 +233,7 @@ enum QuestObjectiveType
QUEST_OBJECTIVE_DEFEATBATTLEPET = 12,
QUEST_OBJECTIVE_WINPVPPETBATTLES = 13,
QUEST_OBJECTIVE_CRITERIA_TREE = 14,
QUEST_OBJECTIVE_PROGRESS_BAR = 15,
QUEST_OBJECTIVE_HAVE_CURRENCY = 16, // requires the player to have X currency when turning in but does not consume it
QUEST_OBJECTIVE_OBTAIN_CURRENCY = 17 // requires the player to gain X currency after starting the quest but not required to keep it until the end (does not consume)
};
@@ -267,7 +268,7 @@ struct QuestObjective
int32 ObjectID = 0;
int32 Amount = 0;
uint32 Flags = 0;
float UnkFloat = 0.0f;
float ProgressBarWeight = 0.0f;
std::string Description;
std::vector<int32> VisualEffects;
};

View File

@@ -161,7 +161,7 @@ WorldPacket const* WorldPackets::Quest::QueryQuestInfoResponse::Write()
_worldPacket << int32(questObjective.ObjectID);
_worldPacket << int32(questObjective.Amount);
_worldPacket << uint32(questObjective.Flags);
_worldPacket << float(questObjective.UnkFloat);
_worldPacket << float(questObjective.ProgressBarWeight);
_worldPacket << int32(questObjective.VisualEffects.size());
for (int32 visualEffect : questObjective.VisualEffects)