本文整理汇总了C#中GoldTree.Messages.ServerMessage.GetBytes方法的典型用法代码示例。如果您正苦于以下问题:C# ServerMessage.GetBytes方法的具体用法?C# ServerMessage.GetBytes怎么用?C# ServerMessage.GetBytes使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GoldTree.Messages.ServerMessage
的用法示例。
在下文中一共展示了ServerMessage.GetBytes方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SendMessage
public void SendMessage(ServerMessage Message)
{
if (Message != null)
{
this.SendData(Message.GetBytes());
}
}
示例2: method_2
//.........这里部分代码省略.........
if (text3 == "updatemotto")
{
@class.GetHabbo().MottoAchievementsCompleted();
goto IL_C70;
}
if (text3 == "updatelook")
{
@class.GetHabbo().AvatarLookAchievementsCompleted();
goto IL_C70;
}
goto IL_C70;
}
default:
goto IL_C70;
}
using (DatabaseClient class2 = GoldTree.GetDatabase().GetClient())
{
GoldTree.GetGame().GetCatalog().method_0(class2);
}
GoldTree.GetGame().GetCatalog().method_1();
GoldTree.GetGame().GetClientManager().method_14(new ServerMessage(441u));
goto IL_C70;
IL_34E:
num2 = uint.Parse(text2.Split(new char[]
{
' '
})[0]);
num3 = uint.Parse(text2.Split(new char[]
{
' '
})[1]);
GameClient class7 = GoldTree.GetGame().GetClientManager().method_2(num2);
class4 = GoldTree.GetGame().GetRoomManager().GetRoom(num3);
if (class7 != null)
{
ServerMessage Message7 = new ServerMessage(286u);
Message7.AppendBoolean(class4.Boolean_3);
Message7.AppendUInt(num3);
class7.SendMessage(Message7);
goto IL_C70;
}
goto IL_C70;
IL_5BF:
uint_2 = uint.Parse(text2);
using (DatabaseClient class2 = GoldTree.GetDatabase().GetClient())
{
GoldTree.GetGame().GetClientManager().method_2(uint_2).GetHabbo().method_0(class2);
goto IL_C70;
}
IL_602:
GoldTree.smethod_18();
goto IL_C70;
IL_633:
@class = GoldTree.GetGame().GetClientManager().method_2(uint.Parse(text2));
if (@class != null)
{
int int_3 = 0;
using (DatabaseClient class2 = GoldTree.GetDatabase().GetClient())
{
int_3 = (int)class2.ReadDataRow("SELECT credits FROM users WHERE id = '" + @class.GetHabbo().Id + "' LIMIT 1")[0];
}
@class.GetHabbo().Credits = int_3;
@class.GetHabbo().method_13(false);
goto IL_C70;
}
goto IL_C70;
IL_6F7:
@class = GoldTree.GetGame().GetClientManager().method_2(uint.Parse(text2));
if (@class != null)
{
int int_4 = 0;
using (DatabaseClient class2 = GoldTree.GetDatabase().GetClient())
{
int_4 = (int)class2.ReadDataRow("SELECT activity_points FROM users WHERE id = '" + @class.GetHabbo().Id + "' LIMIT 1")[0];
}
@class.GetHabbo().ActivityPoints = int_4;
@class.GetHabbo().method_15(false);
goto IL_C70;
}
goto IL_C70;
IL_839:
GoldTree.GetGame().GetClientManager().method_2(uint.Parse(text2)).method_12();
goto IL_C70;
IL_880:
string text6 = text2.Split(new char[]
{
' '
})[0];
text5 = text2.Substring(text6.Length + 1);
ServerMessage Message8 = new ServerMessage(808u);
Message8.AppendStringWithBreak(GoldTreeEnvironment.smethod_1("mus_alert_title"));
Message8.AppendStringWithBreak(text5);
GoldTree.GetGame().GetClientManager().method_2(uint.Parse(text6)).SendMessage(Message8);
}
}
IL_C70:
ServerMessage Message9 = new ServerMessage(1u);
Message9.AppendString("Hello Housekeeping, Love from GoldTree Emu");
this.socket_0.Send(Message9.GetBytes());
}
示例3: method_60
internal void method_60(ServerMessage Message5_0, int int_17)
{
try
{
byte[] array = Message5_0.GetBytes();
for (int i = 0; i < this.RoomUser_0.Length; i++)
{
RoomUser @class = this.RoomUser_0[i];
if (@class != null && [email protected])
{
GameClient class2 = @class.GetClient();
if (class2 != null && class2.GetHabbo() != null && (ulong)class2.GetHabbo().Rank >= (ulong)((long)int_17))
{
try
{
class2.GetConnection().SendData(array);
}
catch
{
}
}
}
}
}
catch (InvalidOperationException)
{
}
}
示例4: SendMessage
internal void SendMessage(ServerMessage Message5_0, List<uint> list_18)
{
try
{
if (this.RoomUser_0 != null)
{
byte[] array = Message5_0.GetBytes();
for (int i = 0; i < this.RoomUser_0.Length; i++)
{
RoomUser @class = this.RoomUser_0[i];
if (@class != null && [email protected])
{
GameClient class2 = @class.GetClient();
if (class2 != null && (list_18 == null || !list_18.Contains(class2.GetHabbo().Id)))
{
try
{
class2.GetConnection().SendData(array);
}
catch
{
}
}
}
}
}
}
catch (InvalidOperationException)
{
}
}
示例5: method_61
public void method_61(ServerMessage Message5_0)
{
try
{
byte[] array = Message5_0.GetBytes();
for (int i = 0; i < this.RoomUser_0.Length; i++)
{
RoomUser @class = this.RoomUser_0[i];
if (@class != null && [email protected])
{
GameClient class2 = @class.GetClient();
if (class2 != null && this.method_26(class2))
{
try
{
class2.GetConnection().SendData(array);
}
catch
{
}
}
}
}
}
catch (InvalidOperationException)
{
}
}
示例6: method_12
private void method_12()
{
int num = int.Parse(GoldTree.GetConfig().data["client.ping.interval"]);
if (num <= 100)
{
throw new ArgumentException("Invalid configuration value for ping interval! Must be above 100 miliseconds.");
}
while (true)
{
try
{
ServerMessage Message = new ServerMessage(50u);
List<GameClient> list = new List<GameClient>();
List<GameClient> list2 = new List<GameClient>();
for (int i = 0; i < this.Session.Length; i++)
{
GameClient @class = this.Session[i];
if (@class != null)
{
if (@class.bool_0)
{
@class.bool_0 = false;
list2.Add(@class);
}
else
{
list.Add(@class);
}
}
}
foreach (GameClient @class in list)
{
try
{
@class.method_12();
}
catch
{
}
}
byte[] byte_ = Message.GetBytes();
foreach (GameClient @class in list2)
{
try
{
@class.GetConnection().SendData(byte_);
}
catch
{
}
}
}
catch (Exception ex)
{
Logging.LogThreadException(ex.ToString(), "Connection checker task");
}
Thread.Sleep(num);
}
}
示例7: method_17
internal void method_17(GameClient class16_1, ServerMessage Message5_0)
{
byte[] byte_ = Message5_0.GetBytes();
for (int i = 0; i < this.Session.Length; i++)
{
GameClient @class = this.Session[i];
if (@class != null && @class != class16_1)
{
try
{
if (@class.GetHabbo().HasFuse("receive_sa"))
{
@class.GetConnection().SendData(byte_);
}
}
catch
{
}
}
}
}
示例8: method_16
internal void method_16(ServerMessage Message5_0, ServerMessage Message5_1)
{
byte[] byte_ = Message5_0.GetBytes();
byte[] byte_2 = Message5_1.GetBytes();
for (int i = 0; i < this.Session.Length; i++)
{
GameClient @class = this.Session[i];
if (@class != null)
{
try
{
if (@class.GetHabbo().HasFuse("receive_sa"))
{
if (@class.GetHabbo().InRoom)
{
@class.GetConnection().SendData(byte_);
}
else
{
@class.GetConnection().SendData(byte_2);
}
}
}
catch
{
}
}
}
}
示例9: method_14
internal void method_14(ServerMessage Message5_0)
{
byte[] byte_ = Message5_0.GetBytes();
for (int i = 0; i < this.Session.Length; i++)
{
GameClient @class = this.Session[i];
if (@class != null)
{
try
{
@class.GetConnection().SendData(byte_);
}
catch
{
}
}
}
}