本文整理汇总了C#中Azure.HabboHotel.GameClients.Interfaces.GameClient类的典型用法代码示例。如果您正苦于以下问题:C# GameClient类的具体用法?C# GameClient怎么用?C# GameClient使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
GameClient类属于Azure.HabboHotel.GameClients.Interfaces命名空间,在下文中一共展示了GameClient类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: Execute
public override bool Execute(GameClient session, string[] pms)
{
var room = Azure.GetGame().GetRoomManager().GetRoom(session.GetHabbo().CurrentRoomId);
room.GetRoomUserManager().GetRoomUserByHabbo(session.GetHabbo().Id);
foreach (var user in room.GetRoomUserManager().GetRoomUsers()) user.ApplyEffect(108);
return true;
}
开发者ID:kessiler,项目名称:azureEmulator,代码行数:7,代码来源:GoBoom.cs
示例2: OnTrigger
public override void OnTrigger(GameClient session, RoomItem item, int request, bool hasRights)
{
RoomUser roomUser = null;
if (session != null)
roomUser = item.GetRoom().GetRoomUserManager().GetRoomUserByHabbo(session.GetHabbo().Id);
if (roomUser == null)
return;
if (Gamemap.TilesTouching(item.X, item.Y, roomUser.X, roomUser.Y))
{
var num = item.GetBaseItem().Modes - 1;
int num2, num3;
int.TryParse(item.ExtraData, out num2);
if (num2 <= 0)
num3 = 1;
else
{
if (num2 >= num)
num3 = 0;
else
num3 = num2 + 1;
}
item.ExtraData = num3.ToString();
item.UpdateState();
item.GetRoom().GetWiredHandler().ExecuteWired(Interaction.TriggerStateChanged, roomUser, item);
return;
}
roomUser.MoveTo(item.SquareInFront);
}
开发者ID:kessiler,项目名称:azureEmulator,代码行数:35,代码来源:InteractorSwitch.cs
示例3: Execute
public override bool Execute(GameClient session, string[] pms)
{
Azure.GetGame().GetHallOfFame().RefreshHallOfFame();
Azure.GetGame().GetRoomManager().GetCompetitionManager().RefreshCompetitions();
Azure.GetGame().GetTargetedOfferManager().LoadOffer();
return true;
}
开发者ID:kessiler,项目名称:azureEmulator,代码行数:7,代码来源:RefreshExtraThings.cs
示例4: Execute
public override bool Execute(GameClient session, string[] pms)
{
var client = Azure.GetGame().GetClientManager().GetClientByUserName(pms[0]);
if (client == null)
{
session.SendWhisper(Azure.GetLanguage().GetVar("user_not_found"));
return true;
}
if (client.GetHabbo().Rank >= session.GetHabbo().Rank)
{
session.SendWhisper(Azure.GetLanguage().GetVar("user_is_higher_rank"));
return true;
}
int time;
if (!int.TryParse(pms[1], out time))
{
session.SendWhisper(Azure.GetLanguage().GetVar("enter_numbers"));
return true;
}
client.GetHabbo().FloodTime = Azure.GetUnixTimeStamp() + Convert.ToInt32(pms[1]);
var serverMessage = new ServerMessage(LibraryParser.OutgoingRequest("FloodFilterMessageComposer"));
serverMessage.AppendInteger(Convert.ToInt32(pms[1]));
client.SendMessage(serverMessage);
return true;
}
开发者ID:kessiler,项目名称:azureEmulator,代码行数:26,代码来源:FloodUser.cs
示例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;
}
开发者ID:kessiler,项目名称:azureEmulator,代码行数:7,代码来源:RefreshSettings.cs
示例6: OnTrigger
public override void OnTrigger(GameClient session, RoomItem item, int request, bool hasRights)
{
if (!hasRights)
return;
int num;
int.TryParse(item.ExtraData, out num);
switch (request)
{
case 1:
num++;
break;
case 2:
num--;
break;
case 3:
num = 0;
break;
}
item.ExtraData = num.ToString();
item.UpdateState(false, true);
}
开发者ID:kessiler,项目名称:azureEmulator,代码行数:27,代码来源:InteractorScoreCounter.cs
示例7: OnTrigger
public override void OnTrigger(GameClient session, RoomItem item, int request, bool hasRights)
{
if (item.ExtraData == "1" || !item.GetBaseItem().VendingIds.Any() || item.InteractingUser != 0u ||
session == null)
return;
var roomUserByHabbo = item.GetRoom().GetRoomUserManager().GetRoomUserByHabbo(session.GetHabbo().Id);
if (roomUserByHabbo == null)
return;
if (!Gamemap.TilesTouching(roomUserByHabbo.X, roomUserByHabbo.Y, item.X, item.Y))
{
roomUserByHabbo.MoveTo(item.SquareInFront);
return;
}
item.InteractingUser = session.GetHabbo().Id;
roomUserByHabbo.CanWalk = false;
roomUserByHabbo.ClearMovement();
roomUserByHabbo.SetRot(PathFinder.CalculateRotation(roomUserByHabbo.X, roomUserByHabbo.Y, item.X, item.Y));
item.ReqUpdate(2, true);
item.ExtraData = "1";
item.UpdateState(false, true);
}
开发者ID:kessiler,项目名称:azureEmulator,代码行数:27,代码来源:InteractorVendor.cs
示例8: 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;
}
开发者ID:kessiler,项目名称:azureEmulator,代码行数:7,代码来源:GoInvisible.cs
示例9: Execute
public override bool Execute(GameClient session, string[] pms)
{
var user = Azure.GetGame().GetClientManager().GetClientByUserName(pms[0]);
if (user == null || user.GetHabbo() == null)
{
session.SendWhisper(Azure.GetLanguage().GetVar("user_not_found"));
return true;
}
if (user.GetHabbo().Rank >= session.GetHabbo().Rank)
{
session.SendWhisper(Azure.GetLanguage().GetVar("user_is_higher_rank"));
return true;
}
try
{
user.GetConnection().Dispose();
Azure.GetGame()
.GetModerationTool()
.LogStaffEntry(session.GetHabbo().UserName, user.GetHabbo().UserName, "dc",
string.Format("Disconnect User[{0}]", pms[1]));
}
catch
{
}
return true;
}
开发者ID:kessiler,项目名称:azureEmulator,代码行数:27,代码来源:DisconnectUser.cs
示例10: OnPlace
public override void OnPlace(GameClient session, RoomItem item)
{
item.ExtraData = "0";
if (item.InteractingUser != 0u)
{
var roomUserByHabbo = item.GetRoom().GetRoomUserManager().GetRoomUserByHabbo(item.InteractingUser);
if (roomUserByHabbo != null)
{
roomUserByHabbo.ClearMovement();
roomUserByHabbo.AllowOverride = false;
roomUserByHabbo.CanWalk = true;
}
item.InteractingUser = 0u;
}
if (item.InteractingUser2 == 0u)
return;
var roomUserByHabbo2 = item.GetRoom().GetRoomUserManager().GetRoomUserByHabbo(item.InteractingUser2);
if (roomUserByHabbo2 != null)
{
roomUserByHabbo2.ClearMovement();
roomUserByHabbo2.AllowOverride = false;
roomUserByHabbo2.CanWalk = true;
}
item.InteractingUser2 = 0u;
}
开发者ID:kessiler,项目名称:azureEmulator,代码行数:32,代码来源:InteractorQuickTeleport.cs
示例11: Execute
public override bool Execute(GameClient session, string[] pms)
{
if (pms[0].Length < 2) return true;
var room = session.GetHabbo().CurrentRoom;
foreach (var current in room.GetRoomUserManager().UserList.Values)
{
try
{
if (!current.IsBot && current.GetClient() != null &&
current.GetClient().GetHabbo() != null)
{
current.GetClient()
.GetHabbo()
.GetBadgeComponent()
.GiveBadge(pms[0], true, current.GetClient());
}
}
catch
{
}
}
Azure.GetGame().GetModerationTool()
.LogStaffEntry(session.GetHabbo().UserName,
string.Empty, "Badge",
string.Concat("Roombadge in room [", room.RoomId, "] with badge [", pms[0], "]"));
return true;
}
开发者ID:kessiler,项目名称:azureEmulator,代码行数:27,代码来源:RoomBadge.cs
示例12: Execute
public override bool Execute(GameClient session, string[] pms)
{
var room = session.GetHabbo().CurrentRoom;
if (room.RoomMuted)
{
session.SendWhisper("Room is already muted.");
return true;
}
session.GetHabbo().CurrentRoom.RoomMuted = true;
/*
var message = new ServerMessage(LibraryParser.OutgoingRequest("AlertNotificationMessageComposer"));
message.AppendString(string.Format("The room was muted due to:\r{0}", string.Join(" ", pms)));
message.AppendString(string.Empty);
room.SendMessage(message);*/
room.SendMessage(GameClient.GetBytesNotif(
$"Este quarto foi silenciado pelo motivo:\r{string.Join(" ", pms)}"));
Azure.GetGame()
.GetModerationTool().LogStaffEntry(session.GetHabbo().UserName, string.Empty,
"Room Mute", "Room muted");
return true;
}
开发者ID:kessiler,项目名称:azureEmulator,代码行数:25,代码来源:RoomMute.cs
示例13: HelperSession
/// <summary>
/// Initializes a new instance of the <see cref="HelperSession" /> class.
/// </summary>
/// <param name="helper">The helper.</param>
/// <param name="requester">The requester.</param>
/// <param name="question">The question.</param>
internal HelperSession(GameClient helper, GameClient requester, string question)
{
Helper = helper;
Requester = requester;
Chats = new List<string> {question};
Response(requester, question);
}
开发者ID:kessiler,项目名称:azureEmulator,代码行数:13,代码来源:HelperSession.cs
示例14: OnPlace
public override void OnPlace(GameClient session, RoomItem item)
{
item.ExtraData = "0";
if (item.InteractingUser != 0)
{
var user = item.GetRoom().GetRoomUserManager().GetRoomUserByHabbo(item.InteractingUser);
if (user != null)
{
user.ClearMovement();
user.AllowOverride = false;
user.CanWalk = true;
}
item.InteractingUser = 0;
}
if (item.InteractingUser2 != 0)
{
var user = item.GetRoom().GetRoomUserManager().GetRoomUserByHabbo(item.InteractingUser2);
if (user != null)
{
user.ClearMovement();
user.AllowOverride = false;
user.CanWalk = true;
}
item.InteractingUser2 = 0;
}
}
开发者ID:kessiler,项目名称:azureEmulator,代码行数:32,代码来源:InteractorTeleport.cs
示例15: Execute
public override bool Execute(GameClient session, string[] pms)
{
var user = Azure.GetHabboForName(pms[0]);
if (user == null)
{
session.SendWhisper(Azure.GetLanguage().GetVar("user_not_found"));
return true;
}
if (user.Rank >= session.GetHabbo().Rank)
{
session.SendWhisper(Azure.GetLanguage().GetVar("user_is_higher_rank"));
return true;
}
using (var adapter = Azure.GetDatabaseManager().GetQueryReactor())
{
adapter.SetQuery("DELETE FROM users_bans WHERE value = @name");
adapter.AddParameter("name", user.UserName);
adapter.RunQuery();
Azure.GetGame()
.GetModerationTool()
.LogStaffEntry(session.GetHabbo().UserName, user.UserName, "Unban",
string.Format("User has been Unbanned [{0}]", pms[0]));
return true;
}
}
开发者ID:kessiler,项目名称:azureEmulator,代码行数:26,代码来源:UnBanUser.cs
示例16: Execute
public override bool Execute(GameClient session, string[] pms)
{
var user = Azure.GetGame().GetClientManager().GetClientByUserName(pms[0]);
if (user == null)
{
session.SendWhisper(Azure.GetLanguage().GetVar("user_not_found"));
return true;
}
if (user.GetHabbo().Rank >= session.GetHabbo().Rank)
{
session.SendWhisper(Azure.GetLanguage().GetVar("user_is_higher_rank"));
return true;
}
var userName = pms[0];
var rank = pms[1];
using (var adapter = Azure.GetDatabaseManager().GetQueryReactor())
{
adapter.SetQuery("UPDATE users SET [email protected] WHERE [email protected] LIMIT 1");
adapter.AddParameter("user", userName);
adapter.AddParameter("rank", rank);
adapter.RunQuery();
}
session.SendWhisper(Azure.GetLanguage().GetVar("user_rank_update"));
return true;
}
开发者ID:kessiler,项目名称:azureEmulator,代码行数:28,代码来源:GiveRank.cs
示例17: Execute
public override bool Execute(GameClient session, string[] pms)
{
var room = session.GetHabbo().CurrentRoom;
if (!session.GetHabbo().CurrentRoom.RoomMuted)
{
session.SendWhisper("Room isn't muted.");
return true;
}
session.GetHabbo().CurrentRoom.RoomMuted = false;
/*
var message = new ServerMessage();
message.Init(LibraryParser.OutgoingRequest("AlertNotificationMessageComposer"));
message.AppendString("Room is now UnMuted.");
message.AppendString("");
room.SendMessage(message);*/
room.SendMessage(GameClient.GetBytesNotif("Este quarto foi des-selenciado."));
Azure.GetGame()
.GetModerationTool().LogStaffEntry(session.GetHabbo().UserName, string.Empty,
"Room Unmute", "Room UnMuted");
return true;
}
开发者ID:kessiler,项目名称:azureEmulator,代码行数:25,代码来源:RoomUnMute.cs
示例18: Execute
public override bool Execute(GameClient session, string[] pms)
{
var user = Azure.GetGame().GetClientManager().GetClientByUserName(pms[0]);
if (user == null)
{
session.SendWhisper(Azure.GetLanguage().GetVar("user_not_found"));
return true;
}
if (user.GetHabbo().Rank >= session.GetHabbo().Rank)
{
session.SendWhisper(Azure.GetLanguage().GetVar("user_is_higher_rank"));
return true;
}
try
{
Azure.GetGame()
.GetBanManager()
.BanUser(user, session.GetHabbo().UserName, 788922000.0, string.Join(" ", pms.Skip(2)),
true, false);
}
catch
{
Writer.Writer.LogException("Error while banning");
}
return true;
}
开发者ID:kessiler,项目名称:azureEmulator,代码行数:28,代码来源:BanUserIp.cs
示例19: 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;
}
开发者ID:kessiler,项目名称:azureEmulator,代码行数:34,代码来源:Kick.cs
示例20: OnTrigger
public override void OnTrigger(GameClient session, RoomItem item, int request, bool hasRights)
{
RoomUser roomUser = null;
if (session != null)
roomUser = item.GetRoom().GetRoomUserManager().GetRoomUserByHabbo(session.GetHabbo().Id);
if (roomUser == null)
return;
if (Gamemap.TilesTouching(item.X, item.Y, roomUser.X, roomUser.Y))
{
if (item.ExtraData == "-1")
return;
if (request == -1)
{
item.ExtraData = "0";
item.UpdateState();
return;
}
item.ExtraData = "-1";
item.UpdateState(false, true);
item.ReqUpdate(4, true);
return;
}
roomUser.MoveTo(item.SquareInFront);
}
开发者ID:kessiler,项目名称:azureEmulator,代码行数:29,代码来源:InteractorDice.cs
注:本文中的Azure.HabboHotel.GameClients.Interfaces.GameClient类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论