本文整理汇总了C#中CLFramework.PacketWriter.Bool方法的典型用法代码示例。如果您正苦于以下问题:C# PacketWriter.Bool方法的具体用法?C# PacketWriter.Bool怎么用?C# PacketWriter.Bool使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CLFramework.PacketWriter
的用法示例。
在下文中一共展示了PacketWriter.Bool方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AlchemyResponse
public static byte[] AlchemyResponse(bool isSuccess, ObjData.slotItem sItem, byte type, byte totalblue)
{
PacketWriter Writer = new PacketWriter();
Writer.Create(OperationCode.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(ObjData.Manager.ItemBlue[sItem.dbID].totalblue);
for (int i = 0; i <= ObjData.Manager.ItemBlue[sItem.dbID].totalblue - 1; i++)
{
Writer.DWord(ObjData.Manager.MagicOptions.Find(mg => (mg.Name == Convert.ToString(ObjData.Manager.ItemBlue[sItem.dbID].blue[i]))).ID);
Writer.DWord(ObjData.Manager.ItemBlue[sItem.dbID].blueamount[i]);
}
Writer.Word(1);
Writer.Word(2);
Writer.Word(3);
return Writer.GetBytes();
}
示例2: ConnectSuccess
public static byte[] ConnectSuccess()
{
PacketWriter Writer = new PacketWriter();
Writer.Create(OperationCode.SERVER_CONNECTION);
Writer.Bool(true);
return Writer.GetBytes();
}
示例3: CancelLeaveGame
public static byte[] CancelLeaveGame()
{
PacketWriter Writer = new PacketWriter();
Writer.Create(OperationCode.SERVER_LEAVE_CALCEL);
Writer.Bool(true);
return Writer.GetBytes();
}
示例4: ServerListPacket
public static byte[] ServerListPacket(int cliVersion)
{
//Create a new packet writer to create our packet
PacketWriter W = new PacketWriter();
//Write the opcode from server to client
W.Create(Opcodes.SERVER.SERVER_SERVERLIST);
//Structure of packet below
W.Word(0x0201);
W.Text("CLOWEN_DEV_PROJECT");
W.Byte(0);
//Repeat the following packet data below for each server in the list
foreach (KeyValuePair<int, Definitions.Serverdef.ServerDetails> Gameservers in Definitions.Serverdef.Serverlist)
{
if (cliVersion == Definitions.Serverdef.SilkroadClientVersion)
{
W.Bool(true);
W.Word(Gameservers.Value.id);
W.Text(Gameservers.Value.name);
W.Word(Gameservers.Value.usedSlots);
W.Word(Gameservers.Value.maxSlots);
W.Byte(Gameservers.Value.status);
}
}
//Static 0 byte
W.Byte(0);
//Send the created packet back to the request (client).
return W.GetBytes();
}
示例5: CloseExhangeWindow
public static byte[] CloseExhangeWindow()
{
PacketWriter Writer = new PacketWriter();
Writer.Create(OperationCode.SERVER_EXCHANGE_CLOSE);
Writer.Bool(true);
return Writer.GetBytes();
}
示例6: CloseNPC
public static byte[] CloseNPC()
{
PacketWriter Writer = new PacketWriter();
Writer.Create(OperationCode.SERVER_CLOSE_NPC);
Writer.Bool(true);
return Writer.GetBytes();
}
示例7: AgentServer
public static byte[] AgentServer()
{
PacketWriter Writer = new PacketWriter();
Writer.Create(OperationCode.SERVER_AGENTSERVER);
Writer.Text("AgentServer");
Writer.Bool(true);
return Writer.GetBytes();
}
示例8: Movement
public static byte[] Movement(ObjData.vektor p)
{
PacketWriter Writer = new PacketWriter();
Writer.Create(OperationCode.SERVER_MOVEMENT); //Select opcode
Writer.DWord(p.ID); //Player ID
Writer.Bool(true); //Bool 1
Writer.Byte(p.xSec); //Player X Sector
Writer.Byte(p.ySec); //Player Y Sector
if (!FileDB.CheckCave(p.xSec, p.ySec))
{
Writer.Word(p.x); //Player X Location
Writer.Word(p.z); //Player Z Location
Writer.Word(p.y); //Player Y Location
}
else
{
if (p.x < 0)
{
Writer.Word(p.x);
Writer.Word(0xFFFF);
}
else
{
Writer.DWord(p.x);
}
Writer.DWord(p.z);
if (p.y < 0)
{
Writer.Word(p.y);
Writer.Word(0xFFFF);
}
else
{
Writer.DWord(p.y);
}
}
Writer.Bool(false);
/* ReSearch this is ext packets
Writer.Byte(p.xSec); //Player X Sector
Writer.Byte(p.ySec); //Player Y Sector
Writer.Word(p.x); //Player X Location
Writer.DWord(p.z); //Player Z Location
Writer.Word(p.y); */ //Player Y Location
return Writer.GetBytes();
}
示例9: SkillEndBuffPacket
public static byte[] SkillEndBuffPacket(int overid)
{
PacketWriter Writer = new PacketWriter();
Writer.Create(OperationCode.SERVER_SKILL_ENDBUFF);
Writer.Bool(true);
Writer.DWord(overid);
return Writer.GetBytes();
}
示例10: ChatIndexPacket
public static byte[] ChatIndexPacket(byte type, byte index)
{
PacketWriter Writer = new PacketWriter();
Writer.Create(OperationCode.SERVER_CHAT_INDEX);
Writer.Bool(true);
Writer.Byte(type);
Writer.Byte(index);
return Writer.GetBytes();
}
示例11: MasteryUpPacket
public static byte[] MasteryUpPacket(int mastery, byte level)
{
PacketWriter Writer = new PacketWriter();
Writer.Create(OperationCode.SERVER_MASTERY_UP);
Writer.Bool(true);
Writer.DWord(mastery);
Writer.Byte(level);
return Writer.GetBytes();
}
示例12: EffectUpdate
public static byte[] EffectUpdate(int objectid, CLGameServer.Effect.EffectNumbers effectid, bool start)
{
PacketWriter Writer = new PacketWriter();
Writer.Create(OperationCode.SERVER_SKILL_EFFECTS);
Writer.DWord(objectid);
Writer.Byte(1);
Writer.Bool(start);
Writer.Byte(4); // effect change
Writer.DWord(effectid);
return Writer.GetBytes();
}
示例13: CREATEITEM
////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Create Item From Gm console
////////////////////////////////////////////////////////////////////////////////////////////////////////////
public static byte[] CREATEITEM(byte type, byte Slot, int id, short plus, int durability, int itemid, int bluecount)
{
int msid = Convert.ToInt32(DB.GetData("SELECT id FROM char_items WHERE owner='" + id + "' AND slot = '" + Slot + "'", "id"));
PlayerMgr.LoadBluesid(msid);
PacketWriter Writer = new PacketWriter();
Writer.Create(OperationCode.SERVER_ITEM_MOVE);
Writer.Bool(true);
Writer.Byte(6);
Item.AddItemPacket(Writer, Slot, id, (byte)plus, plus, durability, itemid, msid, 0);
return Writer.GetBytes();
}
示例14: EnterStall
public static byte[] EnterStall(int CharacterID, WorldMgr.stall stall)
{
PacketWriter Writer = new PacketWriter();
Writer.Create(OperationCode.SERVER_STALL_OTHER_OPEN);
Writer.Byte(1);
Writer.DWord(stall.ownerID);
Writer.Text3(stall.WelcomeMsg);
Writer.Bool(stall.isOpened);
Writer.Byte(0);
StallItemPacket(stall.ItemList, Writer);
Writer.Byte(stall.Members.Count - 2);
for (byte i = 0; i < stall.Members.Count; i++)
{
if (stall.Members[i] != stall.ownerID && stall.Members[i] != CharacterID)
Writer.DWord(stall.Members[i]);
}
return Writer.GetBytes();
}
示例15: OpenNPC
public static byte[] OpenNPC(byte type)
{
PacketWriter Writer = new PacketWriter();
Writer.Create(OperationCode.SERVER_OPEN_NPC);
Writer.Bool(true);
switch (type)
{
case 1:
//Purchase items
Writer.Byte(type);
break;
case 2:
Writer.Byte(2);
break;
case 12:
Writer.Byte(0x01);
Writer.Byte(0x01);
break;
default:
Writer.Byte(type);
break;
}
return Writer.GetBytes();
}