Ejemplo n.º 1
0
        public PartyBuffs(Form1 f)
        {
            this.StartPosition = FormStartPosition.CenterScreen;

            InitializeComponent();

            f1 = f;

            if (f1.setinstance2.Enabled == true)
            {
                // Create the required List

                // Read the Buffs file a generate a List to call.
                foreach (XElement BuffElement in XElement.Load("Resources/Buffs.xml").Elements("o"))
                {
                    XMLBuffList.Add(new BuffList()
                    {
                        ID = BuffElement.Attribute("id").Value, Name = BuffElement.Attribute("en").Value
                    });
                }
            }
            else
            {
                MessageBox.Show("No character was selected as the power leveler, this can not be opened yet.");
            }
        }
        public void storeDo(string option, Element e)
        {
            Element olde = null;

            if (e.UndoElement != null)
            {
                olde = e.UndoElement.Copy();
            }
            Element newe = e.Copy();
            var     buff = new BuffElement(e, newe, olde, option);

            undoB.Add(buff);
            e.UndoElement = e.Copy();
        }
Ejemplo n.º 3
0
    private BuffElement GetAvalibleBuffElement()
    {
        BuffElement buffElement = null;

        foreach (var be in AvalibleBuffElements)
        {
            if (!be.Active)
            {
                buffElement = be;
            }
        }

        if (!buffElement)
        {
            GameObject go = Instantiate(BuffPrefab, BuffParent);
            buffElement = go.GetComponent <BuffElement>();
            AvalibleBuffElements.Add(buffElement);
        }

        return(buffElement);
    }
Ejemplo n.º 4
0
    internal void ApplyBuff(BuffDescriptor newBuffDescriptor)
    {
        BuffInstance match = CurrentBuffs.Find(x => x.buffDescriptor.name == newBuffDescriptor.name);

        if (match != null)
        {
            StackBuff(match);
        }
        else
        {
            if (Visualize)
            {
                BuffElement buffElement = GetAvalibleBuffElement();
                if (buffElement != null)
                {
                    BuffInstance newBUff = new BuffInstance();
                    newBUff.buffDescriptor = newBuffDescriptor;
                    newBUff.Duration       = newBuffDescriptor.Duration;
                    newBUff.FullDuration   = newBuffDescriptor.Duration;
                    newBUff.BuffElement    = buffElement;
                    buffElement.Activate(newBUff.buffDescriptor);
                    CurrentBuffs.Add(newBUff);
                }
                else
                {
                    Debug.LogWarning("Dont Get Buff Element");
                }
            }
            else
            {
                BuffInstance newBUff = new BuffInstance();
                newBUff.buffDescriptor = newBuffDescriptor;
                newBUff.Duration       = newBuffDescriptor.Duration;
                newBUff.FullDuration   = newBuffDescriptor.Duration;
                CurrentBuffs.Add(newBUff);
            }
        }
    }
Ejemplo n.º 5
0
	void ResurrectionPenaltyProc( BuffElement _element)
	{
		if( m_Owner.FsmType == eFsmType.PLAYER && m_PenaltyDisplayed == false && _element.skillIdx == 19999)
		{
			string str = AsTableManager.Instance.GetTbl_String(835);
			AsChatManager.Instance.InsertChat( str, eCHATTYPE.eCHATTYPE_SYSTEM);
			AsEventNotifyMgr.Instance.CenterNotify.AddQuestMessage( str, false);
			
			m_PenaltyDisplayed = true;
			
			m_Owner.HandleMessage( new Msg_DeathPenaltyIndicate( true));
		}
	}
Ejemplo n.º 6
0
	void RemoveSizeControlBuff(BuffElement _buff)
	{
		if(_buff.Benefit == true)
			m_listSizeControl_Buff.Remove(_buff);
		else
			m_listSizeControl_Debuff.Remove(_buff);
	}
Ejemplo n.º 7
0
	void AddSizeControlBuff(BuffElement _buff)
	{
		if(_buff.Benefit == true)
			m_listSizeControl_Buff.Add(_buff);
		else
			m_listSizeControl_Debuff.Add(_buff);
	}
Ejemplo n.º 8
0
	public void Release_SizeControl(BuffElement _buff)
	{
		RemoveSizeControlBuff(_buff);
		SortSizeControl();
		DispatchSizeControl();
		
//		if(m_listSizeControl_Buff.Count != 0)
//			m_Owner.HandleMessage(new Msg_ConditionIndicate_SizeControl(m_listSizeControl_Buff[0].SkillLevelPotency));
//		else
//			m_Owner.HandleMessage(new Msg_ConditionRecover_SizeControl(_buff.SkillLevelPotency));
	}
Ejemplo n.º 9
0
	public void Generate_SizeControl(BuffElement _buff)
	{
		AddSizeControlBuff(_buff);
		SortSizeControl();
		DispatchSizeControl();
		
//		if(m_listSizeControl_Buff.Count != 0)
//			m_Owner.HandleMessage(new Msg_ConditionIndicate_SizeControl(m_listSizeControl_Buff[0].SkillLevelPotency));
	}
