public SpellAttachedEffectWatcher(ISpellInstance xEn, IEffect xEffect)
		{
			this.xEn = xEn;
			this.xEffect = xEffect;
		}
Beispiel #2
0
 public void SetPlayer(PlayerEntity xEntity, ISpellInstance xTornado)
 {
     if (Utility.IsWithinRange((int)xEntity.xRenderComponent.iActiveAnimation, 2600, 2603))
     {
         this.bToBeDestroyed = true;
         return;
     }
     this.v2ShootDir = Utility.RandomizeVector2Direction(CAS.RandomInLogic);
     xEntity.xRenderComponent.SwitchAnimation((ushort)(2600 + (int)xEntity.byAnimationDirection), Animation.CancelOptions.IgnoreIfPlaying);
     this.xStuckPlayer = xEntity;
     this.xTheTornado = xTornado;
     this.xRenderComponent.xTransform = this.xStuckPlayer.xTransform;
     this.xRenderComponent.fVirtualHeight = this.xStuckPlayer.xRenderComponent.fVirtualHeight + 2f;
     xEntity.xCollisionComponent.xMovementCollider.fWeight = 1000f;
     xEntity.bShieldUp = false;
     xEntity.bIsPushing = false;
     if (xEntity == Program.game.xLocalPlayer.xEntity)
     {
         Program.game.xStolenInput = this;
     }
     if (CAS.NetworkRole == NetworkHelperInterface.NetworkRole.Server)
     {
         NetOutgoingMessage om = Program.game._Network_CreateMessage();
         om.Write(255);
         om.Write(16);
         om.Write(this.iID);
         om.Write(xEntity.Owner.iConnectionIdentifier);
         om.Write(xTornado.iID);
         om.Write(this.v2ShootDir.X);
         om.Write(this.v2ShootDir.Y);
         Program.game._Network_SendMessage(om, true);
     }
 }