本文整理汇总了C#中Messages.PopString方法的典型用法代码示例。如果您正苦于以下问题:C# Messages.PopString方法的具体用法?C# Messages.PopString怎么用?C# Messages.PopString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Messages
的用法示例。
在下文中一共展示了Messages.PopString方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Invoke
public void Invoke(Session Session, Messages.PacketEvent Packet)
{
string Name = Packet.PopString();
string Model = Packet.PopString();
System.IOStreamer.AppendLine("Caption: {0}, Model: {1}", Name, Model);
}
示例2: Invoke
public void Invoke(Session Session, Messages.PacketEvent Packet)
{
switch (Packet.PopString())
{
case "Performance":
switch (Packet.PopString())
{
case "fps":
Session.UpdateFramesPerSecond(int.Parse(Packet.PopString()));
break;
}
break;
}
}
示例3: 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))
{
Adapter.WriteComposer(new ChatMessageComposer(Unit.Id, Packet.PopString()));
}
}
}
示例4: Invoke
public void Invoke(Session Session, Messages.PacketEvent Packet)
{
string Ticket = Packet.PopString();
Character CharObj = System.HabboSystem.CharacterManager.Authenticate(Ticket);
if (CharObj == null)
{
System.IOStreamer.AppendColor(ConsoleColor.Red);
System.IOStreamer.AppendLine("Failed to Authenticate: {0}", Ticket);
System.NetworkSocket.CloseSession(Session);
}
else
{
Session.UpdateCharacter(CharObj);
Session.WriteComposer(new AuthenticationOKMessageComposer());
}
}
示例5: Invoke
public void Invoke(Network.Session Session, Messages.PacketEvent Packet)
{
// TODO ? IF(!INROOM)
if (Session.Character.Muted)
{
Session.WriteComposer(new ModMessageComposer("You are muted, only someone with an higher rank can unmute you."));
return;
}
ICollection<int> Targets = Packet.PopCollection();
string Message = Packet.PopString();
foreach (int TargetId in Targets)
{
if (TargetId < 1 || TargetId == Session.Character.Id)
{
continue;
}
if (System.HabboSystem.CharacterManager.GetStatus(TargetId) == CharacterStatus.Offline)
{
continue;
}
if (!Session.Character.MessengerFriends.Contains(TargetId))
{
Session.WriteComposer(new RoomInviteErrorComposer());
continue;
}
var TargetSession = System.NetworkSocket.GetSession(TargetId);
if (TargetSession == null)
{
Session.WriteComposer(new RoomInviteErrorComposer());
continue;
}
if (TargetSession.Character.Muted)
{
Session.WriteComposer(new ModMessageComposer(string.Format("{0} is muted.", Session.Character.Username)));
continue;
}
TargetSession.WriteComposer(new RoomInviteComposer(Session.Character.Id, Message));
}
}