Mostrar Mensajes

Esta sección te permite ver todos los posts escritos por este usuario. Ten en cuenta que sólo puedes ver los posts escritos en zonas a las que tienes acceso en este momento.


Mensajes - fissban

Páginas: [1] 2 3 4 5 6 ... 9
1
Issues / Re:Mal funcionamiento en skills
« en: Hoy a las 08:49:25 pm »
Nop, ya eso lo habia intentado yo. El efecto se activa y afecta al mob "No aparece en mensaje de Unnafected", pero simplemente sigue atacando al PJ

proba esto

Código
### Eclipse Workspace Patch 1.0
#P C4_DataPack
Index: data/xml/stats/skills/1000-1099.xml
===================================================================
--- data/xml/stats/skills/1000-1099.xml (revision 1075)
+++ data/xml/stats/skills/1000-1099.xml (working copy)
@@ -1215,6 +1215,7 @@
    <set name="hitTime" val="4000"/>
    <set name="reuseDelay" val="20000"/>
    <set name="skillType" val="AGGREMOVE"/>
+   <set name="effectPower" val="40"/> <!-- land rate -->
    <set name="isMagic" val="true"/>
    <set name="operateType" val="ACTIVE"/>
    <set name="castRange" val="600"/>
#P C4_GameServer
Index: java/net/sf/l2j/gameserver/handler/skill/SkillDisablers.java
===================================================================
--- java/net/sf/l2j/gameserver/handler/skill/SkillDisablers.java (revision 1104)
+++ java/net/sf/l2j/gameserver/handler/skill/SkillDisablers.java (working copy)
@@ -168,12 +168,12 @@
  if (monster.getTemplate().getRace() == NpcRaceType.UNDEAD)
  {
  monster.stopHating(target);
- monster.getAI().notifyEvent(CtrlEventType.AGGRESSION, null, -monster.getHating(monster.getMostHated()));
+ monster.getAI().notifyEvent(CtrlEventType.AGGRESSION, monster.getMostHated(), -monster.getHating(monster.getMostHated()));
  }
  }
  else
  {
- monster.getAI().notifyEvent(CtrlEventType.AGGRESSION, null, -monster.getHating(monster.getMostHated()));
+ monster.getAI().notifyEvent(CtrlEventType.AGGRESSION, monster.getMostHated(), -monster.getHating(monster.getMostHated()));
  }
  }
  }
Index: java/net/sf/l2j/gameserver/model/actor/ai/AttackableAI.java
===================================================================
--- java/net/sf/l2j/gameserver/model/actor/ai/AttackableAI.java (revision 1102)
+++ java/net/sf/l2j/gameserver/model/actor/ai/AttackableAI.java (working copy)
@@ -1110,20 +1110,20 @@
 
  // Get the hate of the actor against the target
  // only if hate is definitely reduced
- // if (aggro < 0)
- // {
- // if (me.getHating(target) <= 0)
- // {
- // if (me.getMostHated() == null)
- // {
- // globalAggro = -25;
- // me.clearAggroList();
- // setIntention(CtrlIntentionType.ACTIVE);
- // me.setWalking();
- // }
- // }
- // return;
- // }
+ if (aggro < 0)
+ {
+ if (me.getHating(target) <= 0)
+ {
+ if (me.getMostHated() == null)
+ {
+ globalAggro = -25;
+ me.clearAggroList();
+ setIntention(CtrlIntentionType.ACTIVE);
+ me.setWalking();
+ }
+ }
+ return;
+ }
 
  // Set the actor AI Intention to ATTACK
  if (getIntention() != CtrlIntentionType.ATTACK)

lo que si pude observar es que cuando tienen un "faction" definido por mas que el efecto entre los q estan al su alrededor ven la "agresion" y se vuelven a llemar asiq continua atacando casi de inmediato.

2
Issues / Re:[Skill - Confusion] - Error
« en: Junio 20, 2018, 09:22:22 pm »
Bueno eh echo varias pruebas y al parecer lo logre pero toque varias cosas de los ai de los mobs asique deberiamos hacer un buen test por las dudas, aqui te dejo el diff.

Código
Index: java/net/sf/l2j/gameserver/handler/skill/SkillDisablers.java
===================================================================
--- java/net/sf/l2j/gameserver/handler/skill/SkillDisablers.java (revision 1097)
+++ java/net/sf/l2j/gameserver/handler/skill/SkillDisablers.java (working copy)
@@ -167,12 +167,13 @@
  {
  if (monster.getTemplate().getRace() == NpcRaceType.UNDEAD)
  {
- monster.getAI().notifyEvent(CtrlEventType.AGGRESSION, null, -((L2MonsterInstance) target).getHating(((L2MonsterInstance) target).getMostHated()));
+ monster.stopHating(target);
+ monster.getAI().notifyEvent(CtrlEventType.AGGRESSION, null, -monster.getHating(monster.getMostHated()));
  }
  }
  else
  {
- monster.getAI().notifyEvent(CtrlEventType.AGGRESSION, null, -((L2MonsterInstance) target).getHating(((L2MonsterInstance) target).getMostHated()));
+ monster.getAI().notifyEvent(CtrlEventType.AGGRESSION, null, -monster.getHating(monster.getMostHated()));
  }
  }
  }
Index: java/net/sf/l2j/gameserver/handler/skill/SkillMdam.java
===================================================================
--- java/net/sf/l2j/gameserver/handler/skill/SkillMdam.java (revision 1097)
+++ java/net/sf/l2j/gameserver/handler/skill/SkillMdam.java (working copy)
@@ -53,8 +53,8 @@
  return;
  }
 
- boolean sps = activeChar.isChargedShot(ShotType.SPIRITSHOTS);
- boolean bss = activeChar.isChargedShot(ShotType.BLESSED_SPIRITSHOTS);
+ var sps = activeChar.isChargedShot(ShotType.SPIRITSHOTS);
+ var bss = activeChar.isChargedShot(ShotType.BLESSED_SPIRITSHOTS);
 
  for (L2Object target2 : targets)
  {
@@ -69,15 +69,15 @@
  continue;
  }
 
