Sync with L2jServer HighFive Feb 18th 2015.
This commit is contained in:
@ -21,6 +21,7 @@ package com.l2jserver.gameserver.model;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.l2jserver.gameserver.instancemanager.MapRegionManager;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.interfaces.IIdentifiable;
|
||||
import com.l2jserver.gameserver.network.SystemMessageId;
|
||||
@ -35,7 +36,6 @@ public class PartyMatchRoom implements IIdentifiable
|
||||
private final int _id;
|
||||
private String _title;
|
||||
private int _loot;
|
||||
private int _location;
|
||||
private int _minlvl;
|
||||
private int _maxlvl;
|
||||
private int _maxmem;
|
||||
@ -46,7 +46,6 @@ public class PartyMatchRoom implements IIdentifiable
|
||||
_id = id;
|
||||
_title = title;
|
||||
_loot = loot;
|
||||
_location = 0; // TODO: Closes town
|
||||
_minlvl = minlvl;
|
||||
_maxlvl = maxlvl;
|
||||
_maxmem = maxmem;
|
||||
@ -132,9 +131,29 @@ public class PartyMatchRoom implements IIdentifiable
|
||||
return _maxlvl;
|
||||
}
|
||||
|
||||
/**
|
||||
* <ul>
|
||||
* <li>1 : Talking Island</li>
|
||||
* <li>2 : Gludio</li>
|
||||
* <li>3 : Dark Elven Ter.</li>
|
||||
* <li>4 : Elven Territory</li>
|
||||
* <li>5 : Dion</li>
|
||||
* <li>6 : Giran</li>
|
||||
* <li>7 : Neutral Zone</li>
|
||||
* <li>8 : Lyonn</li>
|
||||
* <li>9 : Schuttgart</li>
|
||||
* <li>10 : Oren</li>
|
||||
* <li>11 : Hunters Village</li>
|
||||
* <li>12 : Innadril</li>
|
||||
* <li>13 : Aden</li>
|
||||
* <li>14 : Rune</li>
|
||||
* <li>15 : Goddard</li>
|
||||
* </ul>
|
||||
* @return the id
|
||||
*/
|
||||
public int getLocation()
|
||||
{
|
||||
return _location;
|
||||
return MapRegionManager.getInstance().getMapRegion(_members.get(0)).getBbs();
|
||||
}
|
||||
|
||||
public int getMembers()
|
||||
@ -169,11 +188,6 @@ public class PartyMatchRoom implements IIdentifiable
|
||||
_maxlvl = maxlvl;
|
||||
}
|
||||
|
||||
public void setLocation(int loc)
|
||||
{
|
||||
_location = loc;
|
||||
}
|
||||
|
||||
public void setLootType(int loot)
|
||||
{
|
||||
_loot = loot;
|
||||
@ -188,4 +202,4 @@ public class PartyMatchRoom implements IIdentifiable
|
||||
{
|
||||
_title = title;
|
||||
}
|
||||
}
|
||||
}
|
@ -1954,6 +1954,11 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
||||
{
|
||||
if (item.isEquipped())
|
||||
{
|
||||
if (item.getMana() < item.useSkillDisTime())
|
||||
{
|
||||
abortCast();
|
||||
return;
|
||||
}
|
||||
item.decreaseMana(false, item.useSkillDisTime());
|
||||
break;
|
||||
}
|
||||
@ -5173,10 +5178,13 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
||||
}
|
||||
|
||||
// Launch weapon Special ability effect if available
|
||||
L2Weapon activeWeapon = getActiveWeaponItem();
|
||||
if (activeWeapon != null)
|
||||
if (crit)
|
||||
{
|
||||
activeWeapon.castOnCriticalSkill(this, target);
|
||||
L2Weapon activeWeapon = getActiveWeaponItem();
|
||||
if (activeWeapon != null)
|
||||
{
|
||||
activeWeapon.castOnCriticalSkill(this, target);
|
||||
}
|
||||
}
|
||||
|
||||
// Recharge any active auto-soulshot tasks for current creature.
|
||||
|
@ -680,20 +680,7 @@ public class CharStat
|
||||
return 1;
|
||||
}
|
||||
|
||||
double mpConsume = calcStat(Stats.MP_CONSUME, skill.getMpInitialConsume(), null, skill);
|
||||
|
||||
if (skill.isDance())
|
||||
{
|
||||
return (int) calcStat(Stats.DANCE_MP_CONSUME_RATE, mpConsume);
|
||||
}
|
||||
else if (skill.isMagic())
|
||||
{
|
||||
return (int) calcStat(Stats.MAGICAL_MP_CONSUME_RATE, mpConsume);
|
||||
}
|
||||
else
|
||||
{
|
||||
return (int) calcStat(Stats.PHYSICAL_MP_CONSUME_RATE, mpConsume);
|
||||
}
|
||||
return (int) calcStat(Stats.MP_CONSUME, skill.getMpInitialConsume(), null, skill);
|
||||
}
|
||||
|
||||
public byte getAttackElement()
|
||||
|
@ -454,6 +454,7 @@ public abstract class Inventory extends ItemContainer
|
||||
|
||||
if (itemSkill != null)
|
||||
{
|
||||
itemSkill.setReferenceItemId(item.getId());
|
||||
player.addSkill(itemSkill, false);
|
||||
|
||||
if (itemSkill.isActive())
|
||||
|
@ -126,7 +126,7 @@ public final class Skill implements IIdentifiable
|
||||
/** If {@code true} this skill's effect recovery HP/MP or CP from herb. */
|
||||
private final boolean _isRecoveryHerb;
|
||||
|
||||
private final int _refId;
|
||||
private int _refId;
|
||||
// all times in milliseconds
|
||||
private final int _hitTime;
|
||||
// private final int _skillInterruptTime;
|
||||
@ -225,7 +225,6 @@ public final class Skill implements IIdentifiable
|
||||
{
|
||||
_id = set.getInt("skill_id");
|
||||
_level = set.getInt("level");
|
||||
_refId = set.getInt("referenceId", 0);
|
||||
_displayId = set.getInt("displayId", _id);
|
||||
_displayLevel = set.getInt("displayLevel", _level);
|
||||
_name = set.getString("name", "");
|
||||
@ -1602,6 +1601,11 @@ public final class Skill implements IIdentifiable
|
||||
return _refId;
|
||||
}
|
||||
|
||||
public void setReferenceItemId(int val)
|
||||
{
|
||||
_refId = val;
|
||||
}
|
||||
|
||||
public String getAttributeName()
|
||||
{
|
||||
return _attribute;
|
||||
|
Reference in New Issue
Block a user