Core/Conversations: Fixed CONVERSATION_DYNAMIC_FIELD_LINES structure and defined related opcode/flag
This commit is contained in:
@@ -217,6 +217,7 @@ namespace Framework.Constants
|
|||||||
ConnectToFailed = 0x35d4,
|
ConnectToFailed = 0x35d4,
|
||||||
ContributionContribute = 0x3558,
|
ContributionContribute = 0x3558,
|
||||||
ContributionGetState = 0x3559,
|
ContributionGetState = 0x3559,
|
||||||
|
ConversationLineStarted = 0x354A,
|
||||||
ConvertConsumptionTime = 0x36f9,
|
ConvertConsumptionTime = 0x36f9,
|
||||||
ConvertRaid = 0x364e,
|
ConvertRaid = 0x364e,
|
||||||
CreateCharacter = 0x3643,
|
CreateCharacter = 0x3643,
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ namespace Game.DataStorage
|
|||||||
Log.outInfo(LogFilter.ServerLoading, "Loaded 0 Conversation actor templates. DB table `conversation_actor_template` is empty.");
|
Log.outInfo(LogFilter.ServerLoading, "Loaded 0 Conversation actor templates. DB table `conversation_actor_template` is empty.");
|
||||||
}
|
}
|
||||||
|
|
||||||
SQLResult lineTemplates = DB.World.Query("SELECT Id, StartTime, UiCameraID, ActorIdx, Unk FROM conversation_line_template");
|
SQLResult lineTemplates = DB.World.Query("SELECT Id, StartTime, UiCameraID, ActorIdx, Flags FROM conversation_line_template");
|
||||||
if (!lineTemplates.IsEmpty())
|
if (!lineTemplates.IsEmpty())
|
||||||
{
|
{
|
||||||
uint oldMSTime = Time.GetMSTime();
|
uint oldMSTime = Time.GetMSTime();
|
||||||
@@ -79,8 +79,8 @@ namespace Game.DataStorage
|
|||||||
conversationLine.Id = id;
|
conversationLine.Id = id;
|
||||||
conversationLine.StartTime = lineTemplates.Read<uint>(1);
|
conversationLine.StartTime = lineTemplates.Read<uint>(1);
|
||||||
conversationLine.UiCameraID = lineTemplates.Read<uint>(2);
|
conversationLine.UiCameraID = lineTemplates.Read<uint>(2);
|
||||||
conversationLine.ActorIdx = lineTemplates.Read<ushort>(3);
|
conversationLine.ActorIdx = lineTemplates.Read<byte>(3);
|
||||||
conversationLine.Unk = lineTemplates.Read<ushort>(4);
|
conversationLine.Flags = lineTemplates.Read<byte>(4);
|
||||||
|
|
||||||
_conversationLineTemplateStorage[id] = conversationLine;
|
_conversationLineTemplateStorage[id] = conversationLine;
|
||||||
}
|
}
|
||||||
@@ -226,8 +226,9 @@ namespace Game.DataStorage
|
|||||||
public uint Id; // Link to ConversationLine.db2
|
public uint Id; // Link to ConversationLine.db2
|
||||||
public uint StartTime; // Time in ms after conversation creation the line is displayed
|
public uint StartTime; // Time in ms after conversation creation the line is displayed
|
||||||
public uint UiCameraID; // Link to UiCamera.db2
|
public uint UiCameraID; // Link to UiCamera.db2
|
||||||
public ushort ActorIdx; // Index from conversation_actors
|
public byte ActorIdx; // Index from conversation_actors
|
||||||
public ushort Unk;
|
public byte Flags;
|
||||||
|
public ushort Padding;
|
||||||
}
|
}
|
||||||
|
|
||||||
public class ConversationTemplate
|
public class ConversationTemplate
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
ALTER TABLE `conversation_line_template` ADD `Flags` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `ActorIdx`;
|
||||||
|
UPDATE `conversation_line_template` SET `Flags`=(`ActorIdx`>>8);
|
||||||
|
UPDATE `conversation_line_template` SET `ActorIdx`=`ActorIdx`&0xFF;
|
||||||
|
ALTER TABLE `conversation_line_template`
|
||||||
|
CHANGE `ActorIdx` `ActorIdx` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `UiCameraID`,
|
||||||
|
DROP `Unk`;
|
||||||
Reference in New Issue
Block a user