- boolean mcrit = Formulas.calcMCrit(activeChar.getStat().getMCriticalHit(target, skill));
+ var mcrit = Formulas.calcMCrit(activeChar.getStat().getMCriticalHit(target, skill));
 
- int damage = (int) Formulas.calcMagicDam(activeChar, target, skill, sps, bss, mcrit);
+ var damage = (int) Formulas.calcMagicDam(activeChar, target, skill, sps, bss, mcrit);
 
  if (Config.LOG_VERY_HIGH_DAMAGE)
  {
  if ((damage > Config.LOG_DMG) && (activeChar instanceof L2PcInstance))
  {
- String name = "";
+ var name = "";
  if (target instanceof L2RaidBossInstance)
  {
  name = "RaidBoss ";
Index: java/net/sf/l2j/gameserver/model/actor/L2Attackable.java
===================================================================
--- java/net/sf/l2j/gameserver/model/actor/L2Attackable.java (revision 1093)
+++ java/net/sf/l2j/gameserver/model/actor/L2Attackable.java (working copy)
@@ -773,16 +773,25 @@
  ai.addHate(aggro);
  }
 
+ // Notify the L2Attackable AI with EVT_ATTACKED
+ if (damage > 0)
+ {
+ getAI().notifyEvent(CtrlEventType.ATTACKED, attacker);
+ }
  // Set the intention to the L2Attackable to AI_INTENTION_ACTIVE
- if ((aggro > 0) && (getAI().getIntention() == CtrlIntentionType.IDLE))
+ else if ((aggro > 0) && (getAI().getIntention() == CtrlIntentionType.IDLE))
  {
  getAI().setIntention(CtrlIntentionType.ACTIVE);
  }
-
- // Notify the L2Attackable AI with EVT_ATTACKED
- if (damage > 0)
+ else if (ai.getHate() <= 0)
  {
- getAI().notifyEvent(CtrlEventType.ATTACKED, attacker);
+ if (getMostHated() == null)
+ {
+ aggroList.clear();
+
+ getAI().setIntention(CtrlIntentionType.ACTIVE);
+ setWalking();
+ }
  }
  }
  }
Index: java/net/sf/l2j/gameserver/model/actor/L2Character.java
===================================================================
--- java/net/sf/l2j/gameserver/model/actor/L2Character.java (revision 1097)
+++ java/net/sf/l2j/gameserver/model/actor/L2Character.java (working copy)
@@ -5051,7 +5051,7 @@
 
  broadcastPacket(new ChangeWaitType(this, ChangeWait.WT_STOP_FAKEDEATH));
  broadcastPacket(new Revive(this));
- getAI().notifyEvent(CtrlEventType.FAKE_DEATH, null);
+ getAI().notifyEvent(CtrlEventType.FAKE_DEATH);
  }
 
  /**
@@ -5064,7 +5064,7 @@
  */
  public final void stopFear()
  {
- getAI().notifyEvent(CtrlEventType.AFRAID, null);
+ getAI().notifyEvent(CtrlEventType.AFRAID);
  updateAbnormalEffect();
  }
 
@@ -5078,14 +5078,14 @@
  */
  public final void stopMuted()
  {
- getAI().notifyEvent(CtrlEventType.MUTED, null);
+ getAI().notifyEvent(CtrlEventType.MUTED);
  updateAbnormalEffect();
  }
 
  public final void stopPhysicalMuted()
  {
  setIsPhysicalMuted(false);
- getAI().notifyEvent(CtrlEventType.PHYSICAL_MUTED, null);
+ getAI().notifyEvent(CtrlEventType.PHYSICAL_MUTED);
  updateAbnormalEffect();
  }
 
@@ -5105,7 +5105,7 @@
  stopEffects(EffectType.ROOT);
  }
 
- getAI().notifyEvent(CtrlEventType.ROOTED, null);
+ getAI().notifyEvent(CtrlEventType.ROOTED);
  updateAbnormalEffect();
  }
 
@@ -5125,7 +5125,7 @@
  stopEffects(EffectType.SLEEP);
  }
 
- getAI().notifyEvent(CtrlEventType.SLEEPING, null);
+ getAI().notifyEvent(CtrlEventType.SLEEPING);
  updateAbnormalEffect();
  }
 
@@ -5145,7 +5145,7 @@
  stopEffects(EffectType.STUN);
  }
 
- getAI().notifyEvent(CtrlEventType.STUNNED, null);
+ getAI().notifyEvent(CtrlEventType.STUNNED);
  updateAbnormalEffect();
  }
 
@@ -5159,7 +5159,7 @@
  */
  public final void stopParalyze()
  {
- getAI().notifyEvent(CtrlEventType.PARALYZED, null);
+ getAI().notifyEvent(CtrlEventType.PARALYZED);
  updateAbnormalEffect();
  }
 