Ejemplo n.º 10
0
	public void AddBuff(Msg_NpcBuff_Body _buff, bool _effect)
	{
		#region - init dictionary -
		if(m_dicBuff.ContainsKey(_buff.skillTableIdx_) == false)
			m_dicBuff.Add(_buff.skillTableIdx_, new Dictionary<int, BuffElement>());
		
		if(m_dicBuff[_buff.skillTableIdx_].ContainsKey(_buff.potencyIdx_) == true)
		{
			m_dicBuff[_buff.skillTableIdx_][_buff.potencyIdx_].Release();
			m_dicBuff[_buff.skillTableIdx_].Remove(_buff.potencyIdx_);
		}
		#endregion
		
		BuffElement buff = new BuffElement(_buff, this, _effect);
		
		m_dicBuff[_buff.skillTableIdx_].Add(_buff.potencyIdx_, buff);
		m_mdicBuff.Add(_buff.type_, buff);
		
		if(m_ModelLoaded == true)
			buff.Generate();
		
		ResurrectionPenaltyProc( buff);
	}
Ejemplo n.º 11
0
    public bool LoadCsv(string strContent)
    {
        if (strContent.Length == 0)
        {
            return(false);
        }
        m_mapElements.Clear();
        m_vecAllElements.Clear();
        int           contentOffset = 0;
        List <string> vecLine;

        vecLine = GameAssist.readCsvLine(strContent, ref contentOffset);
        if (vecLine.Count != 5)
        {
            Ex.Logger.Log("Buff.csv中列数量与生成的代码不匹配!");
            return(false);
        }
        if (vecLine[0] != "id")
        {
            Ex.Logger.Log("Buff.csv中字段[id]位置不对应"); return(false);
        }
        if (vecLine[1] != "buffID")
        {
            Ex.Logger.Log("Buff.csv中字段[buffID]位置不对应"); return(false);
        }
        if (vecLine[2] != "overTimed")
        {
            Ex.Logger.Log("Buff.csv中字段[overTimed]位置不对应"); return(false);
        }
        if (vecLine[3] != "continuance")
        {
            Ex.Logger.Log("Buff.csv中字段[continuance]位置不对应"); return(false);
        }
        if (vecLine[4] != "pars")
        {
            Ex.Logger.Log("Buff.csv中字段[pars]位置不对应"); return(false);
        }

        while (true)
        {
            vecLine = GameAssist.readCsvLine(strContent, ref contentOffset);
            if ((int)vecLine.Count == 0)
            {
                break;
            }
            if ((int)vecLine.Count != (int)5)
            {
                return(false);
            }
            BuffElement member = new BuffElement();
            member.id          = Convert.ToInt32(vecLine[0]);
            member.buffID      = Convert.ToInt32(vecLine[1]);
            member.overTimed   = Convert.ToInt32(vecLine[2]);
            member.continuance = Convert.ToInt32(vecLine[3]);
            member.pars        = vecLine[4];

            member.IsValidate = true;
            m_vecAllElements.Add(member);
            m_mapElements[member.id] = member;
        }
        return(true);
    }
