L2JMobius

High Five Impossible to attack the defenders of the castle

evilfrogy · 18 · 6819

Offline evilfrogy

  • Heir
  • **
    • Posts: 10
It is impossible to attack the guards of the castle, the gate, etc. The server defines me as a defender, although I attack.




Offline evilfrogy

  • Heir
  • **
    • Posts: 10
They hit me, but i cant. Why my report is invalid?  :'(

I use the latest version from git.


Online Mobius

  • Distinguished King
  • *****
    • Posts: 16152
It is impossible to attack the guards of the castle, the gate, etc.

They hit me, but i cant.

When you decide how things work, someone might take the time to help you.



Offline evilfrogy

  • Heir
  • **
    • Posts: 10
It is impossible to attack the guards of the castle, the gate, etc.

They hit me, but i cant.

When you decide how things work, someone might take the time to help you.

I'm sorry you have to waste your time on me. I just don't understand what I'm doing wrong. Can you explain to me please? I registered for the siege as an attacker, but I can't attack the guards.



Offline evilfrogy

  • Heir
  • **
    • Posts: 10
Do you use geodata?
No, I thought it was already built into the server. Need to install geodata?




Online Mobius

  • Distinguished King
  • *****
    • Posts: 16152
Try this.
Code: [Select]
Index: java/org/l2jmobius/gameserver/model/actor/Player.java
===================================================================
--- java/org/l2jmobius/gameserver/model/actor/Player.java (revision 10046)
+++ java/org/l2jmobius/gameserver/model/actor/Player.java (working copy)
@@ -1657,7 +1657,7 @@
 
  // Check first castle mid victory.
  final Castle castle = CastleManager.getInstance().getCastleById(_siegeSide);
- if ((castle != null) && !castle.isFirstMidVictory())
+ if ((castle != null) && !castle.isFirstMidVictory() && !(target instanceof Defender))
  {
  return true;
  }


Offline evilfrogy

  • Heir
  • **
    • Posts: 10
Try this.
Code: [Select]
Index: java/org/l2jmobius/gameserver/model/actor/Player.java
===================================================================
--- java/org/l2jmobius/gameserver/model/actor/Player.java (revision 10046)
+++ java/org/l2jmobius/gameserver/model/actor/Player.java (working copy)
@@ -1657,7 +1657,7 @@
 
  // Check first castle mid victory.
  final Castle castle = CastleManager.getInstance().getCastleById(_siegeSide);
- if ((castle != null) && !castle.isFirstMidVictory())
+ if ((castle != null) && !castle.isFirstMidVictory() && !(target instanceof Defender))
  {
  return true;
  }

Thank you very much, you are the best administrator that I have seen. There is no limit to my respect! its work fine for me!


Now i can kill guards, but still cant attack gates, and use aoe spells.



Online Mobius

  • Distinguished King
  • *****
    • Posts: 16152
Try this instead.
Code: [Select]
Index: java/org/l2jmobius/gameserver/model/actor/Player.java
===================================================================
--- java/org/l2jmobius/gameserver/model/actor/Player.java (revision 10046)
+++ java/org/l2jmobius/gameserver/model/actor/Player.java (working copy)
@@ -1657,13 +1657,13 @@
 
  // Check first castle mid victory.
  final Castle castle = CastleManager.getInstance().getCastleById(_siegeSide);
- if ((castle != null) && !castle.isFirstMidVictory())
+ final Player targetPlayer = target.getActingPlayer();
+ if ((castle != null) && (targetPlayer != null) && !castle.isFirstMidVictory())
  {
  return true;
  }
 
  // If target isn't a player, is self, isn't on same siege or not on same state, not friends.
- final Player targetPlayer = target.getActingPlayer();
  if ((targetPlayer == null) || (targetPlayer == this) || (targetPlayer.getSiegeSide() != _siegeSide) || (_siegeState != targetPlayer.getSiegeState()))
  {
  return false;


Offline evilfrogy

  • Heir
  • **
    • Posts: 10
Still not working right.  Can't use aoe skills. Unrecorded players cannot be attacked either.