本文整理汇总了C#中Phoenix.Messages.ClientMessage.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# ClientMessage.ToString方法的具体用法?C# ClientMessage.ToString怎么用?C# ClientMessage.ToString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Phoenix.Messages.ClientMessage
的用法示例。
在下文中一共展示了ClientMessage.ToString方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: parse
public void parse(GameClient Session, ClientMessage Event)
{
try
{
Room room = PhoenixEnvironment.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
uint uint_ = Event.PopWiredUInt();
RoomItem item = room.GetItem(uint_);
string text = item.GetBaseItem().InteractionType.ToLower();
if (text != null && (text == "wf_cnd_trggrer_on_frn" || text == "wf_cnd_furnis_hv_avtrs" || text == "wf_cnd_has_furni_on"))
{
Event.PopWiredBoolean();
Event.PopFixedString();
item.Extra1 = Event.ToString().Substring(Event.Length - (Event.RemainingLength - 2));
item.Extra1 = item.Extra1.Substring(0, item.Extra1.Length - 1);
Event.ResetPointer();
item = room.GetItem(Event.PopWiredUInt());
Event.PopWiredBoolean();
Event.PopFixedString();
int num = Event.PopWiredInt32();
item.Extra2 = "";
for (int i = 0; i < num; i++)
{
item.Extra2 = item.Extra2 + "," + Convert.ToString(Event.PopWiredUInt());
}
if (item.Extra2.Length > 0)
{
item.Extra2 = item.Extra2.Substring(1);
}
}
}
catch
{
}
}
示例2: parse
public void parse(GameClient Session, ClientMessage Event)
{
try
{
Room room = PhoenixEnvironment.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
uint uint_ = Event.PopWiredUInt();
RoomItem item = room.GetItem(uint_);
switch (item.GetBaseItem().InteractionType.ToLower())
{
case "wf_act_give_phx":
{
Event.PopWiredBoolean();
string text2 = Event.PopFixedString();
text2 = PhoenixEnvironment.FilterInjectionChars(text2, false, true);
text2 = ChatCommandHandler.ApplyWordFilter(text2);
if (!(text2 == item.Extra1))
{
string string_ = text2.Split(new char[]
{
':'
})[0].ToLower();
if (PhoenixEnvironment.GetGame().GetRoleManager().HasWiredEffectRole(string_, Session))
{
item.Extra1 = text2;
}
else
{
Session.GetHabbo().Sendselfwhisper(TextManager.GetText("wired_error_permissions"));
}
}
break;
}
case "wf_cnd_phx":
{
Event.PopWiredBoolean();
string text2 = Event.PopFixedString();
text2 = PhoenixEnvironment.FilterInjectionChars(text2, false, true);
text2 = ChatCommandHandler.ApplyWordFilter(text2);
if (!(text2 == item.Extra1))
{
string string_ = text2.Split(new char[]
{
':'
})[0].ToLower();
if (PhoenixEnvironment.GetGame().GetRoleManager().HasWiredConditionRole(string_, Session))
{
item.Extra1 = text2;
}
else
{
Session.GetHabbo().Sendselfwhisper(TextManager.GetText("wired_error_permissions"));
}
}
break;
}
case "wf_act_saymsg":
{
Event.PopWiredBoolean();
string text2 = Event.PopFixedString();
text2 = PhoenixEnvironment.FilterInjectionChars(text2, false, true);
if (text2.Length > 100)
{
text2 = text2.Substring(0, 100);
}
item.Extra1 = text2;
break;
}
case "wf_trg_furnistate":
case "wf_trg_onfurni":
case "wf_trg_offfurni":
case "wf_act_moveuser":
case "wf_act_togglefurni":
{
Event.PopWiredBoolean();
Event.PopFixedString();
item.Extra1 = Event.ToString().Substring(Event.Length - (Event.RemainingLength - 2));
item.Extra1 = item.Extra1.Substring(0, item.Extra1.Length - 2);
Event.ResetPointer();
item = room.GetItem(Event.PopWiredUInt());
Event.PopWiredBoolean();
Event.PopFixedString();
int num2 = Event.PopWiredInt32();
item.Extra2 = "";
for (int i = 0; i < num2; i++)
{
item.Extra2 = item.Extra2 + "," + Convert.ToString(Event.PopWiredUInt());
}
if (item.Extra2.Length > 0)
{
item.Extra2 = item.Extra2.Substring(1);
}
break;
}
case "wf_act_givepoints":
Event.PopWiredInt32();
item.Extra1 = Convert.ToString(Event.PopWiredInt32());
item.Extra2 = Convert.ToString(Event.PopWiredInt32());
break;
case "wf_act_moverotate":
{
//.........这里部分代码省略.........
示例3: parse
public void parse(GameClient Session, ClientMessage Event)
{
ServerMessage Message = new ServerMessage(827);
string text = Event.ToString().Split(new char[]
{
' '
})[1];
if (text.ToLower().Contains("pet"))
{
int PetType = Convert.ToInt32(text.Substring(3));
Message.AppendStringWithBreak("a0 pet" + PetType);
switch (PetType)
{
case 0:
Message.AppendString(TextManager.GetText("pet_breeds_0"));
break;
case 1:
Message.AppendString(TextManager.GetText("pet_breeds_1"));
break;
case 2:
Message.AppendString(TextManager.GetText("pet_breeds_2"));
break;
case 3:
Message.AppendString(TextManager.GetText("pet_breeds_3"));
break;
case 4:
Message.AppendString(TextManager.GetText("pet_breeds_4"));
break;
case 5:
Message.AppendString(TextManager.GetText("pet_breeds_5"));
break;
case 6:
Message.AppendString(TextManager.GetText("pet_breeds_6"));
break;
case 7:
Message.AppendString(TextManager.GetText("pet_breeds_7"));
break;
case 8:
Message.AppendString(TextManager.GetText("pet_breeds_8"));
break;
case 9:
Message.AppendString(TextManager.GetText("pet_breeds_9"));
break;
case 10:
Message.AppendString(TextManager.GetText("pet_breeds_10"));
break;
case 11:
Message.AppendString(TextManager.GetText("pet_breeds_11"));
break;
case 12:
Message.AppendString(TextManager.GetText("pet_breeds_12"));
break;
case 13:
Message.AppendString(TextManager.GetText("pet_breeds_13"));
break;
case 14:
Message.AppendString(TextManager.GetText("pet_breeds_14"));
break;
case 15:
Message.AppendString(TextManager.GetText("pet_breeds_15"));
break;
case 16:
Message.AppendString(TextManager.GetText("pet_breeds_16"));
break;
case 17:
Message.AppendString(TextManager.GetText("pet_breeds_17"));
break;
case 18:
Message.AppendString(TextManager.GetText("pet_breeds_18"));
break;
case 19:
Message.AppendString(TextManager.GetText("pet_breeds_19"));
break;
case 20:
Message.AppendString(TextManager.GetText("pet_breeds_20"));
break;
case 21:
Message.AppendString(TextManager.GetText("pet_breeds_21"));
break;
case 22:
Message.AppendString(TextManager.GetText("pet_breeds_22"));
break;
case 23:
Message.AppendString(TextManager.GetText("pet_breeds_23"));
break;
case 24:
Message.AppendString(TextManager.GetText("pet_breeds_24"));
break;
case 25:
Message.AppendString(TextManager.GetText("pet_breeds_25"));
break;
case 26:
Message.AppendString(TextManager.GetText("pet_breeds_26"));
break;
case 27:
Message.AppendString(TextManager.GetText("pet_breeds_27"));
break;
case 28:
Message.AppendString(TextManager.GetText("pet_breeds_28"));
break;
//.........这里部分代码省略.........
示例4: parse
public void parse(GameClient Session, ClientMessage Event)
{
Room room = PhoenixEnvironment.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
RoomItem item = room.GetItem(Event.PopWiredUInt());
if (room != null && item != null)
{
string text = item.GetBaseItem().InteractionType.ToLower();
if (text != null)
{
if (!(text == "wf_trg_onsay"))
{
if (!(text == "wf_trg_enterroom"))
{
if (!(text == "wf_trg_timer"))
{
if (!(text == "wf_trg_attime"))
{
if (text == "wf_trg_atscore")
{
Event.PopWiredBoolean();
string text2 = Event.ToString().Substring(Event.Length - (Event.RemainingLength - 2));
string[] array = text2.Split(new char[]
{
'@'
});
item.Extra2 = array[0];
item.Extra1 = Convert.ToString(Event.PopWiredInt32());
}
}
else
{
Event.PopWiredBoolean();
string text2 = Event.ToString().Substring(Event.Length - (Event.RemainingLength - 2));
string[] array = text2.Split(new char[]
{
'@'
});
item.Extra2 = array[0];
item.Extra1 = Convert.ToString(Convert.ToString((double)Event.PopWiredInt32() * 0.5));
}
}
else
{
Event.PopWiredBoolean();
string text2 = Event.ToString().Substring(Event.Length - (Event.RemainingLength - 2));
string[] array = text2.Split(new char[]
{
'@'
});
item.Extra2 = array[0];
item.Extra1 = Convert.ToString(Convert.ToString((double)Event.PopWiredInt32() * 0.5));
}
}
else
{
Event.PopWiredBoolean();
string text3 = Event.PopFixedString();
item.Extra1 = text3;
}
}
else
{
Event.PopWiredBoolean();
bool value = Event.PopWiredBoolean();
string text3 = Event.PopFixedString();
text3 = PhoenixEnvironment.FilterInjectionChars(text3, false, true);
if (text3.Length > 100)
{
text3 = text3.Substring(0, 100);
}
item.Extra1 = text3;
item.Extra2 = Convert.ToString(value);
}
}
item.UpdateState(true, false);
}
}