- Timestamp:
- Jan 16, 2012 7:56:19 AM (4 months ago)
- Location:
- trunk/L2J_DataPack
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
dist/game/data/scripts/ai/group_template/SummonMinions.java (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/L2J_DataPack
- Property svn:mergeinfo changed
/branches/unstable/L2J_DataPack_BETA merged: 8407-8426,8428-8480,8482-8491,8493-8588,8590-8629
- Property svn:mergeinfo changed
-
trunk/L2J_DataPack/dist/game/data/scripts/ai/group_template/SummonMinions.java
r8406 r8630 15 15 package ai.group_template; 16 16 17 import gnu.trove. TIntHashSet;18 import gnu.trove. TIntObjectHashMap;17 import gnu.trove.map.hash.TIntObjectHashMap; 18 import gnu.trove.set.hash.TIntHashSet; 19 19 import javolution.util.FastList; 20 20 import javolution.util.FastMap; … … 31 31 { 32 32 private static int HasSpawned; 33 private static TIntHashSet myTrackingSet = new TIntHashSet(); // Used to track instances of npcs34 private FastMap<Integer, FastList<L2PcInstance>> _attackersList = new FastMap<Integer, FastList<L2PcInstance>>().shared();33 private static TIntHashSet myTrackingSet = new TIntHashSet(); // Used to track instances of npcs 34 private final FastMap<Integer, FastList<L2PcInstance>> _attackersList = new FastMap<Integer, FastList<L2PcInstance>>().shared(); 35 35 private static final TIntObjectHashMap<int[]> MINIONS = new TIntObjectHashMap<int[]>(); 36 36 37 37 static 38 38 { 39 //@formatter:off 39 40 MINIONS.put(20767,new int[]{20768,20769,20770}); //Timak Orc Troop 40 41 //MINIONS.put(22030,new Integer[]{22045,22047,22048}); //Ragna Orc Shaman … … 55 56 MINIONS.put(22266,new int[]{18366,18366}); //Pythia 56 57 MINIONS.put(22774,new int[]{22768,22768}); // Tanta Lizardman Summoner 58 //@formatter:on 57 59 } 58 60 … … 60 62 { 61 63 super(questId, name, descr); 62 int[] temp = 63 { 64 20767, 21524, 21531, 21539, 22257, 22258, 22259, 22260, 22261, 22262, 22263, 22264, 22265, 22266, 22774 65 }; 66 this.registerMobs(temp, QuestEventType.ON_ATTACK, QuestEventType.ON_KILL); 64 registerMobs(MINIONS.keys(), QuestEventType.ON_ATTACK, QuestEventType.ON_KILL); 67 65 } 68 66 … … 74 72 if (MINIONS.containsKey(npcId)) 75 73 { 76 if (!myTrackingSet.contains(npcObjId)) // this allows to handle multiple instances of npc74 if (!myTrackingSet.contains(npcObjId)) // this allows to handle multiple instances of npc 77 75 { 78 76 synchronized (myTrackingSet) … … 87 85 switch (npcId) 88 86 { 89 case 22030: // mobs that summon minions only on certain hp87 case 22030: // mobs that summon minions only on certain hp 90 88 case 22032: 91 89 case 22038: … … 94 92 { 95 93 HasSpawned = 0; 96 if (Rnd.get(100) < 33) // mobs that summon minions only on certain chance94 if (Rnd.get(100) < 33) // mobs that summon minions only on certain chance 97 95 { 98 96 int[] minions = MINIONS.get(npcId); … … 130 128 FastList<L2PcInstance> player = new FastList<L2PcInstance>(); 131 129 player.add(member); 132 _attackersList.put(npcObjId, player);130 _attackersList.put(npcObjId, player); 133 131 } 134 132 else if (!_attackersList.get(npcObjId).contains(member)) … … 142 140 FastList<L2PcInstance> player = new FastList<L2PcInstance>(); 143 141 player.add(attacker); 144 _attackersList.put(npcObjId, player);142 _attackersList.put(npcObjId, player); 145 143 } 146 144 else if (!_attackersList.get(npcObjId).contains(attacker)) 147 145 _attackersList.get(npcObjId).add(attacker); 148 146 } 149 if ((attacker.getParty() != null && attacker.getParty().getMemberCount() > 2) ||_attackersList.get(npcObjId).size() > 2) //Just to make sure..147 if ((attacker.getParty() != null && attacker.getParty().getMemberCount() > 2) || _attackersList.get(npcObjId).size() > 2) // Just to make sure.. 150 148 { 151 149 HasSpawned = 0; … … 160 158 break; 161 159 } 162 default: // mobs without special conditions160 default: // mobs without special conditions 163 161 { 164 162 HasSpawned = 0;
Note: See TracChangeset
for help on using the changeset viewer.
