Код:
[CODE]
package actor;
public class TextBuilder {
class Entry {
String value;
Entry next;
Entry(String value) {
this.value = value;
this.next = null;
}
}
int size = 0;
Entry head;
Entry tail;
public TextBuilder() { }
public TextBuilder append(Object value) {
return append(value.toString());
}
public TextBuilder append(String value) {
size += value.length();
if(head == null)
head = tail = new Entry(value);
else
tail = (tail.next = new Entry(value));
return this;
}
public String toString() {
char[] chars = new char[size];
int offset = 0;
for(Entry target = head ; target != null ; offset += target.value.length(), target = target.next)
for(int i = 0 ; i
Код:
Код:
protected void showMainPage(L2PcInstance player)
{
//NpcHtmlMessage adminReply = new NpcHtmlMessage(5);
TextBuilder reply = new TextBuilder();
reply
.append("")
.append(getName())
.append("")
.append("[ ")
.append(getName())
.append(" ]")
.append("")
.append("")
.append("
Engine instances")
.append("");
for (L2EventGroupEngineInstance event : _eventInstances.values())
reply.
append("").
append(event.getName()).
append("").
append("").
append("").
append("");
reply
.append("")
.append("")
.append("")
.append("")
.append("");
adminReply.setHtml(replyMSG.toString());
player.sendPacket(adminReply);
// Send a Server->Client ActionFailed to the L2PcInstance in order to avoid that the client wait another packet
player.sendPacket(ActionFailed.STATIC_PACKET);
}