Send modified item inventory update with checkAndEquipAmmunition method.

This commit is contained in:
MobiusDevelopment 2021-11-08 23:16:25 +00:00
parent 9bb7369263
commit e3691a48d9
21 changed files with 93 additions and 36 deletions

View File

@ -5827,11 +5827,14 @@ public class PlayerInstance extends Playable
{
arrows = _inventory.findBoltForCrossBow(weapon);
}
// Equip arrows needed in left hand.
if (arrows != null)
{
// Equip arrows needed in left hand
_inventory.setPaperdollItem(Inventory.PAPERDOLL_LHAND, arrows);
sendItemList(false);
final InventoryUpdate iu = new InventoryUpdate();
iu.addModifiedItem(arrows);
sendInventoryUpdate(iu);
return true;
}
}

View File

@ -5829,11 +5829,14 @@ public class PlayerInstance extends Playable
{
arrows = _inventory.findBoltForCrossBow(weapon);
}
// Equip arrows needed in left hand.
if (arrows != null)
{
// Equip arrows needed in left hand
_inventory.setPaperdollItem(Inventory.PAPERDOLL_LHAND, arrows);
sendItemList(false);
final InventoryUpdate iu = new InventoryUpdate();
iu.addModifiedItem(arrows);
sendInventoryUpdate(iu);
return true;
}
}

View File

@ -5831,11 +5831,14 @@ public class PlayerInstance extends Playable
{
arrows = _inventory.findBoltForCrossBow(weapon);
}
// Equip arrows needed in left hand.
if (arrows != null)
{
// Equip arrows needed in left hand
_inventory.setPaperdollItem(Inventory.PAPERDOLL_LHAND, arrows);
sendItemList(false);
final InventoryUpdate iu = new InventoryUpdate();
iu.addModifiedItem(arrows);
sendInventoryUpdate(iu);
return true;
}
}

View File

@ -5826,11 +5826,14 @@ public class PlayerInstance extends Playable
{
arrows = _inventory.findBoltForCrossBow(weapon);
}
// Equip arrows needed in left hand.
if (arrows != null)
{
// Equip arrows needed in left hand
_inventory.setPaperdollItem(Inventory.PAPERDOLL_LHAND, arrows);
sendItemList(false);
final InventoryUpdate iu = new InventoryUpdate();
iu.addModifiedItem(arrows);
sendInventoryUpdate(iu);
return true;
}
}

View File

@ -5809,11 +5809,14 @@ public class PlayerInstance extends Playable
{
arrows = _inventory.findBoltForCrossBow(weapon);
}
// Equip arrows needed in left hand.
if (arrows != null)
{
// Equip arrows needed in left hand
_inventory.setPaperdollItem(Inventory.PAPERDOLL_LHAND, arrows);
sendItemList();
final InventoryUpdate iu = new InventoryUpdate();
iu.addModifiedItem(arrows);
sendInventoryUpdate(iu);
return true;
}
}

View File

@ -5809,11 +5809,14 @@ public class PlayerInstance extends Playable
{
arrows = _inventory.findBoltForCrossBow(weapon);
}
// Equip arrows needed in left hand.
if (arrows != null)
{
// Equip arrows needed in left hand
_inventory.setPaperdollItem(Inventory.PAPERDOLL_LHAND, arrows);
sendItemList();
final InventoryUpdate iu = new InventoryUpdate();
iu.addModifiedItem(arrows);
sendInventoryUpdate(iu);
return true;
}
}

View File

@ -5810,11 +5810,14 @@ public class PlayerInstance extends Playable
{
arrows = _inventory.findBoltForCrossBow(weapon);
}
// Equip arrows needed in left hand.
if (arrows != null)
{
// Equip arrows needed in left hand
_inventory.setPaperdollItem(Inventory.PAPERDOLL_LHAND, arrows);
sendItemList();
final InventoryUpdate iu = new InventoryUpdate();
iu.addModifiedItem(arrows);
sendInventoryUpdate(iu);
return true;
}
}

View File

@ -5774,11 +5774,14 @@ public class PlayerInstance extends Playable
{
arrows = _inventory.findBoltForCrossBow(weapon);
}
// Equip arrows needed in left hand.
if (arrows != null)
{
// Equip arrows needed in left hand
_inventory.setPaperdollItem(Inventory.PAPERDOLL_LHAND, arrows);
sendItemList();
final InventoryUpdate iu = new InventoryUpdate();
iu.addModifiedItem(arrows);
sendInventoryUpdate(iu);
return true;
}
}

View File

@ -5819,7 +5819,9 @@ public class PlayerInstance extends Playable
if (ammunition != null)
{
addAmmunitionSkills(ammunition);
sendItemList();
final InventoryUpdate iu = new InventoryUpdate();
iu.addModifiedItem(ammunition);
sendInventoryUpdate(iu);
return true;
}

View File

@ -5836,7 +5836,9 @@ public class PlayerInstance extends Playable
if (ammunition != null)
{
addAmmunitionSkills(ammunition);
sendItemList();
final InventoryUpdate iu = new InventoryUpdate();
iu.addModifiedItem(ammunition);
sendInventoryUpdate(iu);
return true;
}