@@ -5184,7 +5184,6 @@
  public final void startConfused()
  {
  getAI().notifyEvent(CtrlEventType.CONFUSED);
- updateAbnormalEffect();
  }
 
  /**
@@ -5212,7 +5211,6 @@
  abortAttack();
  abortCast();
  getAI().notifyEvent(CtrlEventType.AFRAID);
- updateAbnormalEffect();
  }
 
  /**
@@ -5222,7 +5220,6 @@
  {
  abortCast();
  getAI().notifyEvent(CtrlEventType.MUTED);
- updateAbnormalEffect();
  }
 
  /**
@@ -5233,7 +5230,6 @@
  setIsPhysicalMuted(true);
  abortAttack();
  getAI().notifyEvent(CtrlEventType.PHYSICAL_MUTED);
- updateAbnormalEffect();
  }
 
  /**
@@ -5243,7 +5239,6 @@
  {
  stopMove(null);
  getAI().notifyEvent(CtrlEventType.ROOTED);
- updateAbnormalEffect();
  }
 
  /**
@@ -5256,7 +5251,6 @@
  stopMove(null);
  getAI().notifyEvent(CtrlEventType.SLEEPING);
  getAI().setIntention(CtrlIntentionType.IDLE);
- updateAbnormalEffect();
  }
 
  /**
@@ -5273,7 +5267,6 @@
  stopMove(null);
  getAI().notifyEvent(CtrlEventType.STUNNED);
  getAI().setIntention(CtrlIntentionType.IDLE);
- updateAbnormalEffect();
  }
 
  /**
@@ -5290,6 +5283,5 @@
  stopMove(null);
  getAI().notifyEvent(CtrlEventType.PARALYZED);
  getAI().setIntention(CtrlIntentionType.IDLE);
- updateAbnormalEffect();
  }
 }
Index: java/net/sf/l2j/gameserver/model/actor/ai/AttackableAI.java
===================================================================
--- java/net/sf/l2j/gameserver/model/actor/ai/AttackableAI.java (revision 1092)
+++ java/net/sf/l2j/gameserver/model/actor/ai/AttackableAI.java (working copy)
@@ -223,11 +223,6 @@
  return false;
  }
 
- if ((target instanceof L2Attackable) && me.isConfused())
- {
- return GeoEngine.getInstance().canSeeTarget(me, target);
- }
-
  // Check if the target isn't another L2Npc
  if (target instanceof L2Npc)
  {
@@ -533,7 +528,16 @@
  return;
  }
 
- L2Character attackTarget = npc.getMostHated();
+ L2Character attackTarget;
+
+ if (npc.isConfused() && getTarget() != null && getTarget() instanceof L2Character)
+ {
+ attackTarget = (L2Character) getTarget();
+ }
+ else
+ {
+ attackTarget = npc.getMostHated();
+ }
 
  // If target doesn't exist, is dead or if timeout is expired (non-aggro mobs or mobs which are too far stop to attack)
  if ((attackTarget == null) || attackTarget.isAlikeDead() || ((attackTimeOut < System.currentTimeMillis()) && (!npc.isAggressive() || (Math.sqrt(npc.getPlanDistanceSq(attackTarget.getX(), attackTarget.getY())) > (npc.getAggroRange() * 2)))))
@@ -637,37 +641,14 @@
  }
  }
 
- setTarget(attackTarget);
- npc.setTarget(attackTarget);
-
- /**
- * COMMON INFORMATIONS<br>
- * Used for range and distance check.
- */
-
- // Get all information needed to choose between physical or magical attack
-
- // Force mobs to attack anybody if confused
- L2Character hated;
- if (activeActor.isConfused() || ((((L2Attackable) activeActor).getMostHated() == null) && (attackTarget instanceof L2Attackable)))
- {
- hated = attackTarget;
- }
- else
- {
- hated = ((L2Attackable) activeActor).getMostHated();
- }
-
- if (hated == null)
+ if (attackTarget == null)
  {
  setIntention(CtrlIntentionType.ACTIVE);
  return;
  }
 
- if (hated != attackTarget)
- {
- setTarget(hated);
- }
+ setTarget(attackTarget);
+ npc.setTarget(attackTarget);
 
  attackTimeOut = MAX_ATTACK_TIMEOUT + System.currentTimeMillis();
 
@@ -741,7 +722,7 @@
  }
 
  // We should calculate new distance cuz mob can have changed the target
- double dist = activeActor.getPlanDistanceSq(hated.getX(), hated.getY());
+ double dist = activeActor.getPlanDistanceSq(attackTarget.getX(), attackTarget.getY());
  int collision = (int) npc.getTemplate().getCollisionRadius();
  int combinedCollision = collision + collision;
  int range = npc.getStat().getPhysicalAttackRange() + combinedCollision;
@@ -749,7 +730,7 @@
  if (npc.isMovementDisabled())
  {
  // If you are immobilized and do not have to rank your goal we are looking for a new one
- if (!Util.checkIfInRange(range, activeActor, hated, false))
+ if (!Util.checkIfInRange(range, activeActor, attackTarget, false))
  {
  attackTarget = targetReconsider(range, true);
  }
@@ -763,7 +744,7 @@
  return;
  }
 
