本文整理汇总了C#中Framework.PacketWriter.Word方法的典型用法代码示例。如果您正苦于以下问题:C# PacketWriter.Word方法的具体用法?C# PacketWriter.Word怎么用?C# PacketWriter.Word使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Framework.PacketWriter
的用法示例。
在下文中一共展示了PacketWriter.Word方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AlchemyResponse
public static byte[] AlchemyResponse(bool isSuccess, Global.slotItem sItem, byte type, byte totalblue)
{
PacketWriter Writer = new PacketWriter();
Writer.Create(Systems.SERVER_ALCHEMY);
Writer.Byte(1);
Writer.Byte(2);
Writer.Bool(isSuccess);
Writer.Byte(sItem.Slot);
if (!isSuccess) { Writer.Byte(0); }
Writer.DWord(0);
Writer.DWord(sItem.ID);
Writer.Byte(sItem.PlusValue);
Writer.LWord(0);
Writer.DWord(sItem.Durability);
Writer.Byte(Data.ItemBlue[sItem.dbID].totalblue);
for (int i = 0; i <= Data.ItemBlue[sItem.dbID].totalblue - 1; i++)
{
Writer.DWord(Data.MagicOptions.Find(mg => (mg.Name == Convert.ToString(Data.ItemBlue[sItem.dbID].blue[i]))).ID);
Writer.DWord(Data.ItemBlue[sItem.dbID].blueamount[i]);
}
Writer.Word(1);
Writer.Word(2);
Writer.Word(3);
return Writer.GetBytes();
}
示例2: LoadGame_3
public static byte[] LoadGame_3()
{
PacketWriter Writer = new PacketWriter();
Writer.Create(Systems.SERVER_PATCH);
Writer.Word(0x0101);
Writer.Word(0x0500);
Writer.Byte(0x60);
return Writer.GetBytes();
}
示例3: FriendDecline
public static byte[] FriendDecline(string name)
{
PacketWriter Writer = new PacketWriter();
Writer.Create(Systems.SERVER_FRIEND_INVITE);
Writer.Byte(2);
Writer.Word(0x640B);
Writer.Byte(0);
Writer.Word(0x000B);
Writer.Text(name);
return Writer.GetBytes();
}
示例4: LoadGame_2
public static byte[] LoadGame_2()
{
PacketWriter Writer = new PacketWriter();
Writer.Create(Systems.SERVER_PATCH);
Writer.Word(0x0100);
Writer.Word(0x0100);
Writer.Byte(0x69);
Writer.Byte(0x0C);
Writer.DWord(0x00000005);
Writer.Byte(0x02);
return Writer.GetBytes();
}
示例5: JoinFormedRequest
public static byte[] JoinFormedRequest(character requesting, character owner)
{
//Create new packet writer
PacketWriter Writer = new PacketWriter();
//Add opcode for packet
Writer.Create(Systems.SERVER_PARTY_JOIN_FORMED);
//Character model information (Req).
Writer.DWord(requesting.Information.Model);
//Leader id
Writer.DWord(requesting.Information.UniqueID);
//Party id
Writer.DWord(owner.Network.Party.ptid);
//Static
Writer.DWord(0);
Writer.DWord(0);
Writer.Byte(0);
Writer.Byte(0xFF);
//Write character unique id
Writer.DWord(requesting.Information.UniqueID);
//Write character name
Writer.Text(requesting.Information.Name);
//Write model information
Writer.DWord(requesting.Information.Model);
//Write level information
Writer.Byte(requesting.Information.Level);
//Static
Writer.Byte(0xAA);
//X and Y Sector
Writer.Byte(requesting.Position.xSec);
Writer.Byte(requesting.Position.ySec);
//Static
Writer.Word(0);
Writer.Word(0);
Writer.Word(0);
Writer.Word(1);
Writer.Word(1);
//If character is in a guild
if (requesting.Network.Guild != null)
//Write guild name
Writer.Text(requesting.Network.Guild.Name);
//If character is not in a guild
else
//Write word value 0
Writer.Word(0);
//Static
Writer.Byte(0);
Writer.DWord(0);
Writer.DWord(0);
//Return all bytes to send
return Writer.GetBytes();
}
示例6: PrivateMessageRespond
//Packet for response of message sending
public static byte[] PrivateMessageRespond(byte type)
{
//Create new packet writer
PacketWriter Writer = new PacketWriter();
//Add the opcode to the packet
Writer.Create(Systems.SERVER_PM_SEND);
//Switch on type sended by our function
switch (type)
{
case 1:
//Failed
Writer.Byte(0x02);
Writer.Byte(0x0D);
Writer.Byte(0x64);
break;
case 2:
//Success
Writer.Byte(0x01);
break;
case 3:
//Inbox full
Writer.Byte(2);
Writer.Word(0x6414);
break;
}
//Return all bytes to the void
return Writer.GetBytes();
}
示例7: FriendGroupManage
public static byte[] FriendGroupManage(string type,string groupname, short groupid, int targetid)
{
PacketWriter Writer = new PacketWriter();
switch (type)
{
case "ADD":
Writer.Create(Systems.SERVER_FRIEND_GROUP);
Writer.Byte(1);
Writer.Text(groupname);
Writer.Word(groupid);
break;
case "REMOVE":
Writer.Create(Systems.SERVER_FRIEND_GROUP_REMOVE);
Writer.Byte(1);
Writer.Word(groupid);
break;
case "MOVE":
Writer.Create(Systems.SERVER_FRIEND_GROUP_MANAGE_FRIEND);
Writer.Byte(1);
Writer.DWord(targetid);
Writer.Word(groupid);
break;
}
return Writer.GetBytes();
}
示例8: Arrow
////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Update arrow amount
////////////////////////////////////////////////////////////////////////////////////////////////////////////
public static byte[] Arrow(short amount)
{
PacketWriter Writer = new PacketWriter();
Writer.Create(Systems.SERVER_ARROW_UPDATE);
Writer.Word(amount);
return Writer.GetBytes();
}
示例9: Angle
////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Movement Angle
////////////////////////////////////////////////////////////////////////////////////////////////////////////
public static byte[] Angle(int id, ushort angle)
{
PacketWriter Writer = new PacketWriter();
Writer.Create(Systems.SERVER_ANGLE); //Select opcode
Writer.DWord(id); //Character ID
Writer.Word(angle); //Angle
return Writer.GetBytes();
}
示例10: TeleportStart
public static byte[] TeleportStart()
{
PacketWriter Writer = new PacketWriter();
Writer.Create(Systems.SERVER_TELEPORTSTART);
Writer.Byte(2);
Writer.Word(1);
return Writer.GetBytes();
}
示例11: IngameMessages
public static byte[] IngameMessages(ushort opcode,ushort id)
{
PacketWriter Writer = new PacketWriter();
Writer.Create(opcode);
Writer.Byte(2);
Writer.Word(id);
return Writer.GetBytes();
}
示例12: MakeAliasError
public static byte[] MakeAliasError(string name, byte switchinfo)
{
PacketWriter Writer = new PacketWriter();
Writer.Create(Systems.SERVER_MAKE_ALIAS);
Writer.Byte(2);
Writer.Word(0);
Writer.Byte(0);
Writer.Text(name);
return Writer.GetBytes();
}
示例13: GuildSetTitle2
public static byte[] GuildSetTitle2(int guildid, int charid, string title)
{
PacketWriter Writer = new PacketWriter();
Writer.Create(Systems.SERVER_GUILD_SET_TITLE2);
Writer.Byte(1);
Writer.DWord(guildid);
Writer.DWord(charid);
Writer.Word(title.Length);
Writer.String(title);
return Writer.GetBytes();
}
示例14: StallBuyItem2
public static byte[] StallBuyItem2(string charname, byte stallslot, List<stall.stallItem> ItemList)
{
PacketWriter Writer = new PacketWriter();
Writer.Create(Systems.SERVER_STALL_PLAYERUPDATE);
Writer.Byte(3);
Writer.Byte(stallslot);
Writer.Word(charname.Length);
Writer.String(charname);
StallItemPacket(ItemList, Writer);
return Writer.GetBytes();
}
示例15: AttackPetStats
public static byte[] AttackPetStats(pet_obj c,byte slot)
{
PacketWriter writer = new PacketWriter();
writer.Create(Systems.SERVER_PET_INFORMATION);
writer.DWord(c.UniqueID);
writer.DWord(c.Model);
writer.DWord(0x00000168);//stats
writer.DWord(0x00000168);//stats
writer.LWord(c.exp);//Experience
writer.Byte(c.Level);//Level
writer.Word(0);//Angle
writer.DWord(0x00000001);//1 = Attack icon enabled, 2 = disabled
if (c.Petname != "No name") writer.Text(c.Petname);//Petname
else
writer.Word(0);//No name
writer.Byte(0);//Static perhaps
writer.DWord(c.OwnerID);//Owner
writer.Byte(slot);
return writer.GetBytes();
}