View File

@ -5869,7 +5869,9 @@ public class PlayerInstance extends Playable
if (ammunition != null)
{
addAmmunitionSkills(ammunition);
sendItemList();
final InventoryUpdate iu = new InventoryUpdate();
iu.addModifiedItem(ammunition);
sendInventoryUpdate(iu);
return true;
}

View File

@ -5802,11 +5802,14 @@ public class PlayerInstance extends Playable
{
arrows = _inventory.findBoltForCrossBow(weapon);
}
// Equip arrows needed in left hand.
if (arrows != null)
{
// Equip arrows needed in left hand
_inventory.setPaperdollItem(Inventory.PAPERDOLL_LHAND, arrows);
sendItemList(false);
final InventoryUpdate iu = new InventoryUpdate();
iu.addModifiedItem(arrows);
sendInventoryUpdate(iu);
return true;
}
}

View File

@ -5802,11 +5802,14 @@ public class PlayerInstance extends Playable
{
arrows = _inventory.findBoltForCrossBow(weapon);
}
// Equip arrows needed in left hand.
if (arrows != null)
{
// Equip arrows needed in left hand
_inventory.setPaperdollItem(Inventory.PAPERDOLL_LHAND, arrows);
sendItemList(false);
final InventoryUpdate iu = new InventoryUpdate();
iu.addModifiedItem(arrows);
sendInventoryUpdate(iu);
return true;
}
}

View File

@ -5788,11 +5788,14 @@ public class PlayerInstance extends Playable
{
arrows = _inventory.findBoltForCrossBow(weapon);
}
// Equip arrows needed in left hand.
if (arrows != null)
{
// Equip arrows needed in left hand
_inventory.setPaperdollItem(Inventory.PAPERDOLL_LHAND, arrows);
sendItemList();
final InventoryUpdate iu = new InventoryUpdate();
iu.addModifiedItem(arrows);
sendInventoryUpdate(iu);
return true;
}
}

View File

@ -5802,11 +5802,14 @@ public class PlayerInstance extends Playable
{
arrows = _inventory.findBoltForCrossBow(weapon);
}
// Equip arrows needed in left hand.
if (arrows != null)
{
// Equip arrows needed in left hand
_inventory.setPaperdollItem(Inventory.PAPERDOLL_LHAND, arrows);
sendItemList();
final InventoryUpdate iu = new InventoryUpdate();
iu.addModifiedItem(arrows);
sendInventoryUpdate(iu);
return true;
}
}

View File

@ -5802,11 +5802,14 @@ public class PlayerInstance extends Playable
{
arrows = _inventory.findBoltForCrossBow(weapon);
}
// Equip arrows needed in left hand.
if (arrows != null)
{
// Equip arrows needed in left hand
_inventory.setPaperdollItem(Inventory.PAPERDOLL_LHAND, arrows);
sendItemList();
final InventoryUpdate iu = new InventoryUpdate();
iu.addModifiedItem(arrows);
sendInventoryUpdate(iu);
return true;
}
}

View File

@ -5756,11 +5756,14 @@ public class PlayerInstance extends Playable
{
arrows = _inventory.findBoltForCrossBow(weapon);
}
// Equip arrows needed in left hand.
if (arrows != null)
{
// Equip arrows needed in left hand
_inventory.setPaperdollItem(Inventory.PAPERDOLL_LHAND, arrows);
sendItemList();
final InventoryUpdate iu = new InventoryUpdate();
iu.addModifiedItem(arrows);
sendInventoryUpdate(iu);
return true;
}
}

View File

@ -5783,11 +5783,14 @@ public class PlayerInstance extends Playable
{
arrows = _inventory.findBoltForCrossBow(weapon);
}
// Equip arrows needed in left hand.
if (arrows != null)
{
// Equip arrows needed in left hand
_inventory.setPaperdollItem(Inventory.PAPERDOLL_LHAND, arrows);
sendItemList(false);
final InventoryUpdate iu = new InventoryUpdate();
iu.addModifiedItem(arrows);
sendInventoryUpdate(iu);
return true;
}
}

View File

@ -5835,7 +5835,9 @@ public class PlayerInstance extends Playable
if (ammunition != null)
{
addAmmunitionSkills(ammunition);
sendItemList();
final InventoryUpdate iu = new InventoryUpdate();
iu.addModifiedItem(ammunition);
sendInventoryUpdate(iu);
return true;
}

View File

@ -5880,7 +5880,9 @@ public class PlayerInstance extends Playable
if (ammunition != null)
{
addAmmunitionSkills(ammunition);
sendItemList();
final InventoryUpdate iu = new InventoryUpdate();
iu.addModifiedItem(ammunition);
sendInventoryUpdate(iu);
return true;
}

View File

@ -5880,7 +5880,9 @@ public class PlayerInstance extends Playable
if (ammunition != null)
{
addAmmunitionSkills(ammunition);
sendItemList();
final InventoryUpdate iu = new InventoryUpdate();
iu.addModifiedItem(ammunition);
sendInventoryUpdate(iu);
return true;
}