- if (hated.isMoving())
+ if (attackTarget.isMoving())
  {
  range = range + 50;
  if (npc.isMoving())
@@ -815,7 +796,7 @@
  ItemWeapon weapon = activeActor.getActiveWeaponItem();
  if ((weapon != null) && (weapon.getType() == WeaponType.BOW))
  {
- if (Util.checkIfInRange(100, activeActor, hated, false) && (Rnd.get(4) > 1))
+ if (Util.checkIfInRange(100, activeActor, attackTarget, false) && (Rnd.get(4) > 1))
  {
  final int posX = npc.getX() + ((attackTarget.getX() < npc.getX()) ? 300 : -300);
  final int posY = npc.getY() + ((attackTarget.getY() < npc.getY()) ? 300 : -300);
@@ -833,7 +814,7 @@
  if (dist > (range * range))
  {
  // Move the actor to Pawn server side AND client side by sending Server->Client packet MoveToPawn (broadcast)
- if (hated.isMoving())
+ if (attackTarget.isMoving())
  {
  range -= 100;
  }
@@ -852,7 +833,7 @@
 
  // Finally, physical attacks
  clientStopMoving(null);
- getActor().doAttack(hated);
+ getActor().doAttack(attackTarget);
  }
 
  private static boolean canUseSkill(L2Character actor, Skill sk)
Index: java/net/sf/l2j/gameserver/model/actor/ai/CharacterAI.java
===================================================================
--- java/net/sf/l2j/gameserver/model/actor/ai/CharacterAI.java (revision 1091)
+++ java/net/sf/l2j/gameserver/model/actor/ai/CharacterAI.java (working copy)
@@ -199,7 +199,7 @@
  stopFollow();
 
  // Launch the Think Event
- notifyEvent(CtrlEventType.THINK, null);
+ notifyEvent(CtrlEventType.THINK);
  }
  else
  {
@@ -208,16 +208,16 @@
  }
  else
  {
- // Set the Intention of this AbstractAI to AI_INTENTION_ATTACK
- changeIntention(CtrlIntentionType.ATTACK, target, null);
-
  // Set the AI attack target
  setTarget(target);
 
+ // Set the Intention of this AbstractAI to AI_INTENTION_ATTACK
+ changeIntention(CtrlIntentionType.ATTACK, target, null);
+
  stopFollow();
 
  // Launch the Think Event
- notifyEvent(CtrlEventType.THINK, null);
+ notifyEvent(CtrlEventType.THINK);
  }
  }
 
Index: java/net/sf/l2j/gameserver/model/skills/effects/type/EffectConfusion.java
===================================================================
--- java/net/sf/l2j/gameserver/model/skills/effects/type/EffectConfusion.java (revision 1091)
+++ java/net/sf/l2j/gameserver/model/skills/effects/type/EffectConfusion.java (working copy)
@@ -21,14 +21,11 @@
 import java.util.ArrayList;
 
 import net.sf.l2j.gameserver.model.actor.L2Character;
-import net.sf.l2j.gameserver.model.actor.L2Playable;
 import net.sf.l2j.gameserver.model.actor.ai.enums.CtrlIntentionType;
-import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance.FlagType;
 import net.sf.l2j.gameserver.model.skills.effects.Effect;
 import net.sf.l2j.gameserver.model.skills.effects.EffectTemplate;
 import net.sf.l2j.gameserver.model.skills.effects.enums.EffectType;
 import net.sf.l2j.gameserver.model.skills.stats.Env;
-import net.sf.l2j.gameserver.util.Util;
 import net.sf.l2j.util.lib.Rnd;
 
 /**
@@ -36,6 +33,8 @@
  */
 public class EffectConfusion extends Effect
 {
+ private static final int RADIUS = 600;
+
  public EffectConfusion(Env env, EffectTemplate template)
  {
  super(env, template);
@@ -51,6 +50,8 @@
  public void onStart()
  {
  getEffected().startConfused();
+
+ onActionTime();
  }
 
  @Override
@@ -65,23 +66,11 @@
  var targetList = new ArrayList<L2Character>();
 
  // Getting the possible targets
- for (L2Character character : getEffector().getKnownList().getObjectType(L2Character.class))
+ for (var character : getEffected().getKnownList().getObjectTypeInRadius(L2Character.class, RADIUS))
  {
- if ((character != getEffected()) && Util.checkIfInShortRadius(600, getEffected(), character, true))
+ if (character != getEffector())
  {
- if (character instanceof L2Playable)
- {
- var player = ((L2Playable) character).getActingPlayer();
-
- if (player.getPvpFlag() != FlagType.NON_PVP || player.getKarma() > 0)
- {
- targetList.add(character);
- }
- }
- else
- {
- targetList.add(character);
- }
+ targetList.add(character);
  }
  }
 
@@ -95,6 +84,7 @@
  var target = targetList.get(Rnd.nextInt(targetList.size()));
 
  // Attacking the target
+ getEffected().setTarget(target);
  getEffected().getAI().setIntention(CtrlIntentionType.ATTACK, target);
 
  return true;


3
Issues / Re:Mal funcionamiento en skills
« en: Junio 20, 2018, 11:34:38 am »
chequea si con este mini arreglo funciona el "peace".

Código
Index: data/xml/stats/skills/1000-1099.xml
===================================================================
--- data/xml/stats/skills/1000-1099.xml (revision 1075)
+++ data/xml/stats/skills/1000-1099.xml (working copy)
@@ -1215,6 +1215,7 @@
    <set name="hitTime" val="4000"/>
    <set name="reuseDelay" val="20000"/>
    <set name="skillType" val="AGGREMOVE"/>
+   <set name="effectPower" val="40"/> <!-- land rate -->
    <set name="isMagic" val="true"/>
    <set name="operateType" val="ACTIVE"/>
    <set name="castRange" val="600"/>

Ten en cuenta que el skill tiene un 40% de entrar su efecto.

4
Issues / Re:Mal funcionamiento en skills
« en: Junio 20, 2018, 03:54:13 am »
con esto ya debería funcionar correctamente ese skill.

Código
Index: data/xml/stats/skills/0300-0399.xml
===================================================================
--- data/xml/stats/skills/0300-0399.xml (revision 1075)
+++ data/xml/stats/skills/0300-0399.xml (working copy)
@@ -1213,7 +1213,7 @@
    <set name="saveVs" val="CON"/>
    <set name="baseCritRate" val="15"/>
    <cond msg="s1 cannot be used due to unsuitable terms.">
-     <using kind="Sword, Blunt"/>
+     <using kind="Sword, Big Sword, Blunt, Big Blunt"/>
    </cond>
    <for>
      <effect count="1" name="Stun" time="9" val="0" stackOrder="2" stackType="Stun" abnormal="STUN">

un paso a la ves y vamos solucionando todo :P

5
Issues / Re:Mal funcionamiento en skills
« en: Junio 19, 2018, 11:31:45 am »
armor crush: se usa con espadas y blunts no veo nada q diga q se usa con armas de 2 manos.
Seal mirage: vuelve a probarlo que hice unos ajustes.
peace: prueba este mini arreglo haber que tal va

Código
Index: java/net/sf/l2j/gameserver/model/actor/L2Attackable.java
===================================================================
--- java/net/sf/l2j/gameserver/model/actor/L2Attackable.java (revision 1093)
+++ java/net/sf/l2j/gameserver/model/actor/L2Attackable.java (working copy)
@@ -773,16 +773,25 @@
  ai.addHate(aggro);
  }
 
+ // Notify the L2Attackable AI with EVT_ATTACKED
+ if (damage > 0)
+ {
+ getAI().notifyEvent(CtrlEventType.ATTACKED, attacker);
+ }
  // Set the intention to the L2Attackable to AI_INTENTION_ACTIVE
- if ((aggro > 0) && (getAI().getIntention() == CtrlIntentionType.IDLE))
+ else if ((aggro > 0) && (getAI().getIntention() == CtrlIntentionType.IDLE))
  {
  getAI().setIntention(CtrlIntentionType.ACTIVE);
  }
-
- // Notify the L2Attackable AI with EVT_ATTACKED
- if (damage > 0)
+ else if (ai.getHate() <= 0)
  {
- getAI().notifyEvent(CtrlEventType.ATTACKED, attacker);
+ if (getMostHated() == null)
+ {
+ aggroList.clear();
+
+ getAI().setIntention(CtrlIntentionType.ACTIVE);
+ setWalking();
+ }
  }
  }
  }

