本文整理汇总了C#中GoldTree.HabboHotel.Items.RoomItem.method_4方法的典型用法代码示例。如果您正苦于以下问题:C# RoomItem.method_4方法的具体用法?C# RoomItem.method_4怎么用?C# RoomItem.method_4使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GoldTree.HabboHotel.Items.RoomItem
的用法示例。
在下文中一共展示了RoomItem.method_4方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: 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);
}
}
示例2: 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();
}
}
示例3: OnTrigger
public override void OnTrigger(GameClient Session, RoomItem RoomItem_0, int int_0, bool bool_0)
{
RoomUser @class = null;
if (Session != null)
{
@class = RoomItem_0.method_8().GetRoomUserByHabbo(Session.GetHabbo().Id);
if (@class == null)
{
return;
}
}
if (Session == null || RoomItem_0.method_8().method_99(RoomItem_0.Int32_0, RoomItem_0.Int32_1, @class.int_3, @class.int_4))
{
if (RoomItem_0.ExtraData != "-1")
{
if (int_0 == -1)
{
RoomItem_0.ExtraData = "0";
RoomItem_0.method_4();
}
else
{
RoomItem_0.uint_3 = @class.uint_0;
RoomItem_0.ExtraData = "-1";
RoomItem_0.UpdateState(false, true);
RoomItem_0.ReqUpdate(4);
}
}
}
else
{
if (Session != null && @class != null && @class.bool_0)
{
try
{
@class.method_4(RoomItem_0.GStruct1_1);
}
catch
{
}
}
}
}
示例4: OnTrigger
public override void OnTrigger(GameClient Session, RoomItem RoomItem_0, int int_1, bool bool_0)
{
if (this.Modes != 0 && (bool_0 || RoomItem_0.GetBaseItem().InteractionType.ToLower() == "switch"))
{
if (RoomItem_0.GetBaseItem().InteractionType.ToLower() == "switch" && Session != null)
{
RoomUser @class = Session.GetHabbo().CurrentRoom.GetRoomUserByHabbo(Session.GetHabbo().Id);
if (@class.GStruct1_0.x - RoomItem_0.GStruct1_1.x > 1 || @class.GStruct1_0.y - RoomItem_0.GStruct1_1.y > 1)
{
if (@class.bool_0)
{
@class.method_4(RoomItem_0.GStruct1_0);
return;
}
return;
}
}
int num = 0;
if (RoomItem_0.ExtraData.Length > 0)
{
num = int.Parse(RoomItem_0.ExtraData);
}
int num2;
if (num <= 0)
{
num2 = 1;
}
else
{
if (num >= this.Modes)
{
num2 = 0;
}
else
{
num2 = num + 1;
}
}
if (RoomItem_0.GetBaseItem().Name.Contains("jukebox"))
{
ServerMessage Message = new ServerMessage(327u);
if (num2 == 1)
{
Message.AppendInt32(7);
Message.AppendInt32(6);
Message.AppendInt32(7);
Message.AppendInt32(0);
Message.AppendInt32(0);
RoomItem_0.int_0 = 1;
RoomItem_0.bool_0 = true;
RoomItem_0.bool_1 = true;
}
else
{
Message.AppendInt32(-1);
Message.AppendInt32(-1);
Message.AppendInt32(-1);
Message.AppendInt32(-1);
Message.AppendInt32(0);
RoomItem_0.int_0 = 0;
RoomItem_0.bool_0 = false;
RoomItem_0.method_8().int_13 = 0;
}
RoomItem_0.method_8().SendMessage(Message, null);
}
double double_ = RoomItem_0.Double_1;
RoomItem_0.ExtraData = num2.ToString();
RoomItem_0.method_4();
if (double_ != RoomItem_0.Double_1)
{
Dictionary<int, AffectedTile> dictionary = RoomItem_0.Dictionary_0;
if (dictionary == null)
{
dictionary = new Dictionary<int, AffectedTile>();
}
RoomItem_0.method_8().method_87(RoomItem_0.method_8().method_43(RoomItem_0.Int32_0, RoomItem_0.Int32_1), true, false);
foreach (AffectedTile current in dictionary.Values)
{
RoomItem_0.method_8().method_87(RoomItem_0.method_8().method_43(current.Int32_0, current.Int32_1), true, false);
}
}
if (Session != null)
{
RoomUser RoomUser_ = Session.GetHabbo().CurrentRoom.GetRoomUserByHabbo(Session.GetHabbo().Id);
RoomItem_0.method_8().method_10(RoomUser_, RoomItem_0);
}
}
}
示例5: 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();
}
}