Changeset 2284

Show
Ignore:
Timestamp:
07/15/08 17:52:18 (3 months ago)
Author:
DrHouse
Message:

Fix for Charm of Courage benefits after dying. (Since effect is removed after dying, blessing status was bypassed)

Fixes #2829 , thanks _DS_ for reporting

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/L2_GameServer/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java

    r2283 r2284  
    46704670        public boolean doDie(L2Character killer) 
    46714671        { 
     4672                /* Since L2Character.doDie() calls stopAllEffects(), which includes 
     4673                 * setting charm of curage and other blessings as false, this stores value  
     4674                 * before calling superclass method 
     4675                 */ 
     4676                boolean charmOfCourage = getCharmOfCourage(); 
     4677                 
    46724678                // Kill the L2PcInstance 
    46734679                if (!super.doDie(killer)) 
     
    47374743                                                        // Penalty is lower if the player is at war with the pk (war has to be declared) 
    47384744                                                        if (getSkillLevel(L2Skill.SKILL_LUCKY) < 0 || getStat().getLevel() > 9) 
    4739                                                                 deathPenalty(pk != null && getClan() != null && getClan().isAtWarWith(pk.getClanId()), pk != null);                                                                            
     4745                                                                deathPenalty(pk != null && getClan() != null && getClan().isAtWarWith(pk.getClanId()), pk != null, charmOfCourage);                                                                            
    47404746 
    47414747                                                } else 
     
    51395145         * 
    51405146         */ 
    5141         public void deathPenalty(boolean atwar, boolean killed_by_pc
     5147        public void deathPenalty(boolean atwar, boolean killed_by_pc, boolean charmOfCourage
    51425148        { 
    51435149                // TODO Need Correct Penalty 
     
    52285234                setExpBeforeDeath(getExp()); 
    52295235 
    5230                 if(getCharmOfCourage()
     5236                if(charmOfCourage
    52315237                { 
    52325238                    if (getSiegeState() > 0 && isInsideZone(ZONE_SIEGE)) 
     
    52395245                // Set the new Experience value of the L2PcInstance 
    52405246                getStat().addExp(-lostExp); 
     5247        } 
     5248         
     5249        public void deathPenalty(boolean atwar, boolean killed_by_pc) 
     5250        { 
     5251                deathPenalty(atwar, killed_by_pc, getCharmOfCourage()); 
    52415252        } 
    52425253