예제 #1
0
파일: Projectile.cs 프로젝트: RC1140/mooege
        private bool _spawned;  // using my own spawn flag cause Actor.Spawned isn't being used right now

        public Projectile(PowerContext context, int actorSNO, Vector3D position)
            : base(context.World, actorSNO)
        {
            this.Field2 = 0x8;
            this.Field7 = 0x00000001;  // TODO: test if this is necessary

            if (this.Scale == 0f)
                this.Scale = 1.00f;

            this.Context = context;
            this.Position = new Vector3D(position);
            // offset position by mpq collision data
            this.Position.Z += this.ActorData.Cylinder.Ax1 - this.ActorData.Cylinder.Position.Z;
            // 2 second default timeout for projectiles
            this.Timeout = new SecondsTickTimer(context.World.Game, 2f);

            // copy in important effect params from user
            this.Attributes[GameAttribute.Rune_A, context.PowerSNO] = context.User.Attributes[GameAttribute.Rune_A, context.PowerSNO];
            this.Attributes[GameAttribute.Rune_B, context.PowerSNO] = context.User.Attributes[GameAttribute.Rune_B, context.PowerSNO];
            this.Attributes[GameAttribute.Rune_C, context.PowerSNO] = context.User.Attributes[GameAttribute.Rune_C, context.PowerSNO];
            this.Attributes[GameAttribute.Rune_D, context.PowerSNO] = context.User.Attributes[GameAttribute.Rune_D, context.PowerSNO];
            this.Attributes[GameAttribute.Rune_E, context.PowerSNO] = context.User.Attributes[GameAttribute.Rune_E, context.PowerSNO];

            _prevUpdatePosition = null;
            _mover = new ActorMover(this);
            _spawned = false;
        }
예제 #2
0
파일: Projectile.cs 프로젝트: wlasser/D3Emu
        private bool _spawned;  // using my own spawn flag cause Actor.Spawned isn't being used right now

        public Projectile(PowerContext context, int actorSNO, Vector3D position)
            : base(context.World, actorSNO)
        {
            this.Field2 = 0x8;
            this.Field7 = 0x00000001;  // TODO: test if this is necessary

            if (this.Scale == 0f)
            {
                this.Scale = 1.00f;
            }

            this.Context  = context;
            this.Position = new Vector3D(position);
            // offset position by mpq collision data
            this.Position.Z += this.ActorData.Cylinder.Ax1 - this.ActorData.Cylinder.Position.Z;
            // 2 second default timeout for projectiles
            this.Timeout = new SecondsTickTimer(context.World.Game, 2f);

            // copy in important effect params from user
            this.Attributes[GameAttribute.Rune_A, context.PowerSNO] = context.User.Attributes[GameAttribute.Rune_A, context.PowerSNO];
            this.Attributes[GameAttribute.Rune_B, context.PowerSNO] = context.User.Attributes[GameAttribute.Rune_B, context.PowerSNO];
            this.Attributes[GameAttribute.Rune_C, context.PowerSNO] = context.User.Attributes[GameAttribute.Rune_C, context.PowerSNO];
            this.Attributes[GameAttribute.Rune_D, context.PowerSNO] = context.User.Attributes[GameAttribute.Rune_D, context.PowerSNO];
            this.Attributes[GameAttribute.Rune_E, context.PowerSNO] = context.User.Attributes[GameAttribute.Rune_E, context.PowerSNO];

            _prevUpdatePosition = null;
            _mover   = new ActorMover(this);
            _spawned = false;
        }
예제 #3
0
 public PowerAction(Actor owner, int powerSNO)
     : base(owner)
 {
     _power = PowerLoader.CreateImplementationForPowerSNO(powerSNO);
     _power.User = owner;
     _powerRan = false;
     _baseAttackRadius = this.Owner.ActorData.Cylinder.Ax2 + _power.EvalTag(PowerKeys.AttackRadius) + 1.5f;
     _ownerMover = new ActorMover(owner);
 }