本文整理汇总了C#中Azure.HabboHotel.GameClients.Interfaces.GameClient.SendNotif方法的典型用法代码示例。如果您正苦于以下问题:C# GameClient.SendNotif方法的具体用法?C# GameClient.SendNotif怎么用?C# GameClient.SendNotif使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Azure.HabboHotel.GameClients.Interfaces.GameClient
的用法示例。
在下文中一共展示了GameClient.SendNotif方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Execute
public override bool Execute(GameClient session, string[] pms)
{
var userName = pms[0];
var userSession = Azure.GetGame().GetClientManager().GetClientByUserName(userName);
if (userSession == null)
{
session.SendWhisper(Azure.GetLanguage().GetVar("user_not_found"));
return true;
}
if (session.GetHabbo().Rank <= userSession.GetHabbo().Rank)
{
session.SendNotif(Azure.GetLanguage().GetVar("user_is_higher_rank"));
return true;
}
if (userSession.GetHabbo().CurrentRoomId < 1)
{
session.SendNotif(Azure.GetLanguage().GetVar("command_kick_user_not_in_room"));
return true;
}
var room = Azure.GetGame().GetRoomManager().GetRoom(userSession.GetHabbo().CurrentRoomId);
if (room == null) return true;
room.GetRoomUserManager().RemoveUserFromRoom(userSession, true, false);
userSession.CurrentRoomUserId = -1;
if (pms.Length > 1)
{
userSession.SendNotif(
string.Format(Azure.GetLanguage().GetVar("command_kick_user_mod_default") + "{0}.",
string.Join(" ", pms.Skip(1))));
}
else userSession.SendNotif(Azure.GetLanguage().GetVar("command_kick_user_mod_default"));
return true;
}
示例2: Execute
public override bool Execute(GameClient session, string[] pms)
{
try
{
session.GetHabbo().GetInventoryComponent().Redeemcredits(session);
session.SendNotif(Azure.GetLanguage().GetVar("command_redeem_credits"));
}
catch (Exception e)
{
Writer.Writer.LogException(e.ToString());
session.SendNotif(Azure.GetLanguage().GetVar("command_redeem_credits"));
}
return true;
}
示例3: CanTalk
/// <summary>
/// Determines whether this instance can talk the specified session.
/// </summary>
/// <param name="session">The session.</param>
/// <param name="message">The message.</param>
/// <returns><c>true</c> if this instance can talk the specified session; otherwise, <c>false</c>.</returns>
internal static bool CanTalk(GameClient session, string message)
{
if (CheckForBannedPhrases(message) && session.GetHabbo().Rank < 4)
{
if (!Azure.MutedUsersByFilter.ContainsKey(session.GetHabbo().Id))
session.GetHabbo().BobbaFiltered++;
if (session.GetHabbo().BobbaFiltered < 3)
session.SendNotif("Your language is inappropriate. If you do not change this , measures are being taken by the automated system of Habbo.");
else if (session.GetHabbo().BobbaFiltered >= 3)
{
if (session.GetHabbo().BobbaFiltered == 3)
{
session.GetHabbo().BobbaFiltered = 4;
Azure.MutedUsersByFilter.Add(session.GetHabbo().Id, uint.Parse((Azure.GetUnixTimeStamp() + (300 * 60)).ToString()));
return false;
}
if (session.GetHabbo().BobbaFiltered == 4)
session.SendNotif("Now you can not talk for 5 minutes . This is because your exhibits inappropriate language in Habbo Hotel.");
else if (session.GetHabbo().BobbaFiltered == 5)
session.SendNotif("You risk a ban if you continue to scold it . This is your last warning");
else if (session.GetHabbo().BobbaFiltered >= 7)
{
session.GetHabbo().BobbaFiltered = 0;
Azure.GetGame().GetBanManager().BanUser(session, "Auto-system-ban", 3600, "ban.", false, false);
}
}
}
if (Azure.MutedUsersByFilter.ContainsKey(session.GetHabbo().Id))
{
if (Azure.MutedUsersByFilter[session.GetHabbo().Id] < Azure.GetUnixTimeStamp())
Azure.MutedUsersByFilter.Remove(session.GetHabbo().Id);
else
{
DateTime now = DateTime.Now;
TimeSpan timeStillBanned = now - Azure.UnixToDateTime(Azure.MutedUsersByFilter[session.GetHabbo().Id]);
session.SendNotif("Damn! you can't talk for " + timeStillBanned.Minutes.ToString().Replace("-", "") + " minutes and " + timeStillBanned.Seconds.ToString().Replace("-", "") + " seconds.");
return false;
}
}
return true;
}
示例4: Execute
public override bool Execute(GameClient session, string[] pms)
{
session.GetHabbo().SpectatorMode = true;
session.SendNotif("In next room you enter you will be invisible.");
return true;
}
示例5: Execute
public override bool Execute(GameClient session, string[] pms)
{
using (var adapter = Azure.GetDatabaseManager().GetQueryReactor())
Azure.ConfigData = new ConfigData(adapter);
session.SendNotif(Azure.GetLanguage().GetVar("command_refresh_settings"));
return true;
}
示例6: Execute
public override bool Execute(GameClient session, string[] pms)
{
var room = session.GetHabbo().CurrentRoom;
room.MutedBots = !room.MutedBots;
session.SendNotif(Azure.GetLanguage().GetVar("user_room_mute_bots"));
return true;
}
示例7: Execute
public override bool Execute(GameClient session, string[] pms)
{
FurniDataParser.SetCache();
Azure.GetGame().ReloadItems();
FurniDataParser.Clear();
session.SendNotif(Azure.GetLanguage().GetVar("command_refresh_items"));
return true;
}
示例8: Execute
public override bool Execute(GameClient session, string[] pms)
{
Filter.Reload();
BlackWordsManager.Reload();
session.SendNotif(Azure.GetLanguage().GetVar("command_refresh_banned_hotels"));
return true;
}
示例9: Execute
public override bool Execute(GameClient session, string[] pms)
{
using (var adapter = Azure.GetDatabaseManager().GetQueryReactor())
Azure.GetGame().GetRoleManager().LoadRights(adapter);
CommandsManager.UpdateInfo();
session.SendNotif(Azure.GetLanguage().GetVar("command_refresh_ranks"));
return true;
}
示例10: Execute
public override bool Execute(GameClient session, string[] pms)
{
var room = session.GetHabbo().CurrentRoom;
room.GetGameMap().DiagonalEnabled = !room.GetGameMap().DiagonalEnabled;
session.SendNotif(Azure.GetLanguage().GetVar("command_disable_diagonal"));
return true;
}
示例11: Execute
public override bool Execute(GameClient session, string[] pms)
{
using (var adapter = Azure.GetDatabaseManager().GetQueryReactor())
{
Azure.GetGame().GetNavigator().Initialize(adapter);
Azure.GetGame().GetRoomManager().LoadModels(adapter);
}
session.SendNotif(Azure.GetLanguage().GetVar("command_refresh_navigator"));
return true;
}
示例12: Execute
public override bool Execute(GameClient session, string[] pms)
{
var userName = pms[0];
if (string.IsNullOrEmpty(userName)) return true;
var clientByUserName = Azure.GetGame().GetClientManager().GetClientByUserName(userName);
if (clientByUserName == null || clientByUserName.GetHabbo() == null)
{
using (var adapter = Azure.GetDatabaseManager().GetQueryReactor())
{
adapter.SetQuery(
"SELECT username, rank, id, credits, activity_points, diamonds FROM users WHERE [email protected] LIMIT 1");
adapter.AddParameter("user", userName);
var row = adapter.GetRow();
if (row == null)
{
session.SendWhisper(Azure.GetLanguage().GetVar("user_not_found"));
return true;
}
session.SendNotif(string.Format((Azure.GetLanguage().GetVar("user_info_all")), userName, row[1],
row[3], row[4], row[5]));
}
return true;
}
var habbo = clientByUserName.GetHabbo();
var builder = new StringBuilder();
if (habbo.CurrentRoom != null)
{
builder.AppendFormat(" - ROOM INFORMATION [{0}] - \r", habbo.CurrentRoom.RoomId);
builder.AppendFormat("Owner: {0}\r", habbo.CurrentRoom.RoomData.Owner);
builder.AppendFormat("Room Name: {0}\r", habbo.CurrentRoom.RoomData.Name);
builder.Append(
string.Concat("Current Users: ", habbo.CurrentRoom.UserCount, "/",
habbo.CurrentRoom.RoomData.UsersMax));
}
session.SendNotif(string.Concat("User info for: ", userName, " \rUser ID: ", habbo.Id, ":\rRank: ",
habbo.Rank, "\rCurrentTalentLevel: ", habbo.CurrentTalentLevel, " \rCurrent Room: ", habbo.CurrentRoomId,
" \rCredits: ", habbo.Credits, "\rDuckets: ", habbo.ActivityPoints, "\rDiamonds: ", habbo.Diamonds,
"\rMuted: ", habbo.Muted.ToString(), "\r\r\r", builder.ToString()));
return true;
}
示例13: Execute
public override bool Execute(GameClient session, string[] pms)
{
var client = Azure.GetGame().GetClientManager().GetClientByUserName(pms[0]);
if (client == null)
{
session.SendNotif(Azure.GetLanguage().GetVar("user_not_found"));
return true;
}
int amount;
if (!int.TryParse(pms[1], out amount))
{
session.SendNotif(Azure.GetLanguage().GetVar("enter_numbers"));
return true;
}
client.GetHabbo().ActivityPoints += amount;
client.GetHabbo().UpdateActivityPointsBalance();
client.SendNotif(string.Format(Azure.GetLanguage().GetVar("staff_gives_duckets"),
session.GetHabbo().UserName, amount));
return true;
}
示例14: Execute
public override bool Execute(GameClient session, string[] pms)
{
var client = Azure.GetGame().GetClientManager().GetClientByUserName(pms[0]);
if (client == null)
{
session.SendNotif(Azure.GetLanguage().GetVar("user_not_found"));
return true;
}
if (!client.GetHabbo().GetBadgeComponent().HasBadge(pms[1]))
{
session.SendNotif(Azure.GetLanguage().GetVar("command_badge_remove_error"));
return true;
}
client.GetHabbo().GetBadgeComponent().RemoveBadge(pms[1], client);
session.SendNotif(Azure.GetLanguage().GetVar("command_badge_remove_done"));
Azure.GetGame()
.GetModerationTool()
.LogStaffEntry(session.GetHabbo().UserName, client.GetHabbo().UserName,
"Badge Taken", string.Format("Badge taken from user [{0}]", pms[1]));
return true;
}
示例15: Execute
public override bool Execute(GameClient session, string[] pms)
{
var userName = pms[0];
if (string.Equals(userName, session.GetHabbo().UserName,
StringComparison.CurrentCultureIgnoreCase))
{
session.SendNotif(Azure.GetLanguage().GetVar("summon_yourself"));
return true;
}
var client = Azure.GetGame().GetClientManager().GetClientByUserName(userName);
if (client == null)
{
session.SendNotif(Azure.GetLanguage().GetVar("user_not_found"));
return true;
}
if (session.GetHabbo().CurrentRoom != null &&
session.GetHabbo().CurrentRoomId != client.GetHabbo().CurrentRoomId)
client.GetMessageHandler()
.PrepareRoomForUser(session.GetHabbo().CurrentRoom.RoomId,
session.GetHabbo().CurrentRoom.RoomData.PassWord);
return true;
}