Ejemplo n.º 12
0
    public bool LoadBin(byte[] binContent)
    {
        m_mapElements.Clear();
        m_vecAllElements.Clear();
        int nCol, nRow;
        int readPos = 0;

        readPos += GameAssist.ReadInt32Variant(binContent, readPos, out nCol);
        readPos += GameAssist.ReadInt32Variant(binContent, readPos, out nRow);
        List <string> vecLine     = new List <string>(nCol);
        List <int>    vecHeadType = new List <int>(nCol);
        string        tmpStr;
        int           tmpInt;

        for (int i = 0; i < nCol; i++)
        {
            readPos += GameAssist.ReadString(binContent, readPos, out tmpStr);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out tmpInt);
            vecLine.Add(tmpStr);
            vecHeadType.Add(tmpInt);
        }
        if (vecLine.Count != 24)
        {
            Debug.Log("Buff.csv中列数量与生成的代码不匹配!");
            return(false);
        }
        if (vecLine[0] != "BuffID")
        {
            Debug.Log("Buff.csv中字段[BuffID]位置不对应"); return(false);
        }
        if (vecLine[1] != "Name")
        {
            Debug.Log("Buff.csv中字段[Name]位置不对应"); return(false);
        }
        if (vecLine[2] != "Describe")
        {
            Debug.Log("Buff.csv中字段[Describe]位置不对应"); return(false);
        }
        if (vecLine[3] != "IconShow")
        {
            Debug.Log("Buff.csv中字段[IconShow]位置不对应"); return(false);
        }
        if (vecLine[4] != "IconName")
        {
            Debug.Log("Buff.csv中字段[IconName]位置不对应"); return(false);
        }
        if (vecLine[5] != "DieEfficient")
        {
            Debug.Log("Buff.csv中字段[DieEfficient]位置不对应"); return(false);
        }
        if (vecLine[6] != "TriggerPos")
        {
            Debug.Log("Buff.csv中字段[TriggerPos]位置不对应"); return(false);
        }
        if (vecLine[7] != "TriggerEffects")
        {
            Debug.Log("Buff.csv中字段[TriggerEffects]位置不对应"); return(false);
        }
        if (vecLine[8] != "SustainPos")
        {
            Debug.Log("Buff.csv中字段[SustainPos]位置不对应"); return(false);
        }
        if (vecLine[9] != "SustainEffects")
        {
            Debug.Log("Buff.csv中字段[SustainEffects]位置不对应"); return(false);
        }
        if (vecLine[10] != "AblityID")
        {
            Debug.Log("Buff.csv中字段[AblityID]位置不对应"); return(false);
        }
        if (vecLine[11] != "Type")
        {
            Debug.Log("Buff.csv中字段[Type]位置不对应"); return(false);
        }
        if (vecLine[12] != "ImmuneType")
        {
            Debug.Log("Buff.csv中字段[ImmuneType]位置不对应"); return(false);
        }
        if (vecLine[13] != "Duration")
        {
            Debug.Log("Buff.csv中字段[Duration]位置不对应"); return(false);
        }
        if (vecLine[14] != "Interval")
        {
            Debug.Log("Buff.csv中字段[Interval]位置不对应"); return(false);
        }
        if (vecLine[15] != "RestoreHealth")
        {
            Debug.Log("Buff.csv中字段[RestoreHealth]位置不对应"); return(false);
        }
        if (vecLine[16] != "RestorePower")
        {
            Debug.Log("Buff.csv中字段[RestorePower]位置不对应"); return(false);
        }
        if (vecLine[17] != "UseSkill")
        {
            Debug.Log("Buff.csv中字段[UseSkill]位置不对应"); return(false);
        }
        if (vecLine[18] != "Speed")
        {
            Debug.Log("Buff.csv中字段[Speed]位置不对应"); return(false);
        }
        if (vecLine[19] != "HitFrequency")
        {
            Debug.Log("Buff.csv中字段[HitFrequency]位置不对应"); return(false);
        }
        if (vecLine[20] != "Attribute1Type")
        {
            Debug.Log("Buff.csv中字段[Attribute1Type]位置不对应"); return(false);
        }
        if (vecLine[21] != "Attribute1Value")
        {
            Debug.Log("Buff.csv中字段[Attribute1Value]位置不对应"); return(false);
        }
        if (vecLine[22] != "Attribute2Type")
        {
            Debug.Log("Buff.csv中字段[Attribute2Type]位置不对应"); return(false);
        }
        if (vecLine[23] != "Attribute2Value")
        {
            Debug.Log("Buff.csv中字段[Attribute2Value]位置不对应"); return(false);
        }

        for (int i = 0; i < nRow; i++)
        {
            BuffElement member = new BuffElement();
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.BuffID);
            readPos += GameAssist.ReadString(binContent, readPos, out member.Name);
            readPos += GameAssist.ReadString(binContent, readPos, out member.Describe);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.IconShow);
            readPos += GameAssist.ReadString(binContent, readPos, out member.IconName);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.DieEfficient);
            readPos += GameAssist.ReadString(binContent, readPos, out member.TriggerPos);
            readPos += GameAssist.ReadString(binContent, readPos, out member.TriggerEffects);
            readPos += GameAssist.ReadString(binContent, readPos, out member.SustainPos);
            readPos += GameAssist.ReadString(binContent, readPos, out member.SustainEffects);
            readPos += GameAssist.ReadString(binContent, readPos, out member.AblityID);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Type);
            readPos += GameAssist.ReadString(binContent, readPos, out member.ImmuneType);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Duration);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Interval);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.RestoreHealth);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.RestorePower);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.UseSkill);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Speed);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.HitFrequency);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Attribute1Type);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Attribute1Value);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Attribute2Type);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Attribute2Value);

            member.IsValidate = true;
            m_vecAllElements.Add(member);
            m_mapElements[member.BuffID] = member;
        }
        return(true);
    }
