@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); }