/* * LoginSuccessPacket.java * * Created on March 18, 2007, 11:19 PM * */package ro.net;import java.util.LinkedList;import java.util.List;import ro.Client;import ro.types.*;/** * * @author root */public class LoginSuccessPacket extends Packet { _Word len = new _Word(this); _Long loginID1 = new _Long(this); _Long accountID = new _Long(this); _Long loginID2 = new _Long(this); _Bytes garbage = new _Bytes(30, this); _Byte sex = new _Byte(this); DynamicMarker dyn = new DynamicMarker(this, dynamicPart.class); public static class dynamicPart extends PacketPart { _IP ip = new _IP(this); _Word port = new _Word(this); _String name = new _String(20, this); _Word users = new _Word(this); _Word dunno = new _Word(this); _Word dunno2 = new _Word(this); } public LoginSuccessPacket() { super(0x69); } public void act(Client c) { //Transform dynamic sections into CharacterServers List<CharacterServer> cslist = new LinkedList<CharacterServer>(); for (PacketPart pp: dyn.get()) { dynamicPart p = (dynamicPart) pp; cslist.add(new CharacterServer(p.name.get(), p.ip.get(), p.port.get().intValue(), p.users.get().intValue())); } //Send 'em off to the client c.setCharServers(cslist); }}