本文整理汇总了C#中Messages.PopInt32方法的典型用法代码示例。如果您正苦于以下问题:C# Messages.PopInt32方法的具体用法?C# Messages.PopInt32怎么用?C# Messages.PopInt32使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Messages
的用法示例。
在下文中一共展示了Messages.PopInt32方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Invoke
public void Invoke(Session Session, Messages.PacketEvent Packet)
{
int A = Packet.PopInt32();
int B = Packet.PopInt32();
Session.UpdateLatencyPing(((A + B) / 2));
}
示例2: Invoke
public void Invoke(Session Session, Messages.PacketEvent Packet)
{
RoomAdapter Adapter;
if (System.HabboSystem.CharacterManager.GetCurrentRoom(Session.Character.Id, out Adapter))
{
RoomUnit Unit;
if (Adapter.GetUnit(Session.Character.Id, out Unit))
{
var DanceId = Packet.PopInt32();
Unit.Dance(DanceId);
Unit.Activate();
Adapter.WriteComposer(new DanceMessageComposer(Unit.Id, DanceId));
}
}
}
示例3: Invoke
public void Invoke(Session Session, Messages.PacketEvent Packet)
{
Session.Character.UpdateSoundSettings(Packet.PopInt32());
}
示例4: Invoke
public void Invoke(Network.Session Session, Messages.PacketEvent Packet)
{
// TODO IF(BUSY)
var TargetId = Packet.PopInt32();
/* ChatErrorId(s)
* 3 = Friend Muted x
* 4 = You are muted x
* 5 = offline x
* 6 = not friend x
* 7 = friend is busy
* */
if (TargetId < 1 || TargetId == Session.Character.Id)
{
return;
}
if (Session.Character.Muted)
{
Session.WriteComposer(new InstantMessageErrorComposer(4, TargetId));
return;
}
if (!Session.Character.MessengerFriends.Contains(TargetId))
{
Session.WriteComposer(new InstantMessageErrorComposer(6, TargetId));
return;
}
if (System.HabboSystem.CharacterManager.GetStatus(TargetId) == CharacterStatus.Offline)
{
Session.WriteComposer(new InstantMessageErrorComposer(5, TargetId));
return;
}
var TargetSession = System.NetworkSocket.GetSession(TargetId);
if (TargetSession == null)
{
Session.WriteComposer(new InstantMessageErrorComposer(5, TargetId));
return;
}
if (TargetSession.Character.Muted)
{
Session.WriteComposer(new InstantMessageErrorComposer(3, TargetId));
return;
}
TargetSession.WriteComposer(new NewConsoleMessageComposer(Session.Character.Id, Packet.PopString()));
}