Ejemplo n.º 13
0
    public bool LoadCsv(string strContent)
    {
        if (strContent.Length == 0)
        {
            return(false);
        }
        m_mapElements.Clear();
        m_vecAllElements.Clear();
        int           contentOffset = 0;
        List <string> vecLine;

        vecLine = GameAssist.readCsvLine(strContent, ref contentOffset);
        if (vecLine.Count != 36)
        {
            Ex.Logger.Log("Buff.csv中列数量与生成的代码不匹配!");
            return(false);
        }
        if (vecLine[0] != "BuffID")
        {
            Ex.Logger.Log("Buff.csv中字段[BuffID]位置不对应"); return(false);
        }
        if (vecLine[1] != "Name")
        {
            Ex.Logger.Log("Buff.csv中字段[Name]位置不对应"); return(false);
        }
        if (vecLine[2] != "Describe")
        {
            Ex.Logger.Log("Buff.csv中字段[Describe]位置不对应"); return(false);
        }
        if (vecLine[3] != "IconShow")
        {
            Ex.Logger.Log("Buff.csv中字段[IconShow]位置不对应"); return(false);
        }
        if (vecLine[4] != "IconName")
        {
            Ex.Logger.Log("Buff.csv中字段[IconName]位置不对应"); return(false);
        }
        if (vecLine[5] != "EffectType")
        {
            Ex.Logger.Log("Buff.csv中字段[EffectType]位置不对应"); return(false);
        }
        if (vecLine[6] != "DieEfficient")
        {
            Ex.Logger.Log("Buff.csv中字段[DieEfficient]位置不对应"); return(false);
        }
        if (vecLine[7] != "TriggerPos")
        {
            Ex.Logger.Log("Buff.csv中字段[TriggerPos]位置不对应"); return(false);
        }
        if (vecLine[8] != "TriggerEffects")
        {
            Ex.Logger.Log("Buff.csv中字段[TriggerEffects]位置不对应"); return(false);
        }
        if (vecLine[9] != "SustainPos")
        {
            Ex.Logger.Log("Buff.csv中字段[SustainPos]位置不对应"); return(false);
        }
        if (vecLine[10] != "SustainEffects")
        {
            Ex.Logger.Log("Buff.csv中字段[SustainEffects]位置不对应"); return(false);
        }
        if (vecLine[11] != "MaterialType")
        {
            Ex.Logger.Log("Buff.csv中字段[MaterialType]位置不对应"); return(false);
        }
        if (vecLine[12] != "AblityID")
        {
            Ex.Logger.Log("Buff.csv中字段[AblityID]位置不对应"); return(false);
        }
        if (vecLine[13] != "Type")
        {
            Ex.Logger.Log("Buff.csv中字段[Type]位置不对应"); return(false);
        }
        if (vecLine[14] != "Priority")
        {
            Ex.Logger.Log("Buff.csv中字段[Priority]位置不对应"); return(false);
        }
        if (vecLine[15] != "ImmuneType")
        {
            Ex.Logger.Log("Buff.csv中字段[ImmuneType]位置不对应"); return(false);
        }
        if (vecLine[16] != "Duration")
        {
            Ex.Logger.Log("Buff.csv中字段[Duration]位置不对应"); return(false);
        }
        if (vecLine[17] != "Interval")
        {
            Ex.Logger.Log("Buff.csv中字段[Interval]位置不对应"); return(false);
        }
        if (vecLine[18] != "Steer")
        {
            Ex.Logger.Log("Buff.csv中字段[Steer]位置不对应"); return(false);
        }
        if (vecLine[19] != "Target")
        {
            Ex.Logger.Log("Buff.csv中字段[Target]位置不对应"); return(false);
        }
        if (vecLine[20] != "UseSkill")
        {
            Ex.Logger.Log("Buff.csv中字段[UseSkill]位置不对应"); return(false);
        }
        if (vecLine[21] != "Attribute1Type")
        {
            Ex.Logger.Log("Buff.csv中字段[Attribute1Type]位置不对应"); return(false);
        }
        if (vecLine[22] != "Attribute1Value")
        {
            Ex.Logger.Log("Buff.csv中字段[Attribute1Value]位置不对应"); return(false);
        }
        if (vecLine[23] != "GoBack1")
        {
            Ex.Logger.Log("Buff.csv中字段[GoBack1]位置不对应"); return(false);
        }
        if (vecLine[24] != "Attribute2Type")
        {
            Ex.Logger.Log("Buff.csv中字段[Attribute2Type]位置不对应"); return(false);
        }
        if (vecLine[25] != "Attribute2Value")
        {
            Ex.Logger.Log("Buff.csv中字段[Attribute2Value]位置不对应"); return(false);
        }
        if (vecLine[26] != "GoBack2")
        {
            Ex.Logger.Log("Buff.csv中字段[GoBack2]位置不对应"); return(false);
        }
        if (vecLine[27] != "Attribute3Type")
        {
            Ex.Logger.Log("Buff.csv中字段[Attribute3Type]位置不对应"); return(false);
        }
        if (vecLine[28] != "Attribute3Value")
        {
            Ex.Logger.Log("Buff.csv中字段[Attribute3Value]位置不对应"); return(false);
        }
        if (vecLine[29] != "GoBack3")
        {
            Ex.Logger.Log("Buff.csv中字段[GoBack3]位置不对应"); return(false);
        }
        if (vecLine[30] != "Attribute4Type")
        {
            Ex.Logger.Log("Buff.csv中字段[Attribute4Type]位置不对应"); return(false);
        }
        if (vecLine[31] != "Attribute4Value")
        {
            Ex.Logger.Log("Buff.csv中字段[Attribute4Value]位置不对应"); return(false);
        }
        if (vecLine[32] != "GoBack4")
        {
            Ex.Logger.Log("Buff.csv中字段[GoBack4]位置不对应"); return(false);
        }
        if (vecLine[33] != "MarkType")
        {
            Ex.Logger.Log("Buff.csv中字段[MarkType]位置不对应"); return(false);
        }
        if (vecLine[34] != "SpecialTrigger")
        {
            Ex.Logger.Log("Buff.csv中字段[SpecialTrigger]位置不对应"); return(false);
        }
        if (vecLine[35] != "DispelType")
        {
            Ex.Logger.Log("Buff.csv中字段[DispelType]位置不对应"); return(false);
        }

        while (true)
        {
            vecLine = GameAssist.readCsvLine(strContent, ref contentOffset);
            if ((int)vecLine.Count == 0)
            {
                break;
            }
            if ((int)vecLine.Count != (int)36)
            {
                return(false);
            }
            BuffElement member = new BuffElement();
            member.BuffID          = Convert.ToInt32(vecLine[0]);
            member.Name            = vecLine[1];
            member.Describe        = vecLine[2];
            member.IconShow        = Convert.ToInt32(vecLine[3]);
            member.IconName        = vecLine[4];
            member.EffectType      = Convert.ToInt32(vecLine[5]);
            member.DieEfficient    = Convert.ToInt32(vecLine[6]);
            member.TriggerPos      = Convert.ToInt32(vecLine[7]);
            member.TriggerEffects  = vecLine[8];
            member.SustainPos      = Convert.ToInt32(vecLine[9]);
            member.SustainEffects  = vecLine[10];
            member.MaterialType    = Convert.ToInt32(vecLine[11]);
            member.AblityID        = vecLine[12];
            member.Type            = Convert.ToInt32(vecLine[13]);
            member.Priority        = Convert.ToInt32(vecLine[14]);
            member.ImmuneType      = vecLine[15];
            member.Duration        = Convert.ToInt32(vecLine[16]);
            member.Interval        = Convert.ToInt32(vecLine[17]);
            member.Steer           = Convert.ToInt32(vecLine[18]);
            member.Target          = Convert.ToInt32(vecLine[19]);
            member.UseSkill        = Convert.ToInt32(vecLine[20]);
            member.Attribute1Type  = vecLine[21];
            member.Attribute1Value = vecLine[22];
            member.GoBack1         = Convert.ToInt32(vecLine[23]);
            member.Attribute2Type  = vecLine[24];
            member.Attribute2Value = vecLine[25];
            member.GoBack2         = Convert.ToInt32(vecLine[26]);
            member.Attribute3Type  = vecLine[27];
            member.Attribute3Value = vecLine[28];
            member.GoBack3         = Convert.ToInt32(vecLine[29]);
            member.Attribute4Type  = vecLine[30];
            member.Attribute4Value = vecLine[31];
            member.GoBack4         = Convert.ToInt32(vecLine[32]);
            member.MarkType        = Convert.ToInt32(vecLine[33]);
            member.SpecialTrigger  = Convert.ToInt32(vecLine[34]);
            member.DispelType      = vecLine[35];

            member.IsValidate = true;
            m_vecAllElements.Add(member);
            m_mapElements[member.BuffID] = member;
        }
        return(true);
    }
