Exemplo n.º 1
0
 public override void PetLeaveBattleField(BattleAction_PetLeaveField data, bool isServerData)
 {
     if (data.petId != this.owner.ID)
     {
         return;
     }
     if (this.owner.IsDead)
     {
         return;
     }
     if (this.owner.IsClientDominate)
     {
         ExitBattleFieldAnnouncer.Announce(this.owner);
     }
     BattleBlackboard.Instance.SetPetCountDown(this.owner.OwnerListIdx, new KeyValuePair <float, DateTime>(0f, DateTime.get_Now()));
     if (this.owner.Actor)
     {
         this.owner.Actor.EndAnimationResetToIdle();
         if (this.owner.IsFighting)
         {
             FXManager.Instance.PlayFX(96, null, this.owner.Actor.FixTransform.get_position(), this.owner.Actor.FixTransform.get_rotation(), 1f, 1f, 0, false, 0, null, null, 1f, FXClassification.Normal);
         }
     }
     if (!this.owner.IsClientCreate && this.owner.IsClientDrive)
     {
         LocalBattleHandler.Instance.AppClearBuff(this.owner.ID);
     }
     CommandCenter.ExecuteCommand(this.owner.Actor.FixTransform, new RemoveAllFXCmd());
     this.owner.IsFighting = false;
 }
    public static void SendPetLeaveBattleField(long petID)
    {
        BattleAction_PetLeaveField battleAction_PetLeaveField = new BattleAction_PetLeaveField();

        battleAction_PetLeaveField.petId = petID;
        EventDispatcher.Broadcast <BattleAction_PetLeaveField, bool>(BattleActionEvent.PetLeaveBattleField, battleAction_PetLeaveField, false);
    }
Exemplo n.º 3
0
 public virtual void PetLeaveBattleField(BattleAction_PetLeaveField data, bool isServerData)
 {
 }