6
Issues / Re:Errores - Eventos de Fin de Mes (Creo)
« en: Junio 17, 2018, 01:59:44 am »
disculpa el retraso.

El primer error parece ser de algun html aunque no veo el problema ya q estos estan bien construidos, has realizado alguna modificacion en los html retails?

El segundo es sobre este query
Código
INSERT INTO olympiad_nobles_eom SELECT char_id, olympiad_points FROM olympiad_nobles
Su funcion es lleavr datos de una tabla a la otra y tanto "olympiad_nobles_eom" como "olympiad_nobles" tienen la misma estructura asique no deberia dar fallos....podrias verificarme esto.

7
Issues / Re:Mal funcionamiento en skills restringidos a "UNDEADS"
« en: Junio 16, 2018, 11:53:25 am »
proba este cambio

Código
Index: java/net/sf/l2j/gameserver/data/NpcData.java
===================================================================
--- java/net/sf/l2j/gameserver/data/NpcData.java (revision 1093)
+++ java/net/sf/l2j/gameserver/data/NpcData.java (working copy)
@@ -31,6 +31,7 @@
 import net.sf.l2j.L2DatabaseFactory;
 import net.sf.l2j.gameserver.model.StatsSet;
 import net.sf.l2j.gameserver.model.actor.base.ClassId;
+import net.sf.l2j.gameserver.model.actor.enums.NpcRaceType;
 import net.sf.l2j.gameserver.model.actor.templates.NpcTemplate;
 import net.sf.l2j.gameserver.model.holder.MinionHolder;
 import net.sf.l2j.gameserver.model.skills.Skill;
@@ -190,12 +191,41 @@
  final int id = rset.getInt("skillid");
  final int level = rset.getInt("level");
 
- if (template.getRace() == 0)
+ if (mobId == 12899)
+ {
+ template.setRace(NpcRaceType.CREATURE_VALAKAS);
+ }
+ else if (template.getRace() == NpcRaceType.NONE)
  {
  if ((id >= 4290) && (id <= 4302))
  {
- template.setRace(id);
- continue;
+ switch (id)
+ {
+ case 4290:
+ template.setRace(NpcRaceType.UNDEAD);
+ break;
+ case 4292:
+ template.setRace(NpcRaceType.BEAST);
+ break;
+ case 4293:
+ template.setRace(NpcRaceType.ANIMAL);
+ break;
+ case 4294:
+ template.setRace(NpcRaceType.PLANT);
+ break;
+ case 4299:
+ template.setRace(NpcRaceType.DRAGON);
+ break;
+ case 4300:
+ template.setRace(NpcRaceType.GIANT);
+ break;
+ case 4301:
+ template.setRace(NpcRaceType.BUG);
+ break;
+ case 4302:
+ template.setRace(NpcRaceType.MAGIC_CREATURE);
+ break;
+ }
  }
  }
 
Index: java/net/sf/l2j/gameserver/handler/skill/SkillDisablers.java
===================================================================
--- java/net/sf/l2j/gameserver/handler/skill/SkillDisablers.java (revision 1091)
+++ java/net/sf/l2j/gameserver/handler/skill/SkillDisablers.java (working copy)
@@ -21,6 +21,7 @@
 import net.sf.l2j.gameserver.model.L2Object;
 import net.sf.l2j.gameserver.model.actor.L2Character;
 import net.sf.l2j.gameserver.model.actor.ai.enums.CtrlEventType;
+import net.sf.l2j.gameserver.model.actor.enums.NpcRaceType;
 import net.sf.l2j.gameserver.model.actor.instance.L2MonsterInstance;
 import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
 import net.sf.l2j.gameserver.model.actor.instance.enums.ShotType;
@@ -157,18 +158,19 @@
  // these skills needs to be rechecked
  if (target instanceof L2MonsterInstance)
  {
- if (Formulas.calcEffectSuccess(activeChar, target, skill, true, false, sps, bss))
+ L2MonsterInstance monster = (L2MonsterInstance) target;
+ if (Formulas.calcEffectSuccess(activeChar, monster, skill, true, false, sps, bss))
  {
  if (skill.getTargetType() == SkillTargetType.TARGET_UNDEAD)
  {
- if (target.isUndead())
+ if (monster.getTemplate().getRace() == NpcRaceType.UNDEAD)
  {
- target.getAI().notifyEvent(CtrlEventType.AGGRESSION, null, -((L2MonsterInstance) target).getHating(((L2MonsterInstance) target).getMostHated()));
+ monster.getAI().notifyEvent(CtrlEventType.AGGRESSION, null, -((L2MonsterInstance) target).getHating(((L2MonsterInstance) target).getMostHated()));
  }
  }
  else
  {
- target.getAI().notifyEvent(CtrlEventType.AGGRESSION, null, -((L2MonsterInstance) target).getHating(((L2MonsterInstance) target).getMostHated()));
+ monster.getAI().notifyEvent(CtrlEventType.AGGRESSION, null, -((L2MonsterInstance) target).getHating(((L2MonsterInstance) target).getMostHated()));
  }
  }
  }
