This commit is contained in:
Light2
2014-03-28 02:23:18 +01:00
2 changed files with 20 additions and 4 deletions
+11 -1
View File
@@ -83,12 +83,15 @@ public class DevService implements INetworkDispatch {
suiOptions.put((long) 21, "(Dark) Jedi Robe");
suiOptions.put((long) 22, "Composite Armor");
suiOptions.put((long) 23, "Weapons");
suiOptions.put((long) 24, "Misc Items");
break;
case 3: // [Items] Weapons
suiOptions.put((long) 30, "Jedi Weapons");
suiOptions.put((long) 31, "Melee Weapons");
suiOptions.put((long) 32, "Ranged Weapons");
break;
case 4: // [Items] Misc Items
suiOptions.put((long) 40, "Unity Ring");
}
final SUIWindow window = core.suiService.createListBox(ListBoxType.LIST_BOX_OK_CANCEL, "Character Builder Terminal", "Select the desired option and click OK.", suiOptions, creature, null, 10);
@@ -209,7 +212,10 @@ public class DevService implements INetworkDispatch {
case 23: // Weapons
sendCharacterBuilderSUI(player, 3);
return;
case 24: // Misc Items
sendCharacterBuilderSUI(player, 4);
return;
// [Items] Weapons
case 30: // Jedi Weapons
SWGObject lightsaber1 = core.objectService.createObject("object/weapon/melee/sword/crafted_saber/shared_sword_lightsaber_one_handed_gen5.iff", planet);
@@ -257,6 +263,10 @@ public class DevService implements INetworkDispatch {
inventory.add(rifle1);
return;
case 40:
TangibleObject ring = (TangibleObject) core.objectService.createObject("object/tangible/wearables/ring/shared_ring_s01.iff", planet);
ring.setCustomName("Unity Ring");
inventory.add(ring);
}
}
});
+9 -3
View File
@@ -87,6 +87,8 @@ public class CombatService implements INetworkDispatch {
public void doCombat(final CreatureObject attacker, final TangibleObject target, final WeaponObject weapon, final CombatCommand command, final int actionCounter) {
if(target instanceof CreatureObject) if(((CreatureObject) target).getPosture() == Posture.Incapacitated || ((CreatureObject) target).getPosture() == Posture.Dead) return;
boolean success = true;
if((command.getAttackType() == 0 || command.getAttackType() == 1 || command.getAttackType() == 3) && !attemptCombat(attacker, target))
@@ -181,10 +183,14 @@ public class CombatService implements INetworkDispatch {
if(target instanceof CreatureObject)
{
if(((CreatureObject)(target)).getPosture() == Posture.Incapacitated)
CreatureObject creature = (CreatureObject)target;
if(creature.getPosture() == Posture.Incapacitated || creature.getPosture() == Posture.Dead)
{
attacker.removeDefender(target);
target.removeDefender(attacker);
for (TangibleObject defender : creature.getDefendersList())
{
defender.removeDefender(creature);
creature.removeDefender(defender);
}
}
}
}