本文整理汇总了C#中Yupi.Game.GameClients.Interfaces.GameClient.SendNotif方法的典型用法代码示例。如果您正苦于以下问题:C# GameClient.SendNotif方法的具体用法?C# GameClient.SendNotif怎么用?C# GameClient.SendNotif使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Yupi.Game.GameClients.Interfaces.GameClient
的用法示例。
在下文中一共展示了GameClient.SendNotif方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Execute
public override bool Execute(GameClient session, string[] pms)
{
GameClient client = Yupi.GetGame().GetClientManager().GetClientByUserName(pms[0]);
if (client == null)
{
session.SendNotif(Yupi.GetLanguage().GetVar("user_not_found"));
return true;
}
uint amount;
if (!uint.TryParse(pms[1], out amount))
{
session.SendNotif(Yupi.GetLanguage().GetVar("enter_numbers"));
return true;
}
client.GetHabbo().Duckets += amount;
client.GetHabbo().UpdateActivityPointsBalance();
client.SendNotif(string.Format(Yupi.GetLanguage().GetVar("staff_gives_duckets"), session.GetHabbo().UserName,
amount));
return true;
}
示例2: Execute
public override bool Execute(GameClient session, string[] pms)
{
string userName = pms[0];
GameClient userSession = Yupi.GetGame().GetClientManager().GetClientByUserName(userName);
if (userSession == null)
{
session.SendWhisper(Yupi.GetLanguage().GetVar("user_not_found"));
return true;
}
if (session.GetHabbo().Rank <= userSession.GetHabbo().Rank)
{
session.SendNotif(Yupi.GetLanguage().GetVar("user_is_higher_rank"));
return true;
}
if (userSession.GetHabbo().CurrentRoomId < 1)
{
session.SendNotif(Yupi.GetLanguage().GetVar("command_kick_user_not_in_room"));
return true;
}
Room room = Yupi.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(Yupi.GetLanguage().GetVar("command_kick_user_mod_default") + "{0}.",
string.Join(" ", pms.Skip(1))));
}
else userSession.SendNotif(Yupi.GetLanguage().GetVar("command_kick_user_mod_default"));
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 (!Yupi.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;
Yupi.MutedUsersByFilter.Add(session.GetHabbo().Id,
uint.Parse((Yupi.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;
Yupi.GetGame().GetBanManager().BanUser(session, "Auto-system-ban", 3600, "ban.", false, false);
}
}
}
if (Yupi.MutedUsersByFilter.ContainsKey(session.GetHabbo().Id))
{
if (Yupi.MutedUsersByFilter[session.GetHabbo().Id] < Yupi.GetUnixTimeStamp())
Yupi.MutedUsersByFilter.Remove(session.GetHabbo().Id);
else
{
DateTime now = DateTime.Now;
TimeSpan timeStillBanned = now - Yupi.UnixToDateTime(Yupi.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)
{
try
{
session.GetHabbo().GetInventoryComponent().Redeemcredits(session);
session.SendNotif(Yupi.GetLanguage().GetVar("command_redeem_credits"));
}
catch (Exception e)
{
Writer.LogException(e.ToString());
session.SendNotif(Yupi.GetLanguage().GetVar("command_redeem_credits"));
}
return true;
}
示例5: Execute
public override bool Execute(GameClient session, string[] pms)
{
session.GetHabbo().GetInventoryComponent().Redeemcredits(session);
session.SendNotif(Yupi.GetLanguage().GetVar("command_redeem_credits"));
return true;
}
示例6: 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;
}
示例7: Execute
public override bool Execute(GameClient session, string[] pms)
{
if (pms.Length != 1)
return true;
if (string.IsNullOrEmpty(pms[0]))
return true;
string userName = Yupi.FilterInjectionChars(pms[0]);
Habbo userCached = Yupi.GetHabboForName(userName);
if (userCached == null)
return true;
StringBuilder builder = new StringBuilder();
if (userCached.CurrentRoom != null)
{
builder.Append($" - ROOM INFORMATION [{userCached.CurrentRoom.RoomId}] - \r");
builder.Append($"Owner: {userCached.CurrentRoom.RoomData.Owner}\r");
builder.Append($"Room Name: {userCached.CurrentRoom.RoomData.Name}\r");
builder.Append($"Current Users: {userCached.CurrentRoom.UserCount} / {userCached.CurrentRoom.RoomData.UsersMax}");
}
session.SendNotif(string.Concat("User info for: ", userName, " \rUser ID: ", userCached.Id, ":\rRank: ",
userCached.Rank, "\rCurrentTalentLevel: ", userCached.CurrentTalentLevel, " \rCurrent Room: ", userCached.CurrentRoomId,
" \rCredits: ", userCached.Credits, "\rDuckets: ", userCached.Duckets, "\rDiamonds: ", userCached.Diamonds,
"\rMuted: ", userCached.Muted.ToString(), "\r\r\r", builder.ToString()));
return true;
}
示例8: Execute
public override bool Execute(GameClient session, string[] pms)
{
using (IQueryAdapter adapter = Yupi.GetDatabaseManager().GetQueryReactor())
Yupi.ConfigData = new ServerDatabaseSettings(adapter);
session.SendNotif(Yupi.GetLanguage().GetVar("command_refresh_settings"));
return true;
}
示例9: Execute
public override bool Execute(GameClient session, string[] pms)
{
GameClient client = Yupi.GetGame().GetClientManager().GetClientByUserName(pms[0]);
if (client == null)
{
session.SendNotif(Yupi.GetLanguage().GetVar("user_not_found"));
return true;
}
client.GetHabbo().GetBadgeComponent().GiveBadge(pms[1], true, client);
session.SendNotif(Yupi.GetLanguage().GetVar("command_badge_give_done"));
Yupi.GetGame()
.GetModerationTool()
.LogStaffEntry(session.GetHabbo().UserName, client.GetHabbo().UserName,
"Badge", $"Badge given to user [{pms[1]}]");
return true;
}
示例10: Execute
public override bool Execute(GameClient session, string[] pms)
{
using (IQueryAdapter adapter = Yupi.GetDatabaseManager().GetQueryReactor())
Yupi.GetGame().GetPollManager().Init(adapter);
session.SendNotif(Yupi.GetLanguage().GetVar("command_refresh_polls"));
return true;
}
示例11: Execute
public override bool Execute(GameClient session, string[] pms)
{
uint amount;
if (!uint.TryParse(pms[0], out amount))
{
session.SendNotif(Yupi.GetLanguage().GetVar("enter_numbers"));
return true;
}
foreach (GameClient client in Yupi.GetGame().GetClientManager().Clients.Values)
{
if (client?.GetHabbo() == null)
continue;
Habbo habbo = client.GetHabbo();
habbo.Diamonds += amount;
client.GetHabbo().UpdateSeasonalCurrencyBalance();
client.SendNotif(Yupi.GetLanguage().GetVar("command_diamonds_one_give") + amount + Yupi.GetLanguage().GetVar("command_diamonds_two_give"));
}
return true;
}
示例12: Execute
public override bool Execute(GameClient session, string[] pms)
{
Room room = session.GetHabbo().CurrentRoom;
room.MutedBots = !room.MutedBots;
session.SendNotif(Yupi.GetLanguage().GetVar("user_room_mute_bots"));
return true;
}
示例13: Execute
public override bool Execute(GameClient session, string[] pms)
{
using (IQueryAdapter adapter = Yupi.GetDatabaseManager().GetQueryReactor())
Yupi.GetGame().GetRoleManager().LoadRights(adapter);
CommandsManager.UpdateInfo();
session.SendNotif(Yupi.GetLanguage().GetVar("command_refresh_ranks"));
return true;
}
示例14: Execute
public override bool Execute(GameClient session, string[] pms)
{
FurnitureDataManager.SetCache();
Yupi.GetGame().ReloadItems();
FurnitureDataManager.Clear();
session.SendNotif(Yupi.GetLanguage().GetVar("command_refresh_items"));
return true;
}
示例15: Execute
public override bool Execute(GameClient session, string[] pms)
{
UserChatInputFilter.Reload();
BlackWordsManager.Reload();
session.SendNotif(Yupi.GetLanguage().GetVar("command_refresh_banned_hotels"));
return true;
}