当前位置: 首页>>代码示例>>C#>>正文


C# ClientMessage.ToString方法代码示例

本文整理汇总了C#中Essential.Messages.ClientMessage.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# ClientMessage.ToString方法的具体用法?C# ClientMessage.ToString怎么用?C# ClientMessage.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Essential.Messages.ClientMessage的用法示例。


在下文中一共展示了ClientMessage.ToString方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Handle

        public void Handle(GameClient Session, ClientMessage Event)
        {

            Room @class = Essential.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
            if (@class != null)
            {
            
            RoomItem class2 = @class.method_28(Event.PopWiredUInt());
            if (class2 != null)
            {
                string text = class2.GetBaseItem().InteractionType.ToLower();
                if (text != null)
                {
                    switch(text)
                    {
                        case "wf_trg_atscore":
                            {
                                Event.PopWiredInt32();
                                class2.string_3 = Event.PopWiredInt32().ToString();
                                goto updatethings;
                            }
                        case "wf_cnd_time_more_than":
                        case "wf_cnd_time_less_than":
                            {
                                string text2 = Event.ToString().Substring(Event.Length - (Event.RemainingLength - 2));
                                string[] array = text2.Split(new char[]
							    {
                                    '@'
                                });
                                class2.string_3 = array[0];
                                class2.string_2 = Convert.ToString(Convert.ToString((double)Event.PopWiredInt32() * 0.5));
                                goto updatethings;
                            }
                        case "wf_trg_attime":
                            {
                                int junk = Event.PopWiredInt32();
                                int junk2 = Event.PopWiredInt32();
                                string message = Event.PopFixedString();
                                class2.string_3 = message;
                                class2.string_2 = Convert.ToString(Convert.ToString((double)junk2 * 0.5));
                                goto updatethings;
                            }
                        case "wf_trg_timer":
                            {
                                Event.PopWiredInt32();
                                string text2 = Event.ToString().Substring(Event.Length - (Event.RemainingLength - 2));
                                string[] array = text2.Split(new char[]
							    {
								    '@'
							    });
                                class2.string_3 = array[0];
                                class2.string_2 = Convert.ToString(Convert.ToString((double)Event.PopWiredInt32() * 0.5));
                                goto updatethings;
                            }
                        case "wf_cnd_actor_in_group":
                        case "wf_trg_enterroom":
                        case "wf_cnd_not_in_group":
                            {
                                Event.PopWiredInt32();
                                string text3 = Event.PopFixedString();
                                class2.string_2 = text3;
                                goto updatethings;
                            }
                        case "wf_trg_onsay":
                            {
                                Event.PopWiredInt32();
                                bool value = (Event.PopWiredInt32() == 1);
                                string text3 = Event.PopFixedString();
                                text3 = Essential.DoFilter(text3, false, true);
                                if (text3.Length > 100)
                                {
                                    text3 = text3.Substring(0, 100);
                                }
                                class2.string_2 = text3;
                                class2.string_3 = Convert.ToString(value);
                                goto updatethings;
                            }

                    }
                }
                updatethings:
                class2.UpdateState(true, false);
                Session.SendMessage(new ServerMessage(Outgoing.SaveWired)); // NEW
            }
        }
        }
开发者ID:RootkitR,项目名称:Essential-5.1,代码行数:86,代码来源:UpdateTriggerMessageEvent.cs


注:本文中的Essential.Messages.ClientMessage.ToString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。