本文整理汇总了C#中FrameWork.PacketOut类的典型用法代码示例。如果您正苦于以下问题:C# PacketOut类的具体用法?C# PacketOut怎么用?C# PacketOut使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PacketOut类属于FrameWork命名空间,在下文中一共展示了PacketOut类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: SendAbilities
public void SendAbilities()
{
if (!HasPlayer())
return;
Log.Info("AbilityInterface", "Sending " + Abilities.Count + " Abilities");
PacketOut Out = new PacketOut((byte)Opcodes.F_CHARACTER_INFO);
Out.WriteByte(1); // Action
Out.WriteByte((byte)Abilities.Count);
Out.WriteUInt16(0x300);
foreach (Ability_Info Info in Abilities)
{
Out.WriteUInt16(Info.Entry);
Out.WriteByte(Info.Level);
}
GetPlayer().SendPacket(Out);
PacketOut AutoAttack = new PacketOut((byte)Opcodes.F_CHARACTER_INFO);
AutoAttack.WriteByte(1); // Action
AutoAttack.WriteByte(1); // Count
AutoAttack.WriteUInt16(0x300);
AutoAttack.WriteUInt16(245);
AutoAttack.WriteByte(1);
GetPlayer().SendPacket(AutoAttack);
}
开发者ID:Necrosummon,项目名称:WarEmu,代码行数:28,代码来源:AbilityInterface.cs
示例2: SendMeTo
public override void SendMeTo(Player Plr)
{
PacketOut Out = new PacketOut((byte)Opcodes.F_CREATE_STATIC);
Out.WriteUInt16(Oid);
Out.WriteUInt16(0);
Out.WriteUInt16((UInt16)Spawn.WorldO);
Out.WriteUInt16((UInt16)Spawn.WorldZ);
Out.WriteUInt32((UInt32)Spawn.WorldX);
Out.WriteUInt32((UInt32)Spawn.WorldY);
Out.WriteUInt16((ushort)Spawn.DisplayID);
Out.WriteUInt16(Spawn.Proto.GetUnk(0));
Out.WriteUInt16(Spawn.Proto.GetUnk(1));
Out.WriteUInt16(Spawn.Proto.GetUnk(2));
Out.WriteByte(0);
Out.WriteUInt16(Spawn.Proto.GetUnk(3));
Out.Fill(0, 5);
Out.WriteUInt16(Spawn.Proto.GetUnk(4));
Out.WriteUInt16(Spawn.Proto.GetUnk(5));
Out.WriteUInt32(0);
Out.WritePascalString(Name);
Out.WriteByte(0);
Plr.SendPacket(Out);
base.SendMeTo(Plr);
}
开发者ID:Necrosummon,项目名称:WarEmu,代码行数:30,代码来源:GameObject.cs
示例3: CL_CHECK
static public void CL_CHECK(BaseClient client, PacketIn packet)
{
Client cclient = client as Client;
uint Version = packet.GetUint32();
Log.Debug("CL_CHECK", "Launcher Version : " + Version);
PacketOut Out = new PacketOut((byte)Opcodes.LCR_CHECK);
if (Version != Program.Version)
{
Out.WriteByte((byte)CheckResult.LAUNCHER_VERSION); // Version incorrect + message
Out.WriteString(Program.Message);
client.SendPacket(Out);
cclient.Disconnect();
return;
}
byte File = packet.GetUint8();
UInt64 Len = 0;
if (File >= 1)
Len = packet.GetUint64();
if ((long)Len != Program.Info.Length)
{
Out.WriteByte((byte)CheckResult.LAUNCHER_FILE);
Out.WriteString(Program.StrInfo);
}
else
Out.WriteByte((byte)CheckResult.LAUNCHER_OK);
cclient.SendPacket(Out);
}
开发者ID:dzikun,项目名称:WarEmu,代码行数:35,代码来源:Packets.cs
示例4: SendAbilityDone
public void SendAbilityDone(ushort TargetOID)
{
Log.Success("Ability", "Send Done :" + Info.Entry);
Player player = this.Caster.GetPlayer();
PacketOut Out1 = new PacketOut((byte)Opcodes.F_USE_ABILITY);
Out1.WriteUInt16(0);
Out1.WriteUInt16(Info.Entry);
Out1.WriteUInt16(Caster.Oid);
Out1.WriteHexStringBytes("061022730601000001E601000000");
player.DispatchPacket(Out1, true);
PacketOut Out2 = new PacketOut((byte)Opcodes.F_USE_ABILITY);
Out2.WriteUInt16(0);
Out2.WriteUInt16(Info.Entry);
Out2.WriteUInt16(Caster.Oid);
Out2.WriteHexStringBytes("0610227302010000000001000000");
player.DispatchPacket(Out2, true);
PacketOut Out3 = new PacketOut((byte)Opcodes.F_SWITCH_ATTACK_MODE);
Out3.WriteByte(1);
Out3.Fill(0, 3);
player.SendPacket(Out3);
PacketOut Out4 = new PacketOut((byte)Opcodes.F_SET_ABILITY_TIMER);
Out4.WriteUInt16(Info.Entry);
Out4.Fill(0, 10);
player.SendPacket(Out4);
}
开发者ID:Necrosummon,项目名称:WarEmu,代码行数:29,代码来源:Ability.cs
示例5: OnWorldPlayerEvent
public override void OnWorldPlayerEvent(string EventName, Player Plr, object Data)
{
if (EventName == "SEND_PACKAGES")
{
List<PacketInfo> P;
if (Packets.TryGetValue(Plr._Info.Career, out P))
{
foreach (PacketInfo Packet in P)
{
PacketOut Out = new PacketOut(Packet.Opcode);
Out.Write(Packet.Data, 3, Packet.Data.Length - 3);
Plr.SendPacket(Out);
}
}
if (Plr._Info.FirstConnect && Plr.GmLevel == 0)
{
Plr._Info.FirstConnect = false;
PacketInfo Packet = Intros[Plr._Info.Career];
PacketOut Out = new PacketOut(Packet.Opcode);
Out.Write(Packet.Data, 3, Packet.Data.Length - 3);
Plr.SendPacket(Out);
}
}
}
开发者ID:dzikun,项目名称:WarEmu,代码行数:25,代码来源:PacketSenderScript.cs
示例6: CMSG_VerifyProtocolReq
static public void CMSG_VerifyProtocolReq(BaseClient client, PacketIn packet)
{
Client cclient = client as Client;
PacketOut Out = new PacketOut((byte)Opcodes.SMSG_VerifyProtocolReply);
byte[] IV_HASH1 = { 0x01, 0x53, 0x21, 0x4d, 0x4a, 0x04, 0x27, 0xb7, 0xb4, 0x59, 0x0f, 0x3e, 0xa7, 0x9d, 0x29, 0xe9 };
byte[] IV_HASH2 = { 0x49, 0x18, 0xa1, 0x2a, 0x64, 0xe1, 0xda, 0xbd, 0x84, 0xd9, 0xf4, 0x8a, 0x8b, 0x3c, 0x27, 0x20 };
ByteString iv1 = ByteString.CopyFrom(IV_HASH1);
ByteString iv2 = ByteString.CopyFrom(IV_HASH2);
VerifyProtocolReply.Builder verify = VerifyProtocolReply.CreateBuilder();
verify.SetResultCode(VerifyProtocolReply.Types.ResultCode.RES_SUCCESS);
verify.SetIv1(ByteString.CopyFrom(IV_HASH1));
verify.SetIv2(ByteString.CopyFrom(IV_HASH2));
Out.Write(verify.Build().ToByteArray());
cclient.SendTCPCuted(Out);
}
开发者ID:dzikun,项目名称:WarEmu,代码行数:25,代码来源:AuthentificationHandlers.cs
示例7: HandlePacket
public static void HandlePacket(BaseClient client, PacketIn packet)
{
LobbyClient cclient = (LobbyClient)client;
UInt32 WorldUid = packet.GetUint32R();
string Name = packet.GetUnicodeString();
PacketOut Out = new PacketOut((UInt32)Opcodes.ANS_CHARACTER_NAME_CHECK);
if (CheckName(Name) == 0)
{
cclient.CreateChar = new DBCharacter();
cclient.CreateChar.AcctId = cclient.Account.Id;
cclient.CreateChar.Name = Name;
if (cclient.Account.WorldId != WorldUid)
Program.CharMgr.SetAccountWorld(cclient.Account.Id, (int)WorldUid);
Out.WriteUInt32(0);
}
else
{
cclient.CreateChar = null;
Out.WriteUInt32(1);
}
cclient.SendTCP(Out);
}
开发者ID:Novo,项目名称:apbprivateserver,代码行数:28,代码来源:ASK_CHARACTER_NAME_CHECK.cs
示例8: BuildStats
public void BuildStats(ref PacketOut Out)
{
Out.WriteByte(0);
for (byte i = 0; i < _BaseStats.Length; ++i)
{
Out.WriteByte(i);
Out.WriteUInt16(_BaseStats[i]);
}
}
开发者ID:Necrosummon,项目名称:WarEmu,代码行数:9,代码来源:StatsInterface.cs
示例9: SendInteract
public void SendInteract(Player Plr, InteractMenu Menu)
{
if (Money > 0)
{
if (Plr.GetGroup() == null)
{
Plr.AddMoney(Money);
}
else
{
Plr.GetGroup().AddMoney(Money / (uint)Plr.GetGroup().Size());
}
Money = 0;
}
switch (Menu.Menu)
{
case 15: // Fermeture du loot
return;
case 13: // Récupération de tous les items
if (Plr.ItmInterface.GetTotalFreeInventorySlot() < GetLootCount())
Plr.SendLocalizeString("", GameData.Localized_text.TEXT_OVERAGE_CANT_LOOT);
else
{
for (byte i = 0; i < Loots.Length; ++i)
{
if (Loots[i] == null)
continue;
TakeLoot(Plr, i);
}
}
break;
case 12: // Récupération d'un item
TakeLoot(Plr, Menu.Num);
break;
}
PacketOut Out = new PacketOut((byte)Opcodes.F_INTERACT_RESPONSE);
Out.WriteByte(4);
Out.WriteByte(GetLootCount());
for (byte i = 0; i < Loots.Length; ++i)
{
if (Loots[i] == null)
continue;
Out.WriteByte(i);
Item.BuildItem(ref Out, null, Loots[i].Item, 0, 1);
}
Plr.SendPacket(Out);
}
开发者ID:JeFawk,项目名称:WarEmu,代码行数:57,代码来源:LootsMgr.cs
示例10: HandlePacket
public static void HandlePacket(BaseClient client, PacketIn packet)
{
LobbyClient cclient = client as LobbyClient;
Program.CharMgr.DeleteCharacter(cclient.Account.Id, packet.GetUint8());
PacketOut Out = new PacketOut((UInt32)Opcodes.ANS_CHARACTER_DELETE);
Out.WriteUInt32R(0);
cclient.SendTCP(Out);
}
开发者ID:Novo,项目名称:apbprivateserver,代码行数:9,代码来源:ASK_CHARACTER_DELETE.cs
示例11: BuildObjectives
public static void BuildObjectives(PacketOut Out, List<Quest_Objectives> Objs)
{
Out.WriteByte((byte)Objs.Count);
foreach (Quest_Objectives Objective in Objs)
{
Out.WriteByte((byte)Objective.ObjCount);
Out.WritePascalString(Objective.Description);
}
}
开发者ID:Necrosummon,项目名称:WarEmu,代码行数:10,代码来源:QuestsInterface.cs
示例12: SendTok
public void SendTok(ushort Entry, bool Print)
{
PacketOut Out = new PacketOut((byte)Opcodes.F_TOK_ENTRY_UPDATE);
Out.WriteUInt32(1);
Out.WriteUInt16((UInt16)Entry);
Out.WriteByte(1);
Out.WriteByte((byte)(Print ? 1 : 0));
Out.WriteByte(1);
GetPlayer().SendPacket(Out);
}
开发者ID:nalgol,项目名称:WarEmu,代码行数:10,代码来源:TokInterface.cs
示例13: Send
public static void Send(LobbyClient client)
{
PacketOut Out = new PacketOut((UInt32)Opcodes.ANS_CHARACTER_CREATE);
if (client.CreateChar == null)
Out.WriteInt32R(1);
else
{
Out.WriteInt32R(0);
Out.WriteInt32R(client.CreateChar.SlotId);
}
client.CreateChar = null;
client.SendTCP(Out);
}
开发者ID:Novo,项目名称:apbprivateserver,代码行数:13,代码来源:ANS_CHARACTER_CREATE.cs
示例14: F_PING
static public void F_PING(BaseClient client, PacketIn packet)
{
GameClient cclient = client as GameClient;
uint Timestamp = packet.GetUint32();
PacketOut Out = new PacketOut((byte)Opcodes.S_PONG);
Out.WriteUInt32(Timestamp);
Out.WriteUInt64((UInt64)TCPManager.GetTimeStamp());
Out.WriteUInt32((UInt32)(cclient.SequenceID+1));
Out.WriteUInt32(0);
cclient.SendPacket(Out);
}
开发者ID:dzikun,项目名称:WarEmu,代码行数:13,代码来源:AuthentificationHandlers.cs
示例15: Send
public static void Send(LobbyClient client)
{
Log.Debug("LOGIN_SALT", "Send to " + client.Account.Email);
MakeSalt(client);
PacketOut Out = new PacketOut((UInt32)Opcodes.LOGIN_SALT);
Out.WriteInt32R(client.Account.Id);
Out.Write(client.B, 0, 64);
Out.WriteByte(0x40);
Out.WriteByte(0);
Out.Write(client.Salt, 0, 10);
client.SendTCP(Out);
}
开发者ID:Novo,项目名称:apbprivateserver,代码行数:13,代码来源:LOGIN_SALT.cs
示例16: Send
public static void Send(LobbyClient client)
{
PacketOut Out = new PacketOut((UInt32)Opcodes.ANS_LOGIN_SUCCESS);
Out.WriteUnicodeString(client.Account.RealTag,48);
Out.WriteUInt32R(21); // Account Type
Out.WriteInt64R(TCPManager.GetTimeStamp());
// Temps avant expiration du compte
Out.WriteByte(0x13); // ms
Out.WriteByte(0x29); // sec
Out.WriteUInt16R(0x12); // Hour
// Date de création
Out.WriteByte(0x0E); // day
Out.WriteByte(0x07); // month
Out.WriteUInt16R(2010); // Year
Out.WriteInt32R(1450); // Temps de jeu (secondes)
Out.WriteInt32R(client.Account.Points); // Points APB
for(int i=1;i<6;++i)
Out.WriteInt32R(
Program.FileMgr.GetFileVersion(client.Account.Id, i, true, "", "")); // Config file, Server Version
Out.WriteInt32R(0);
Out.WriteUInt16(0x957D);
Out.WriteUInt16(0x0400);
Out.WriteUInt16(0x5052);
Out.WriteUInt16(0x4F45);
Out.WriteUInt16(0x552E);
Out.WriteUInt16(0x3232);
Out.WriteUInt16(0x3738);
Out.WriteUInt16(0x3031);
Out.WriteUInt16(0);
Out.WriteUInt16(0x0067);
Out.WriteUInt64(0x526C624331313256);
Out.WriteUInt64(0x486E314100000000);
Out.WriteUInt16(0);
Out.WriteStringBytes("");
Out.WriteByte(0);
client.SendTCP(Out);
ANS_CHARACTER_INFO.Send(client);
}
开发者ID:Novo,项目名称:apbprivateserver,代码行数:51,代码来源:ANS_LOGIN_SUCCES.cs
示例17: BuildQuestComplete
public static void BuildQuestComplete(PacketOut Out, Quest Q, bool Particular)
{
Out.WritePascalString(Q.Name);
Out.WriteUInt16((UInt16)Q.OnCompletionQuest.Length);
Out.WriteStringBytes(Q.OnCompletionQuest);
if (Particular)
{
Out.WriteUInt16((UInt16)Q.Particular.Length);
Out.WriteStringBytes(Q.Particular);
}
Out.WriteByte(1);
Out.WriteUInt32(Q.Gold);
Out.WriteUInt32(Q.Xp);
}
开发者ID:Necrosummon,项目名称:WarEmu,代码行数:14,代码来源:QuestsInterface.cs
示例18: SendReinitTime
public void SendReinitTime(Player Plr, ushort Time)
{
PacketOut Out = new PacketOut((byte)Opcodes.F_OBJECTIVE_INFO);
Out.WriteUInt32(Info.Entry);
Out.WriteByte(1);
Out.WriteByte(2);
Out.WriteByte(1);
Out.WriteUInt16(0);
Out.WritePascalString(Info.Name);
Out.WriteUInt16(0);
Out.WriteUInt16(Time); // Time in seconds
Out.WriteUInt16(0);
Out.WriteUInt16(0);
Plr.SendPacket(Out);
}
开发者ID:dzikun,项目名称:WarEmu,代码行数:15,代码来源:PQuestObject.cs
示例19: F_CONNECT
static public void F_CONNECT(BaseClient client, PacketIn packet)
{
GameClient cclient = client as GameClient;
packet.Skip(8);
UInt32 Tag = packet.GetUint32();
string Token = packet.GetString(80);
packet.Skip(21);
string Username = packet.GetString(23);
// TODO
AuthResult Result = Program.AcctMgr.CheckToken(Username, Token);
if (Result != AuthResult.AUTH_SUCCESS)
{
Log.Error("F_CONNECT", "Invalid Token =" + Username);
cclient.Disconnect();
}
else
{
cclient._Account = Program.AcctMgr.GetAccount(Username);
if (cclient._Account == null)
{
Log.Error("F_CONNECT", "Invalid Account =" + Username);
cclient.Disconnect();
}
else
{
//Log.Success("F_CONNECT", "MeId=" + cclient.Id);
GameClient Other = (cclient.Server as TCPServer).GetClientByAccount(cclient, cclient._Account.AccountId);
if (Other != null)
Other.Disconnect();
{
PacketOut Out = new PacketOut((byte)Opcodes.S_CONNECTED);
Out.WriteUInt32(0);
Out.WriteUInt32(Tag);
Out.WriteByte(Program.Rm.RealmId);
Out.WriteUInt32(1);
Out.WritePascalString(Username);
Out.WritePascalString(Program.Rm.Name);
Out.WriteByte(0);
Out.WriteUInt16(0);
cclient.SendPacket(Out);
}
}
}
}
开发者ID:dzikun,项目名称:WarEmu,代码行数:48,代码来源:AuthentificationHandlers.cs
示例20: SendMount
public void SendMount(Player Plr)
{
PacketOut Out = new PacketOut((byte)Opcodes.F_MOUNT_UPDATE);
Out.WriteUInt16(Owner.Oid);
if (CurrentMountInfo == null)
Out.WriteUInt32(0);
else
Out.WriteUInt32(CurrentMountInfo.Entry);
Out.Fill(0, 14);
if (Plr == null)
Owner.DispatchPacket(Out, true);
else
Plr.SendPacket(Out);
}
开发者ID:dzikun,项目名称:WarEmu,代码行数:17,代码来源:Mount.cs
注:本文中的FrameWork.PacketOut类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论