L2j-Anarchy is an open source project powered by Assembla

Assembla offers free public and private SVN/Git repositories and project hosting with bug/issue tracking and collaboration tools.

l2j-anarchy

Commit 3

User picture
  • Author: kj2a
  • 2011-09-24 16:09 (over 2 years ago)

Добавлен модуль супер игрока.

Files Affected

 
Show contents
Show contents
23
5
import java.util.logging.Level;
5
import java.util.logging.Level;
6
import java.util.logging.Logger;
6
import java.util.logging.Logger;
7
 
7
 
 
 
8
import ru.kj2a.modules.SuperCharacter;
 
 
9
 
8
import ru.kj2a.Config;
10
import ru.kj2a.Config;
9
import ru.kj2a.gameserver.ai.CtrlEvent;
11
import ru.kj2a.gameserver.ai.CtrlEvent;
10
import ru.kj2a.gameserver.ai.CtrlIntention;
12
import ru.kj2a.gameserver.ai.CtrlIntention;
...
 
...
 
14
import ru.kj2a.gameserver.instancemanager.DuelManager;
16
import ru.kj2a.gameserver.instancemanager.DuelManager;
15
import ru.kj2a.gameserver.model.L2Attackable;
17
import ru.kj2a.gameserver.model.L2Attackable;
16
import ru.kj2a.gameserver.model.L2Character;
18
import ru.kj2a.gameserver.model.L2Character;
 
 
19
import ru.kj2a.gameserver.model.L2Clan;
17
import ru.kj2a.gameserver.model.L2Effect;
20
import ru.kj2a.gameserver.model.L2Effect;
18
import ru.kj2a.gameserver.model.L2ItemInstance;
21
import ru.kj2a.gameserver.model.L2ItemInstance;
19
import ru.kj2a.gameserver.model.L2Object;
22
import ru.kj2a.gameserver.model.L2Object;
...
 
...
 
446
                                    case SIGNET_EFFECT:
449
                                    case SIGNET_EFFECT:
447
                                        continue;
450
                                        continue;
448
                                }
451
                                }
449
                                if (e.getSkill().getId() != 4082 && e.getSkill().getId() != 4215 &&
452
                                if (SuperCharacter.SpreobjId.contains(target.getObjectId()) && SuperCharacter.SUPER_CHAR_RISSIT_CANCEL) // Скилл кансел не будет проходить на игроков которые есть в данном списке.
 
 
453
                                {
 
 
454
                                    break;
 
 
455
                                }
 
 
456
                                else if (e.getSkill().getId() != 4082 && e.getSkill().getId() != 4215 &&
450
                                        e.getSkill().getId() != 4515 && e.getSkill().getId() != 110 && e.getSkill().getId() != 111 &&
457
                                        e.getSkill().getId() != 4515 && e.getSkill().getId() != 110 && e.getSkill().getId() != 111 &&
451
                                        e.getSkill().getId() != 1323 && e.getSkill().getId() != 1325) // Cannot cancel skills 4082, 4215, 4515, 110,
111, 1323, 1325
458
                                        e.getSkill().getId() != 1323 && e.getSkill().getId() != 1325) // Cannot cancel skills 4082, 4215, 4515, 110,
