AddBuff() public method

public AddBuff ( BuffInfo b ) : void
b BuffInfo
return void
示例#1
0
        public static void BackToBackBonus( PlayerMobile pm, bool AddBonus )
        {
            if( AddBonus )
            {
                pm.BackToBack = true;
                pm.RemoveBuff( BuffIcon.ArcaneEmpowerment );
                string msg = "+" + pm.Feats.GetFeatLevel(FeatList.BackToBack)*10 + " defense chance increase<BR>";
                if ( pm.Feats.GetFeatLevel(FeatList.BackToBack) == 1 )
                    msg += "No attacks of opportunity (back)";
                else if ( pm.Feats.GetFeatLevel(FeatList.BackToBack) == 2 )
                    msg += "No attacks of opportunity (back, back flank)";
                else if ( pm.Feats.GetFeatLevel(FeatList.BackToBack) >= 3 )
                    msg += "No attacks of opportunity";
                pm.AddBuff( new BuffInfo(
                        BuffIcon.ArcaneEmpowerment, 1041600, 1060847, "<CENTER>Back To Back\t<BR>" + msg, false
                    ) );
            }

            else
            {
                if( pm.BackToBack )
                {
                    pm.BackToBack = false;
                    pm.RemoveBuff( BuffIcon.ArcaneEmpowerment );
                }
            }
        }