예제 #1
0
        public void AddBuff(int caster, Engines.Spells.SpellBuff buff, int spriteID, int value, bool sendPacket, Engines.Spells.SpellEffect effect)
        {
            this.Buffs.Add(buff);
            buff.ApplyBuff();

            if (sendPacket)
            {
                this.Team.Fight.Send("GA;" + spriteID + ";" + caster + ";" + ID + "," + value + "," + buff.Duration);

                string packetShowedBuffInStatusBar = "GIE" + (int)effect.Effect;
                packetShowedBuffInStatusBar += ";" + this.ID;
                packetShowedBuffInStatusBar += ";" + effect.Value.ToString();
                packetShowedBuffInStatusBar += ";" + (effect.Value2.ToString() != "-1" ? effect.Value2.ToString() : "").ToString();
                packetShowedBuffInStatusBar += ";" + (effect.Value3.ToString() != "-1" ? effect.Value3.ToString() : "").ToString();
                packetShowedBuffInStatusBar += ";" + (effect.Chance.ToString() != "-1" ? effect.Chance.ToString() : "").ToString();
                packetShowedBuffInStatusBar += ";" + (effect.Turn > 0 ? effect.Turn.ToString() : "").ToString();
                packetShowedBuffInStatusBar += ";" + effect.Engine.Spell.ID.ToString();

                this.Team.Fight.Send(packetShowedBuffInStatusBar);
            }
        }