Пример #1
0
        /**
         * @brief 提取数据
         *
         * @param node
         *
         * @return
         */
        public bool CollectDataFromDBC(DBC_Row node)
        {
            m_Id = DBCUtil.ExtractNumeric <int>(node, "Id", 0, true);
            m_AttrData.CollectDataFromDBC(node);

            return(true);
        }
Пример #2
0
 public bool CollectDataFromDBC(DBC_Row node)
 {
     Id                   = DBCUtil.ExtractNumeric <int>(node, "Id", 0);
     Describe             = DBCUtil.ExtractString(node, "Describe", "");
     AddEnergyRecover     = DBCUtil.ExtractNumeric <int>(node, "AddEnergyRecover", 0);
     AddEnergyMax         = DBCUtil.ExtractNumeric <int>(node, "AddEnergyMax", 0);
     AddMaxAd             = DBCUtil.ExtractNumeric <int>(node, "AddMaxAd", 0);
     AddMinAd             = DBCUtil.ExtractNumeric <int>(node, "AddMinAd", 0);
     AddCritical          = DBCUtil.ExtractNumeric <int>(node, "AddCritical", 0);
     AddCriticalFactor    = DBCUtil.ExtractNumeric <int>(node, "AddCriticalFactor", 0);
     AddMetalFactor       = DBCUtil.ExtractNumeric <int>(node, "AddMetalFactor", 0);
     AddWoodFactor        = DBCUtil.ExtractNumeric <int>(node, "AddWoodFactor", 0);
     AddWaterFactor       = DBCUtil.ExtractNumeric <int>(node, "AddWaterFactor", 0);
     AddFireFactor        = DBCUtil.ExtractNumeric <int>(node, "AddFireFactor", 0);
     AddEarthFactor       = DBCUtil.ExtractNumeric <int>(node, "AddEarthFactor", 0);
     AddFullDamageFactor  = DBCUtil.ExtractNumeric <int>(node, "AddFullDamageFactor", 0);
     AddHpMax             = DBCUtil.ExtractNumeric <int>(node, "AddHpMax", 0);
     AddArmor             = DBCUtil.ExtractNumeric <int>(node, "AddArmor", 0);
     AddMiss              = DBCUtil.ExtractNumeric <int>(node, "AddMiss", 0);
     AddMetalResist       = DBCUtil.ExtractNumeric <int>(node, "AddMetalResist", 0);
     AddWoodResist        = DBCUtil.ExtractNumeric <int>(node, "AddWoodResist", 0);
     AddWaterResist       = DBCUtil.ExtractNumeric <int>(node, "AddWaterResist", 0);
     AddFireResist        = DBCUtil.ExtractNumeric <int>(node, "AddFireResist", 0);
     AddEarthResist       = DBCUtil.ExtractNumeric <int>(node, "AddEarthResist", 0);
     AddAccuracyRecover   = DBCUtil.ExtractNumeric <int>(node, "AddAccuracyRecover", 0);
     AddDamageDerate      = DBCUtil.ExtractNumeric <int>(node, "AddDamageDerate", 0);
     AddMoveSpeed         = DBCUtil.ExtractNumeric <int>(node, "AddMoveSpeed", 0);
     AddFullElementResist = DBCUtil.ExtractNumeric <int>(node, "AddFullElementResist", 0);
     AddFullElementFactor = DBCUtil.ExtractNumeric <int>(node, "AddFullElementFactor", 0);
     AddHpFactor          = DBCUtil.ExtractNumeric <int>(node, "AddHpFactor", 0);
     AfterCollectData();
     return(true);
 }
Пример #3
0
 public bool CollectDataFromDBC(DBC_Row node)
 {
     m_Id          = DBCUtil.ExtractNumeric <int>(node, "Id", 0, true);
     m_Description = DBCUtil.ExtractString(node, "Description", "", false);
     m_AttrData.CollectDataFromDBC(node);
     return(true);
 }
Пример #4
0
 public bool CollectDataFromDBC(DBC_Row node)
 {
     Id             = DBCUtil.ExtractNumeric <int>(node, "Id", 0, true);
     PeriodTime     = DBCUtil.ExtractNumeric <float>(node, "PeriodTime", 0, false);
     MaxPeriodCount = DBCUtil.ExtractNumeric <int>(node, "MaxPeriodCount", 0, false);
     return(true);
 }
Пример #5
0
 public bool CollectDataFromDBC(DBC_Row node)
 {
     Id       = DBCUtil.ExtractNumeric <int>(node, "Id", 0, true);
     Duration = DBCUtil.ExtractNumeric <int>(node, "Duration", 30, true);
     Price    = DBCUtil.ExtractNumeric <int>(node, "Price", 0, false);
     Diamond  = DBCUtil.ExtractNumeric <int>(node, "Diamond", 0, false);
     return(true);
 }
