本文整理汇总了C#中GameClient.SendWhisper方法的典型用法代码示例。如果您正苦于以下问题:C# GameClient.SendWhisper方法的具体用法?C# GameClient.SendWhisper怎么用?C# GameClient.SendWhisper使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GameClient
的用法示例。
在下文中一共展示了GameClient.SendWhisper方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Execute
public override void Execute(GameClient session, string[] pms)
{
var room = AzureEmulator.GetGame().GetRoomManager().GetRoom(session.GetHabbo().CurrentRoomId);
if (room == null) return;
var user2 = room.GetRoomUserManager().GetRoomUserByHabbo(session.GetHabbo().LastSelectedUser);
if (user2 == null)
{
session.SendWhisper(TextManager.GetText("user_not_found"));
return;
}
var user = room.GetRoomUserManager().GetRoomUserByHabbo(session.GetHabbo().UserName);
if (PathFinder.GetDistance(user.X, user.Y, user2.X, user2.Y) > 1)
{
session.SendWhisper(TextManager.GetText("kil_command_error_1"));
return;
}
if (user2.IsLyingDown || user2.IsSitting)
{
session.SendWhisper(TextManager.GetText("kil_command_error_2"));
return;
}
if (!String.Equals(user2.GetUserName(), session.GetHabbo().UserName, StringComparison.CurrentCultureIgnoreCase))
{
user2.Statusses.Add("lay", "0.55");
user2.IsLyingDown = true;
user2.UpdateNeeded = true;
user.Chat(user.GetClient(), TextManager.GetText("command.kill.user"), true, 0, 3);
user2.Chat(user2.GetClient(), TextManager.GetText("command.kill.userdeath"), true, 0,
3);
return;
}
user.Chat(session, "I am sad", false, 0, 0);
}
示例2: Execute
public override void Execute(GameClient session, string[] pms)
{
var user = AzureEmulator.GetHabboForName(pms[0]);
if (user == null)
{
session.SendWhisper(TextManager.GetText("user_not_found"));
return;
}
if (user.Rank >= session.GetHabbo().Rank)
{
session.SendWhisper(TextManager.GetText("user_is_higher_rank"));
return;
}
using (var adapter = AzureEmulator.GetDatabaseManager().GetQueryReactor())
{
adapter.SetQuery("DELETE FROM users_bans WHERE value = @name");
adapter.AddParameter("name", user.UserName);
adapter.RunQuery();
AzureEmulator.GetGame()
.GetModerationTool()
.LogStaffEntry(session.GetHabbo().UserName, user.UserName, "Unban",
string.Format("User has been Unbanned [{0}]", pms[0]));
return;
}
}
示例3: Execute
public override void Execute(GameClient session, string[] pms)
{
var user = AzureEmulator.GetGame().GetClientManager().GetClientByUserName(pms[0]);
if (user == null || user.GetHabbo() == null)
{
session.SendWhisper(TextManager.GetText("user_not_found"));
return;
}
if (user.GetHabbo().Rank >= session.GetHabbo().Rank)
{
session.SendWhisper(TextManager.GetText("user_is_higher_rank"));
return;
}
try
{
user.GetConnection().Dispose();
AzureEmulator.GetGame()
.GetModerationTool()
.LogStaffEntry(session.GetHabbo().UserName, user.GetHabbo().UserName, "dc",
string.Format("Disconnect User[{0}]", pms[1]));
}
catch
{
}
}
示例4: Execute
public override void Execute(GameClient session, string[] pms)
{
var user = AzureEmulator.GetGame().GetClientManager().GetClientByUserName(pms[0]);
if (user == null)
{
session.SendWhisper(TextManager.GetText("user_not_found"));
return;
}
if (user.GetHabbo().Rank >= session.GetHabbo().Rank)
{
session.SendWhisper(TextManager.GetText("user_is_higher_rank"));
return;
}
try
{
var length = int.Parse(pms[1]);
var message = pms.Length < 3 ? string.Empty : string.Join(" ", pms.Skip(2));
if (string.IsNullOrWhiteSpace(message)) message = TextManager.GetText("command_ban_user_no_reason");
ModerationTool.BanUser(session, user.GetHabbo().Id, length, message);
AzureEmulator.GetGame()
.GetModerationTool()
.LogStaffEntry(session.GetHabbo().UserName, user.GetHabbo().UserName, "Ban",
string.Format("USER:{0} TIME:{1} REASON:{2}", pms[0], pms[1], message));
}
catch
{
// error handle
}
}
示例5: Execute
public override void Execute(GameClient session, string[] pms)
{
var user = AzureEmulator.GetGame().GetClientManager().GetClientByUserName(pms[0]);
if (user == null)
{
session.SendWhisper(TextManager.GetText("user_not_found"));
return;
}
if (user.GetHabbo().Rank >= session.GetHabbo().Rank)
{
session.SendWhisper(TextManager.GetText("user_is_higher_rank"));
return;
}
try
{
AzureEmulator.GetGame()
.GetBanManager()
.BanUser(user, session.GetHabbo().UserName, 788922000.0, string.Join(" ", pms.Skip(1)),
true, false);
}
catch
{
Writer.Writer.LogException("Error while banning");
}
}
示例6: Execute
public override void Execute(GameClient session, string[] pms)
{
var client = AzureEmulator.GetGame().GetClientManager().GetClientByUserName(pms[0]);
if (client == null)
{
session.SendWhisper(TextManager.GetText("user_not_found"));
return;
}
if (client.GetHabbo().Rank >= session.GetHabbo().Rank)
{
session.SendWhisper(TextManager.GetText("user_is_higher_rank"));
return;
}
int time;
if (!int.TryParse(pms[1], out time))
{
session.SendWhisper(TextManager.GetText("enter_numbers"));
return;
}
client.GetHabbo().FloodTime = AzureEmulator.GetUnixTimeStamp() + Convert.ToInt32(pms[1]);
var serverMessage = new ServerMessage(LibraryParser.OutgoingRequest("FloodFilterMessageComposer"));
serverMessage.AppendInteger(Convert.ToInt32(pms[1]));
client.SendMessage(serverMessage);
}
示例7: Execute
public override void Execute(GameClient session, string[] pms)
{
var mode = pms[0];
pms = pms.Skip(1).ToArray();
switch (mode.ToLower())
{
case "info":
{
if (pms.Length == 0)
{
session.SendWhisper("Usage :developer info [items/user/users/cache]");
}
else
{
GetInfo(session, pms);
}
break;
}
case "set":
{
if (pms.Length < 2)
{
session.SendWhisper("Usage :developer set [item/baseItem] id");
}
else
{
Set(session, pms);
}
break;
}
case "copy":
{
Copy(session);
break;
}
case "paste":
{
Paste(session);
break;
}
case "delete":
{
Delete(session);
break;
}
default:
{
session.SendWhisper("Usage :developer [info/set/copy/paste/delete]");
break;
}
}
}
示例8: Execute
public override void Execute(GameClient session, string[] pms)
{
var room = session.GetHabbo().CurrentRoom;
var user = room.GetRoomUserManager().GetRoomUserByHabbo(session.GetHabbo().Id);
if (user == null) return;
var client = AzureEmulator.GetGame().GetClientManager().GetClientByUserName(pms[0]);
if (client == null)
{
session.SendWhisper(TextManager.GetText("user_not_found"));
return;
}
if (client.GetHabbo().Id == session.GetHabbo().Id)
{
session.SendWhisper(TextManager.GetText("command_pull_error_own"));
return;
}
var user2 = room.GetRoomUserManager().GetRoomUserByHabbo(client.GetHabbo().Id);
if (user2 == null) return;
if (user2.TeleportEnabled)
{
session.SendWhisper(TextManager.GetText("command_error_teleport_enable"));
return;
}
if (PathFinder.GetDistance(user.X, user.Y, user2.X, user2.Y) > 2)
{
session.SendWhisper(TextManager.GetText("command_pull_error_far_away"));
return;
}
if ((user.RotBody % 2) != 0) user.RotBody--;
switch (user.RotBody)
{
case 0:
user2.MoveTo(user.X, user.Y - 1);
break;
case 2:
user2.MoveTo(user.X + 1, user.Y);
break;
case 4:
user2.MoveTo(user.X, user.Y + 1);
break;
case 6:
user2.MoveTo(user.X - 1, user.Y);
break;
}
}
示例9: Execute
public override void Execute(GameClient session, string[] pms)
{
Filter.Reload();
BlackWordsManager.Reload();
session.SendWhisper(TextManager.GetText("cmd_succesfully"));
}
示例10: Execute
public override void Execute(GameClient session, string[] pms)
{
FurniDataParser.SetCache();
AzureEmulator.GetGame().Reloaditems();
FurniDataParser.Clear();
session.SendWhisper(TextManager.GetText("cmd_succesfully"));
}
示例11: Execute
public override void Execute(GameClient session, string[] pms)
{
var room = session.GetHabbo().CurrentRoom;
var user = room.GetRoomUserManager().GetRoomUserByHabbo(pms[0]);
if (user == null)
{
session.SendWhisper(TextManager.GetText("user_not_found"));
}
var gender = user.GetClient().GetHabbo().Gender;
var look = user.GetClient().GetHabbo().Look;
session.GetHabbo().Gender = gender;
session.GetHabbo().Look = look;
using (var adapter = AzureEmulator.GetDatabaseManager().GetQueryReactor())
{
adapter.SetQuery(
"UPDATE users SET gender = @gender, look = @look WHERE id = " + session.GetHabbo().Id);
adapter.AddParameter("gender", gender);
adapter.AddParameter("look", look);
adapter.RunQuery();
}
var myUser = room.GetRoomUserManager().GetRoomUserByHabbo(session.GetHabbo().UserName);
if (myUser == null)
return;
var message = new ServerMessage(LibraryParser.OutgoingRequest("UpdateUserDataMessageComposer"));
message.AppendInteger(myUser.VirtualId);
message.AppendString(session.GetHabbo().Look);
message.AppendString(session.GetHabbo().Gender.ToLower());
message.AppendString(session.GetHabbo().Motto);
message.AppendInteger(session.GetHabbo().AchievementPoints);
room.SendMessage(message.GetReversedBytes());
}
示例12: Execute
public override bool Execute(GameClient session, string[] pms)
{
if (!pms.Any() || pms[0].ToLower() != Azure.GetLanguage().GetVar("command_group_yes"))
{
session.SendNotif(Azure.GetLanguage().GetVar("command_group_delete_confirm"));
return true;
}
var room = session.GetHabbo().CurrentRoom;
if (room.RoomData == null || room.RoomData.Group == null)
{
session.SendWhisper(Azure.GetLanguage().GetVar("command_group_has_no_room"));
return true;
}
var group = room.RoomData.Group;
foreach (var user in @group.Members.Values)
{
var clientByUserId = Azure.GetGame().GetClientManager().GetClientByUserId(user.Id);
if (clientByUserId == null) continue;
clientByUserId.GetHabbo().UserGroups.Remove(user);
if (clientByUserId.GetHabbo().FavouriteGroup == @group.Id) clientByUserId.GetHabbo().FavouriteGroup = 0;
}
room.RoomData.Group = null;
room.RoomData.GroupId = 0;
Azure.GetGame().GetGroupManager().DeleteGroup(@group.Id);
Azure.GetGame().GetRoomManager().UnloadRoom(room, Azure.GetLanguage().GetVar("command_group_remove"));
return true;
}
示例13: Execute
public override void Execute(GameClient session, string[] pms)
{
ushort itemId;
if (!ushort.TryParse(pms[0], out itemId))
{
return;
}
var user = session.GetHabbo()
.CurrentRoom.GetRoomUserManager()
.GetRoomUserByHabbo(session.GetHabbo().UserName);
if (user.RidingHorse)
{
session.SendWhisper(TextManager.GetText("horse_handitem_error"));
return;
}
if (user.IsLyingDown)
{
return;
}
user.CarryItem(itemId);
}
示例14: Execute
public override void Execute(GameClient session, string[] pms)
{
using (IQueryAdapter client = AzureEmulator.GetDatabaseManager().GetQueryReactor())
{
TextManager.ClearText();
}
session.SendWhisper(TextManager.GetText("cmd_succesfully"));
}
示例15: Execute
public override void Execute(GameClient session, string[] pms)
{
using (var adapter = AzureEmulator.GetDatabaseManager().GetQueryReactor())
{
AzureEmulator.ConfigData = new ConfigData(adapter);
}
session.SendWhisper(TextManager.GetText("cmd_settings_succesfully"));
}