Index: java/net/sf/l2j/gameserver/handler/target/TargetAreaCorpseMob.java
===================================================================
--- java/net/sf/l2j/gameserver/handler/target/TargetAreaCorpseMob.java (revision 1091)
+++ java/net/sf/l2j/gameserver/handler/target/TargetAreaCorpseMob.java (working copy)
@@ -60,6 +60,11 @@
 
  L2PcInstance src = activeChar.getActingPlayer();
 
+ if (src == null)
+ {
+ return EMPTY_TARGET_LIST;
+ }
+
  for (L2Character obj : target.getKnownList().getObjectTypeInRadius(L2Character.class, skill.getSkillRadius()))
  {
  if (!((obj instanceof L2Attackable) || (obj instanceof L2Playable)) || obj.isDead() || (obj == activeChar))
@@ -67,66 +72,63 @@
  continue;
  }
 
- if (src != null)
+ if (!GeoEngine.getInstance().canSeeTarget(target, obj))
+ {
+ continue;
+ }
+
+ L2PcInstance trg = obj.getActingPlayer();
+
+ if (trg != null)
  {
- L2PcInstance trg = obj.getActingPlayer();
+ if (trg == src)
+ {
+ continue;
+ }
 
- if (trg != null)
+ if (trg.isInsideZone(ZoneType.PEACE))
  {
- if (trg == src)
+ continue;
+ }
+
+ if ((src.getParty() != null) && (trg.getParty() != null))
+ {
+ if (src.getParty().getLeader().getObjectId() == trg.getParty().getLeader().getObjectId())
  {
  continue;
  }
 
- if ((src.getParty() != null) && (trg.getParty() != null))
+ if ((src.getParty().getCommandChannel() != null) && (trg.getParty().getCommandChannel() != null))
  {
- if (src.getParty().getLeader().getObjectId() == trg.getParty().getLeader().getObjectId())
+ if (src.getParty().getCommandChannel() == trg.getParty().getCommandChannel())
  {
  continue;
  }
-
- if ((src.getParty().getCommandChannel() != null) && (trg.getParty().getCommandChannel() != null))
- {
- if (src.getParty().getCommandChannel() == trg.getParty().getCommandChannel())
- {
- continue;
- }
- }
  }
-
- if (trg.isInsideZone(ZoneType.PEACE))
+ }
+
+ if (!srcInArena && !(trg.isInsideZone(ZoneType.PVP) && !trg.isInsideZone(ZoneType.SIEGE)))
+ {
+ if ((src.getAllyId() == trg.getAllyId()) && (src.getAllyId() != 0))
  {
  continue;
  }
 
- if (!srcInArena && !(trg.isInsideZone(ZoneType.PVP) && !trg.isInsideZone(ZoneType.SIEGE)))
+ if ((src.getClan() != null) && (trg.getClan() != null))
  {
- if ((src.getAllyId() == trg.getAllyId()) && (src.getAllyId() != 0))
- {
- continue;
- }
-
- if ((src.getClan() != null) && (trg.getClan() != null))
- {
- if (src.getClan().getId() == trg.getClan().getId())
- {
- continue;
- }
- }
-
- if (!src.checkPvpSkill(obj, skill, activeChar instanceof L2Summon))
+ if (src.getClan().getId() == trg.getClan().getId())
  {
  continue;
  }
  }
+
+ if (!src.checkPvpSkill(obj, skill, activeChar instanceof L2Summon))
+ {
+ continue;
+ }
  }
  }
 
- if (!GeoEngine.getInstance().canSeeTarget(target, obj))
- {
- continue;
- }
-
  targetList.add(obj);
  }
 
Index: java/net/sf/l2j/gameserver/handler/target/TargetAuraUndead.java
===================================================================
--- java/net/sf/l2j/gameserver/handler/target/TargetAuraUndead.java (revision 1091)
+++ java/net/sf/l2j/gameserver/handler/target/TargetAuraUndead.java (working copy)
@@ -25,6 +25,7 @@
 import net.sf.l2j.gameserver.model.L2Object;
 import net.sf.l2j.gameserver.model.actor.L2Character;
 import net.sf.l2j.gameserver.model.actor.L2Npc;
+import net.sf.l2j.gameserver.model.actor.enums.NpcRaceType;
 import net.sf.l2j.gameserver.model.actor.instance.L2SummonInstance;
 import net.sf.l2j.gameserver.model.skills.Skill;
 import net.sf.l2j.gameserver.model.skills.enums.SkillTargetType;
