Fixed QuestObjective order and change name of QuestGiverQuestList -> QuestGiverQuestListMessage
This commit is contained in:
@@ -315,9 +315,9 @@ namespace Game.Misc
|
|||||||
_session.SendPacket(packet);
|
_session.SendPacket(packet);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SendQuestGiverQuestList(ObjectGuid guid)
|
public void SendQuestGiverQuestListMessage(ObjectGuid guid)
|
||||||
{
|
{
|
||||||
QuestGiverQuestList questList = new QuestGiverQuestList();
|
QuestGiverQuestListMessage questList = new QuestGiverQuestListMessage();
|
||||||
questList.QuestGiverGUID = guid;
|
questList.QuestGiverGUID = guid;
|
||||||
|
|
||||||
QuestGreeting questGreeting = Global.ObjectMgr.GetQuestGreeting(guid);
|
QuestGreeting questGreeting = Global.ObjectMgr.GetQuestGreeting(guid);
|
||||||
@@ -348,7 +348,7 @@ namespace Game.Misc
|
|||||||
ObjectManager.GetLocaleString(localeData.LogTitle, locale, ref title);
|
ObjectManager.GetLocaleString(localeData.LogTitle, locale, ref title);
|
||||||
}
|
}
|
||||||
|
|
||||||
GossipTextData text = new GossipTextData();
|
GossipText text = new GossipText();
|
||||||
text.QuestID = questID;
|
text.QuestID = questID;
|
||||||
text.QuestType = questMenuItem.QuestIcon;
|
text.QuestType = questMenuItem.QuestIcon;
|
||||||
text.QuestLevel = (uint)quest.Level;
|
text.QuestLevel = (uint)quest.Level;
|
||||||
@@ -356,7 +356,7 @@ namespace Game.Misc
|
|||||||
text.QuestFlagsEx = (uint)quest.FlagsEx;
|
text.QuestFlagsEx = (uint)quest.FlagsEx;
|
||||||
text.Repeatable = false; // NYI
|
text.Repeatable = false; // NYI
|
||||||
text.QuestTitle = title;
|
text.QuestTitle = title;
|
||||||
questList.GossipTexts.Add(text);
|
questList.QuestDataText.Add(text);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -321,7 +321,7 @@ namespace Game.Entities
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
PlayerTalkClass.SendQuestGiverQuestList(guid);
|
PlayerTalkClass.SendQuestGiverQuestListMessage(guid);
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool IsActiveQuest(uint quest_id)
|
public bool IsActiveQuest(uint quest_id)
|
||||||
|
|||||||
@@ -6175,7 +6175,7 @@ namespace Game
|
|||||||
|
|
||||||
// Load `quest_objectives`
|
// Load `quest_objectives`
|
||||||
// 0 1 2 3 4 5 6 7 8 9
|
// 0 1 2 3 4 5 6 7 8 9
|
||||||
result = DB.World.Query("SELECT ID, QuestID, Type, StorageIndex, ObjectID, Amount, Flags, Flags2, ProgressBarWeight, Description FROM quest_objectives ORDER BY StorageIndex ASC");
|
result = DB.World.Query("SELECT ID, QuestID, Type, StorageIndex, ObjectID, Amount, Flags, Flags2, ProgressBarWeight, Description FROM quest_objectives ORDER BY `Order` ASC, StorageIndex ASC");
|
||||||
|
|
||||||
if (result.IsEmpty())
|
if (result.IsEmpty())
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -600,20 +600,20 @@ namespace Game.Network.Packets
|
|||||||
public byte Entry;
|
public byte Entry;
|
||||||
}
|
}
|
||||||
|
|
||||||
public class QuestGiverQuestList : ServerPacket
|
public class QuestGiverQuestListMessage : ServerPacket
|
||||||
{
|
{
|
||||||
public QuestGiverQuestList() : base(ServerOpcodes.QuestGiverQuestListMessage) { }
|
public QuestGiverQuestListMessage() : base(ServerOpcodes.QuestGiverQuestListMessage) { }
|
||||||
|
|
||||||
public override void Write()
|
public override void Write()
|
||||||
{
|
{
|
||||||
_worldPacket.WritePackedGuid(QuestGiverGUID);
|
_worldPacket.WritePackedGuid(QuestGiverGUID);
|
||||||
_worldPacket.WriteUInt32(GreetEmoteDelay);
|
_worldPacket.WriteUInt32(GreetEmoteDelay);
|
||||||
_worldPacket.WriteUInt32(GreetEmoteType);
|
_worldPacket.WriteUInt32(GreetEmoteType);
|
||||||
_worldPacket.WriteUInt32(GossipTexts.Count);
|
_worldPacket.WriteUInt32(QuestDataText.Count);
|
||||||
_worldPacket.WriteBits(Greeting.Length, 11);
|
_worldPacket.WriteBits(Greeting.Length, 11);
|
||||||
_worldPacket.FlushBits();
|
_worldPacket.FlushBits();
|
||||||
|
|
||||||
foreach (GossipTextData gossip in GossipTexts)
|
foreach (GossipText gossip in QuestDataText)
|
||||||
{
|
{
|
||||||
_worldPacket.WriteUInt32(gossip.QuestID);
|
_worldPacket.WriteUInt32(gossip.QuestID);
|
||||||
_worldPacket.WriteUInt32(gossip.QuestType);
|
_worldPacket.WriteUInt32(gossip.QuestType);
|
||||||
@@ -634,7 +634,7 @@ namespace Game.Network.Packets
|
|||||||
public ObjectGuid QuestGiverGUID;
|
public ObjectGuid QuestGiverGUID;
|
||||||
public uint GreetEmoteDelay;
|
public uint GreetEmoteDelay;
|
||||||
public uint GreetEmoteType;
|
public uint GreetEmoteType;
|
||||||
public List<GossipTextData> GossipTexts = new List<GossipTextData>();
|
public List<GossipText> QuestDataText = new List<GossipText>();
|
||||||
public string Greeting = "";
|
public string Greeting = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1086,9 +1086,9 @@ namespace Game.Network.Packets
|
|||||||
public int Amount;
|
public int Amount;
|
||||||
}
|
}
|
||||||
|
|
||||||
public struct GossipTextData
|
public struct GossipText
|
||||||
{
|
{
|
||||||
public GossipTextData(uint questID, uint questType, uint questLevel, uint questFlags, uint questFlagsEx, bool repeatable, string questTitle)
|
public GossipText(uint questID, uint questType, uint questLevel, uint questFlags, uint questFlagsEx, bool repeatable, string questTitle)
|
||||||
{
|
{
|
||||||
QuestID = questID;
|
QuestID = questID;
|
||||||
QuestType = questType;
|
QuestType = questType;
|
||||||
|
|||||||
Reference in New Issue
Block a user