Exemplo n.º 1
0
        //广播地面火球效果
        private void PosGuideBefore(ObjCharacter caster, ObjPlayer target, Vector2 pos, int d)
        {
            //var mTable = Table.GetSkill(5150);
            if (target == null)
            {
                return;
            }
            var buffId   = 1060;
            var replyMsg = new BuffResultMsg();
            var temp     = new BuffResult
            {
                Type       = BuffType.HT_EFFECT,
                BuffTypeId = buffId,
                ViewTime   = Extension.AddTimeDiffToNet(d)
            };

            temp.Param.Add(5150);
            temp.TargetObjId = target.ObjId;
            temp.Param.Add((int)(pos.X * 100));
            temp.Param.Add((int)(pos.Y * 100));
            temp.Param.Add((int)(caster.GetDirection().X *1000));
            temp.Param.Add((int)(caster.GetDirection().Y *1000));
            temp.Param.Add(1500); //mTable.CastParam[1]
            replyMsg.buff.Add(temp);
            target.BroadcastBuffList(replyMsg);
            SceneServerControl.Timer.CreateTrigger(DateTime.Now.AddMilliseconds(1400 + d), () => { FireCast(pos); });
            if (MyRandom.Random(10000) < 5000)
            {
                DropItem(2, MyRandom.Random(MinGold, MaxGold), pos);

                var max = pos2.Count;
                if (IsInspired(target))
                {
                    max = Math.Max(GoldNumInspireMax, 0);
                }
                else
                {
                    max = Math.Max(GoldNumMax, 0);
                }
                // 修改掉落的堆数 走配置  跟是否鼓舞有关系
                oldList = pos2.RandRange(0, max);
                for (int i = 0; i < oldList.Count; ++i)
                {
                    DropItem(2, MyRandom.Random(MinGold, MaxGold), oldList[i]);
                }
            }
        }