public void SetPlayer(Character character) { Name = character.Name; Guid = new WoWGuid(character.GUID); }
static void HandleCharlist(Character[] rlist) { int x = 0; foreach (Character rl in rlist) { Log.WriteLine(LogType.Normal, "[{0}] {1} - {2}", x + 1, rl.Name, rl.Level); x++; } }
public void LoginPlayer(Character chr) { PacketOut outpacket = new PacketOut(WorldServerOpCode.CMSG_PLAYER_LOGIN); outpacket.Write(chr.GUID); Send(outpacket); outpacket = new PacketOut(WorldServerOpCode.CMSG_UPDATE_ACCOUNT_DATA); outpacket.Write((UInt32)7); outpacket.Write((UInt32)5144); outpacket.Write(account_data); Send(outpacket); objectMgr.MapID = chr.MapID; objectMgr.playerGuid = new WoWGuid(chr.GUID); objectMgr.getPlayerObject().SetPlayer(chr); StartHeartbeat(); movementMgr.Start(); combatMgr.Start(); terrainMgr.ChangeMap(chr.MapID); Log.WriteLine(LogType.Success, "Logged into world as {0}.", chr.Name); }
private void HandleCharlist(Character[] list) { this.UseWaitCursor = false; foreach (Character rl in list) { if (charlist.Items.Contains(rl.Name)) return; this.charlist.Items.Add(rl.Name); } button1.Text = "Connect to World Server"; button1.Enabled = true; Status = ServiceType.World; }
public void HandleCharEnum(PacketIn packet) { byte count = packet.ReadByte(); Character[] characterList = new Character[count]; for (int i = 0; i < count; i++) { characterList[i].GUID = packet.ReadUInt64(); characterList[i].Name = packet.ReadString(); characterList[i].Race = packet.ReadByte(); characterList[i].Class = packet.ReadByte(); packet.ReadByte(); packet.ReadUInt32(); packet.ReadByte(); packet.ReadByte(); packet.ReadUInt32(); characterList[i].MapID = packet.ReadUInt32(); packet.ReadFloat(); packet.ReadFloat(); packet.ReadFloat(); packet.ReadUInt32(); packet.ReadUInt32(); packet.ReadByte(); packet.ReadUInt32(); packet.ReadUInt32(); packet.ReadUInt32(); packet.ReadBytes(9 * 20); } Log.WriteLine(LogType.Success, "Received info about {0} characters", count); Charlist = characterList; mCore.Event(new Event(EventType.EVENT_CHARLIST, "", new object[] { Charlist })); PingLoop(); }