本文整理汇总了C#中RoomUser.IsOwner方法的典型用法代码示例。如果您正苦于以下问题:C# RoomUser.IsOwner方法的具体用法?C# RoomUser.IsOwner怎么用?C# RoomUser.IsOwner使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RoomUser
的用法示例。
在下文中一共展示了RoomUser.IsOwner方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Handle
public bool Handle(RoomUser user, Team team, RoomItem item)
{
if (user != null && !user.IsBot && user.GetClient() != null)
{
if (user.GetClient().GetHabbo().Rank >= 6) // staff can't be kicked
return false;
if (user.IsOwner()) // can't kick room owner
{
user.GetClient().SendillustrationMessage("admin.persistent", "WIRED REACTIE: Gebruiker wegsturen", "Je bent uit de kamer gestuurd door de Wired.<br><br><b>" + message + "</b>\r\r<i>De kamer eigenaar zal niet worden weggestuurd!");
return false;
}
GenericTriggerWithModes.DoAnimation(this.item);
user.GetClient().SendillustrationMessage("admin.persistent", user.GetClient().GetHabbo().CurrentRoom.Name, "Je bent uit de kamer gestuurd door de Wired.<br><br><b>" + message);
ButterflyEnvironment.GetGame().GetRoomManager().GetRoom(user.RoomId).GetRoomUserManager().RemoveUserFromRoom(user.GetClient(), true, false);
handler.OnEvent(this.item.Id);
return true;
}
return false;
}
示例2: UserRoomTimeCycles
internal void UserRoomTimeCycles(RoomUser roomUsers)
{
if (!roomUsers.IsAsleep && (roomUsers.IdleTime >= 600) && !roomUsers.IsBot && !roomUsers.IsPet)
{
roomUsers.IsAsleep = true;
ServerMessage sleepEffectMessage = new ServerMessage(LibraryParser.OutgoingRequest("RoomUserIdleMessageComposer"));
sleepEffectMessage.AppendInteger(roomUsers.VirtualId);
sleepEffectMessage.AppendBool(true);
_userRoom.SendMessage(sleepEffectMessage);
}
if (!roomUsers.IsOwner() && (roomUsers.IdleTime >= 300) && !roomUsers.IsBot && !roomUsers.IsPet)
{
try
{
GameClient ownerAchievementMessage =
Yupi.GetGame().GetClientManager().GetClientByUserId((uint) _userRoom.RoomData.OwnerId);
if (ownerAchievementMessage != null)
Yupi.GetGame()
.GetAchievementManager()
.ProgressUserAchievement(ownerAchievementMessage, "ACH_RoomDecoHosting", 1, true);
}
catch (Exception)
{
// ignored
}
}
}
示例3: UserRoomTimeCycles
internal void UserRoomTimeCycles(RoomUser RoomUsers)
{
if ((!RoomUsers.IsAsleep) && (RoomUsers.IdleTime >= 600) && (!RoomUsers.IsBot) && (!RoomUsers.IsPet))
{
RoomUsers.IsAsleep = true;
ServerMessage SleepEffectMessage = new ServerMessage(LibraryParser.OutgoingRequest("RoomUserIdleMessageComposer"));
SleepEffectMessage.AppendInteger(RoomUsers.VirtualId);
SleepEffectMessage.AppendBool(true);
UserRoom.SendMessage(SleepEffectMessage);
SleepEffectMessage = null;
}
if ((!RoomUsers.IsOwner()) && (RoomUsers.UserTimeInCurrentRoom >= 300) && (!RoomUsers.IsBot) && (!RoomUsers.IsPet))
{
GameClient OwnerAchievementMessage = AzureEmulator.GetGame().GetClientManager().GetClientByUserId((uint)UserRoom.RoomData.OwnerId);
AzureEmulator.GetGame().GetAchievementManager().ProgressUserAchievement(OwnerAchievementMessage, "ACH_RoomDecoHosting", 1, false);
RoomUsers.UserTimeInCurrentRoom = 0;
OwnerAchievementMessage = null;
}
}