本文整理汇总了C#中GoldTree.HabboHotel.Items.RoomItem类的典型用法代码示例。如果您正苦于以下问题:C# RoomItem类的具体用法?C# RoomItem怎么用?C# RoomItem使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
RoomItem类属于GoldTree.HabboHotel.Items命名空间,在下文中一共展示了RoomItem类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnTrigger
public override void OnTrigger(GameClient Session, RoomItem RoomItem_0, int int_0, bool bool_0)
{
if (bool_0)
{
ServerMessage Message = new ServerMessage(650u);
Message.AppendInt32(0);
Message.AppendInt32(5);
Message.AppendInt32(0);
Message.AppendInt32(RoomItem_0.GetBaseItem().Sprite);
Message.AppendUInt(RoomItem_0.uint_0);
Message.AppendStringWithBreak("");
Message.AppendString("I");
if (RoomItem_0.string_3.Length > 0)
{
Message.AppendString(RoomItem_0.string_3);
}
else
{
Message.AppendString("RB");
}
Message.AppendStringWithBreak("HRAH");
Session.SendMessage(Message);
RoomItem_0.ReqUpdate(1);
}
}
示例2: OnPlace
public override void OnPlace(GameClient Session, RoomItem Item)
{
RoomMusicController roomMusicController = GoldTree.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId).GetRoomMusicController();
roomMusicController.LinkRoomOutputItemIfNotAlreadyExits(Item);
roomMusicController.Stop();
Session.GetHabbo().CurrentRoom.LoadMusic();
}
示例3: OnPlace
public override void OnPlace(GameClient Session, RoomItem RoomItem_0)
{
RoomItem_0.ExtraData = "0";
if (RoomItem_0.uint_3 != 0u)
{
RoomUser @class = RoomItem_0.method_8().GetRoomUserByHabbo(RoomItem_0.uint_3);
if (@class != null)
{
@class.method_3(true);
@class.bool_1 = false;
@class.bool_0 = true;
}
RoomItem_0.uint_3 = 0u;
}
if (RoomItem_0.uint_4 != 0u)
{
RoomUser @class = RoomItem_0.method_8().GetRoomUserByHabbo(RoomItem_0.uint_4);
if (@class != null)
{
@class.method_3(true);
@class.bool_1 = false;
@class.bool_0 = true;
}
RoomItem_0.uint_4 = 0u;
}
}
示例4: OnTrigger
public override void OnTrigger(GameClient Session, RoomItem RoomItem_0, int int_0, bool bool_0)
{
RoomUser @class = RoomItem_0.method_8().GetRoomUserByHabbo(Session.GetHabbo().Id);
if (@class != null && @class.class34_1 == null)
{
if (ThreeDCoord.smethod_0(@class.GStruct1_0, RoomItem_0.GStruct1_0) || ThreeDCoord.smethod_0(@class.GStruct1_0, RoomItem_0.GStruct1_1))
{
if (RoomItem_0.uint_3 == 0u)
{
@class.int_19 = -1;
RoomItem_0.uint_3 = @class.GetClient().GetHabbo().Id;
@class.RoomItem_0 = RoomItem_0;
}
}
else
{
if (@class.bool_0)
{
try
{
@class.method_4(RoomItem_0.GStruct1_1);
}
catch
{
}
}
}
}
}
示例5: OnRemove
public override void OnRemove(GameClient Session, RoomItem Item)
{
RoomMusicController roomMusicController = GoldTree.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId).GetRoomMusicController();
roomMusicController.Stop();
roomMusicController.UnLinkRoomOutputItem();
Item.UpdateState(true, true);
}
示例6: Action
public void Action(RoomItem Item, Task Task, string ExtraData)
{
if (ExtraData == "1")
{
Task.Wait(7000);
Item.FireWorkCount--;
using (DatabaseClient dbClient = GoldTree.GetDatabase().GetClient())
{
dbClient.AddParamWithValue("itemid", Item.uint_0);
dbClient.ExecuteQuery("UPDATE items SET fw_count = fw_count - 1 WHERE id = @itemid LIMIT 1");
}
}
if (Item.FireWorkCount == 0)
{
ExtraData = "0";
}
Item.ExtraData = ExtraData;
Item.UpdateState(true, true);
Task.Wait();
Task.Dispose();
}
示例7: OnTrigger
public override void OnTrigger(GameClient Session, RoomItem RoomItem_0, int int_0, bool bool_0)
{
RoomUser @class = RoomItem_0.method_8().GetRoomUserByHabbo(Session.GetHabbo().Id);
if (@class != null && (RoomItem_0.GStruct1_2.x < RoomItem_0.method_8().Class28_0.int_4 && RoomItem_0.GStruct1_2.y < RoomItem_0.method_8().Class28_0.int_5))
{
if (ThreeDCoord.smethod_1(@class.GStruct1_0, RoomItem_0.GStruct1_1) && @class.bool_0)
{
@class.method_4(RoomItem_0.GStruct1_1);
}
else
{
if (RoomItem_0.method_8().method_30(RoomItem_0.GStruct1_2.x, RoomItem_0.GStruct1_2.y, RoomItem_0.Double_0, true, false) && RoomItem_0.uint_3 == 0u)
{
RoomItem_0.uint_3 = @class.uint_0;
@class.bool_0 = false;
if (@class.bool_6 && (@class.int_10 != RoomItem_0.GStruct1_1.x || @class.int_11 != RoomItem_0.GStruct1_1.y))
{
@class.method_3(true);
}
@class.bool_1 = true;
@class.method_4(RoomItem_0.GStruct1_0);
RoomItem_0.ReqUpdate(3);
}
}
}
}
示例8: AddFreezeScoreboard
internal void AddFreezeScoreboard(RoomItem item)
{
if (this.freezeScoreboards.Contains(item.uint_0))
{
this.freezeScoreboards.Remove(item.uint_0);
}
this.freezeScoreboards.Add(item.uint_0, item);
}
示例9: AddFreezeGate
internal void AddFreezeGate(RoomItem item)
{
if (this.freezeGates.Contains(item.uint_0))
{
this.freezeGates.Remove(item.uint_0);
}
this.freezeGates.Add(item.uint_0, item);
}
示例10: OnTrigger
public override void OnTrigger(GameClient Session, RoomItem RoomItem_0, int int_0, bool bool_0)
{
if (bool_0 && RoomItem_0.ExtraData != "-1")
{
RoomItem_0.ExtraData = "-1";
RoomItem_0.method_4();
RoomItem_0.ReqUpdate(10);
}
}
示例11: Handle
public void Handle(GameClient Session, ClientMessage Event)
{
try
{
Room @class = GoldTree.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
if (@class != null)
{
if (@class.method_72("stickiepole") > 0 || @class.method_26(Session))
{
uint uint_ = Event.PopWiredUInt();
string text = Event.PopFixedString();
string[] array = text.Split(new char[]
{
' '
});
if (array[0].Contains("-"))
{
array[0] = array[0].Replace("-", "");
}
UserItem class2 = Session.GetHabbo().method_23().method_10(uint_);
if (class2 != null)
{
if (array[0].StartsWith(":"))
{
string text2 = @class.method_98(text);
if (text2 == null)
{
ServerMessage Message = new ServerMessage(516u);
Message.AppendInt32(11);
Session.SendMessage(Message);
return;
}
RoomItem RoomItem_ = new RoomItem(class2.uint_0, @class.Id, class2.uint_1, class2.string_0, 0, 0, 0.0, 0, text2, @class);
if (@class.method_82(Session, RoomItem_, true, null))
{
Session.GetHabbo().method_23().method_12(uint_, 1u, false);
}
}
using (DatabaseClient class3 = GoldTree.GetDatabase().GetClient())
{
class3.ExecuteQuery(string.Concat(new object[]
{
"UPDATE items SET room_id = '",
@class.Id,
"' WHERE Id = '",
class2.uint_0,
"' LIMIT 1"
}));
}
}
}
}
}
catch
{
}
}
示例12: OnTrigger
public override void OnTrigger(GameClient Session, RoomItem RoomItem_0, int int_0, bool bool_0)
{
if (RoomItem_0.ExtraData != "-1")
{
RoomItem_0.ExtraData = "-1";
RoomItem_0.UpdateState(false, true);
RoomItem_0.ReqUpdate(3);
}
}
示例13: OnTrigger
public override void OnTrigger(GameClient Session, RoomItem RoomItem_0, int int_1, bool bool_0)
{
if (bool_0)
{
if (this.Modes == 0)
{
RoomItem_0.UpdateState(false, true);
}
int num = 0;
int num2 = 0;
if (RoomItem_0.ExtraData.Length > 0)
{
num = int.Parse(RoomItem_0.ExtraData);
}
if (num <= 0)
{
num2 = 1;
}
else
{
if (num >= this.Modes)
{
num2 = 0;
}
else
{
num2 = num + 1;
}
}
if (num2 == 0)
{
if (RoomItem_0.method_8().method_97(RoomItem_0.Int32_0, RoomItem_0.Int32_1))
{
return;
}
Dictionary<int, AffectedTile> dictionary = RoomItem_0.method_8().method_94(RoomItem_0.GetBaseItem().Length, RoomItem_0.GetBaseItem().Width, RoomItem_0.Int32_0, RoomItem_0.Int32_1, RoomItem_0.int_3);
if (dictionary == null)
{
dictionary = new Dictionary<int, AffectedTile>();
}
foreach (AffectedTile current in dictionary.Values)
{
if (RoomItem_0.method_8().method_97(current.Int32_0, current.Int32_1))
{
return;
}
}
}
RoomItem_0.ExtraData = num2.ToString();
RoomItem_0.method_4();
RoomItem_0.method_8().method_22();
}
}
示例14: OnTrigger
public override void OnTrigger(GameClient Session, RoomItem RoomItem_0, int int_0, bool bool_0)
{
if (bool_0)
{
int num = 0;
if (RoomItem_0.ExtraData.Length > 0)
{
num = int.Parse(RoomItem_0.ExtraData);
}
if (int_0 == 0)
{
if (num <= -1)
{
num = 0;
}
else
{
if (num >= 0)
{
num = -1;
}
}
}
else
{
if (int_0 >= 1)
{
if (int_0 == 1)
{
num--;
if (num < 0)
{
num = 0;
}
}
else
{
if (int_0 == 2)
{
num++;
if (num >= 100)
{
num = 0;
}
}
}
}
}
RoomItem_0.ExtraData = num.ToString();
RoomItem_0.method_4();
}
}
示例15: OnTrigger
public override void OnTrigger(GameClient Session, RoomItem RoomItem_0, int int_0, bool bool_0)
{
if (bool_0)
{
ServerMessage Message = new ServerMessage(651u);
Message.AppendInt32(0);
Message.AppendInt32(5);
Message.AppendInt32(1);
Message.AppendUInt(RoomItem_0.uint_0);
Message.AppendInt32(RoomItem_0.GetBaseItem().Sprite);
Message.AppendUInt(RoomItem_0.uint_0);
Session.SendMessage(Message);
}
}