public override byte[] GetDecorationData() { using (var result = new PangyaBinaryWriter()) { result.WriteStruct(ItemDecoration); return(result.GetBytes()); } }
public void SendResponse(PangyaBinaryWriter packet) { Send(packet); if (packet.GetSize > 0) { Response.Clear(); } }
private void Handle() { switch (PacketResult.Action) { case ChangeEquipmentEnumB.GetCaddieSelected: { //response.Write(Player.Caddies.First().GetData()); } break; case ChangeEquipmentEnumB.GetClubSelected: { //response.Write(Player.WarehouseCollection.GetClubData()); } break; case ChangeEquipmentEnumB.GetBallSelected: { //response.Write(PacketResult.Id); } break; case ChangeEquipmentEnumB.GetCharSelected: { if (Player.Game == null) { return; } foreach (var player in Player.Game.Players) { var response = new PangyaBinaryWriter(); response.Write(new byte[] { 0x4B, 0x00 }); response.Write(0); response.Write((byte)PacketResult.Action); response.Write(Player.ConnectionId); response.Write(Player.Characters.GetCharData()); player.SendResponse(response.GetBytes()); } } break; case ChangeEquipmentEnumB.GetMascotSelected: { //response.Write(Player.Mascots.First()?.GetMascotInfo() ?? new byte[0x3E]);//62 } break; case ChangeEquipmentEnumB.GameStart: { HandleAcquireData(); } break; } }
public static byte[] ShowDropItem(uint ConID) { var result = new PangyaBinaryWriter(); result.Write(new byte[] { 0xCC, 0x00 }); result.WriteUInt32(ConID); result.WriteByte((byte)0); return(result.GetBytes()); }
public static byte[] ShowPlayerTimeBoost(uint ConID) { var result = new PangyaBinaryWriter(); result.Write(new byte[] { 0xC7, 0x00 }); result.Write(new byte[] { 0x00, 0x00, 0x40, 0x40 }); result.WriteUInt32(ConID); return(result.GetBytes()); }
public static byte[] ShowPlayerPauseGame(uint ConID, byte PauseType) { var result = new PangyaBinaryWriter(); result.Write(new byte[] { 0x8B, 0x00 }); result.WriteUInt32(ConID); result.WriteByte(PauseType); return(result.GetBytes()); }
public static byte[] ShowGameReady(uint ConID, byte ReadyType) { var result = new PangyaBinaryWriter(); result.Write(new byte[] { 0x78, 0x00 }); result.WriteUInt32(ConID); result.WriteByte(ReadyType); return(result.GetBytes()); }
public static byte[] ShowRingEffects(uint ConID, byte[] un) { var result = new PangyaBinaryWriter(); result.Write(new byte[] { 0x37, 0x02 }); result.WriteUInt32(ConID); result.Write(un); return(result.GetBytes()); }
public static byte[] ShowSleep(uint ConID, byte SleepType) { var result = new PangyaBinaryWriter(); result.Write(new byte[] { 0x8E, 0x00 }); result.WriteUInt32(ConID); result.WriteUInt16(SleepType); return(result.GetBytes()); }
public static byte[] ShowGameIcon(uint ConID, ushort IconType) { var result = new PangyaBinaryWriter(); result.Write(new byte[] { 0x5D, 0x00 }); result.WriteUInt32(ConID); result.WriteUInt16(IconType); return(result.GetBytes()); }
public static byte[] ShowGameLoading(uint ConID, byte Process) { var result = new PangyaBinaryWriter(); result.Write(new byte[] { 0xA3, 0x00 }); result.WriteUInt32(ConID); result.WriteByte(Process); return(result.GetBytes()); }
public static byte[] ShowMessageGlobal(string message) { using (var response = new PangyaBinaryWriter()) { response.Write(new byte[] { 0x42, 0x00 }); response.WritePStr(message); return(response.GetBytes()); } }
public static byte[] ShowWeather(ushort type = 0) { var result = new PangyaBinaryWriter(); result.Write(new byte[] { 0x9E, 0x00 }); result.WriteUInt16(type); result.WriteByte(0); return(result.GetBytes()); }
public static byte[] ShowGameStart(GameStartFlag result) { using (var response = new PangyaBinaryWriter()) { response.Write(new byte[] { 0x7F, 0x00 }); response.Write((uint)result); return(response.GetBytes()); } }
public void PlayerGPTime(GPlayer player) { using (var Response = new PangyaBinaryWriter()) { Response.Write(new byte[] { 0xbA, 0x00 }); Response.Write(GameTools.Tools.GetFixTime(DateTime.Now)); player.SendResponse(Response); } }
public static byte[] ShowLeaveMatch(uint ConID, byte Type) { var Response = new PangyaBinaryWriter(); Response.Write(new byte[] { 0x6C, 0x00 }); Response.WriteUInt32(ConID); Response.WriteByte(Type);//tipos return(Response.GetBytes()); }
public static byte[] ShowPowerShot(uint ConID, PowerShotFlag PowerShot) { var result = new PangyaBinaryWriter(); result.Write(new byte[] { 0x58, 0x00 }); result.WriteUInt32(ConID); result.WriteByte((byte)PowerShot); return(result.GetBytes()); }
public static byte[] ShowPlayerChangeClub(uint ConID, byte ClubType) { var result = new PangyaBinaryWriter(); result.Write(new byte[] { 0x59, 0x00 }); result.WriteUInt32(ConID); result.WriteByte(ClubType); return(result.GetBytes()); }
public static byte[] ShowNewMaster(uint ConID) { var resp = new PangyaBinaryWriter(); resp.Write(new byte[] { 0x7C, 0x00 }); resp.WriteUInt32(ConID); resp.WriteUInt16(65535); return(resp.GetBytes()); }
public static byte[] ShowPlayerRotate(uint ConID, float Angle) { var result = new PangyaBinaryWriter(); result.Write(new byte[] { 0x56, 0x00 }); result.WriteUInt32(ConID); result.WriteSingle(Angle); return(result.GetBytes()); }
public static byte[] ShowTeam(uint ConID, GameTeamVersusFlag Team) { var result = new PangyaBinaryWriter(); result.Write(new byte[] { 0x32, 0x01 }); result.WriteUInt32(ConID); result.WriteByte((byte)Team); return(result.GetBytes()); }
public void Notice(string message) { var response = new PangyaBinaryWriter(new MemoryStream()); response.Write(new byte[] { 0x42, 0x00 }); response.WritePStr("Aviso: " + message); SendToAll(response.GetBytes()); Console.WriteLine("BroadCast enviado com sucesso"); }
public static byte[] ShowLogin(uint UID) { using (var Response = new PangyaBinaryWriter()) { Response.Write(new byte[] { 0x2F, 0x00, 0x00 }); Response.Write(UID); //uid player return(Response.GetBytes()); } }
public byte[] GetGolfEQP() { using (var Packet = new PangyaBinaryWriter()) { Packet.WriteUInt32(BallTypeID); Packet.WriteUInt32(ClubSetIndex); return(Packet.GetBytes()); } }
public static bool SendAuth(AuthPacket packet) { if (_server.AuthServer != null) { _server.AuthServer.Send(packet); return(true); } else { switch (packet.ID) { case AuthPacketEnum.SERVER_RELEASE_CHAT: { bool Type = packet.Message.IsGM; string GetNickName = packet.Message.GetNickName; string GetMessage = packet.Message.GetMessage; if (Type) { PacketCreator.ChatText(GetNickName, GetMessage, Type); } } break; case AuthPacketEnum.SERVER_RELEASE_TICKET: { string GetNickName = packet.Message.GetNickName; string GetMessage = packet.Message.GetMessage; using (var result = new PangyaBinaryWriter()) { result.Write(new byte[] { 0xC9, 0x00 }); result.WritePStr(GetNickName); result.WritePStr(GetMessage); _server.SendToAll(result.GetBytes()); } } break; case AuthPacketEnum.SERVER_RELEASE_BOXRANDOM: { string GetMessage = packet.Message.GetMessage; _server.Notice(GetMessage); } break; case AuthPacketEnum.SERVER_RELEASE_NOTICE: { string GetNickname = packet.Message.GetNickname; string Messages = packet.Message.mensagem; PacketCreator.ShowGMNotice(Messages, GetNickname); } break; } return(false); } }
public byte[] GetInfo() { using (var result = new PangyaBinaryWriter()) { result.Write(Index); result.Write(TypeID); result.Write(Quantity); return(result.GetBytes()); } }
public static byte[] ShowDeleteFriend(uint FriendUID) { using (var Response = new PangyaBinaryWriter()) { Response.Write(new byte[] { 0x30, 0x00, 0x0B, 0x01 }); Response.Write(0); Response.Write(FriendUID); return(Response.GetBytes()); } }
protected void PlayerShopPangsInfo(GPlayer player, Packet packet) { using (var Response = new PangyaBinaryWriter()) { Response.Write(new byte[] { 0xEA, 0x00 }); Response.Write(1); // return code Response.WriteUInt64(player.GameInfo.GameShop.Pangs); // income player.SendResponse(Response.GetBytes()); } }
/// <summary> /// Size Packet 634 /// </summary> /// <returns>Select(634 array of byte)</returns> public byte[] GetEquipInfo() { var Response = new PangyaBinaryWriter(); Response.Write(GetCharData()); Response.Write(GetCaddieData()); Response.Write(GetClubData()); Response.Write(GetMascotData()); return(Response.GetBytes()); }
public byte[] GetToolbar() { PangyaBinaryWriter Reply; Reply = new PangyaBinaryWriter(); Reply.Write(new byte[] { 0x72, 0x00 }); Reply.Write(GetEquipData()); return(Reply.GetBytes()); }