Advertisement
Sarada-L2

Spawn Protection + Teleport Effect Frozen

Apr 16th, 2021
623
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.77 KB | None | 0 0
  1. diff --git a/head-src/com/l2jfrozen/gameserver/model/actor/instance/L2PcInstance.java b/head-src/com/l2jfrozen/gameserver/model/actor/instance/L2PcInstance.java
  2. index 5d2c263..1c9510f 100644
  3. --- a/head-src/com/l2jfrozen/gameserver/model/actor/instance/L2PcInstance.java
  4. +++ b/head-src/com/l2jfrozen/gameserver/model/actor/instance/L2PcInstance.java
  5. @@ -5713,7 +5713,6 @@
  6.  
  7. @@ -15662,10 +15660,16 @@
  8. sendMessage("The effect of Teleport Spawn Protection has been removed.");
  9.  
  10. if (Config.PLAYER_SPAWN_PROTECTION > 0)
  11. + {
  12. setProtection(false);
  13. + stopAbnormalEffect(L2Character.ABNORMAL_EFFECT_IMPRISIONING_2);
  14. + }
  15.  
  16. if (Config.PLAYER_TELEPORT_PROTECTION > 0)
  17. + {
  18. setTeleportProtection(false);
  19. + stopAbnormalEffect(L2Character.ABNORMAL_EFFECT_IMPRISIONING_2);
  20. + }
  21. }
  22.  
  23. /**
  24. @@ -15701,6 +15705,7 @@
  25. if ((Config.PLAYER_TELEPORT_PROTECTION > 0) && !isInOlympiadMode())
  26. {
  27. setTeleportProtection(true);
  28. + startAbnormalEffect(L2Character.ABNORMAL_EFFECT_IMPRISIONING_2);
  29. sendMessage("The effects of Teleport Spawn Protection flow through you.");
  30. }
  31.  
  32. diff --git a/head-src/com/l2jfrozen/gameserver/network/clientpackets/EnterWorld.java b/head-src/com/l2jfrozen/gameserver/network/clientpackets/EnterWorld.java
  33. index 263a0ce..6016536 100644
  34. --- a/head-src/com/l2jfrozen/gameserver/network/clientpackets/EnterWorld.java
  35. +++ b/head-src/com/l2jfrozen/gameserver/network/clientpackets/EnterWorld.java
  36. @@ -181,7 +181,10 @@
  37. activeChar.sendPacket(new QuestList());
  38.  
  39. if (Config.PLAYER_SPAWN_PROTECTION > 0)
  40. + {
  41. activeChar.setProtection(true);
  42. + activeChar.startAbnormalEffect(L2Character.ABNORMAL_EFFECT_IMPRISIONING_2);
  43. + }
  44.  
  45. activeChar.spawnMe(activeChar.getX(), activeChar.getY(), activeChar.getZ());
  46.  
  47.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement