Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ### Eclipse Workspace Patch 1.0
- #P Orionwins
- diff --git src/l2jwins/game/model/actor/instance/L2RandomCraftInstance.java src/l2jwins/game/model/actor/instance/L2RandomCraftInstance.java
- index 8be6aff..a5d3d1b 100644
- --- src/l2jwins/game/model/actor/instance/L2RandomCraftInstance.java
- +++ src/l2jwins/game/model/actor/instance/L2RandomCraftInstance.java
- @@ -88,9 +88,11 @@
- player.getInventory().destroyItemByItemId("Random Craft", Config.RANDOM_CRAFT_ITEM_ID_CONSUME, Config.RANDOM_CRAFT_ITEM_CONSUME_REFRESH, player, this);
- generateItems(player);
- - showHtmlWindow(player);
- +
- player.sendPacket(new ItemList(player, true));
- + showHtmlWindow(player);
- +
- // Almacene los elementos generados en la base de datos para el jugador
- saveGeneratedItems(player);
- }
- @@ -105,8 +107,16 @@
- deleteGeneratedItems(player);
- createItem(player);
- +
- + // showHtmlWindow(player);
- + }
- +
- + else if (command.startsWith("back"))
- + {
- +
- + showHtmlWindow(player);
- + }
- +
- }
- private void generateItems(L2PcInstance player)
- @@ -380,6 +390,10 @@
- // Borra la lista de elementos para el jugador
- player.clearGeneratedCraftItems();
- setHasGeneratedItems(false);
- +
- + // Muestra la ventana de felicitaciones con el item ganador
- + showCongratulationsWindow(player, craftItem);
- +
- return;
- }
- }
- @@ -456,6 +470,42 @@
- player.sendPacket(html);
- }
- + private void showCongratulationsWindow(L2PcInstance player, RandomCraftItem craftItem)
- + {
- + StringBuilder html = new StringBuilder();
- +
- + html.append("<html><body>");
- + html.append("<center>Felicidades, has ganado un item</center>");
- + html.append("<br>");
- + html.append("<center>¡Has recibido</center>");
- + html.append("<br>");
- + html.append("<br>");
- + html.append("<img src=\"L2UI.SquareGray\" width=295 height=1>");
- + html.append("<center>");
- + html.append("<table>");
- + html.append("<tr>");
- + html.append("<td>");
- + html.append("<img src=").append(craftItem.getIcon()).append(" width=32 height=32>");
- + html.append("</td>");
- + html.append("<td width=260>");
- + html.append("<font color=LEVEL>").append(craftItem.getItem().getName()).append("</font>");
- + html.append("</td>");
- + html.append("</tr>");
- + html.append("</table>");
- + html.append("</center>");
- + html.append("<img src=\"L2UI.SquareGray\" width=295 height=1>");
- + html.append("<br>");
- + html.append("<br>");
- + html.append("<br>");
- + html.append("<br>");
- + html.append("<center>");
- + html.append("<button value=\"Back\" action=\"bypass -h npc_").append(getObjectId()).append("_back\" width=75 height=21 back=\"L2UI.DefaultButton_click\" fore=\"L2UI.DefaultButton\">");
- + html.append("</center>");
- + html.append("</body></html>");
- +
- + showHtmlWindow(player, html.toString());
- + }
- +
- /**
- * @return the hasGeneratedItems
- */
Advertisement
Comments
-
- this helps me better understand all the important aspects.
Add Comment
Please, Sign In to add comment
Advertisement