Пример #6
0
 public bool CollectDataFromDBC(DBC_Row node)
 {
     Id          = DBCUtil.ExtractNumeric <int>(node, "Id", 0);
     Description = DBCUtil.ExtractString(node, "Description", "");
     Script      = DBCUtil.ExtractString(node, "Script", "");
     AttrId      = DBCUtil.ExtractNumeric <int>(node, "AttrId", 0);
     MaxCount    = DBCUtil.ExtractNumeric <int>(node, "MaxCount", 0);
     return(true);
 }
Пример #7
0
 public bool CollectDataFromDBC(DBC_Row node)
 {
     Id           = DBCUtil.ExtractNumeric <int>(node, "Id", 0);
     Description  = DBCUtil.ExtractString(node, "Description", "");
     CostAction   = DBCUtil.ExtractNumeric <int>(node, "CostAction", 0);
     AddAttrType  = DBCUtil.ExtractNumeric <int>(node, "AddAttrType", 0);
     AddAttrValue = DBCUtil.ExtractNumeric <int>(node, "AddAttrValue", 0);
     return(true);
 }
Пример #8
0
 public bool CollectDataFromDBC(DBC_Row node)
 {
     Id          = DBCUtil.ExtractNumeric <int>(node, "Id", 0);
     Description = DBCUtil.ExtractString(node, "Description", "");
     Script      = DBCUtil.ExtractString(node, "Script", "");
     BreakType   = DBCUtil.ExtractNumeric <int>(node, "BreakType", 0);
     NextId      = DBCUtil.ExtractNumeric <int>(node, "NextId", 0);
     return(true);
 }
Пример #9
0
 public bool CollectDataFromDBC(DBC_Row node)
 {
     Id          = DBCUtil.ExtractNumeric <int>(node, "Id", 0);
     Description = DBCUtil.ExtractString(node, "Description", "");
     Pitch       = DBCUtil.ExtractNumeric <float>(node, "Pitch", 0);
     Yaw         = DBCUtil.ExtractNumeric <float>(node, "Yaw", 0);
     Distance    = DBCUtil.ExtractNumeric <float>(node, "Distance", 0);
     return(true);
 }
 public bool CollectDataFromDBC(DBC_Row node)
 {
     m_EquipmentId   = DBCUtil.ExtractNumeric <int>(node, "EquipmentId", 0, true);
     m_EquipmentName = DBCUtil.ExtractString(node, "EquipmentName", "", true);
     m_UiModel       = DBCUtil.ExtractString(node, "UiModel", "", false);
     m_Model         = DBCUtil.ExtractString(node, "Model", "", false);
     m_AttrData.CollectDataFromDBC(node);
     return(true);
 }
Пример #11
0
 public bool CollectDataFromDBC(DBC_Row node)
 {
     ModelId     = DBCUtil.ExtractNumeric <int>(node, "ModelId", 0);
     Description = DBCUtil.ExtractString(node, "Description", "");
     Stand       = DBCUtil.ExtractString(node, "Stand", "");
     Run         = DBCUtil.ExtractString(node, "Run", "");
     Dead        = DBCUtil.ExtractString(node, "Dead", "");
     Born        = DBCUtil.ExtractString(node, "Born", "");
     return(true);
 }
Пример #12
0
 public bool CollectDataFromDBC(DBC_Row node)
 {
     Id           = DBCUtil.ExtractNumeric <int>(node, "Id", 0);
     Description  = DBCUtil.ExtractString(node, "Description", "");
     Model        = DBCUtil.ExtractString(node, "Model", "");
     Scale        = DBCUtil.ExtractNumeric <float>(node, "Scale", 0);
     ActionId     = DBCUtil.ExtractNumeric <int>(node, "ActionId", 0);
     ActionPrefix = DBCUtil.ExtractString(node, "ActionPrefix", "");
     AIScript     = DBCUtil.ExtractString(node, "AIScript", "");
     AttrId       = DBCUtil.ExtractNumeric <int>(node, "AttrId", 0);
     Skills       = DBCUtil.ExtractNumericArray <int>(node, "Skills", null);
     return(true);
 }
