@Override
 public void init(final AbstractGameClientInstance clientInstance) throws Exception {
   BinaryDocumentManager.getInstance()
       .foreach(
           new AvatarBreedBinaryData(),
           new LoadProcedure<AvatarBreedBinaryData>() {
             @Override
             public void load(final AvatarBreedBinaryData bs) {
               final int breedId = bs.getId();
               final AvatarBreed breed = AvatarBreed.getBreedFromId(breedId);
               if (breed == null) {
                 AvatarBreedLoader.m_logger.error(
                     (Object) ("Tentative d'initialiser une breed inconnue " + breedId));
                 return;
               }
               breed.setData(createAvatarBreedData(bs));
               BreedColorsManager.getInstance().addAps(breed.getBreedId(), bs.getBackgroundAps());
             }
           });
   BinaryDocumentManager.getInstance()
       .foreach(
           new AvatarBreedColorsBinaryData(),
           new LoadProcedure<AvatarBreedColorsBinaryData>() {
             @Override
             public void load(final AvatarBreedColorsBinaryData bs) {
               final int breedId = bs.getId();
               AvatarBreedLoader.this.addBreedColor(breedId, bs);
             }
           });
   clientInstance.fireContentInitializerDone(this);
 }
 @Override
 public void init(final AbstractGameClientInstance clientInstance) throws Exception {
   BinaryDocumentManager.getInstance()
       .foreach(
           new AptitudeBinaryData(),
           new LoadProcedure<AptitudeBinaryData>() {
             @Override
             public void load(final AptitudeBinaryData bs) {
               final ReferenceAptitude refAptitude =
                   AptitudeLoader.this.createReferenceAptitude(bs);
               ReferenceAptitudeManager.getInstance().registerReferenceAptitude(refAptitude);
               for (final int effectId : bs.getEffectIds()) {
                 final WakfuEffect effect = EffectManager.getInstance().loadAndAddEffect(effectId);
                 if (effect != null) {
                   refAptitude.addEffect(effect);
                 } else {
                   AptitudeLoader.m_logger.error(
                       (Object)
                           ("Probl\u00e8me de chargmeent de ReferenceAptitude " + bs.getId()));
                 }
               }
             }
           });
   clientInstance.fireContentInitializerDone(this);
 }
Ejemplo n.º 3
0
 @Override
 public void init(final AbstractGameClientInstance clientInstance) throws Exception {
   BinaryDocumentManager.getInstance()
       .foreach(
           new PetBinaryData(),
           new LoadProcedure<PetBinaryData>() {
             @Override
             public void load(final PetBinaryData bs) {
               PetDefinitionManager.INSTANCE.add(
                   PetLoader.createPetDefinition(bs), bs.getItemRefId());
             }
           });
   clientInstance.fireContentInitializerDone(this);
 }
 @Override
 public void init(final AbstractGameClientInstance clientInstance) throws Exception {
   (this.m_config = new WakfuClientInteractiveElementFactoryConfiguration())
       .setFactories(WakfuClientInteractiveElementTypes.values());
   this.m_config.setViewFactories(WakfuClientInteractiveElementViewTypes.values());
   try {
     BinaryDocumentManager.getInstance()
         .foreach(
             new InteractiveElementModelBinaryData(),
             new LoadProcedure<InteractiveElementModelBinaryData>() {
               @Override
               public void load(final InteractiveElementModelBinaryData ibs) {
                 final int viewModelId = ibs.getId();
                 final short viewTypeId = ibs.getType();
                 final int gfx = ibs.getGfx();
                 final int color = ibs.getColor();
                 final byte height = ibs.getHeight();
                 final int particleId = ibs.getParticleId();
                 final int particleOffsetZ = ibs.getParticleOffsetZ();
                 InteractiveElementLoader.this.m_config.setViewProperties(
                     viewModelId, viewTypeId, gfx, height, color, particleId, particleOffsetZ);
                 if (InteractiveElementLoader.m_logger.isTraceEnabled()) {
                   InteractiveElementLoader.m_logger.trace(
                       (Object)
                           ("Loaded view id="
                               + viewModelId
                               + " type="
                               + viewTypeId
                               + " gfx="
                               + gfx
                               + " color="
                               + color
                               + " height="
                               + height));
                 }
               }
             });
   } catch (Exception e) {
     InteractiveElementLoader.m_logger.error(
         (Object) "Erreur lors de la lecture du fichier de vues d'\u00e9l\u00e9ments interactifs",
         (Throwable) e);
   }
   ((InteractiveElementFactory<T, WakfuClientInteractiveElementFactoryConfiguration>)
           WakfuClientInteractiveElementFactory.getInstance())
       .configure(this.m_config);
   this.m_config = null;
   clientInstance.fireContentInitializerDone(this);
 }