Commit b6c69543 authored by tricid's avatar tricid

Get rid of some inconsistent weapontypes. This might break shit.

I'll test it soon.  Something was dumb and needs to be fixed tho
parent f1a993d8
......@@ -129,7 +129,7 @@ public class C_Attack extends ClientBasePacket {
L1ItemInstance ammo = null;
if (weapon != null) {
weaponId = weapon.getItem().getItemId();
weaponType = weapon.getItem().getType1();
weaponType = weapon.getItem().getType();
if (weaponType == WeaponType.Bow) {
ammo = pc.getInventory().getArrow();
} else if (weaponType == WeaponType.Gauntlet) {
......
......@@ -30,7 +30,7 @@ public class ItemTable {
private static Logger _log = LoggerFactory.getLogger(ItemTable.class.getName());
private static final Map<String, Integer> _armorTypes = Maps.newHashMap();
private static final Map<String, Integer> _weaponTypes = Maps.newHashMap();
private static final Map<String, Integer> _weaponId = Maps.newHashMap();
// private static final Map<String, Integer> _weaponId = Maps.newHashMap();
private static final Map<String, Integer> _materialTypes = Maps
.newHashMap();
private static final Map<String, Integer> _etcItemTypes = Maps.newHashMap();
......@@ -145,24 +145,24 @@ public class ItemTable {
_weaponTypes.put("kiringku", Integer.valueOf(17));
_weaponTypes.put("chainsword", Integer.valueOf(18));
_weaponId.put("sword", Integer.valueOf(4));
_weaponId.put("dagger", Integer.valueOf(46));
_weaponId.put("tohandsword", Integer.valueOf(50));
_weaponId.put("bow", Integer.valueOf(20));
_weaponId.put("blunt", Integer.valueOf(11));
_weaponId.put("spear", Integer.valueOf(24));
_weaponId.put("staff", Integer.valueOf(40));
_weaponId.put("throwingknife", Integer.valueOf(2922));
_weaponId.put("arrow", Integer.valueOf(66));
_weaponId.put("gauntlet", Integer.valueOf(62));
_weaponId.put("claw", Integer.valueOf(58));
_weaponId.put("edoryu", Integer.valueOf(54));
_weaponId.put("singlebow", Integer.valueOf(20));
_weaponId.put("singlespear", Integer.valueOf(24));
_weaponId.put("tohandblunt", Integer.valueOf(11));
_weaponId.put("tohandstaff", Integer.valueOf(40));
_weaponId.put("kiringku", Integer.valueOf(58));
_weaponId.put("chainsword", Integer.valueOf(24));
// _weaponId.put("sword", Integer.valueOf(4));
// _weaponId.put("dagger", Integer.valueOf(46));
// _weaponId.put("tohandsword", Integer.valueOf(50));
// _weaponId.put("bow", Integer.valueOf(20));
// _weaponId.put("blunt", Integer.valueOf(11));
// _weaponId.put("spear", Integer.valueOf(24));
// _weaponId.put("staff", Integer.valueOf(40));
// _weaponId.put("throwingknife", Integer.valueOf(2922));
// _weaponId.put("arrow", Integer.valueOf(66));
// _weaponId.put("gauntlet", Integer.valueOf(62));
// _weaponId.put("claw", Integer.valueOf(58));
// _weaponId.put("edoryu", Integer.valueOf(54));
// _weaponId.put("singlebow", Integer.valueOf(20));
// _weaponId.put("singlespear", Integer.valueOf(24));
// _weaponId.put("tohandblunt", Integer.valueOf(11));
// _weaponId.put("tohandstaff", Integer.valueOf(40));
// _weaponId.put("kiringku", Integer.valueOf(58));
// _weaponId.put("chainsword", Integer.valueOf(24));
_materialTypes.put("none", Integer.valueOf(0));
_materialTypes.put("liquid", Integer.valueOf(1));
......@@ -285,8 +285,8 @@ public class ItemTable {
weapon.setIdentifiedNameId(rs.getString("identified_name_id"));
weapon.setType((_weaponTypes.get(rs.getString("type")))
.intValue());
weapon.setType1((_weaponId.get(rs.getString("type")))
.intValue());
// weapon.setType1((_weaponId.get(rs.getString("type")))
// .intValue());
weapon.setType2(1);
weapon.setUseType(1);
weapon.setMaterial((_materialTypes.get(rs.getString("material")))
......
......@@ -139,7 +139,7 @@ public class L1Attack {
private L1ItemInstance weapon = null;
private int _weaponId = 0;
private int _weaponType = 0;
private int _weaponType2 = 0;
//private int _weaponType2 = 0;
private int _weaponAddHit = 0;
private int _weaponAddDmg = 0;
private int _weaponSmall = 0;
......@@ -281,9 +281,9 @@ public class L1Attack {
if (weapon != null) {
L1Item item = weapon.getItem();
_weaponId = item.getItemId();
_weaponType = item.getType1();
_weaponType2 = item.getType();
isKiringku = _weaponType2 == WeaponType.Kiringku;
_weaponType = item.getType();
//_weaponType2 = item.getType();
isKiringku = _weaponType == WeaponType.Kiringku;
_weaponAddHit = item.getHitModifier() + weapon.getHitByMagic();
_weaponAddDmg = item.getDmgModifier() + weapon.getDmgByMagic();
_weaponSmall = item.getDmgSmall();
......@@ -833,7 +833,7 @@ public class L1Attack {
damage += calcAttrEnchantDmg();
}
if (_weaponType2 == WeaponType.Chainsword) {
if (_weaponType == WeaponType.Chainsword) {
if (_pc.isFoeSlayer()) {
if (_pc.hasSkillEffect(STATUS_WEAKNESS_EXPOSURE_LV3)) {
damage += 60;
......
......@@ -54,7 +54,7 @@ public class L1EquipmentSlot {
private void setWeapon(L1ItemInstance weapon) {
_owner.setWeapon(weapon);
_owner.setCurrentWeapon(weapon.getItem().getType1());
_owner.setCurrentWeapon(weapon.getItem().getType());
weapon.startEquipmentTimer(_owner);
_weapon = weapon;
}
......
......@@ -2,10 +2,23 @@ package l1j.server.server.model.item;
public class WeaponType {
public static final int Fist = 0;
public static final int Sword = 1;
public static final int Dagger = 2;
public static final int TwoHandSword = 3;
public static final int Bow = 4;
public static final int Spear = 5;
public static final int Blunt = 6;
public static final int Staff = 7;
public static final int ThrowingKnife = 8;
public static final int Arrow = 9;
public static final int Gauntlet = 10;
public static final int Claw = 11;
public static final int Edoryu = 12;
public static final int SingleBow = 13;
public static final int SingleSpear = 14;
public static final int TwoHandBlunt = 15;
public static final int TwoHandStaff = 16;
public static final int Kiringku = 17;
public static final int Bow = 20;
public static final int Edoryu = 54;
public static final int Claw = 58;
public static final int Gauntlet = 62;
public static final int Chainsword = 18;
}
......@@ -93,26 +93,26 @@ public abstract class L1Item implements Serializable {
_type = type;
}
private int _type1;
/**
* getType1<br>
*
* @return <p>
* [weapon]<br>
* sword:4, dagger:46, tohandsword:50, bow:20, blunt:11, spear:24,
* staff:40, throwingknife:2922, arrow:66, gauntlet:62, claw:58,
* edoryu:54, singlebow:20, singlespear:24, tohandblunt:11,
* tohandstaff:40
* </p>
*/
public int getType1() {
return _type1;
}
public void setType1(int type1) {
_type1 = type1;
}
// private int _type1;
//
// /**
// * getType1<br>
// *
// * @return <p>
// * [weapon]<br>
// * sword:4, dagger:46, tohandsword:50, bow:20, blunt:11, spear:24,
// * staff:40, throwingknife:2922, arrow:66, gauntlet:62, claw:58,
// * edoryu:54, singlebow:20, singlespear:24, tohandblunt:11,
// * tohandstaff:40
// * </p>
// */
// public int getType1() {
// return _type1;
// }
//
// public void setType1(int type1) {
// _type1 = type1;
// }
private int _material;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment