Ejemplo n.º 1
0
 protected override void DeathIncome(Units attacker)
 {
     UtilManager.Instance.AddDeathGold(attacker, this);
     UtilManager.Instance.AddExp(attacker, this);
     UtilManager.Instance.UpdateKillState(attacker, this);
     CreepHelper.AddBuff(this._creepId, attacker);
 }
Ejemplo n.º 2
0
 public static void DoMonsterPseudoDeath(Units inMonsterUnit, Units inAttackerUnit, int inOldGroupType, int inNewGroupType, float inHpVal, float inMpVal, string inNpcId, string inBattleMonsterCreepId)
 {
     if (inMonsterUnit == null)
     {
         return;
     }
     inMonsterUnit.PseudoDeath(inOldGroupType, inNewGroupType, inHpVal, inMpVal, inNpcId, inBattleMonsterCreepId, inAttackerUnit);
     CreepHelper.TryShowCreepSpecialEffect(inBattleMonsterCreepId, inMonsterUnit);
     CreepHelper.TryShowCreepUIMessageInfo(inAttackerUnit, inMonsterUnit, inBattleMonsterCreepId, inOldGroupType);
     Singleton <MiniMapView> .Instance.ForceUpdateMapItemByUnits(inMonsterUnit, true);
 }
Ejemplo n.º 3
0
    private bool NeutralMonsterDeath(Units attacker)
    {
        if (base.hp > 0f)
        {
            return(false);
        }
        if (Singleton <PvpManager> .Instance.IsInPvp)
        {
            return(false);
        }
        if (this.neutralRelive)
        {
            return(false);
        }
        if (base.teamType != 2)
        {
            return(false);
        }
        SysBattleMonsterCreepVo reliveCreepVo = CreepSpawner.GetReliveCreepVo(this.unique_id);

        if (reliveCreepVo == null)
        {
            return(false);
        }
        if (StringUtils.CheckValid(reliveCreepVo.summons2))
        {
            SysBattleMonsterCreepVo dataById = BaseDataMgr.instance.GetDataById <SysBattleMonsterCreepVo>(reliveCreepVo.summons2);
            string[] stringValue             = StringUtils.GetStringValue(dataById.monsters, '|');
            base.ChangeTeam((TeamType)attacker.teamType);
            if (Singleton <CreepSpawner> .Instance != null)
            {
                Singleton <CreepSpawner> .Instance.AddNPCId(stringValue[0]);
            }
            this.neutralRelive = true;
            MapManager.Instance.ReliveNeutralMonster(this, stringValue[0], attacker.teamType);
            string fxName = CreepHelper.GetFxName(this._creepId, CreepFxType.creep_under_control);
            if (fxName != null)
            {
                ActionManager.PlayEffect(fxName, this, null, null, true, string.Empty, null);
            }
            return(true);
        }
        return(false);
    }
Ejemplo n.º 4
0
 public override void RealDeath(Units attacker)
 {
     CreepHelper.TryShowCreepUIMessageInfo(attacker, this, this.GetBattleMonsterCreepId(), base.teamType);
     base.TryHideNewbieHintObj();
     base.RealDeath(attacker);
 }