Jump to content
  • 0

Question

Posted

Hi ,

 

The issue is that if a bishop uses mass resurrection and the clan member is dead and also has a pet dead mass resurrection resurrect the pet first

 

how can i do it to res the character fist?

 

       some part of the code , any ideas?

        for (L2Character cha : targetToRes)
            if (activeChar instanceof L2PcInstance)
            {
                if (cha instanceof L2PcInstance)
                    ((L2PcInstance) cha).reviveRequest((L2PcInstance) activeChar, skill, false);
                else if (cha instanceof L2PetInstance)
                    ((L2PetInstance) cha).getOwner().reviveRequest((L2PcInstance) activeChar, skill, true);
            }
            else
            {
                DecayTaskManager.getInstance().cancelDecayTask(cha);
                cha.doRevive(Formulas.calculateSkillResurrectRestorePercent(skill.getPower(), activeChar.getWIT()));
            }
    }

8 answers to this question

Recommended Posts

  • 0
Posted

on l2skill

            if (activeChar instanceof L2Playable)
                {
                    final L2PcInstance player = activeChar.getActingPlayer();
                    
                    if (player == null)
                        return _emptyTargetList;
                    
                    if (player.getOlympiadManagement().isInOlympiadMode())
                        return new L2Character[] { player };
                    
                    final boolean isCorpseType = targetType == SkillTargetType.TARGET_CORPSE_CLAN;
                    
                    if (!isCorpseType)
                    {
                        if (onlyFirst)
                            return new L2Character[] { player };
                        
                        targetList.add(player);
                    }
                    
                    final int radius = getSkillRadius();
                    final L2Clan clan = player.getClan();
                    
                    if (addSummon(activeChar, player, radius, isCorpseType))
                        targetList.add(player.getPet());
                    
                    if (clan != null)
                    {
                        L2PcInstance obj;
                        // Get Clan Members
                        for (L2ClanMember member : clan.getMembers())
                        {
                            obj = member.getPlayerInstance();
                            
                            if (obj == null || obj == player)
                                continue;
                            
                            if (player.isInDuel())
                            {
                                if (player.getDuelId() != obj.getDuelId())
                                    continue;
                                if (player.isInParty() && obj.isInParty() && player.getParty().getPartyLeaderOID() != obj.getParty().getPartyLeaderOID())
                                    continue;
                            }
                            
                            // Don't add this target if this is a Pc->Pc pvp casting and pvp condition not met
                            if (!player.checkPvpSkill(obj, this))
                                continue;
                            
                            if (!TvTEvent.checkForTvTSkill(player, obj, this))
                                continue;

                            if (!TvTCustomEvent.checkForTvTSkill(player, obj, this))
                                continue;
                            
                            if (!onlyFirst && addSummon(activeChar, obj, radius, isCorpseType))
                                targetList.add(obj.getPet());
                            
                            if (!addCharacter(activeChar, obj, radius, isCorpseType))
                                continue;
                            
                            if (isCorpseType)
                            {
                                if (getSkillType() == L2SkillType.RESURRECT)
                                {
                                    // check target is not in a active siege zone
                                    if (obj.isInsideZone(L2Character.ZONE_SIEGE) && !obj.isInSiege())
                                        continue;
                                }
                            }
                            
                            if (onlyFirst)
                                return new L2Character[] { obj };
                            
                            targetList.add(obj);
  • 0
Posted

I just need mass resurrection to rez First the Character then the Pet because with the code above if both char/pet are dead and clan member uses mass resurrection - the box about accept resurrection is for pet so pet ressurected and characters remained dead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..