Skip to content

Mass Res Problem

Featured Replies

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()));
            }
    }

Try to change the code order, first pet then player. Looks like pet 'override' character.

  • Author

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);

As i understand, he wants what pet will be ressurect if master character has accepted the ressurection from a clan member.

  • Author

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.