Пример #13
0
 public bool CollectDataFromDBC(DBC_Row node)
 {
     Id               = DBCUtil.ExtractNumeric <int>(node, "Id", 0, true);
     IsActive         = DBCUtil.ExtractBool(node, "IsActive", false, true);
     EnterBattleTime  = DBCUtil.ExtractNumeric <int>(node, "EnterBattleTime", 500, true);
     LeaveBattleTime  = DBCUtil.ExtractNumeric <int>(node, "LeaveBattleTime", 500, true);
     HeightInMainCity = DBCUtil.ExtractNumeric <float>(node, "HeightInMainCity", 0.0f, true);
     DisInMainCity    = DBCUtil.ExtractNumeric <float>(node, "DisInMainCity", 0.0f, true);
     HeightInIdle     = DBCUtil.ExtractNumeric <float>(node, "HeightInIdle", 0.0f, true);
     DisInIdle        = DBCUtil.ExtractNumeric <float>(node, "DisInIdle", 0.0f, true);
     HeightInCombat   = DBCUtil.ExtractNumeric <float>(node, "HeightInCombat", 0.0f, true);
     DisInCombat      = DBCUtil.ExtractNumeric <float>(node, "DisInCombat", 0.0f, true);
     return(true);
 }
Пример #14
0
        public bool CollectDataFromDBC(DBC_Row node)
        {
            m_Id          = DBCUtil.ExtractNumeric <int>(node, "ID", 0, true);
            m_Week        = DBCUtil.ExtractNumeric <int>(node, "Week", 0, true);
            m_StartHour   = DBCUtil.ExtractNumeric <int>(node, "StartHour", 0, true);
            m_StartMinute = DBCUtil.ExtractNumeric <int>(node, "StartMinute", 0, true);
            m_EndHour     = DBCUtil.ExtractNumeric <int>(node, "EndHour", 0, true);
            m_EndMinute   = DBCUtil.ExtractNumeric <int>(node, "EndMinute", 0, true);
            m_Interval    = DBCUtil.ExtractNumeric <int>(node, "Interval", 0, true);
            m_Message     = DBCUtil.ExtractString(node, "Message", "", true);
            m_ScrollCount = DBCUtil.ExtractNumeric <int>(node, "ScrollCount", 0, true);

            return(true);
        }
Пример #15
0
 public bool CollectDataFromDBC(DBC_Row node)
 {
     Id                  = DBCUtil.ExtractNumeric <int>(node, "Id", 0);
     Describe            = DBCUtil.ExtractString(node, "Describe", "");
     AddStrength         = DBCUtil.ExtractNumeric <int>(node, "AddStrength", 0);
     AddStrengthRate     = DBCUtil.ExtractNumeric <int>(node, "AddStrengthRate", 0);
     AddIntelligence     = DBCUtil.ExtractNumeric <int>(node, "AddIntelligence", 0);
     AddIntelligenceRate = DBCUtil.ExtractNumeric <int>(node, "AddIntelligenceRate", 0);
     AddCharm            = DBCUtil.ExtractNumeric <int>(node, "AddCharm", 0);
     AddCharmRate        = DBCUtil.ExtractNumeric <int>(node, "AddCharmRate", 0);
     AddAction           = DBCUtil.ExtractNumeric <int>(node, "AddAction", 0);
     AddActionMax        = DBCUtil.ExtractNumeric <int>(node, "AddActionMax", 0);
     AddGold             = DBCUtil.ExtractNumeric <int>(node, "AddGold", 0);
     AfterCollectData();
     return(true);
 }
Пример #16
0
 public bool CollectDataFromDBC(DBC_Row node)
 {
     Id           = DBCUtil.ExtractNumeric <int>(node, "Id", 0, true);
     AiActionType = DBCUtil.ExtractNumeric <int>(node, "ActionType", 1, true);
     ActionParam  = DBCUtil.ExtractNumeric <string>(node, "ActionParam", "", false);
     DisMin       = DBCUtil.ExtractNumeric <float>(node, "DisMin", -1.0f, false);
     DisMax       = DBCUtil.ExtractNumeric <float>(node, "DisMax", -1.0f, false);
     TargetHpMin  = DBCUtil.ExtractNumeric <float>(node, "TargetHpMin", -1.0f, false);
     TargetHpMax  = DBCUtil.ExtractNumeric <float>(node, "TargetHpMax", -1.0f, false);
     SelfHpMin    = DBCUtil.ExtractNumeric <float>(node, "SelfHpMin", -1.0f, false);
     SelfHpMax    = DBCUtil.ExtractNumeric <float>(node, "SelfHpMax", -1.0f, false);
     Cooldown     = DBCUtil.ExtractNumeric <float>(node, "Cooldown", -1.0f, false);
     Weight       = DBCUtil.ExtractNumeric <float>(node, "Weight", 0.0f, false);
     LastTime     = DBCUtil.ExtractNumeric <float>(node, "LastTime", 0.0f, true);
     CanInterrupt = DBCUtil.ExtractBool(node, "CanInterrupt", false, false);
     return(true);
 }
