Jump to content
  • 0

Mass Res Problem


GameBlonD

Question

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()));
            }
    }
Link to comment
Share on other sites

8 answers to this question

Recommended Posts

  • 0

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);
Link to comment
Share on other sites

  • 0

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...