Examples of PartSet


Examples of com.l2client.model.PartSet

   * Retrieves weapon configs for an entity
   * @param top entity (e.g. DwarfWarrior etc.)
   * @return the next weapon configuration
   */
  public static WeaponSet getWeaponset(PartSet top){
    PartSet det = top.getPart("weapon");
    if(det != null){
    String weaponSets = det.getNext();
//    String weaponSet = det.getPart(weaponSets).getNext();
    Asset ws = new Asset(weaponSets,det.getName());
    Singleton.get().getAssetManager().loadAsset(ws, true);
    //add weaponset meshes
    return (WeaponSet)ws.getBaseAsset();
    } else
      return null;
View Full Code Here

Examples of com.l2client.model.PartSet

   * @param weapons  the waeponset to use for loading
   * @return
   */
  private static Asset[] getWeapons(PartSet top, WeaponSet weapons){
    if(weapons != null){
    PartSet det = top.getPart("mesh");
    PartSet p = det.getPart(weapons.getPrimhand());
    if(p == null)
      return null;
    String s = p.getNext();
    Asset prim = new Asset(s,p.getName());
    Singleton.get().getAssetManager().loadAsset(prim, false);
    p = det.getPart(weapons.getOffhand());
    //FIXME optionality not done here so far
    if(p != null){
      s = p.getNext();
      Asset secnd = new Asset(s,p.getName());
      Singleton.get().getAssetManager().loadAsset(secnd, false);
      return new Asset[]{prim,secnd};
    } else
      return new Asset []{prim};
   
View Full Code Here

Examples of com.l2client.model.PartSet

  private static HashMap<Asset, String> getWeaponGeoms(PartSet top,
      WeaponSet weapons) {
    HashMap<Asset, String> ret = new HashMap<Asset, String>();

    if (weapons != null) {
      PartSet det = top.getPart("mesh");
      PartSet p = det.getPart(weapons.getPrimhand());
      if (p == null) {
        log.severe("Failed to load any weapons for "+top.getName()+" and weaponset "+weapons);
        return ret;
      }
      String mat = p.getNext();
      for(PartSet set : p.getParts()) {
      Asset prim = new Asset(set.getNext(), p.getName());
      Singleton.get().getAssetManager().loadAsset(prim, false);
      ret.put(prim, mat);
      }
      p = det.getPart(weapons.getOffhand());
      // FIXME optionality not done here so far
      if (p != null) {
        mat = p.getNext();
        for(PartSet set : p.getParts()) {
        Asset prim = new Asset(set.getNext(), p.getName());
        Singleton.get().getAssetManager().loadAsset(prim, false);
        ret.put(prim, mat);
        }
      }
    }
View Full Code Here

Examples of com.l2client.model.PartSet

      man.loadParts("megaset.csv");
        // create the geometry and attach it
//      AssetManager assetMan = new DesktopAssetManager(true);
//      AnimData aData = (AnimData) assetMan.loadAsset("ready_idle.anim.xml");
     
      PartSet p = man.getPart("anim");
      assertNotNull("No animations found in megaset !?!", p);
     
      PartSet d = p.getPart("MTW2_Sword");
      assertNotNull("MTW2_Sword animation not found in megaset !?!", d);
      AnimationManager.get().precacheAnimations(d);
     
      d = p.getPart("MTW2_Knifeman");
      assertNotNull("MTW2_Knifeman animation not found in megaset !?!", d);
View Full Code Here

Examples of com.l2client.model.PartSet

public class PartSetTest extends TestCase {

  public void testSelf() {

    Singleton.get().getPartManager().loadParts("megaset.test.csv");
    PartSet s = Singleton.get().getPartManager().getPart("halberd");
    assertEquals(4, s.getSize());
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.