Ejemplo n.º 14
0
    public bool LoadBin(byte[] binContent)
    {
        m_mapElements.Clear();
        m_vecAllElements.Clear();
        int nCol, nRow;
        int readPos = 0;

        readPos += GameAssist.ReadInt32Variant(binContent, readPos, out nCol);
        readPos += GameAssist.ReadInt32Variant(binContent, readPos, out nRow);
        List <string> vecLine     = new List <string>(nCol);
        List <int>    vecHeadType = new List <int>(nCol);
        string        tmpStr;
        int           tmpInt;

        for (int i = 0; i < nCol; i++)
        {
            readPos += GameAssist.ReadString(binContent, readPos, out tmpStr);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out tmpInt);
            vecLine.Add(tmpStr);
            vecHeadType.Add(tmpInt);
        }
        if (vecLine.Count != 36)
        {
            Ex.Logger.Log("Buff.csv中列数量与生成的代码不匹配!");
            return(false);
        }
        if (vecLine[0] != "BuffID")
        {
            Ex.Logger.Log("Buff.csv中字段[BuffID]位置不对应"); return(false);
        }
        if (vecLine[1] != "Name")
        {
            Ex.Logger.Log("Buff.csv中字段[Name]位置不对应"); return(false);
        }
        if (vecLine[2] != "Describe")
        {
            Ex.Logger.Log("Buff.csv中字段[Describe]位置不对应"); return(false);
        }
        if (vecLine[3] != "IconShow")
        {
            Ex.Logger.Log("Buff.csv中字段[IconShow]位置不对应"); return(false);
        }
        if (vecLine[4] != "IconName")
        {
            Ex.Logger.Log("Buff.csv中字段[IconName]位置不对应"); return(false);
        }
        if (vecLine[5] != "EffectType")
        {
            Ex.Logger.Log("Buff.csv中字段[EffectType]位置不对应"); return(false);
        }
        if (vecLine[6] != "DieEfficient")
        {
            Ex.Logger.Log("Buff.csv中字段[DieEfficient]位置不对应"); return(false);
        }
        if (vecLine[7] != "TriggerPos")
        {
            Ex.Logger.Log("Buff.csv中字段[TriggerPos]位置不对应"); return(false);
        }
        if (vecLine[8] != "TriggerEffects")
        {
            Ex.Logger.Log("Buff.csv中字段[TriggerEffects]位置不对应"); return(false);
        }
        if (vecLine[9] != "SustainPos")
        {
            Ex.Logger.Log("Buff.csv中字段[SustainPos]位置不对应"); return(false);
        }
        if (vecLine[10] != "SustainEffects")
        {
            Ex.Logger.Log("Buff.csv中字段[SustainEffects]位置不对应"); return(false);
        }
        if (vecLine[11] != "MaterialType")
        {
            Ex.Logger.Log("Buff.csv中字段[MaterialType]位置不对应"); return(false);
        }
        if (vecLine[12] != "AblityID")
        {
            Ex.Logger.Log("Buff.csv中字段[AblityID]位置不对应"); return(false);
        }
        if (vecLine[13] != "Type")
        {
            Ex.Logger.Log("Buff.csv中字段[Type]位置不对应"); return(false);
        }
        if (vecLine[14] != "Priority")
        {
            Ex.Logger.Log("Buff.csv中字段[Priority]位置不对应"); return(false);
        }
        if (vecLine[15] != "ImmuneType")
        {
            Ex.Logger.Log("Buff.csv中字段[ImmuneType]位置不对应"); return(false);
        }
        if (vecLine[16] != "Duration")
        {
            Ex.Logger.Log("Buff.csv中字段[Duration]位置不对应"); return(false);
        }
        if (vecLine[17] != "Interval")
        {
            Ex.Logger.Log("Buff.csv中字段[Interval]位置不对应"); return(false);
        }
        if (vecLine[18] != "Steer")
        {
            Ex.Logger.Log("Buff.csv中字段[Steer]位置不对应"); return(false);
        }
        if (vecLine[19] != "Target")
        {
            Ex.Logger.Log("Buff.csv中字段[Target]位置不对应"); return(false);
        }
        if (vecLine[20] != "UseSkill")
        {
            Ex.Logger.Log("Buff.csv中字段[UseSkill]位置不对应"); return(false);
        }
        if (vecLine[21] != "Attribute1Type")
        {
            Ex.Logger.Log("Buff.csv中字段[Attribute1Type]位置不对应"); return(false);
        }
        if (vecLine[22] != "Attribute1Value")
        {
            Ex.Logger.Log("Buff.csv中字段[Attribute1Value]位置不对应"); return(false);
        }
        if (vecLine[23] != "GoBack1")
        {
            Ex.Logger.Log("Buff.csv中字段[GoBack1]位置不对应"); return(false);
        }
        if (vecLine[24] != "Attribute2Type")
        {
            Ex.Logger.Log("Buff.csv中字段[Attribute2Type]位置不对应"); return(false);
        }
        if (vecLine[25] != "Attribute2Value")
        {
            Ex.Logger.Log("Buff.csv中字段[Attribute2Value]位置不对应"); return(false);
        }
        if (vecLine[26] != "GoBack2")
        {
            Ex.Logger.Log("Buff.csv中字段[GoBack2]位置不对应"); return(false);
        }
        if (vecLine[27] != "Attribute3Type")
        {
            Ex.Logger.Log("Buff.csv中字段[Attribute3Type]位置不对应"); return(false);
        }
        if (vecLine[28] != "Attribute3Value")
        {
            Ex.Logger.Log("Buff.csv中字段[Attribute3Value]位置不对应"); return(false);
        }
        if (vecLine[29] != "GoBack3")
        {
            Ex.Logger.Log("Buff.csv中字段[GoBack3]位置不对应"); return(false);
        }
        if (vecLine[30] != "Attribute4Type")
        {
            Ex.Logger.Log("Buff.csv中字段[Attribute4Type]位置不对应"); return(false);
        }
        if (vecLine[31] != "Attribute4Value")
        {
            Ex.Logger.Log("Buff.csv中字段[Attribute4Value]位置不对应"); return(false);
        }
        if (vecLine[32] != "GoBack4")
        {
            Ex.Logger.Log("Buff.csv中字段[GoBack4]位置不对应"); return(false);
        }
        if (vecLine[33] != "MarkType")
        {
            Ex.Logger.Log("Buff.csv中字段[MarkType]位置不对应"); return(false);
        }
        if (vecLine[34] != "SpecialTrigger")
        {
            Ex.Logger.Log("Buff.csv中字段[SpecialTrigger]位置不对应"); return(false);
        }
        if (vecLine[35] != "DispelType")
        {
            Ex.Logger.Log("Buff.csv中字段[DispelType]位置不对应"); return(false);
        }

        for (int i = 0; i < nRow; i++)
        {
            BuffElement member = new BuffElement();
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.BuffID);
            readPos += GameAssist.ReadString(binContent, readPos, out member.Name);
            readPos += GameAssist.ReadString(binContent, readPos, out member.Describe);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.IconShow);
            readPos += GameAssist.ReadString(binContent, readPos, out member.IconName);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.EffectType);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.DieEfficient);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.TriggerPos);
            readPos += GameAssist.ReadString(binContent, readPos, out member.TriggerEffects);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.SustainPos);
            readPos += GameAssist.ReadString(binContent, readPos, out member.SustainEffects);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.MaterialType);
            readPos += GameAssist.ReadString(binContent, readPos, out member.AblityID);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Type);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Priority);
            readPos += GameAssist.ReadString(binContent, readPos, out member.ImmuneType);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Duration);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Interval);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Steer);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Target);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.UseSkill);
            readPos += GameAssist.ReadString(binContent, readPos, out member.Attribute1Type);
            readPos += GameAssist.ReadString(binContent, readPos, out member.Attribute1Value);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.GoBack1);
            readPos += GameAssist.ReadString(binContent, readPos, out member.Attribute2Type);
            readPos += GameAssist.ReadString(binContent, readPos, out member.Attribute2Value);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.GoBack2);
            readPos += GameAssist.ReadString(binContent, readPos, out member.Attribute3Type);
            readPos += GameAssist.ReadString(binContent, readPos, out member.Attribute3Value);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.GoBack3);
            readPos += GameAssist.ReadString(binContent, readPos, out member.Attribute4Type);
            readPos += GameAssist.ReadString(binContent, readPos, out member.Attribute4Value);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.GoBack4);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.MarkType);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.SpecialTrigger);
            readPos += GameAssist.ReadString(binContent, readPos, out member.DispelType);

            member.IsValidate = true;
            m_vecAllElements.Add(member);
            m_mapElements[member.BuffID] = member;
        }
        return(true);
    }