@@ -47,7 +48,9 @@
  {
  if ((character instanceof L2Npc) || (character instanceof L2SummonInstance))
  {
- if (!character.isUndead())
+ L2Npc npc = (L2Npc) character;
+
+ if (npc.getTemplate().getRace() != NpcRaceType.UNDEAD)
  {
  continue;
  }
Index: java/net/sf/l2j/gameserver/handler/target/TargetUndead.java
===================================================================
--- java/net/sf/l2j/gameserver/handler/target/TargetUndead.java (revision 1091)
+++ java/net/sf/l2j/gameserver/handler/target/TargetUndead.java (working copy)
@@ -22,6 +22,7 @@
 import net.sf.l2j.gameserver.model.L2Object;
 import net.sf.l2j.gameserver.model.actor.L2Character;
 import net.sf.l2j.gameserver.model.actor.L2Npc;
+import net.sf.l2j.gameserver.model.actor.enums.NpcRaceType;
 import net.sf.l2j.gameserver.model.actor.instance.L2SummonInstance;
 import net.sf.l2j.gameserver.model.skills.Skill;
 import net.sf.l2j.gameserver.model.skills.enums.SkillTargetType;
@@ -47,7 +48,15 @@
  return EMPTY_TARGET_LIST;
  }
 
- if (!target.isUndead() || target.isDead())
+ L2Npc npc = (L2Npc) target;
+
+ if (npc.getTemplate().getRace() != NpcRaceType.UNDEAD)
+ {
+ activeChar.sendPacket(SystemMessage.INCORRECT_TARGET);
+ return EMPTY_TARGET_LIST;
+ }
+
+ if (target.isDead())
  {
  activeChar.sendPacket(SystemMessage.INCORRECT_TARGET);
  return EMPTY_TARGET_LIST;
Index: java/net/sf/l2j/gameserver/model/actor/L2Character.java
===================================================================
--- java/net/sf/l2j/gameserver/model/actor/L2Character.java (revision 1094)
+++ java/net/sf/l2j/gameserver/model/actor/L2Character.java (working copy)
@@ -1664,11 +1664,6 @@
  isSingleSpear = value;
  }
 
- public boolean isUndead()
- {
- return template.isUndead();
- }
-
  public CharTemplate getTemplate()
  {
  return template;
Index: java/net/sf/l2j/gameserver/model/actor/L2Npc.java
===================================================================
--- java/net/sf/l2j/gameserver/model/actor/L2Npc.java (revision 1091)
+++ java/net/sf/l2j/gameserver/model/actor/L2Npc.java (working copy)
@@ -306,15 +306,6 @@
  }
 
  /**
- * Return True if this npc is undead in function of the L2NpcTemplate.
- */
- @Override
- public boolean isUndead()
- {
- return getTemplate().isUndead();
- }
-
- /**
  * @return True if this npc is quest monster in function of the L2NpcTemplate.
  */
  public boolean isQuestMonster()
Index: java/net/sf/l2j/gameserver/model/actor/enums/NpcRaceType.java
===================================================================
--- java/net/sf/l2j/gameserver/model/actor/enums/NpcRaceType.java (revision 0)
+++ java/net/sf/l2j/gameserver/model/actor/enums/NpcRaceType.java (revision 0)
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 2014-2018 L2jAdmins
+ *
+ * This file is part of L2jAdmins.
+ *
+ * L2jAdmins is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * L2jAdmins is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+package net.sf.l2j.gameserver.model.actor.enums;
+
+/**
+ * @author fissban
+ */
+public enum NpcRaceType
+{
+ NONE,
+ UNDEAD,
+ BEAST,
+ ANIMAL,
+ PLANT,
+ DRAGON,
+ GIANT,
+ MAGIC_CREATURE,
+ CREATURE_VALAKAS,
+ BUG
+}
Index: java/net/sf/l2j/gameserver/model/actor/templates/CharTemplate.java
===================================================================
--- java/net/sf/l2j/gameserver/model/actor/templates/CharTemplate.java (revision 1091)
+++ java/net/sf/l2j/gameserver/model/actor/templates/CharTemplate.java (working copy)
@@ -77,8 +77,6 @@
  private final double baseHolyVuln;
  private final double baseDarkVuln;
 
- private final boolean isUndead;
-
  // C4 Stats
  private final int baseMpConsumeRate;
  private final int baseHpConsumeRate;
@@ -140,8 +138,6 @@
  baseHolyVuln = set.getDouble("holyVuln", 1.0);
  baseDarkVuln = set.getDouble("darkVuln", 1.0);
 
- isUndead = (set.getInteger("isUndead", 0) == 1);
-
  // C4 Stats
  baseMpConsumeRate = set.getInteger("mpConsumeRate", 0);
  baseHpConsumeRate = set.getInteger("hpConsumeRate", 0);
@@ -350,11 +346,6 @@
  return baseDarkVuln;
  }
 
- public boolean isUndead()
- {
- return isUndead;
- }
-
  public int getBaseMpConsumeRate()
  {
  return baseMpConsumeRate;
Index: java/net/sf/l2j/gameserver/model/actor/templates/NpcTemplate.java
===================================================================
--- java/net/sf/l2j/gameserver/model/actor/templates/NpcTemplate.java (revision 1093)
+++ java/net/sf/l2j/gameserver/model/actor/templates/NpcTemplate.java (working copy)
@@ -28,6 +28,7 @@
 
 import net.sf.l2j.gameserver.model.StatsSet;
 import net.sf.l2j.gameserver.model.actor.base.ClassId;
+import net.sf.l2j.gameserver.model.actor.enums.NpcRaceType;
 import net.sf.l2j.gameserver.model.drop.DropCategory;
 import net.sf.l2j.gameserver.model.drop.DropInstance;
 import net.sf.l2j.gameserver.model.holder.MinionHolder;
@@ -68,7 +69,7 @@
  private boolean isAuctioner = false;
  private boolean isWarehouse = false;
 
- private int race;
+ private NpcRaceType race;
  private final String jClass;
 
  /** The table containing all Item that can be dropped by L2NpcInstance using this L2NpcTemplate */
@@ -120,7 +121,7 @@
  ss = (short) set.getInteger("ss", 0);
  bss = (short) set.getInteger("bss", 0);
  ssRate = (short) set.getInteger("ssRate", 0);
- race = 0;
+ race = NpcRaceType.NONE;
  jClass = set.getString("jClass");
  }
 
@@ -257,14 +258,14 @@
  return scriptEvents;
  }
 
- public int getRace()
+ public NpcRaceType getRace()
  {
  return race;
  }
 
- public void setRace(int race)
+ public void setRace(NpcRaceType npcRaceType)
  {
- this.race = race;
+ this.race = npcRaceType;
  }
 
  public int getId()
Index: java/net/sf/l2j/gameserver/model/skills/stats/Formulas.java
===================================================================
--- java/net/sf/l2j/gameserver/model/skills/stats/Formulas.java (revision 1094)
+++ java/net/sf/l2j/gameserver/model/skills/stats/Formulas.java (working copy)
@@ -30,6 +30,7 @@
 import net.sf.l2j.gameserver.model.actor.L2Character;
 import net.sf.l2j.gameserver.model.actor.L2Npc;
 import net.sf.l2j.gameserver.model.actor.L2Playable;
+import net.sf.l2j.gameserver.model.actor.enums.NpcRaceType;
 import net.sf.l2j.gameserver.model.actor.instance.L2DoorInstance;
 import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
 import net.sf.l2j.gameserver.model.actor.instance.L2PetInstance;
