mirror of
https://github.com/ProjectSWGCore/NGECore2.git
synced 2026-08-02 03:15:52 -04:00
Initial commit of lightsaber customization - see extended
The majority of lightsaber customization now works. All that I can think of that needs to be done is: * Rare/Unique color crystals names/palette index to resources.datatables.LightsaberColors * Weapon element types and damage bonus based on color crystal * Random stats when tuning power crystals/krayt dragon pearls * Checks to see if lightsaber is full - container size is in IFFs, we should implement it for all containers
This commit is contained in:
@@ -533,12 +533,16 @@ public class LootService implements INetworkDispatch {
|
||||
|
||||
}
|
||||
|
||||
private void setCustomization(TangibleObject droppedItem,String itemName) {
|
||||
public void setCustomization(TangibleObject droppedItem,String itemName) {
|
||||
|
||||
// Example color crystal
|
||||
if (itemName.contains("colorcrystal")) {
|
||||
System.out.println("colorcrystal");
|
||||
droppedItem.setCustomizationVariable("/private/index_color_1", (byte) new Random().nextInt(11));
|
||||
|
||||
int crystalColor = new Random().nextInt(11);
|
||||
|
||||
droppedItem.setCustomizationVariable("/private/index_color_1", (byte) crystalColor);
|
||||
droppedItem.getAttributes().put("@obj_attr_n:color", resources.datatables.LightsaberColors.get(crystalColor));
|
||||
}
|
||||
|
||||
// Example power crystal
|
||||
@@ -558,7 +562,7 @@ public class LootService implements INetworkDispatch {
|
||||
// }
|
||||
}
|
||||
|
||||
private void handleSpecialItems(TangibleObject droppedItem,String itemName) {
|
||||
public void handleSpecialItems(TangibleObject droppedItem,String itemName) {
|
||||
if (itemName.contains("kraytpearl")){
|
||||
handleKraytPearl(droppedItem);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user