Ejemplo n.º 15
0
    public bool LoadBin(byte[] binContent)
    {
        m_mapElements.Clear();
        m_vecAllElements.Clear();
        int nCol, nRow;
        int readPos = 0;

        readPos += GameAssist.ReadInt32Variant(binContent, readPos, out nCol);
        readPos += GameAssist.ReadInt32Variant(binContent, readPos, out nRow);
        List <string> vecLine     = new List <string>(nCol);
        List <int>    vecHeadType = new List <int>(nCol);
        string        tmpStr;
        int           tmpInt;

        for (int i = 0; i < nCol; i++)
        {
            readPos += GameAssist.ReadString(binContent, readPos, out tmpStr);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out tmpInt);
            vecLine.Add(tmpStr);
            vecHeadType.Add(tmpInt);
        }
        if (vecLine.Count != 5)
        {
            Ex.Logger.Log("Buff.csv中列数量与生成的代码不匹配!");
            return(false);
        }
        if (vecLine[0] != "id")
        {
            Ex.Logger.Log("Buff.csv中字段[id]位置不对应"); return(false);
        }
        if (vecLine[1] != "buffID")
        {
            Ex.Logger.Log("Buff.csv中字段[buffID]位置不对应"); return(false);
        }
        if (vecLine[2] != "overTimed")
        {
            Ex.Logger.Log("Buff.csv中字段[overTimed]位置不对应"); return(false);
        }
        if (vecLine[3] != "continuance")
        {
            Ex.Logger.Log("Buff.csv中字段[continuance]位置不对应"); return(false);
        }
        if (vecLine[4] != "pars")
        {
            Ex.Logger.Log("Buff.csv中字段[pars]位置不对应"); return(false);
        }

        for (int i = 0; i < nRow; i++)
        {
            BuffElement member = new BuffElement();
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.id);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.buffID);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.overTimed);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.continuance);
            readPos += GameAssist.ReadString(binContent, readPos, out member.pars);

            member.IsValidate = true;
            m_vecAllElements.Add(member);
            m_mapElements[member.id] = member;
        }
        return(true);
    }
