本文整理汇总了C#中Packet.WriteShort方法的典型用法代码示例。如果您正苦于以下问题:C# Packet.WriteShort方法的具体用法?C# Packet.WriteShort怎么用?C# Packet.WriteShort使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Packet
的用法示例。
在下文中一共展示了Packet.WriteShort方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: WriteToPacket
public void WriteToPacket(Packet packet)
{
packet.WriteSingle(DeflectionModifier);
packet.WriteShort(ArmorFactor);
Resistances.WriteToPacket(packet);
packet.WriteShort(DefenseBonus);
}
示例2: SpawnMonster
public static Packet SpawnMonster(Mob pMob, int pSpawnType, int pLink, bool pAzwan)
{
Packet p = new Packet();
p.WriteShort((short)SendOpcodes.Monster_Spawn);
p.WriteInt(pMob.SpawnID);
p.WriteByte(1);
p.WriteInt(pMob.MobID);
MobPacketHelper.AddMonsterStatus(p, pMob);
p.WriteShort(pMob.Position.X);
p.WriteShort(pMob.Position.Y);
p.WriteByte(pMob.Stance); // Stance, TODO.
p.WriteShort(pMob.Foothold);
p.WriteShort(pMob.OriginalFoothold);
p.WriteByte((byte)pSpawnType);
if (pSpawnType == -3 || pSpawnType >= 0)
p.WriteInt(pLink);
p.WriteByte(0); // TODO: Carnival.
p.WriteInt(125);
p.WriteZero(16);
p.WriteByte(0);
p.WriteInt(-1);
p.WriteInt(0);
p.WriteInt(46);
p.WriteInt(0);
p.WriteByte(0);
p.WriteByte(0xFF);
return p;
}
示例3: WriteToPacket
public void WriteToPacket(Packet packet)
{
packet.WriteInteger(HeatMaximum);
packet.WriteInteger(PowerMaximum);
packet.WriteShort(PowerRegenRate);
packet.WriteShort(CoolRate);
}
示例4: Encode
public Packet Encode()
{
Packet packet = new Packet();
packet.WriteShort(this._x);
packet.WriteShort(this._y);
packet.WriteShort(this._z);
return packet;
}
示例5: Cash_Shop_Gifts
public static Packet Cash_Shop_Gifts(Client pClient)
{
Packet p = new Packet();
p.WriteShort((short)SendOpcodes.Cash_Shop_Opeartion);
p.WriteByte((byte)(Opeartion_Code + 6));
p.WriteShort(0); // Gifts size.
return p;
}
示例6: StatChange
public static Packet StatChange(Character pCharacter, uint pFlag, short pValue, bool pSelf = false)
{
Packet p = new Packet();
p.WriteShort((short)SendOpcodes.Stats_Update);
p.WriteBool(pSelf);
p.WriteUInt(pFlag);
p.WriteShort(pValue);
return p;
}
示例7: MissionsRequest
public static void MissionsRequest(TNLConnection conn)
{
var resp = new Packet(Opcode.ConvoyMissionsResponse);
resp.WritePadding(4);
resp.WriteLong(-1L); // Member coid
resp.WriteShort(0); // Mission Num
resp.WritePadding(6);
for (var i = 0; i < 0; ++i)
resp.WriteShort(0);
conn.SendPacket(resp, RPCGuaranteeType.RPCGuaranteedOrdered);
}
示例8: AddMonsterStatus
public static void AddMonsterStatus(Packet pPacket, Mob pMob)
{
pPacket.WriteByte(0);
pPacket.WriteZero(40);
pPacket.WriteShort(5088);
pPacket.WriteShort(72);
pPacket.WriteZero(3);
pPacket.WriteByte(136);
for (int i = 0; i < 4; i++)
{
pPacket.WriteLong(0);
pPacket.WriteHexString("30 3B");
}
pPacket.WriteZero(7);
pPacket.WriteZero(12);
}
示例9: Cash_Shop_Inventory
public static Packet Cash_Shop_Inventory(Client pClient)
{
Packet p = new Packet();
p.WriteShort((short)SendOpcodes.Cash_Shop_Opeartion);
p.WriteByte((byte)(Opeartion_Code + 3));
p.WriteByte(0);
p.WriteShort(0);
p.WriteInt(0);
p.WriteShort(16); // Slots
p.WriteShort(6);
p.WriteShort(0);
p.WriteShort(1);
return p;
}
示例10: Cash_Shop_Disable
public static Packet Cash_Shop_Disable()
{
Packet p = new Packet();
p.WriteShort((short)SendOpcodes.Cash_Shop_Use);
p.WriteZero(5);
return p;
}
示例11: HeartbeatResponse
public static Packet HeartbeatResponse(int pRequest)
{
Packet p = new Packet();
p.WriteShort((short)SendOpcodes.Heartbeat_Response);
p.WriteInt(Tools.HeartbeatAlgorithm(pRequest));
return p;
}
示例12: Encode
public Packet Encode()
{
Packet packet = new Packet();
packet.WriteBuffer(this._scene_rot_pos.GetBuffer());
packet.WriteBuffer(this._forward.GetBuffer());
packet.WriteString(this._ani_name);
packet.WriteShort(this._x_axis);
packet.Encode(Msg.P_REQ_SCENE_MOVE);
return packet;
}
示例13: InvalidPIC
public static Packet InvalidPIC()
{
Packet p = new Packet();
p.WriteShort((short)SendOpcodes.PIC_Error);
p.WriteByte(0x14);
p.WriteByte(0);
return p;
}
示例14: CheckNameResult
public static Packet CheckNameResult(string pName, bool pUsed)
{
Packet p = new Packet();
p.WriteShort((short)SendOpcodes.Check_Name_Result);
p.WriteMapleString(pName);
p.WriteByte((byte)(pUsed ? 1 : 0));
return p;
}
示例15: CreateCharacterResult
public static Packet CreateCharacterResult(Character pCharacter, bool pValid)
{
Packet p = new Packet();
p.WriteShort((short)SendOpcodes.Create_Character_Result);
p.WriteByte((byte)(pValid ? 0 : 1));
HelpPacket.AddCharacterImage(p, pCharacter, false, false);
return p;
}