本文整理汇总了C#中Phoenix.HabboHotel.GameClients.GameClient.SendNotif方法的典型用法代码示例。如果您正苦于以下问题:C# GameClient.SendNotif方法的具体用法?C# GameClient.SendNotif怎么用?C# GameClient.SendNotif使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Phoenix.HabboHotel.GameClients.GameClient
的用法示例。
在下文中一共展示了GameClient.SendNotif方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: parse
public void parse(GameClient Session, ClientMessage Event)
{
Room @class = PhoenixEnvironment.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
if (@class != null && (@class.AllowPet || @class.CheckRights(Session, true)))
{
uint uint_ = Event.PopWiredUInt();
Pet class2 = Session.GetHabbo().GetInventoryComponent().GetPet(uint_);
if (class2 != null && !class2.PlacedInRoom)
{
int num = Event.PopWiredInt32();
int num2 = Event.PopWiredInt32();
if (@class.CanWalk(num, num2, 0.0, true, false))
{
if (@class.Int32_2 >= GlobalClass.MaxPetsPerRoom)
{
Session.SendNotif(TextManager.GetText("error_maxpets") + GlobalClass.MaxPetsPerRoom);
}
else
{
class2.PlacedInRoom = true;
class2.RoomId = @class.RoomId;
List<RandomSpeech> list = new List<RandomSpeech>();
List<BotResponse> list2 = new List<BotResponse>();
@class.method_4(new RoomBot(class2.PetId, class2.RoomId, AIType.Pet, "freeroam", class2.Name, "", class2.Look, num, num2, 0, 0, 0, 0, 0, 0, ref list, ref list2, 0), class2);
if (@class.CheckRights(Session, true))
{
Session.GetHabbo().GetInventoryComponent().MovePetToRoom(class2.PetId, @class.RoomId);
}
}
}
}
}
}
示例2: parse
public void parse(GameClient Session, ClientMessage Event)
{
if (Session.GetHabbo().HasRole("acc_supporttool"))
{
uint Id = Event.PopWiredUInt();
if (PhoenixEnvironment.GetGame().GetClientManager().GetNameById(Id) != "Unknown User")
{
Session.SendMessage(PhoenixEnvironment.GetGame().GetModerationTool().SerializeUserInfo(Id));
}
else
{
Session.SendNotif("Could not load user info, invalid user.");
}
}
}
示例3: parse
public void parse(GameClient session, ClientMessage message)
{
int id = message.PopWiredInt32();
int userid = message.PopWiredInt32();
if (id <= 0 || userid <= 0)
return;
using (DatabaseClient dbclient = PhoenixEnvironment.GetDatabase().GetClient())
{
DataRow datarow = dbclient.ReadDataRow("SELECT id FROM friend_stream_likes WHERE friend_stream_id = '" + id + "' AND userid = '" + userid + "' LIMIT 1");
if (datarow == null)
{
dbclient.AddParamWithValue("fsi", id);
dbclient.AddParamWithValue("userid", userid);
dbclient.ExecuteQuery("INSERT INTO friend_stream_likes (friend_stream_id, userid) VALUES (@fsi, @userid)");
}
else
{
session.SendNotif("You cant like twice!");
}
}
}
示例4: method_21
public void method_21(GameClient Session)
{
int num1 = 0;
List<UserItem> list = new List<UserItem>();
foreach (UserItem userItem in this.InventoryItems)
{
if (userItem != null && userItem.GetBaseItem().Name.StartsWith("PntEx_"))
{
int num2 = int.Parse(userItem.GetBaseItem().Name.Split(new char[1]
{
'_'
})[1]);
if (!this.mRemovedItems.Contains(userItem.Id))
{
if (num2 > 0)
num1 += num2;
list.Add(userItem);
}
}
}
foreach (UserItem userItem in list)
this.RemoveItem(userItem.Id, 0, false);
Session.GetHabbo().shells += num1;
Session.GetHabbo().UpdateShellsBalance(false, true);
Session.SendNotif("All mussel bars in your inventory were in " + num1 + " Mussels converted!");
}
示例5: method_20
internal void method_20(GameClient Session)
{
int num1 = 0;
List<UserItem> list = new List<UserItem>();
foreach (UserItem userItem in this.InventoryItems)
{
if (userItem != null && userItem.GetBaseItem().Name.StartsWith("PixEx_"))
{
int num2 = int.Parse(userItem.GetBaseItem().Name.Split(new char[1]
{
'_'
})[1]);
if (!this.mRemovedItems.Contains(userItem.Id))
{
if (num2 > 0)
num1 += num2;
list.Add(userItem);
}
}
}
foreach (UserItem userItem in list)
this.RemoveItem(userItem.Id, 0, false);
Session.GetHabbo().ActivityPoints += num1;
Session.GetHabbo().UpdateActivityPointsBalance(true);
Session.SendNotif("All pixels ingots in your inventory were in " + num1 + " Pixel converted!");
}
示例6: parse
public void parse(GameClient Session, ClientMessage Event)
{
CatalogPage Page = PhoenixEnvironment.GetGame().GetCatalog().GetPage(Event.PopWiredInt32());
if (Page != null && Page.Enabled && Page.Visible && Page.MinRank <= Session.GetHabbo().Rank)
{
if (Page.ClubOnly && !Session.GetHabbo().GetSubscriptionManager().HasSubscription("habbo_club"))
{
Session.SendNotif("This page is for Phoenix Club members only!");
}
else
{
Session.SendMessage(Page.GetMessage);
if (Page.Layout == "recycler")
{
ServerMessage Message = new ServerMessage(507);
Message.AppendBoolean(true);
Message.AppendBoolean(false);
Session.SendMessage(Message);
}
else
{
if (Page.Layout == "club_buy")
{
ServerMessage Message2 = new ServerMessage(625);
if (Session.GetHabbo().Vip)
{
Message2.AppendInt32(2);
Message2.AppendInt32(4535);
Message2.AppendStringWithBreak("HABBO_CLUB_VIP_1_MONTH");
Message2.AppendInt32(25);
Message2.AppendInt32(0);
Message2.AppendInt32(1);
Message2.AppendInt32(1);
Message2.AppendInt32(101);
Message2.AppendInt32(DateTime.Today.AddDays(30.0).Year);
Message2.AppendInt32(DateTime.Today.AddDays(30.0).Month);
Message2.AppendInt32(DateTime.Today.AddDays(30.0).Day);
Message2.AppendInt32(4536);
Message2.AppendStringWithBreak("HABBO_CLUB_VIP_3_MONTHS");
Message2.AppendInt32(60);
Message2.AppendInt32(0);
Message2.AppendInt32(1);
Message2.AppendInt32(3);
Message2.AppendInt32(163);
Message2.AppendInt32(DateTime.Today.AddDays(90.0).Year);
Message2.AppendInt32(DateTime.Today.AddDays(90.0).Month);
Message2.AppendInt32(DateTime.Today.AddDays(90.0).Day);
}
else
{
Message2.AppendInt32(4);
Message2.AppendInt32(4533);
Message2.AppendStringWithBreak("HABBO_CLUB_BASIC_1_MONTH");
Message2.AppendInt32(15);
Message2.AppendInt32(0);
Message2.AppendInt32(0);
Message2.AppendInt32(1);
Message2.AppendInt32(31);
Message2.AppendInt32(DateTime.Today.AddDays(30.0).Year);
Message2.AppendInt32(DateTime.Today.AddDays(30.0).Month);
Message2.AppendInt32(DateTime.Today.AddDays(30.0).Day);
Message2.AppendInt32(4534);
Message2.AppendStringWithBreak("HABBO_CLUB_BASIC_3_MONTHS");
Message2.AppendInt32(45);
Message2.AppendInt32(0);
Message2.AppendInt32(0);
Message2.AppendInt32(3);
Message2.AppendInt32(93);
Message2.AppendInt32(DateTime.Today.AddDays(90.0).Year);
Message2.AppendInt32(DateTime.Today.AddDays(90.0).Month);
Message2.AppendInt32(DateTime.Today.AddDays(90.0).Day);
Message2.AppendInt32(4535);
Message2.AppendStringWithBreak("HABBO_CLUB_VIP_1_MONTH");
Message2.AppendInt32(25);
Message2.AppendInt32(0);
Message2.AppendInt32(1);
Message2.AppendInt32(1);
Message2.AppendInt32(101);
Message2.AppendInt32(DateTime.Today.AddDays(30.0).Year);
Message2.AppendInt32(DateTime.Today.AddDays(30.0).Month);
Message2.AppendInt32(DateTime.Today.AddDays(30.0).Day);
Message2.AppendInt32(4536);
Message2.AppendStringWithBreak("HABBO_CLUB_VIP_3_MONTHS");
Message2.AppendInt32(60);
Message2.AppendInt32(0);
Message2.AppendInt32(1);
Message2.AppendInt32(3);
Message2.AppendInt32(163);
Message2.AppendInt32(DateTime.Today.AddDays(90.0).Year);
Message2.AppendInt32(DateTime.Today.AddDays(90.0).Month);
Message2.AppendInt32(DateTime.Today.AddDays(90.0).Day);
}
Session.SendMessage(Message2);
}
}
}
}
}
示例7: parse
public void parse(GameClient Session, ClientMessage Event)
{
uint ItemId = Event.PopWiredUInt();
DataRow Row = null;
using (DatabaseClient adapter = PhoenixEnvironment.GetDatabase().GetClient())
{
Row = adapter.ReadDataRow("SELECT state, timestamp, total_price, extra_data, item_id, furni_id FROM catalog_marketplace_offers WHERE offer_id = '" + ItemId + "' LIMIT 1");
}
if (Row == null || (string)Row["state"] != "1" || (double)Row["timestamp"] <= PhoenixEnvironment.GetGame().GetCatalog().GetMarketplace().FormatTimestamp())
{
Session.SendNotif(TextManager.GetText("marketplace_error_expired"));
}
else
{
Item Item = PhoenixEnvironment.GetGame().GetItemManager().GetItem((uint)Row["item_id"]);
if (Item != null)
{
if ((int)Row["total_price"] >= 1)
{
if (Session.GetHabbo().Credits < (int)Row["total_price"])
{
Session.SendNotif(TextManager.GetText("marketplace_error_credits"));
return;
}
Session.GetHabbo().Credits -= (int)Row["total_price"];
Session.GetHabbo().UpdateCreditsBalance(true);
}
PhoenixEnvironment.GetGame().GetCatalog().DeliverItems(Session, Item, 1, (string)Row["extra_data"], false, (uint)Row["furni_id"]);
using (DatabaseClient adapter = PhoenixEnvironment.GetDatabase().GetClient())
{
adapter.ExecuteQuery("UPDATE catalog_marketplace_offers SET state = '2' WHERE offer_id = '" + ItemId + "' LIMIT 1");
int num2 = 0;
try
{
num2 = adapter.ReadInt32("SELECT Id FROM catalog_marketplace_data WHERE daysago = 0 AND sprite = " + Item.SpriteId + " LIMIT 1;");
}
catch
{
}
if (num2 > 0)
{
adapter.ExecuteQuery(string.Concat(new object[]
{
"UPDATE catalog_marketplace_data SET sold = sold + 1, avgprice = (avgprice + ",
(int)Row["total_price"],
") WHERE Id = ",
num2,
" LIMIT 1;"
}));
}
else
{
adapter.ExecuteQuery(string.Concat(new object[]
{
"INSERT INTO catalog_marketplace_data (sprite, sold, avgprice, daysago) VALUES ('",
Item.SpriteId,
"', 1, ",
(int)Row["total_price"],
", 0)"
}));
}
if (PhoenixEnvironment.GetGame().GetCatalog().GetMarketplace().MarketAverages.ContainsKey(Item.SpriteId) && PhoenixEnvironment.GetGame().GetCatalog().GetMarketplace().MarketCounts.ContainsKey(Item.SpriteId))
{
int num3 = PhoenixEnvironment.GetGame().GetCatalog().GetMarketplace().MarketCounts[Item.SpriteId];
int num4 = PhoenixEnvironment.GetGame().GetCatalog().GetMarketplace().MarketAverages[Item.SpriteId];
num4 += (int)Row["total_price"];
PhoenixEnvironment.GetGame().GetCatalog().GetMarketplace().MarketAverages.Remove(Item.SpriteId);
PhoenixEnvironment.GetGame().GetCatalog().GetMarketplace().MarketAverages.Add(Item.SpriteId, num4);
PhoenixEnvironment.GetGame().GetCatalog().GetMarketplace().MarketCounts.Remove(Item.SpriteId);
PhoenixEnvironment.GetGame().GetCatalog().GetMarketplace().MarketCounts.Add(Item.SpriteId, num3 + 1);
}
else
{
if (!PhoenixEnvironment.GetGame().GetCatalog().GetMarketplace().MarketAverages.ContainsKey(Item.SpriteId))
{
PhoenixEnvironment.GetGame().GetCatalog().GetMarketplace().MarketAverages.Add(Item.SpriteId, (int)Row["total_price"]);
}
if (!PhoenixEnvironment.GetGame().GetCatalog().GetMarketplace().MarketCounts.ContainsKey(Item.SpriteId))
{
PhoenixEnvironment.GetGame().GetCatalog().GetMarketplace().MarketCounts.Add(Item.SpriteId, 1);
}
}
}
ServerMessage Message = new ServerMessage(67);
Message.AppendUInt(Item.ItemId);
Message.AppendStringWithBreak(Item.Name);
Message.AppendInt32((int)Row["total_price"]);
Message.AppendInt32(0);
Message.AppendInt32(0);
Message.AppendInt32(1);
Message.AppendStringWithBreak(Item.Type.ToString());
Message.AppendInt32(Item.SpriteId);
Message.AppendStringWithBreak("");
Message.AppendInt32(1);
Message.AppendInt32(-1);
Message.AppendStringWithBreak("");
Session.SendMessage(Message);
Session.SendMessage(PhoenixEnvironment.GetGame().GetCatalog().GetMarketplace().SerializeOffersNew(-1, -1, "", 1));
}
}
//.........这里部分代码省略.........
示例8: BanUser
public void BanUser(GameClient ModSession, uint UserId, int Length, string Message)
{
GameClient Client = PhoenixEnvironment.GetGame().GetClientManager().GetClientByHabbo(UserId);
if (Client != null && Client.GetHabbo().Id != ModSession.GetHabbo().Id)
{
if (Client.GetHabbo().Rank >= ModSession.GetHabbo().Rank)
{
ModSession.SendNotif(TextManager.GetText("mod_error_permission_ban"));
}
else
{
Double dLength = Length;
PhoenixEnvironment.GetGame().GetBanManager().BanUser(Client, ModSession.GetHabbo().Username, dLength, Message, false);
}
}
}
示例9: DeliverItems
//.........这里部分代码省略.........
IL_4CF:
Session.GetHabbo().GetInventoryComponent().AddItem(num, Item.ItemId, string_0, bool_0);
goto IL_4EA;
}
Session.GetHabbo().GetInventoryComponent().UpdateItems(false);
return;
}
if (text == "e")
{
for (int i = 0; i < int_0; i++)
{
Session.GetHabbo().GetAvatarEffectsInventoryComponent().AddEffect(Item.SpriteId, 3600);
}
return;
}
if (text == "h")
{
for (int i = 0; i < int_0; i++)
{
Session.GetHabbo().GetSubscriptionManager().AddOrExtendSubscription("habbo_club", 2678400);
}
if (!Session.GetHabbo().GetBadgeComponent().HasBadge("HC1"))
{
Session.GetHabbo().GetBadgeComponent().GiveBadge(Session, "HC1", true);
}
ServerMessage Message2 = new ServerMessage(7u);
Message2.AppendStringWithBreak("habbo_club");
if (Session.GetHabbo().GetSubscriptionManager().HasSubscription("habbo_club"))
{
double num3 = (double)Session.GetHabbo().GetSubscriptionManager().GetSubscription("habbo_club").ExpireTime;
double num4 = num3 - PhoenixEnvironment.GetUnixTimestamp();
int num5 = (int)Math.Ceiling(num4 / 86400.0);
int num6 = num5 / 31;
if (num6 >= 1)
{
num6--;
}
Message2.AppendInt32(num5 - num6 * 31);
Message2.AppendBoolean(true);
Message2.AppendInt32(num6);
}
else
{
for (int i = 0; i < 3; i++)
{
Message2.AppendInt32(0);
}
}
Session.SendMessage(Message2);
ServerMessage Message3 = new ServerMessage(2u);
if (Session.GetHabbo().Vip || GlobalClass.VIPclothesforHCusers)
{
Message3.AppendInt32(2);
}
else
{
if (Session.GetHabbo().GetSubscriptionManager().HasSubscription("habbo_club"))
{
Message3.AppendInt32(1);
}
else
{
Message3.AppendInt32(0);
}
}
if (Session.GetHabbo().HasRole("acc_anyroomowner"))
{
Message3.AppendInt32(7);
}
else
{
if (Session.GetHabbo().HasRole("acc_anyroomrights"))
{
Message3.AppendInt32(5);
}
else
{
if (Session.GetHabbo().HasRole("acc_supporttool"))
{
Message3.AppendInt32(4);
}
else
{
if (Session.GetHabbo().Vip || GlobalClass.VIPclothesforHCusers || Session.GetHabbo().GetSubscriptionManager().HasSubscription("habbo_club"))
{
Message3.AppendInt32(2);
}
else
{
Message3.AppendInt32(0);
}
}
}
}
Session.SendMessage(Message3);
return;
}
}
Session.SendNotif("Something went wrong! The item type could not be processed. Please do not try to buy this item anymore, instead inform support as soon as possible.");
}
示例10: parse
public void parse(GameClient Session, ClientMessage Event)
{
Room @class = PhoenixEnvironment.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
if (@class != null && @class.CheckRights(Session) && (GlobalClass.AllowFriendlyFurni || !(@class.Owner != Session.GetHabbo().Username)))
{
string text = Event.PopFixedString();
string[] array = text.Split(new char[]
{
' '
});
if (array[0].Contains("-"))
{
array[0] = array[0].Replace("-", "");
}
uint uint_ = 0u;
try
{
uint_ = uint.Parse(array[0]);
}
catch
{
return;
}
UserItem class2 = Session.GetHabbo().GetInventoryComponent().GetItem(uint_);
if (class2 != null)
{
string text2 = class2.GetBaseItem().InteractionType.ToLower();
if (text2 != null && text2 == "dimmer" && @class.method_72("dimmer") >= 1)
{
Session.SendNotif("You can only have one moodlight in a room.");
}
else if (text2 != null && text2 == "jukebox" && @class.method_72("jukebox") >= 1)
{
Session.SendNotif("You can only have one jukebox in a room.");
}
else
{
RoomItem RoomItem_;
if (array[1].StartsWith(":"))
{
string text3 = @class.method_98(":" + text.Split(new char[]
{
':'
})[1]);
if (text3 == null)
{
ServerMessage Message = new ServerMessage(516u);
Message.AppendInt32(11);
Session.SendMessage(Message);
return;
}
RoomItem_ = new RoomItem(class2.Id, @class.RoomId, class2.BaseItem, class2.ExtraData, 0, 0, 0.0, 0, text3, @class);
if ([email protected]_82(Session, RoomItem_, true, null))
{
goto IL_32C;
}
Session.GetHabbo().GetInventoryComponent().RemoveItem(uint_, 1u, false);
using (DatabaseClient class3 = PhoenixEnvironment.GetDatabase().GetClient())
{
class3.ExecuteQuery(string.Concat(new object[]
{
"UPDATE items SET room_id = '",
@class.RoomId,
"' WHERE Id = '",
class2.Id,
"' LIMIT 1"
}));
goto IL_32C;
}
}
int int_ = int.Parse(array[1]);
int int_2 = int.Parse(array[2]);
int int_3 = int.Parse(array[3]);
RoomItem_ = new RoomItem(class2.Id, @class.RoomId, class2.BaseItem, class2.ExtraData, 0, 0, 0.0, 0, "", @class);
if (@class.method_79(Session, RoomItem_, int_, int_2, int_3, true, false, false))
{
Session.GetHabbo().GetInventoryComponent().RemoveItem(uint_, 1u, false);
using (DatabaseClient class3 = PhoenixEnvironment.GetDatabase().GetClient())
{
class3.ExecuteQuery(string.Concat(new object[]
{
"UPDATE items SET room_id = '",
@class.RoomId,
"' WHERE Id = '",
class2.Id,
"' LIMIT 1"
}));
}
}
IL_32C:
if (Session.GetHabbo().CurrentQuestId == 14u)
{
PhoenixEnvironment.GetGame().GetQuestManager().ProgressUserQuest(14u, Session);
}
}
}
}
}
示例11: parse
public void parse(GameClient Session, ClientMessage Event)
{
Room room = PhoenixEnvironment.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
if (room != null && Session != null)
{
if (Session.GetHabbo().Muted)
{
Session.SendNotif(TextManager.GetText("error_muted"));
}
else
{
if (Session.GetHabbo().HasRole("ignore_roommute") || !room.RoomMuted)
{
string str = PhoenixEnvironment.FilterInjectionChars(Event.PopFixedString());
string name = str.Split(new char[]
{
' '
})[0];
string s = str.Substring(name.Length + 1);
s = ChatCommandHandler.ApplyWordFilter(s);
RoomUser roomUserByHabbo = room.GetRoomUserByHabbo(Session.GetHabbo().Id);
RoomUser user2 = room.GetRoomUserByHabbo(name);
if (Session.GetHabbo().MaxFloodTime() > 0)
{
TimeSpan timeSpan = DateTime.Now - Session.GetHabbo().FloodTime;
if (timeSpan.Seconds > 4)
{
Session.GetHabbo().FloodCount = 0;
}
if (timeSpan.Seconds < 4 && Session.GetHabbo().FloodCount > 5 && !roomUserByHabbo.IsBot)
{
ServerMessage Message = new ServerMessage(27);
Message.AppendInt32(Session.GetHabbo().MaxFloodTime());
Session.SendMessage(Message);
Session.GetHabbo().Muted = true;
Session.GetHabbo().MuteLength = Session.GetHabbo().MaxFloodTime();
return;
}
Session.GetHabbo().FloodTime = DateTime.Now;
Session.GetHabbo().FloodCount++;
}
ServerMessage Message2 = new ServerMessage(25);
Message2.AppendInt32(roomUserByHabbo.VirtualId);
Message2.AppendStringWithBreak(s);
Message2.AppendBoolean(false);
if (roomUserByHabbo != null && !roomUserByHabbo.IsBot)
{
roomUserByHabbo.GetClient().SendMessage(Message2);
}
roomUserByHabbo.Unidle();
if (user2 != null && !user2.IsBot && (user2.GetClient().GetHabbo().MutedUsers.Count <= 0 || !user2.GetClient().GetHabbo().MutedUsers.Contains(Session.GetHabbo().Id)))
{
user2.GetClient().SendMessage(Message2);
if (GlobalClass.RecordChatlogs && !Session.GetHabbo().isAaron)
{
using (DatabaseClient client = PhoenixEnvironment.GetDatabase().GetClient())
{
client.AddParamWithValue("message", "<Whisper to " + user2.GetClient().GetHabbo().Username + ">: " + s);
client.ExecuteQuery(string.Concat(new object[]
{
"INSERT INTO chatlogs (user_id,room_id,hour,minute,timestamp,message,user_name,full_date) VALUES ('",
Session.GetHabbo().Id,
"','",
room.RoomId,
"','",
DateTime.Now.Hour,
"','",
DateTime.Now.Minute,
"',UNIX_TIMESTAMP(),@message,'",
Session.GetHabbo().Username,
"','",
DateTime.Now.ToLongDateString(),
"')"
}));
}
}
}
}
}
}
}
示例12: parse
public void parse(GameClient Session, ClientMessage Event)
{
Room @class = PhoenixEnvironment.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
if (@class != null && @class.CheckRights(Session, true))
{
Event.PopWiredInt32();
string text = PhoenixEnvironment.FilterInjectionChars(Event.PopFixedString());
string text2 = PhoenixEnvironment.FilterInjectionChars(Event.PopFixedString());
if (text2.Length > 255)
{
text2 = text2.Substring(0, 255);
}
int num = Event.PopWiredInt32();
string text3 = PhoenixEnvironment.FilterInjectionChars(Event.PopFixedString());
int num2 = Event.PopWiredInt32();
int num3 = Event.PopWiredInt32();
int num4 = Event.PopWiredInt32();
List<string> list = new List<string>();
StringBuilder stringBuilder = new StringBuilder();
for (int i = 0; i < num4; i++)
{
if (i > 0)
{
stringBuilder.Append(",");
}
string text4 = PhoenixEnvironment.FilterInjectionChars(Event.PopFixedString().ToLower());
if (text4 == ChatCommandHandler.ApplyWordFilter(text4))
{
list.Add(text4);
stringBuilder.Append(text4);
}
}
if (stringBuilder.Length > 100)
{
stringBuilder.Clear();
stringBuilder.Append("");
}
int num5 = 0;
int num6 = 0;
int num7 = 0;
int num8 = 0;
string a = Event.PlainReadBytes(1)[0].ToString();
Event.AdvancePointer(1);
string a2 = Event.PlainReadBytes(1)[0].ToString();
Event.AdvancePointer(1);
string a3 = Event.PlainReadBytes(1)[0].ToString();
Event.AdvancePointer(1);
string a4 = Event.PlainReadBytes(1)[0].ToString();
Event.AdvancePointer(1);
int num9 = Event.PopWiredInt32();
int num10 = Event.PopWiredInt32();
if (!(text != ChatCommandHandler.ApplyWordFilter(text)) && !(text2 != ChatCommandHandler.ApplyWordFilter(text2)) && text.Length >= 1 && (num9 >= -2 && num9 <= 1 && num10 >= -2 && num10 <= 1))
{
@class.Wallthick = num9;
@class.Floorthick = num10;
if (num >= 0 && num <= 2 && (num2 == 10 || num2 == 15 || num2 == 20 || num2 == 25 || num2 == 30 || num2 == 35 || num2 == 40 || num2 == 45 || num2 == 50 || num2 == 55 || num2 == 60 || num2 == 65 || num2 == 70 || num2 == 75 || num2 == 80 || num2 == 85 || num2 == 90 || num2 == 95 || num2 == 100))
{
FlatCat class2 = PhoenixEnvironment.GetGame().GetNavigator().GetFlatCat(num3);
if (class2 != null)
{
if ((long)class2.MinRank > (long)((ulong)Session.GetHabbo().Rank))
{
Session.SendNotif("You are not allowed to use this category. Your room has been moved to no category instead.");
num3 = 0;
}
if (num4 <= 2)
{
if (a == "65")
{
num5 = 1;
@class.AllowPet = true;
}
else
{
@class.AllowPet = false;
}
if (a2 == "65")
{
num6 = 1;
@class.AllowPetsEating = true;
}
else
{
@class.AllowPetsEating = false;
}
if (a3 == "65")
{
num7 = 1;
@class.AllowWalkthrough = true;
}
else
{
@class.AllowWalkthrough = false;
}
@class.GenerateMaps();
if (a4 == "65")
{
num8 = 1;
@class.Hidewall = true;
}
//.........这里部分代码省略.........
示例13: parse
public void parse(GameClient Session, ClientMessage Event)
{
if (Session.GetHabbo().LoadingRoom > 0u && Session.GetHabbo().LoadingChecksPassed)
{
RoomData @class = PhoenixEnvironment.GetGame().GetRoomManager().GenerateRoomData(Session.GetHabbo().LoadingRoom);
if (@class != null)
{
if (@class.Model == null)
{
Session.SendNotif("Error loading room, please try again soon! (Error Code: MdlData)");
Session.SendMessage(new ServerMessage(18u));
Session.GetMessageHandler().ClearRoomLoading();
}
else
{
Session.SendMessage(@class.Model.method_1());
Session.SendMessage(@class.Model.method_2());
Room class2 = PhoenixEnvironment.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().LoadingRoom);
if (class2 != null)
{
Session.GetMessageHandler().ClearRoomLoading();
ServerMessage Message = new ServerMessage(30u);
if (class2.Model.StaticFurniMap != "")
{
Message.AppendStringWithBreak(class2.Model.StaticFurniMap);
}
else
{
Message.AppendInt32(0);
}
Session.SendMessage(Message);
if (class2.Type == "private")
{
Hashtable hashtable_ = class2.Hashtable_0;
Hashtable hashtable_2 = class2.Hashtable_1;
ServerMessage Message2 = new ServerMessage(32u);
Message2.AppendInt32(hashtable_.Count);
foreach (RoomItem class3 in hashtable_.Values)
{
class3.Serialize(Message2);
}
Session.SendMessage(Message2);
ServerMessage Message3 = new ServerMessage(45u);
Message3.AppendInt32(hashtable_2.Count);
foreach (RoomItem class3 in hashtable_2.Values)
{
class3.Serialize(Message3);
}
Session.SendMessage(Message3);
}
class2.method_46(Session, Session.GetHabbo().SpectatorMode);
List<RoomUser> list = new List<RoomUser>();
for (int i = 0; i < class2.UserList.Length; i++)
{
RoomUser class4 = class2.UserList[i];
if (class4 != null && (!class4.IsSpectator && class4.Visible))
{
list.Add(class4);
}
}
ServerMessage Message4 = new ServerMessage(28u);
Message4.AppendInt32(list.Count);
foreach (RoomUser class4 in list)
{
class4.Serialize(Message4);
}
Session.SendMessage(Message4);
ServerMessage Message5 = new ServerMessage(472u);
Message5.AppendBoolean(class2.Hidewall);
Message5.AppendInt32(class2.Wallthick);
Message5.AppendInt32(class2.Floorthick);
Session.SendMessage(Message5);
if (class2.Type == "public")
{
ServerMessage Message6 = new ServerMessage(471u);
Message6.AppendBoolean(false);
Message6.AppendStringWithBreak(class2.ModelName);
Message6.AppendBoolean(false);
Session.SendMessage(Message6);
}
else
{
if (class2.Type == "private")
{
ServerMessage Message6 = new ServerMessage(471u);
Message6.AppendBoolean(true);
Message6.AppendUInt(class2.RoomId);
if (class2.CheckRights(Session, true))
{
Message6.AppendBoolean(true);
}
else
{
Message6.AppendBoolean(false);
}
Session.SendMessage(Message6);
ServerMessage Message7 = new ServerMessage(454u);
Message7.AppendBoolean(false);
@class.Serialize(Message7, false, false);
Session.SendMessage(Message7);
//.........这里部分代码省略.........
示例14: RedeemCredits
public void RedeemCredits(GameClient Session)
{
int num = 0;
List<UserItem> list = new List<UserItem>();
foreach (UserItem current in this.InventoryItems)
{
if (current != null && (current.GetBaseItem().Name.StartsWith("CF_") || current.GetBaseItem().Name.StartsWith("CFC_")))
{
string[] array = current.GetBaseItem().Name.Split(new char[]
{
'_'
});
int num2 = int.Parse(array[1]);
if (!this.mRemovedItems.Contains(current.Id))
{
if (num2 > 0)
{
num += num2;
}
list.Add(current);
}
}
}
foreach (UserItem current in list)
{
this.RemoveItem(current.Id, 0, false);
}
Session.GetHabbo().Credits += num;
Session.GetHabbo().UpdateCreditsBalance(true);
Session.SendNotif("All coins in your inventory have been converted back into " + num + " credits!");
}
示例15: KickUser
public void KickUser(GameClient ModSession, uint UserId, string Message, bool Soft)
{
GameClient Client = PhoenixEnvironment.GetGame().GetClientManager().GetClientByHabbo(UserId);
if (Client == null || Client.GetHabbo().CurrentRoomId < 1 || Client.GetHabbo().Id == ModSession.GetHabbo().Id)
{
return;
}
if (Client.GetHabbo().Rank >= ModSession.GetHabbo().Rank)
{
ModSession.SendNotif(TextManager.GetText("mod_error_permission_kick"));
}
Room Room = PhoenixEnvironment.GetGame().GetRoomManager().GetRoom(Client.GetHabbo().CurrentRoomId);
if (Room != null)
{
Room.RemoveUserFromRoom(Client, true, false);
if (!Soft)
{
Client.SendNotif(Message);
using (DatabaseClient adapter = PhoenixEnvironment.GetDatabase().GetClient())
{
adapter.ExecuteQuery("UPDATE user_info SET cautions = cautions + 1 WHERE user_id = '" + UserId + "' LIMIT 1");
}
}
}
}