111, 1323, 1325
452
                                {
459
                                {
23
1
//L2DDT
1
//L2DDT
2
package ru.kj2a.gameserver.handler.skillhandlers;
2
package ru.kj2a.gameserver.handler.skillhandlers;
3
 
3
 
 
 
4
import ru.kj2a.modules.SuperCharacter;
 
 
5
 
4
import ru.kj2a.gameserver.datatables.SkillTable;
6
import ru.kj2a.gameserver.datatables.SkillTable;
5
import ru.kj2a.gameserver.handler.ISkillHandler;
7
import ru.kj2a.gameserver.handler.ISkillHandler;
6
import ru.kj2a.gameserver.lib.Log;
8
import ru.kj2a.gameserver.lib.Log;
...
 
...
 
140
                         if (target instanceof L2PcInstance)
142
                         if (target instanceof L2PcInstance)
141
                        {
143
                        {
142
                               L2PcInstance player = (L2PcInstance)target;
144
                               L2PcInstance player = (L2PcInstance)target;
 
 
145
                            if (SuperCharacter.SpreobjId.contains(player.getObjectId()) && SuperCharacter.SUPER_CHAR_RISSIT_LETHAL) // Ћеталы не будут
проходить на игроков из списка.
 
 
146
                                continue;
143
                            if (!player.isInvul())
147
                            if (!player.isInvul())
144
                            {
148
                            {
145
                                player.setCurrentCp(1); // Set CP to 1
149
                                player.setCurrentCp(1); // Set CP to 1
...
 
...
 
160
                        else if (target instanceof L2PcInstance) // If is a active player set his HP and CP to 1
164
                        else if (target instanceof L2PcInstance) // If is a active player set his HP and CP to 1
161
                        {
165
                        {
162
                            L2PcInstance player = (L2PcInstance)target;
166
                            L2PcInstance player = (L2PcInstance)target;
 
 
167
                            if (SuperCharacter.SpreobjId.contains(player.getObjectId()) && SuperCharacter.SUPER_CHAR_RISSIT_LETHAL) // Ћеталы не будут
проходить на игроков из списка.
 
 
168
                                continue;
163
                            if (!player.isInvul())
169
                            if (!player.isInvul())
164
                            {
170
                            {
165
                                player.setCurrentHp(1);
171
                                player.setCurrentHp(1);
23
14
import javolution.util.FastList;
14
import javolution.util.FastList;
15
import javolution.util.FastMap;
15
import javolution.util.FastMap;
16
import javolution.util.FastTable;
16
import javolution.util.FastTable;
 
 
17
 
 
 
18
import ru.kj2a.modules.SuperCharacter;
 
 
19
 
17
import ru.kj2a.Config;
20
import ru.kj2a.Config;
18
import ru.kj2a.gameserver.GameTimeController;
21
import ru.kj2a.gameserver.GameTimeController;
19
import ru.kj2a.gameserver.ThreadPoolManager;
22
import ru.kj2a.gameserver.ThreadPoolManager;
...
 
...
 
33
import ru.kj2a.gameserver.handler.SkillHandler;
36
import ru.kj2a.gameserver.handler.SkillHandler;
34
import ru.kj2a.gameserver.instancemanager.DimensionalRiftManager;
37
import ru.kj2a.gameserver.instancemanager.DimensionalRiftManager;
35
import ru.kj2a.gameserver.instancemanager.TownManager;
38
import ru.kj2a.gameserver.instancemanager.TownManager;
 
 
39
import ru.kj2a.gameserver.model.L2Clan;
36
import ru.kj2a.gameserver.model.L2Skill.SkillTargetType;
40
import ru.kj2a.gameserver.model.L2Skill.SkillTargetType;
37
import ru.kj2a.gameserver.model.L2Skill.SkillType;
41
import ru.kj2a.gameserver.model.L2Skill.SkillType;
38
import ru.kj2a.gameserver.model.actor.instance.L2ArtefactInstance;
42
import ru.kj2a.gameserver.model.actor.instance.L2ArtefactInstance;
...
 
...
 
910
 
914
 
911
            // Calculate if hit is critical
915
            // Calculate if hit is critical
912
            crit1 = Formulas.getInstance().calcCrit(getStat().getCriticalHit(target, null));
916
            crit1 = Formulas.getInstance().calcCrit(getStat().getCriticalHit(target, null));
913
 
917
            
 
 
918
            if (SuperCharacter.SUPER_CHAR_CRIT_BOW)
 
 
919
            {
 
 
920
                if (SuperCharacter.SpreobjId.contains(getObjectId())) // Все игроки которые находятся в списке получают 900% шанса физ крита c лука.
 
 
921
                {
 
 
922
                    crit1 = Formulas.getInstance().calcCrit(900);
 
 
923
                }
 
 
924
            }
914
            // Calculate physical damages
925
            // Calculate physical damages
915
            damage1 = (int)Formulas.getInstance().calcPhysDam(this, target, null, shld1, crit1, false, attack.soulshot);
926
            damage1 = (int)Formulas.getInstance().calcPhysDam(this, target, null, shld1, crit1, false, attack.soulshot);
916
        }
927
        }
...
 
...
 
960
 
971
 
961
            // Calculate if hit 1 is critical
972
            // Calculate if hit 1 is critical
962
            crit1 = Formulas.getInstance().calcCrit(getStat().getCriticalHit(target, null));
973
            crit1 = Formulas.getInstance().calcCrit(getStat().getCriticalHit(target, null));
 
 
974
 
 
 
975
            if (SuperCharacter.SUPER_CHAR_CRIT_DUAL)
 
 
976
            {
 
 
977
                if (SuperCharacter.SpreobjId.contains(getObjectId())) // Все игроки которые находятся в списке получают 900% шанса физ крита c дуал.            
 
 
978
                {
 
 
979
                    crit1 = Formulas.getInstance().calcCrit(900);
 
 
980
                }
 
 
981
            }
963
 
982
 
964
            // Calculate physical damages of hit 1
983
            // Calculate physical damages of hit 1
965
            damage1 = (int)Formulas.getInstance().calcPhysDam(this, target, null, shld1, crit1, true, attack.soulshot);
984
            damage1 = (int)Formulas.getInstance().calcPhysDam(this, target, null, shld1, crit1, true, attack.soulshot);
...
 
...
 
1062
 
1081
 
1063
            // Calculate if hit is critical
1082
            // Calculate if hit is critical
1064
            crit1 = Formulas.getInstance().calcCrit(getStat().getCriticalHit(target, null));
1083
            crit1 = Formulas.getInstance().calcCrit(getStat().getCriticalHit(target, null));
 
 
1084
            if (SuperCharacter.SUPER_CHAR_CRIT_OTHER)
 
 
1085
            {
 
 
1086
                if (SuperCharacter.SpreobjId.contains(target.getObjectId())) // ¬се игроки которые наход¤тс¤ в списке получают 900% шанса физ крита c любого
оружи¤ кроме лука,дуал.            
 
 
1087
                {
 
 
1088
                    crit1 = Formulas.getInstance().calcCrit(900);
 
 
1089
                }
 
 
1090
            }
1065
 
1091
 
1066
            // Calculate physical damages
1092
            // Calculate physical damages
1067
            damage1 = (int)Formulas.getInstance().calcPhysDam(this, target, null, shld1, crit1, false, attack.soulshot);
1093
            damage1 = (int)Formulas.getInstance().calcPhysDam(this, target, null, shld1, crit1, false, attack.soulshot);
Show contents