Ejemplo n.º 16
0
	void ReleaseResurrectionPenalty(BuffElement _element)
	{
		if( m_Owner.FsmType == eFsmType.PLAYER && _element.skillIdx == 19999)
		{
			m_PenaltyDisplayed = false;
			
			m_Owner.HandleMessage( new Msg_DeathPenaltyIndicate( false));
		}
	}
Ejemplo n.º 17
0
	public void AddBuff(body2_SC_CHAR_BUFF _buff)
	{
		#region - init dictionary -
		if(m_dicBuff.ContainsKey(_buff.nSkillTableIdx) == false)
			m_dicBuff.Add(_buff.nSkillTableIdx, new Dictionary<int, BuffElement>());
		
		if(m_dicBuff[_buff.nSkillTableIdx].ContainsKey(_buff.nPotencyIdx) == true)
		{
			m_dicBuff[_buff.nSkillTableIdx][_buff.nPotencyIdx].Release();
			m_dicBuff[_buff.nSkillTableIdx].Remove(_buff.nPotencyIdx);
		}
		#endregion
		
		BuffElement buff = new BuffElement(_buff, this, false);
		
		m_dicBuff[_buff.nSkillTableIdx].Add(_buff.nPotencyIdx, buff);
		m_mdicBuff.Add(_buff.eType, buff);
		
		if(m_ModelLoaded == true)
			buff.Generate();
		
		ResurrectionPenaltyProc( buff);
	}
Ejemplo n.º 18
0
 private BuffTable()
 {
     m_mapElements    = new Dictionary <int, BuffElement>();
     m_emptyItem      = new BuffElement();
     m_vecAllElements = new List <BuffElement>();
 }
