Beispiel #1
0
        public virtual bool OnLeaveCombat(Object mob, object args)
        {
            // save statistics
            InstanceService.SaveDeathCountPerBoss(Instance.ZoneID + ":" + Instance.ID, mob.GetInstanceBossSpawn(), PlayerDeathsCount);

            if (!mob.GetInstanceBossSpawn().IsDead)
            {
                // save statistics
                InstanceService.SaveAttemptsPerBoss(Instance.ZoneID + ":" + Instance.ID, this, 1);

                if (InstanceGroupSpawnId > 0)
                {
                    Instance.BossRespawnInstanceGroup(InstanceGroupSpawnId);
                }
            }
            else
            {
                PlayerDeathsCount = 0;

                // save statistics
                InstanceService.SaveTtkPerBoss(Instance.ZoneID + ":" + Instance.ID, this, BossTimer.Elapsed);
            }
            // Want to keep the add list on the boss instance.
            //// reset add list
            //AddDictionary = new List<Creature>();

            // reset all Modify Scalers
            ModifyDmgHealScaler = 1f;
            List <Player> plrs = GetPlayersInRange(300, false);

            foreach (Player plr in plrs)
            {
                plr.ModifyDmgHealScaler = 1f;
            }
            // reset the outgoing damage of the boss
            try
            {
                StsInterface.RemoveBonusMultiplier(GameData.Stats.OutgoingDamagePercent, 1.0f, BuffClass.Standard);
            }
            catch (Exception e)
            {
                Log.Error("Exception", e.Message + "\r\n" + e.StackTrace);
            }

            if (BossTimer != null)
            {
                BossTimer.Reset();
            }

            return(false);
        }