Пример #17
0
 public bool CollectDataFromDBC(DBC_Row node)
 {
     m_Id       = DBCUtil.ExtractNumeric <int>(node, "Id", 0, true);
     m_LogicId  = DBCUtil.ExtractNumeric <int>(node, "LogicId", 0, true);
     m_IsClient = DBCUtil.ExtractBool(node, "IsClient", false, true);
     m_IsServer = DBCUtil.ExtractBool(node, "IsServer", false, true);
     m_ParamNum = DBCUtil.ExtractNumeric <int>(node, "ParamNum", 0, true);
     if (m_ParamNum > 0)
     {
         m_Params = new string[m_ParamNum];
         for (int i = 0; i < m_ParamNum; ++i)
         {
             m_Params[i] = DBCUtil.ExtractString(node, "Param" + i, "", false);
         }
     }
     return(true);
 }
Пример #18
0
 public bool CollectDataFromDBC(DBC_Row node)
 {
     Id              = DBCUtil.ExtractNumeric <int>(node, "Id", 0);
     Description     = DBCUtil.ExtractString(node, "Description", "");
     Length          = DBCUtil.ExtractNumeric <float>(node, "Length", 0);
     Width           = DBCUtil.ExtractNumeric <float>(node, "Width", 0);
     Res             = DBCUtil.ExtractString(node, "Res", "");
     Type            = DBCUtil.ExtractNumeric <int>(node, "Type", 0);
     LeftPortType    = DBCUtil.ExtractNumeric <int>(node, "LeftPortType", 0);
     LeftOffeset     = DBCUtil.ExtractNumericArray <float>(node, "LeftOffeset", null);
     RightPortType   = DBCUtil.ExtractNumeric <int>(node, "RightPortType", 0);
     RightOffset     = DBCUtil.ExtractNumericArray <float>(node, "RightOffset", null);
     ForwardPortType = DBCUtil.ExtractNumeric <int>(node, "ForwardPortType", 0);
     ForwardOffset   = DBCUtil.ExtractNumericArray <float>(node, "ForwardOffset", null);
     BackPortType    = DBCUtil.ExtractNumeric <int>(node, "BackPortType", 0);
     BackOffset      = DBCUtil.ExtractNumericArray <float>(node, "BackOffset", null);
     return(true);
 }
Пример #19
0
        public void Init()
        {
            ArkCrossEngine.RoleInfo ri = ArkCrossEngine.LobbyClient.Instance.CurrentRole;
            if (ri != null)
            {
                Data_PlayerConfig cg = PlayerConfigProvider.Instance.GetPlayerConfigById(ri.HeroId);
                if (cg != null)
                {
                    herostr = cg.m_Portrait;
                }
                heroname = ri.Nickname;
            }
            m_StoryInfos.Clear();
            DBC dlgCfg = new DBC();

            if (dlgCfg.Load(HomePath.GetAbsolutePath(FilePathDefine_Client.C_DialogConfig)))
            {
                for (int index = 0; index < dlgCfg.RowNum; index++)
                {
                    DBC_Row node = dlgCfg.GetRowByIndex(index);
                    if (null != node)
                    {
                        StoryDlgInfo info = new StoryDlgInfo();
                        info.ID           = DBCUtil.ExtractNumeric <int>(node, "Id", 0, true);
                        info.StoryName    = DBCUtil.ExtractString(node, "StoryName", "", true);
                        info.DlgType      = (StoryDlgPanel.StoryDlgType)DBCUtil.ExtractNumeric <int>(node, "DlgType", 0, true);
                        info.IntervalTime = DBCUtil.ExtractNumeric <float>(node, "IntervalTime", 1.0f, true);
                        info.StoryItems   = BuildStoryItems(info.StoryName);
                        if (!m_StoryInfos.ContainsKey(info.ID))
                        {
                            m_StoryInfos.Add(info.ID, info);
                        }
                    }
                }
            }
        }
