Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- L2PcInstance.java
- public void useMagic(final L2Skill skill, final boolean forceUse, final boolean dontMove)
- {
- if (isDead())
- {
- abortCast();
- sendPacket(ActionFailed.STATIC_PACKET);
- return;
- }
- + if (isAio() && !isGM() && !isInsideZone(L2Character.ZONE_PEACE))
- + {
- + sendPacket(ActionFailed.STATIC_PACKET);
- + return;
- + }
- public void sendSkillList(final L2PcInstance player)
- {
- + boolean isDisabled = false;
- SkillList sl = new SkillList();
- if (player != null)
- {
- for (final L2Skill s : player.getAllSkills())
- {
- if (s == null)
- {
- continue;
- }
- if (s.getId() > 9000)
- {
- continue; // Fake skills to change base stats
- }
- if (s.bestowed())
- {
- continue;
- }
- + if (isAio() && !isGM() && !isInsideZone(L2Character.ZONE_PEACE))
- + isDisabled = true;
- if (s.isChance())
- {
- - sl.addSkill(s.getId(), s.getLevel(), s.isChance());
- + sl.addSkill(s.getId(), s.getLevel(), s.isChance(), isDisabled);
- }
- else
- {
- - sl.addSkill(s.getId(), s.getLevel(), s.isPassive());
- + sl.addSkill(s.getId(), s.getLevel(), s.isPassive(), isDisabled);
- }
- }
- }
- sendPacket(sl);
- sl = null;
- }
- SkillList.java
- - public void addSkill(final int id, final int level, final boolean passive)
- + public void addSkill(final int id, final int level, final boolean passive, boolean isDisabled)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement