05-15-2013, 08:53 PM
Причина вот в чем... вырезал я даный код с GvE в шаре валяется:
все работает все скилы бьют без нажатия "Ctrl" а вот аура скил не работает вобше.
и так же в массовых скилах проблема Если нажимаю "Ctrl"
бьет всех в радиусе действия умения, а вот если "Ctrl" не нажимать масовый скил бьет только 1. в чем моя ошибка, что не так?
Исходники L2JFrozen...
Core
.L2PcInstance.java
return false;
+
+ L2PcInstance player = null;
+ if(attacker instanceof L2PcInstance)
+ player = (L2PcInstance) attacker;
+ if(attacker instanceof L2SummonInstance)
+ player = ((L2SummonInstance) attacker).getOwner();
+
+ if(player != null)
+ if(getRace() != player.getRace())
+ return true;
+
// TODO: check for friendly mobs
if (skill.isOffensive())
{
+
+ boolean cond = true;
+ L2PcInstance trgtF = null;
+ if (target instanceof L2PcInstance)
+ trgtF = (L2PcInstance)target;
+ else if (target instanceof L2SummonInstance)
+ trgtF = ((L2SummonInstance)target).getOwner();
+ if (trgtF != null)
+ {
+ if (trgtF.getRace() == getRace())
+ cond = false;
+ if (trgtF.isInOlympiadMode() && isInOlympiadMode())
+ cond = true;
+ }
+
+ if (!cond)
+ return false;
+
-----------------------
.L2Character.java
if (isAttackingDisabled())
return;
+
+ if (this instanceof L2PcInstance)
+ {
+ L2PcInstance player = (L2PcInstance) this;
+ L2PcInstance trgtF = null;
+ boolean cond = true;
+
+ if (target instanceof L2PcInstance)
+ trgtF = (L2PcInstance) target;
+ else if (target instanceof L2SummonInstance)
+ trgtF = ((L2SummonInstance)target).getOwner();
+
+ if (trgtF != null)
+ {
+ if (trgtF.getRace() == player.getRace())
+ cond = false;
+ if (trgtF.isInOlympiadMode() && player.isInOlympiadMode())
+ cond = true;
+ }
+ if (!cond)
+ return;
+ }
+
if (this instanceof L2PcInstance)
-------------
.RequestActionUse.java
return;
}
+
+ boolean cond = true;
+ L2PcInstance player = null;
+ if (target instanceof L2PcInstance)
+ player = (L2PcInstance) target;
+ else if (target instanceof L2SummonInstance)
+ player = ((L2SummonInstance) target).getOwner();
+ if (player != null)
+ {
+ if (activeChar.getRace() == player.getRace())
+ cond = false;
+ if (activeChar.isInOlympiadMode() && player.isInOlympiadMode())
+ cond = true;
+ }
+ if (!cond)
+ return;
+
if (target.isAutoAttackable(activeChar) || _ctrlPressed)
+
+ boolean cond = true;
+ L2PcInstance player = null;
+ if (target instanceof L2PcInstance)
+ player = (L2PcInstance) target;
+ else if (target instanceof L2SummonInstance)
+ player = ((L2SummonInstance) target).getOwner();
+ if (player != null)
+ {
+ if (activeChar.getRace() == player.getRace())
+ cond = false;
+ if (activeChar.isInOlympiadMode() && player.isInOlympiadMode())
+ cond = true;
+ }
+
+ if (!cond)
+ return;
+
if (activeSummon != null && !activeSummon.isBetrayed())
-----------
.L2Skill.java
+ boolean cond = true;
+ if (target instanceof L2PcInstance)
+ {
+
+ if (targetPlayer.getRace() == player.getRace())
+ cond = false;
+ if (targetPlayer.isInOlympiadMode() && player.isInOlympiadMode())
+ cond = true;
+ }
+ else if (target instanceof L2SummonInstance)
+ {
+ L2PcInstance targetPlayerR = ((L2SummonInstance)target).getOwner();
+ if (targetPlayerR.getRace() == player.getRace())
+ cond = false;
+ if (targetPlayerR.isInOlympiadMode() && player.isInOlympiadMode())
+ cond = true;
+ }
+ if (!cond)
+ return null;
+
if (targetPlayer.inObserverMode())
return false;
+
+ L2PcInstance player = null;
+ if(attacker instanceof L2PcInstance)
+ player = (L2PcInstance) attacker;
+ if(attacker instanceof L2SummonInstance)
+ player = ((L2SummonInstance) attacker).getOwner();
+
+ if(player != null)
+ if(getRace() != player.getRace())
+ return true;
+
// TODO: check for friendly mobs
if (skill.isOffensive())
{
+
+ boolean cond = true;
+ L2PcInstance trgtF = null;
+ if (target instanceof L2PcInstance)
+ trgtF = (L2PcInstance)target;
+ else if (target instanceof L2SummonInstance)
+ trgtF = ((L2SummonInstance)target).getOwner();
+ if (trgtF != null)
+ {
+ if (trgtF.getRace() == getRace())
+ cond = false;
+ if (trgtF.isInOlympiadMode() && isInOlympiadMode())
+ cond = true;
+ }
+
+ if (!cond)
+ return false;
+
-----------------------
.L2Character.java
if (isAttackingDisabled())
return;
+
+ if (this instanceof L2PcInstance)
+ {
+ L2PcInstance player = (L2PcInstance) this;
+ L2PcInstance trgtF = null;
+ boolean cond = true;
+
+ if (target instanceof L2PcInstance)
+ trgtF = (L2PcInstance) target;
+ else if (target instanceof L2SummonInstance)
+ trgtF = ((L2SummonInstance)target).getOwner();
+
+ if (trgtF != null)
+ {
+ if (trgtF.getRace() == player.getRace())
+ cond = false;
+ if (trgtF.isInOlympiadMode() && player.isInOlympiadMode())
+ cond = true;
+ }
+ if (!cond)
+ return;
+ }
+
if (this instanceof L2PcInstance)
-------------
.RequestActionUse.java
return;
}
+
+ boolean cond = true;
+ L2PcInstance player = null;
+ if (target instanceof L2PcInstance)
+ player = (L2PcInstance) target;
+ else if (target instanceof L2SummonInstance)
+ player = ((L2SummonInstance) target).getOwner();
+ if (player != null)
+ {
+ if (activeChar.getRace() == player.getRace())
+ cond = false;
+ if (activeChar.isInOlympiadMode() && player.isInOlympiadMode())
+ cond = true;
+ }
+ if (!cond)
+ return;
+
if (target.isAutoAttackable(activeChar) || _ctrlPressed)
+
+ boolean cond = true;
+ L2PcInstance player = null;
+ if (target instanceof L2PcInstance)
+ player = (L2PcInstance) target;
+ else if (target instanceof L2SummonInstance)
+ player = ((L2SummonInstance) target).getOwner();
+ if (player != null)
+ {
+ if (activeChar.getRace() == player.getRace())
+ cond = false;
+ if (activeChar.isInOlympiadMode() && player.isInOlympiadMode())
+ cond = true;
+ }
+
+ if (!cond)
+ return;
+
if (activeSummon != null && !activeSummon.isBetrayed())
-----------
.L2Skill.java
+ boolean cond = true;
+ if (target instanceof L2PcInstance)
+ {
+
+ if (targetPlayer.getRace() == player.getRace())
+ cond = false;
+ if (targetPlayer.isInOlympiadMode() && player.isInOlympiadMode())
+ cond = true;
+ }
+ else if (target instanceof L2SummonInstance)
+ {
+ L2PcInstance targetPlayerR = ((L2SummonInstance)target).getOwner();
+ if (targetPlayerR.getRace() == player.getRace())
+ cond = false;
+ if (targetPlayerR.isInOlympiadMode() && player.isInOlympiadMode())
+ cond = true;
+ }
+ if (!cond)
+ return null;
+
if (targetPlayer.inObserverMode())
все работает все скилы бьют без нажатия "Ctrl" а вот аура скил не работает вобше.
и так же в массовых скилах проблема Если нажимаю "Ctrl"
бьет всех в радиусе действия умения, а вот если "Ctrl" не нажимать масовый скил бьет только 1. в чем моя ошибка, что не так?
Исходники L2JFrozen...
Я бы изменил мир, но Бог не дает исходники...