@@ -498,9 +499,9 @@
 
  if (attacker instanceof L2Npc)
  {
- int raceId = ((L2Npc) attacker).getTemplate().getRace();
+ NpcRaceType raceId = ((L2Npc) attacker).getTemplate().getRace();
  // Skill Race : Undead
- if (raceId == 4290)
+ if (raceId == NpcRaceType.UNDEAD)
  {
  pAtk /= attacker.calcStat(StatsType.PHYSICAL_DEF_UNDEAD, 1, target, null);
  }
@@ -512,43 +513,33 @@
  }
  if (target instanceof L2Npc)
  {
- int raceId = ((L2Npc) target).getTemplate().getRace();
-
- if (raceId == 4290)// Skill Race : Undead
- {
- pAtk *= attacker.calcStat(StatsType.PHYSICAL_ATK_MONSTERS, 1, target, null);
- }
- if (raceId == 4292) // Skill Race : Beast
+ switch (((L2Npc) target).getTemplate().getRace())
  {
- pAtk *= attacker.calcStat(StatsType.PHYSICAL_ATK_MONSTERS, 1, target, null);
- }
- if (raceId == 4293)// Skill Race : Animal
- {
- pAtk *= attacker.calcStat(StatsType.PHYSICAL_ATK_ANIMALS, 1, target, null);
- }
- if (raceId == 4294)// Skill Race : Plant
- {
- pAtk *= attacker.calcStat(StatsType.PHYSICAL_ATK_PLANTS, 1, target, null);
- }
- if (raceId == 4299)// Skill Race : Dragon
- {
- pAtk *= attacker.calcStat(StatsType.PHYSICAL_ATK_DRAGONS, 1, target, null);
- }
- if (raceId == 4300)// Skill Race : Giant
- {
- pAtk *= attacker.calcStat(StatsType.PHYSICAL_ATK_GIANTS, 1, target, null);
- }
- if (raceId == 4301)// Skill Race : Bug
- {
- pAtk *= attacker.calcStat(StatsType.PHYSICAL_ATK_INSECTS, 1, target, null);
- }
- if (raceId == 4302)// Skill Race : Magic Creatures
- {
- pAtk *= attacker.calcStat(StatsType.PHYSICAL_ATK_MAGIC_CREATURES, 1, target, null);
- }
- if (((L2Npc) target).getId() == 12899)// For amulets of Valakas
- {
- pAtk *= attacker.calcStat(StatsType.VALAKAS_PHYSICAL_DMG, 1, null, null);
+ case UNDEAD:
+ case BEAST:
+ pAtk *= attacker.calcStat(StatsType.PHYSICAL_ATK_MONSTERS, 1, target, null);
+ break;
+ case ANIMAL:
+ pAtk *= attacker.calcStat(StatsType.PHYSICAL_ATK_ANIMALS, 1, target, null);
+ break;
+ case PLANT:
+ pAtk *= attacker.calcStat(StatsType.PHYSICAL_ATK_PLANTS, 1, target, null);
+ break;
+ case DRAGON:
+ pAtk *= attacker.calcStat(StatsType.PHYSICAL_ATK_DRAGONS, 1, target, null);
+ break;
+ case GIANT:
+ pAtk *= attacker.calcStat(StatsType.PHYSICAL_ATK_GIANTS, 1, target, null);
+ break;
+ case MAGIC_CREATURE:
+ pAtk *= attacker.calcStat(StatsType.PHYSICAL_ATK_MAGIC_CREATURES, 1, target, null);
+ break;
+ case BUG:
+ pAtk *= attacker.calcStat(StatsType.PHYSICAL_ATK_INSECTS, 1, target, null);
+ break;
+ case CREATURE_VALAKAS:
+ pAtk *= attacker.calcStat(StatsType.VALAKAS_PHYSICAL_DMG, 1, null, null);
+ break;
  }
  }
 


8
esto no lo necesitas
Código
	public static void main(String[] args)
{
new EventMedalQuest(-1, "Event Medal", "events");
}

esto
Código
	public EventMedalQuest(int questId, String name, String descr)
{
super(5000, "EventMedalQuest");

por

Código
	public EventMedalQuest()
{
super(5000, "EventMedalQuest");

9
Issues / Re:Char Freez
« en: Junio 04, 2018, 11:40:13 am »
eh echo varias pruebas y no logro reproducir tu error

10
Issues / Re:Problema instalando el server Rev 1993
« en: Junio 02, 2018, 07:14:00 pm »
Usa nuestro instalador para la db q te creara c4game y c4login....el error es porq no encuentra esta ultima db

11
Issues / Re:Char Freez
« en: Junio 02, 2018, 02:27:43 pm »
voy a agregar un simple chequeo aunque no entiendo el porq del error al tirar un simple skill.

Código
Index: java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java
===================================================================
--- java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java (revision 1093)
+++ java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java (working copy)
@@ -4671,6 +4671,11 @@
  */
  public boolean checkPvpSkill(L2Object target, Skill skill, boolean srcIsSummon)
  {
+ if (skill == null || target == null)
+ {
+ return false;
+ }
+
  L2PcInstance targetPlayer = target.getActingPlayer();
 
  // check for PC->PC Pvp status

12
Issues / Re:Char Freez
« en: Junio 02, 2018, 12:00:59 pm »
Jejeje queria saber cual es exactamente la linea pero bue

13
Issues / Re:Char Freez
« en: Junio 01, 2018, 10:29:38 pm »
que tienes en
Código
 at net.sf.l2j.gameserver.model.actor.instance.L2PcInstance.checkPvpSkill(L2PcInstance.java:4691)

14
Issues / Re:Char Freez
« en: Junio 01, 2018, 08:21:55 pm »
supongo que estas usando una version actualizada verdad? recuerda que casia  diario subo fix para reparar cosas

15
Issues / Re:Droplist y Rates Drop Bug Rev 1035
« en: Mayo 31, 2018, 02:05:54 pm »

Páginas: [1] 2 3 4 5 6 ... 9