Пример #20
0
        private List <StoryDlgItem> BuildStoryItems(string storyName)
        {
            DBC    storyItems = new DBC();
            string str        = String.Format("{0}{1}.txt", FilePathDefine_Client.C_DialogPath, storyName.Trim());

            if (storyItems.Load(HomePath.GetAbsolutePath(str)))
            {
                List <StoryDlgItem> itemList = new List <StoryDlgItem>();
                for (int index = 0; index < storyItems.RowNum; index++)
                {
                    DBC_Row node = storyItems.GetRowByIndex(index);
                    if (null != node)
                    {
                        StoryDlgItem item = new StoryDlgItem();
                        item.Number       = DBCUtil.ExtractNumeric <int>(node, "Number", 0, true);
                        item.UnitId       = DBCUtil.ExtractNumeric <int>(node, "UnitId", -1, false);
                        item.IntervalTime = DBCUtil.ExtractNumeric <float>(node, "IntervalTime", 0f, false);
                        item.SpeakerName  = DBCUtil.ExtractString(node, "SpeakerName", "", true);
                        if (item.SpeakerName.Contains("player"))
                        {
                            item.SpeakerName = item.SpeakerName.Replace("player", heroname);
                        }
                        item.ImageLeftAtlas = DBCUtil.ExtractString(node, "ImageLeftAtlas", "", false);
                        item.ImageLeft      = DBCUtil.ExtractString(node, "ImageLeft", "", true);
                        if (item.ImageLeft.Contains("player"))
                        {
                            item.ImageLeft = item.ImageLeft.Replace("player", herostr);
                        }
                        item.ImageLeftBig    = string.Format("{0}_big", item.ImageLeft);
                        item.ImageLeftSmall  = string.Format("{0}_small", item.ImageLeft);
                        item.ImageRightAtlas = DBCUtil.ExtractString(node, "ImageRightAtlas", "", false);
                        item.ImageRight      = DBCUtil.ExtractString(node, "ImageRight", "", true);
                        if (item.ImageRight.Contains("player"))
                        {
                            item.ImageRight = item.ImageRight.Replace("player", herostr);
                        }
                        item.ImageRightBig   = string.Format("{0}_big", item.ImageRight);
                        item.ImageRightSmall = string.Format("{0}_small", item.ImageRight);
                        item.Words           = DBCUtil.ExtractString(node, "Words", "", true);
                        if (item.Words.Contains("player"))
                        {
                            item.Words = item.Words.Replace("player", heroname);
                        }
                        item.TextureAnimationPath = DBCUtil.ExtractString(node, "TexturePath", "", false);
                        //TweenPos
                        item.FromOffsetBottom = DBCUtil.ExtractNumeric <float>(node, "FromOffsetBottom", 0, false);
                        item.FromOffsetLeft   = DBCUtil.ExtractNumeric <float>(node, "FromOffsetLeft", 0, false);
                        item.ToOffsetBottom   = DBCUtil.ExtractNumeric <float>(node, "ToOffsetBottom", 0, false);
                        item.ToOffsetLeft     = DBCUtil.ExtractNumeric <float>(node, "ToOffsetLeft", 0, false);
                        item.TweenPosDelay    = DBCUtil.ExtractNumeric <float>(node, "TweenPosDelay", 0, false);
                        item.TweenPosDuration = DBCUtil.ExtractNumeric <float>(node, "TweenPosDuration", 0, false);
                        //TweenScale
                        item.FromScale          = DBCUtil.ExtractNumeric <float>(node, "FromScale", 1, false);
                        item.ToScale            = DBCUtil.ExtractNumeric <float>(node, "ToScale", 1, false);
                        item.TweenScaleDelay    = DBCUtil.ExtractNumeric <float>(node, "TweenScaleDelay", 0, false);
                        item.TweenScaleDuration = DBCUtil.ExtractNumeric <float>(node, "TweenScaleDuration", 0, false);
                        //TweenAlpha
                        item.FromAlpha          = DBCUtil.ExtractNumeric <float>(node, "FromAlpha", 1, false);
                        item.ToAlpha            = DBCUtil.ExtractNumeric <float>(node, "ToAlpha", 1, false);
                        item.TweenAlphaDelay    = DBCUtil.ExtractNumeric <float>(node, "TweenAlphaDelay", 0, false);
                        item.TweenAlphaDuration = DBCUtil.ExtractNumeric <float>(node, "TweenAlphaDuration", 0, false);
                        //显示字的速度
                        item.WordDuration = DBCUtil.ExtractNumeric <float>(node, "WordDuration", 0, false);

                        itemList.Add(item);
                    }
                }
                return(itemList);
            }
            return(null);
        }
Пример #21
0
 public bool CollectDataFromDBC(DBC_Row node)
 {
     m_Id       = DBCUtil.ExtractNumeric <int>(node, "Id", 0, true);
     m_LastName = DBCUtil.ExtractString(node, "LastName", "", true);
     return(true);
 }
Пример #22
0
 public bool CollectDataFromDBC(DBC_Row node)
 {
     Id       = DBCUtil.ExtractNumeric <int>(node, "Id", 0, true);
     m_String = DBCUtil.ExtractString(node, "String", "", true);
     return(true);
 }