Ignore:
Timestamp:
Jan 16, 2012 7:56:19 AM (4 months ago)
Author:
MELERIX
Message:

STABLE: Sync with BETA [8629]

Location:
trunk/L2J_DataPack
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/L2J_DataPack

  • trunk/L2J_DataPack/dist/game/data/scripts/ai/group_template/Monastery.java

    r8406 r8630  
    3838public class Monastery extends L2AttackableAIScript 
    3939{ 
    40         static final int[] mobs1 = {22124, 22125, 22126, 22127, 22129}; 
    41         static final int[] mobs2 = {22134, 22135}; 
     40        private static final int[] mobs1 = 
     41        { 
     42                22124, 22125, 22126, 22127, 22129 
     43        }; 
     44        private static final int[] mobs2 = 
     45        { 
     46                22134, 22135 
     47        }; 
    4248         
    43         static final NpcStringId[] messages = { 
     49        private static final NpcStringId[] messages = 
     50        { 
    4451                NpcStringId.YOU_CANNOT_CARRY_A_WEAPON_WITHOUT_AUTHORIZATION, 
    4552                NpcStringId.S1_WHY_WOULD_YOU_CHOOSE_THE_PATH_OF_DARKNESS, 
    4653                NpcStringId.S1_HOW_DARE_YOU_DEFY_THE_WILL_OF_EINHASAD 
    4754        }; 
     55         
    4856        public Monastery(int questId, String name, String descr) 
    4957        { 
     
    5664        public String onAggroRangeEnter(L2Npc npc, L2PcInstance player, boolean isPet) 
    5765        { 
    58                 if (Util.contains(mobs1,npc.getNpcId()) && !npc.isInCombat() && npc.getTarget() == null) 
     66                if (Util.contains(mobs1, npc.getNpcId()) && !npc.isInCombat() && npc.getTarget() == null) 
    5967                { 
    6068                        if (player.getActiveWeaponInstance() != null) 
     
    6775                                        case 22126: 
    6876                                        { 
    69                                                 L2Skill skill = SkillTable.getInstance().getInfo(4589,8); 
     77                                                L2Skill skill = SkillTable.getInstance().getInfo(4589, 8); 
    7078                                                npc.doCast(skill); 
    7179                                                break; 
     
    8088                                } 
    8189                        } 
    82                         else if (((L2Attackable)npc).getMostHated() == null) 
     90                        else if (((L2Attackable) npc).getMostHated() == null) 
    8391                                return null; 
    8492                } 
     
    8997        public String onSkillSee(L2Npc npc, L2PcInstance caster, L2Skill skill, L2Object[] targets, boolean isPet) 
    9098        { 
    91                 if (Util.contains(mobs2,npc.getNpcId())) 
     99                if (Util.contains(mobs2, npc.getNpcId())) 
    92100                { 
    93101                        if (skill.getSkillType() == L2SkillType.AGGDAMAGE && targets.length != 0) 
     
    97105                                        if (obj.equals(npc)) 
    98106                                        { 
    99                                                 NpcSay packet = new NpcSay(npc.getObjectId(), 0, npc.getNpcId(), messages[Rnd.get(2)+1]); 
     107                                                NpcSay packet = new NpcSay(npc.getObjectId(), 0, npc.getNpcId(), messages[Rnd.get(2) + 1]); 
    100108                                                packet.addStringParameter(caster.getName()); 
    101109                                                npc.broadcastPacket(packet); 
     
    113121        public String onSpawn(L2Npc npc) 
    114122        { 
    115                 if (Util.contains(mobs1,npc.getNpcId())) 
     123                if (Util.contains(mobs1, npc.getNpcId())) 
    116124                { 
    117125                        FastList<L2Playable> result = new FastList<L2Playable>(); 
     
    141149                                                        case 22127: 
    142150                                                        { 
    143                                                                 L2Skill skill = SkillTable.getInstance().getInfo(4589,8); 
     151                                                                L2Skill skill = SkillTable.getInstance().getInfo(4589, 8); 
    144152                                                                npc.doCast(skill); 
    145153                                                                break; 
     
    163171        public String onSpellFinished(L2Npc npc, L2PcInstance player, L2Skill skill) 
    164172        { 
    165                 if (Util.contains(mobs1,npc.getNpcId()) && skill.getId() == 4589) 
     173                if (Util.contains(mobs1, npc.getNpcId()) && skill.getId() == 4589) 
    166174                { 
    167175                        npc.setIsRunning(true); 
Note: See TracChangeset for help on using the changeset viewer.