as0ka Posted February 9, 2017 Posted February 9, 2017 (edited) Hello i have question about cancel msg on display , in my systemmsg now when someone cancel me , its show only last buff wich is canceled , my question is it posible to show all buffs there like this on my pic? http://prikachi.com/images.php?images/343/9036343E.jpg Edited February 9, 2017 by as0ka Quote
AchYlek Posted February 9, 2017 Posted February 9, 2017 Hello i have question about cancel msg on display , in my systemmsg now when someone cancel me , its show only last buff wich is canceled , my question is it posible to show all buffs there like this on my pic? http://prikachi.com/images.php?images/343/9036343E.jpg no Quote
UgliBiBagli Posted February 9, 2017 Posted February 9, 2017 no, because each call to OnScreenMessage wipes previous message that was displayed thus only the last one appears on screen Quote
vampir Posted February 9, 2017 Posted February 9, 2017 Do you mean to show multiple cancelled buffs in those big letters message, that shows currently - Song of Storm Guard ? Yes, it can be done. There are 3 ways: 1. Server Side, 2. Interface.u, 3. Dll files Server side is easiest: In my H5 pack there is class EffectDispelEffects, it manages Cancels, Cleanses, Banes. After buffs are cancelled, you need to call new method: private static void showCancelOnScreenMsg(Player effected, Collection<Effect> cancelledBuffs) { String msg = getCancelOnSreenMsg(cancelledBuffs); showCancelOnScreenMsg(effected, msg); } private static string getCancelOnScreenMsg(Collection<Effect> cancelledBuffs) { StringBuilder builder = new StringBuilder(); boolean firstBuffAdded = false; for(Effect e : cancelledBuffs) { if(firstBuffAdded) builder.append("\n"); else firstBuffAdded = true; String effectName = e.getSkill().getName(); builder.append("- ").append(effectName); } return builder.toString(); } private static void showCancelOnScreenMsg(Player player, String message) { player.sendPacket(new ExShowScreenMessage(message, 5000, ExShowScreenMessage.ScreenMessageAlign.MIDDLE_RIGHT, false); } Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.