Ejemplo n.º 19
0
    public bool LoadCsv(string strContent)
    {
        if (strContent.Length == 0)
        {
            return(false);
        }
        m_mapElements.Clear();
        m_vecAllElements.Clear();
        int           contentOffset = 0;
        List <string> vecLine;

        vecLine = GameAssist.readCsvLine(strContent, ref contentOffset);
        if (vecLine.Count != 24)
        {
            Debug.Log("Buff.csv中列数量与生成的代码不匹配!");
            return(false);
        }
        if (vecLine[0] != "BuffID")
        {
            Debug.Log("Buff.csv中字段[BuffID]位置不对应"); return(false);
        }
        if (vecLine[1] != "Name")
        {
            Debug.Log("Buff.csv中字段[Name]位置不对应"); return(false);
        }
        if (vecLine[2] != "Describe")
        {
            Debug.Log("Buff.csv中字段[Describe]位置不对应"); return(false);
        }
        if (vecLine[3] != "IconShow")
        {
            Debug.Log("Buff.csv中字段[IconShow]位置不对应"); return(false);
        }
        if (vecLine[4] != "IconName")
        {
            Debug.Log("Buff.csv中字段[IconName]位置不对应"); return(false);
        }
        if (vecLine[5] != "DieEfficient")
        {
            Debug.Log("Buff.csv中字段[DieEfficient]位置不对应"); return(false);
        }
        if (vecLine[6] != "TriggerPos")
        {
            Debug.Log("Buff.csv中字段[TriggerPos]位置不对应"); return(false);
        }
        if (vecLine[7] != "TriggerEffects")
        {
            Debug.Log("Buff.csv中字段[TriggerEffects]位置不对应"); return(false);
        }
        if (vecLine[8] != "SustainPos")
        {
            Debug.Log("Buff.csv中字段[SustainPos]位置不对应"); return(false);
        }
        if (vecLine[9] != "SustainEffects")
        {
            Debug.Log("Buff.csv中字段[SustainEffects]位置不对应"); return(false);
        }
        if (vecLine[10] != "AblityID")
        {
            Debug.Log("Buff.csv中字段[AblityID]位置不对应"); return(false);
        }
        if (vecLine[11] != "Type")
        {
            Debug.Log("Buff.csv中字段[Type]位置不对应"); return(false);
        }
        if (vecLine[12] != "ImmuneType")
        {
            Debug.Log("Buff.csv中字段[ImmuneType]位置不对应"); return(false);
        }
        if (vecLine[13] != "Duration")
        {
            Debug.Log("Buff.csv中字段[Duration]位置不对应"); return(false);
        }
        if (vecLine[14] != "Interval")
        {
            Debug.Log("Buff.csv中字段[Interval]位置不对应"); return(false);
        }
        if (vecLine[15] != "RestoreHealth")
        {
            Debug.Log("Buff.csv中字段[RestoreHealth]位置不对应"); return(false);
        }
        if (vecLine[16] != "RestorePower")
        {
            Debug.Log("Buff.csv中字段[RestorePower]位置不对应"); return(false);
        }
        if (vecLine[17] != "UseSkill")
        {
            Debug.Log("Buff.csv中字段[UseSkill]位置不对应"); return(false);
        }
        if (vecLine[18] != "Speed")
        {
            Debug.Log("Buff.csv中字段[Speed]位置不对应"); return(false);
        }
        if (vecLine[19] != "HitFrequency")
        {
            Debug.Log("Buff.csv中字段[HitFrequency]位置不对应"); return(false);
        }
        if (vecLine[20] != "Attribute1Type")
        {
            Debug.Log("Buff.csv中字段[Attribute1Type]位置不对应"); return(false);
        }
        if (vecLine[21] != "Attribute1Value")
        {
            Debug.Log("Buff.csv中字段[Attribute1Value]位置不对应"); return(false);
        }
        if (vecLine[22] != "Attribute2Type")
        {
            Debug.Log("Buff.csv中字段[Attribute2Type]位置不对应"); return(false);
        }
        if (vecLine[23] != "Attribute2Value")
        {
            Debug.Log("Buff.csv中字段[Attribute2Value]位置不对应"); return(false);
        }

        while (true)
        {
            vecLine = GameAssist.readCsvLine(strContent, ref contentOffset);
            if ((int)vecLine.Count == 0)
            {
                break;
            }
            if ((int)vecLine.Count != (int)24)
            {
                return(false);
            }
            BuffElement member = new BuffElement();
            member.BuffID          = Convert.ToInt32(vecLine[0]);
            member.Name            = vecLine[1];
            member.Describe        = vecLine[2];
            member.IconShow        = Convert.ToInt32(vecLine[3]);
            member.IconName        = vecLine[4];
            member.DieEfficient    = Convert.ToInt32(vecLine[5]);
            member.TriggerPos      = vecLine[6];
            member.TriggerEffects  = vecLine[7];
            member.SustainPos      = vecLine[8];
            member.SustainEffects  = vecLine[9];
            member.AblityID        = vecLine[10];
            member.Type            = Convert.ToInt32(vecLine[11]);
            member.ImmuneType      = vecLine[12];
            member.Duration        = Convert.ToInt32(vecLine[13]);
            member.Interval        = Convert.ToInt32(vecLine[14]);
            member.RestoreHealth   = Convert.ToInt32(vecLine[15]);
            member.RestorePower    = Convert.ToInt32(vecLine[16]);
            member.UseSkill        = Convert.ToInt32(vecLine[17]);
            member.Speed           = Convert.ToInt32(vecLine[18]);
            member.HitFrequency    = Convert.ToInt32(vecLine[19]);
            member.Attribute1Type  = Convert.ToInt32(vecLine[20]);
            member.Attribute1Value = Convert.ToInt32(vecLine[21]);
            member.Attribute2Type  = Convert.ToInt32(vecLine[22]);
            member.Attribute2Value = Convert.ToInt32(vecLine[23]);

            member.IsValidate = true;
            m_vecAllElements.Add(member);
            m_mapElements[member.BuffID] = member;
        }
        return(true);
    }