コード例 #1
0
 @Override
 public String getFormatedOverheadText() {
   final TextWidgetFormater sb = new TextWidgetFormater();
   sb.append(this.getName());
   final ArrayList<String> effects =
       CastableDescriptionGenerator.generateDescription(
           new EffectAreaWriter(this, this.m_level, 0));
   for (int i = 0, size = effects.size(); i < size; ++i) {
     sb.newLine().append(effects.get(i));
   }
   return sb.finishAndToString();
 }
コード例 #2
0
 @Override
 public void onCreation(final ChatViewManager manager) {
   final int idPrivate = ChatWindowManager.getInstance().getModeratorWindowId();
   final GameDateConst tmp = BaseGameDateProvider.INSTANCE.getDate();
   final String time = "[" + tmp.getHours() + ':' + tmp.getMinutes() + "] ";
   final TextWidgetFormater msg = new TextWidgetFormater();
   msg.openText();
   msg.addColor(new Color(0.84f, 0.27f, 0.29f, 1.0f));
   msg.append(time);
   msg.b().u();
   msg.addId("characterName_" + this.m_sourceId);
   msg.append(this.m_sourceName);
   msg._u()._b();
   msg.append(WakfuTranslator.getInstance().getString("colon")).append(this.m_message);
   msg.closeText();
   final ChatMessage chatMessage = new ChatMessage(msg.finishAndToString());
   chatMessage.setPipeDestination(3);
   chatMessage.setWindowId(idPrivate);
   ChatManager.getInstance().pushMessage(chatMessage);
 }