Exemple #1
0
        internal RoomUser(uint HabboId, uint RoomId, int VirtualId, GameClient pClient, Room room)
        {
            this.mClient      = pClient;
            this.Freezed      = false;
            this.HabboId      = HabboId;
            this.RoomId       = RoomId;
            this.VirtualId    = VirtualId;
            this.IdleTime     = 0;
            this.X            = 0;
            this.Y            = 0;
            this.Z            = 0;
            this.RotHead      = 0;
            this.RotBody      = 0;
            this.UpdateNeeded = true;
            this.Statusses    = new Dictionary <string, string>();
            //this.Path = new List<Coord>();
            //this.PathStep = 0;
            //this.TeleDelay = -1;

            this.AllowOverride = false;
            this.CanWalk       = true;

            this.IsSpectator = false;
            this.SqState     = 3;
            //this.Steps = 0;

            this.InternalRoomID    = 0;
            this.CurrentItemEffect = ItemEffectType.None;
            this.mRoom             = room;
            this.events            = new Queue();
        }
Exemple #2
0
        internal RoomUser(uint HabboId, uint RoomId, int VirtualId, Room room, bool isSpectator)
        {
            this.enteredStopwatch = new Stopwatch();
            this.enteredStopwatch.Start();
            this.Freezed             = false;
            this.HabboId             = HabboId;
            this.RoomId              = RoomId;
            this.VirtualId           = VirtualId;
            this.IdleTime            = 0;
            this.X                   = 0;
            this.Y                   = 0;
            this.Z                   = 0;
            this.RotHead             = room.GetGameMap().Model.DoorOrientation;
            this.RotBody             = room.GetGameMap().Model.DoorOrientation;
            this.UpdateNeeded        = true;
            this.Statusses           = new Dictionary <string, string>();
            this.lastActionStopwatch = new Stopwatch();
            this.lastActionStopwatch.Start();
            this.mRoom = room;

            this.IgnoreChat = false;

            this.AllowOverride = false;
            this.CanWalk       = true;

            this.IsSpectator = isSpectator;
            this.SqState     = 3;

            this.InternalRoomID    = 0;
            this.CurrentItemEffect = ItemEffectType.None;
            this.events            = new Queue();
            this.FreezeLives       = 0;
        }
Exemple #3
0
 internal RoomUser(uint HabboId, uint RoomId, int VirtualId, Room room, bool isSpectator)
 {
     this.Freezed           = false;
     this.HabboId           = HabboId;
     this.RoomId            = RoomId;
     this.VirtualId         = VirtualId;
     this.IdleTime          = 0;
     this.X                 = 0;
     this.Y                 = 0;
     this.Z                 = 0.0;
     this.RotHead           = 0;
     this.RotBody           = 0;
     this.UpdateNeeded      = true;
     this.Statusses         = new Dictionary <string, string>();
     this.TeleDelay         = -1;
     this.mRoom             = room;
     this.AllowOverride     = false;
     this.CanWalk           = true;
     this.IsSpectator       = isSpectator;
     this.SqState           = 3;
     this.InternalRoomID    = 0;
     this.CurrentItemEffect = ItemEffectType.None;
     this.events            = new Queue();
     this.FreezeLives       = 0;
     this.InteractingGate   = false;
     this.GateId            = 0u;
     this.LastInteraction   = 0;
     this.LockedTilesCount  = 0;
 }
Exemple #4
0
 public RoomUser(int HabboId, int RoomId, int VirtualId, Room room)
 {
     Freezed        = false;
     this.HabboId   = HabboId;
     this.RoomId    = RoomId;
     this.VirtualId = VirtualId;
     IdleTime       = 0;
     X                 = 0;
     Y                 = 0;
     Z                 = 0;
     PrevTime          = 0;
     RotHead           = 0;
     RotBody           = 0;
     UpdateNeeded      = true;
     Statusses         = new Dictionary <string, string>();
     TeleDelay         = -1;
     mRoom             = room;
     AllowOverride     = false;
     CanWalk           = true;
     SqState           = 3;
     InternalRoomID    = 0;
     CurrentItemEffect = ItemEffectType.NONE;
     FreezeLives       = 0;
     InteractingGate   = false;
     GateId            = 0;
     LastInteraction   = 0;
     LockedTilesCount  = 0;
     IsJumping         = false;
     TimeInRoom        = 0;
     TradeId           = 0;
     TradePartner      = 0;
     IsTrading         = false;
 }
Exemple #5
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="RoomUser" /> class.
 /// </summary>
 /// <param name="habboId">The habbo identifier.</param>
 /// <param name="roomId">The room identifier.</param>
 /// <param name="virtualId">The virtual identifier.</param>
 /// <param name="pClient">The p client.</param>
 /// <param name="room">The room.</param>
 internal RoomUser(uint habboId, uint roomId, int virtualId, GameClient pClient, Room room)
 {
     _mClient              = pClient;
     Freezed               = false;
     HabboId               = habboId;
     RoomId                = roomId;
     VirtualId             = virtualId;
     IdleTime              = 0;
     X                     = 0;
     Y                     = 0;
     Z                     = 0.0;
     RotHead               = 0;
     RotBody               = 0;
     UserTimeInCurrentRoom = 0;
     UpdateNeeded          = true;
     Statusses             = new Dictionary <string, string>();
     TeleDelay             = -1;
     LastInteraction       = 0;
     AllowOverride         = false;
     CanWalk               = true;
     IsSpectator           = GetClient().GetHabbo().SpectatorMode;
     SqState               = 3;
     InternalRoomId        = 0;
     CurrentItemEffect     = ItemEffectType.None;
     _mRoom                = room;
     Events1               = new Queue();
     InteractingGate       = false;
     GateId                = 0u;
     LockedTilesCount      = 0;
 }
 //コピーコンストラクタ
 public ConsumptionItem(ConsumptionItem other)
     : base(other.itemID, other.itemName, other.itemExplanation,
            other.itemPrice, other.itemRare, other.itemWeight, other.amountLimit)
 {
     this.effectType = other.effectType;
     this.itemEffect = other.itemEffect;
     this.stack      = other.stack;
 }
        private int stack;             //スタック数

        public ConsumptionItem(int itemID, string itemName, string itemExplanation,
                               int itemPrice, int itemRare, float itemWeight, int amountLimit, ItemEffectType effectType, ItemEffect itemEffect)
            : base(itemID, itemName, itemExplanation, itemPrice, itemRare, itemWeight, amountLimit)
        {
            this.effectType = effectType;
            this.itemEffect = itemEffect;

            stack = 1;
        }
Exemple #8
0
 // Constructor
 public ItemEffect(
     ItemEffectType effectType,
     bool[] boolParams     = null,
     float[] floatParams   = null,
     string[] stringParams = null
     ) : base(boolParams, floatParams, stringParams)
 {
     this.effectType = effectType;
 }
Exemple #9
0
 public EffectDatabase.ItemEff.ItemEffect GetEffectNew(ItemEffectType effectType)
 {
     for (int i = 0; i < effectsNew.Count; i++)
     {
         if (effectsNew[i].effectType == effectType)
         {
             return(effectsNew[i]);
         }
     }
     return(null);
 }
Exemple #10
0
 public ItemEffect GetEffect(ItemEffectType effectType)
 {
     for (int i = 0; i < effects.Length; i++)
     {
         if (effects[i].effectType == effectType)
         {
             return(effects[i]);
         }
     }
     return(null);
 }
Exemple #11
0
    public List <EffectDatabase.ItemEff.ItemEffect> GetEffectsNew(ItemEffectType effectType)
    {
        List <EffectDatabase.ItemEff.ItemEffect> effects = new List <EffectDatabase.ItemEff.ItemEffect>();

        for (int i = 0; i < effectsNew.Count; i++)
        {
            if (effectsNew[i].effectType == effectType)
            {
                effects.Add(effectsNew[i]);
            }
        }
        return(effects);
    }
Exemple #12
0
    public List <ItemEffect> GetEffects(ItemEffectType effectType)
    {
        List <ItemEffect> effects = new List <ItemEffect>();

        for (int i = 0; i < this.effects.Length; i++)
        {
            if (this.effects[i].effectType == effectType)
            {
                effects.Add(this.effects[i]);
            }
        }
        return(effects);
    }
Exemple #13
0
        public RoomUser(int HabboId, int RoomId, int VirtualId, Room room)
        {
            this.Freezed   = false;
            this.HabboId   = HabboId;
            this.RoomId    = RoomId;
            this.VirtualId = VirtualId;
            this.IdleTime  = 0;

            this.X            = 0;
            this.Y            = 0;
            this.Z            = 0;
            this.PrevTime     = 0;
            this.RotHead      = 0;
            this.RotBody      = 0;
            this.UpdateNeeded = true;
            this._statusses   = new Dictionary <string, string>();

            this.TeleDelay = -1;
            this.mRoom     = room;

            this.AllowOverride = false;
            this.CanWalk       = true;


            this.SqState = 3;

            this.InternalRoomID    = 0;
            this.CurrentItemEffect = ItemEffectType.NONE;

            this.FreezeLives      = 0;
            this.InteractingGate  = false;
            this.GateId           = 0;
            this.LastInteraction  = 0;
            this.LockedTilesCount = 0;

            this.IsJumping  = false;
            this.TimeInRoom = 0;

            this._tradeId      = 0;
            this._tradePartner = 0;
            this._trading      = false;
        }
Exemple #14
0
 public RoomUser(int HabboId, int RoomId, int VirtualId, Room room)
 {
     this.Freezed           = false;
     this.HabboId           = HabboId;
     this.RoomId            = RoomId;
     this.VirtualId         = VirtualId;
     this.IdleTime          = 0;
     this.X                 = 0;
     this.Y                 = 0;
     this.Z                 = 0.0;
     this.RotHead           = 0;
     this.RotBody           = 0;
     this.UpdateNeeded      = true;
     this._statusses        = new Dictionary <string, string>();
     this.mRoom             = room;
     this.AllowOverride     = false;
     this.CanWalk           = true;
     this.CurrentItemEffect = ItemEffectType.None;
     this.breakwalk         = false;
     this.AllowShoot        = false;
     this.AllowBuyItems     = new List <int>();
     this.mDispose          = false;
     this.AllowMoveTo       = true;
 }
Exemple #15
0
        private void UpdateUserEffect(RoomUser User, int x, int y)
        {
            if (User.IsBot)
            {
                return;
            }
            byte NewCurrentUserItemEffect = room.GetGameMap().EffectMap[x, y];

            if (NewCurrentUserItemEffect > 0)
            {
                ItemEffectType Type = ByteToItemEffectEnum.Parse(NewCurrentUserItemEffect);
                if (Type != User.CurrentItemEffect)
                {
                    switch (Type)
                    {
                    case ItemEffectType.Iceskates:
                    {
                        if (User.GetClient().GetHabbo().Gender == "M")
                        {
                            User.GetClient().GetHabbo().GetAvatarEffectsInventoryComponent().ApplyCustomEffect(38);
                        }
                        else
                        {
                            User.GetClient().GetHabbo().GetAvatarEffectsInventoryComponent().ApplyCustomEffect(39);
                        }
                        User.CurrentItemEffect = ItemEffectType.Iceskates;
                        break;
                    }

                    case ItemEffectType.Normalskates:
                    {
                        if (User.GetClient().GetHabbo().Gender == "M")
                        {
                            User.GetClient().GetHabbo().GetAvatarEffectsInventoryComponent().ApplyCustomEffect(55);
                        }
                        else
                        {
                            User.GetClient().GetHabbo().GetAvatarEffectsInventoryComponent().ApplyCustomEffect(56);
                        }
                        //56=girls
                        //55=
                        User.CurrentItemEffect = Type;
                        break;
                    }

                    case ItemEffectType.Swim:
                    {
                        User.GetClient().GetHabbo().GetAvatarEffectsInventoryComponent().ApplyCustomEffect(29);
                        User.CurrentItemEffect = Type;
                        break;
                    }

                    case ItemEffectType.SwimLow:
                    {
                        User.GetClient().GetHabbo().GetAvatarEffectsInventoryComponent().ApplyCustomEffect(30);
                        User.CurrentItemEffect = Type;
                        break;
                    }

                    case ItemEffectType.SwimHalloween:
                    {
                        User.GetClient().GetHabbo().GetAvatarEffectsInventoryComponent().ApplyCustomEffect(37);
                        User.CurrentItemEffect = Type;
                        break;
                    }

                    case ItemEffectType.None:
                    {
                        User.GetClient().GetHabbo().GetAvatarEffectsInventoryComponent().ApplyCustomEffect(-1);
                        User.CurrentItemEffect = Type;
                        break;
                    }

                    case ItemEffectType.PublicPool:
                    {
                        User.AddStatus("swim", string.Empty);
                        User.CurrentItemEffect = Type;
                        break;
                    }
                    }
                }
            }
            else if (User.CurrentItemEffect != ItemEffectType.None && NewCurrentUserItemEffect == 0)
            {
                User.GetClient().GetHabbo().GetAvatarEffectsInventoryComponent().ApplyEffect(-1);
                User.CurrentItemEffect = ItemEffectType.None;
                User.RemoveStatus("swim");
            }
        }
Exemple #16
0
        public RoomUser(int HabboId, int RoomId, int VirtualId, Room room)
        {
            this.Freezed = false;
            this.HabboId = HabboId;
            this.RoomId = RoomId;
            this.VirtualId = VirtualId;
            this.IdleTime = 0;

            this.X = 0;
            this.Y = 0;
            this.Z = 0;
            this.PrevTime = 0;
            this.RotHead = 0;
            this.RotBody = 0;
            this.UpdateNeeded = true;
            this.Statusses = new Dictionary<string, string>();

            this.TeleDelay = -1;
            this.mRoom = room;

            this.AllowOverride = false;
            this.CanWalk = true;

            this.SqState = 3;

            this.InternalRoomID = 0;
            this.CurrentItemEffect = ItemEffectType.NONE;

            this.FreezeLives = 0;
            this.InteractingGate = false;
            this.GateId = 0;
            this.LastInteraction = 0;
            this.LockedTilesCount = 0;

            this.IsJumping = false;
            this.TimeInRoom = 0;
        }
Exemple #17
0
        private void HandleRandomEffect(PlayerController player)
        {
            if (m_PickedUp | AllowedEffects == null | AllowedEffects.Count <= 0)
            {
                return;
            }

            ExpandShaders.Instance.GlitchScreenForDuration();

            AllowedEffects = AllowedEffects.Shuffle();

            m_SelectedEffect = BraveUtility.RandomElement(AllowedEffects);

            if (m_SelectedEffect == ItemEffectType.ArmorUp)
            {
                player.healthHaver.Armor += 10f;
            }
            else if (m_SelectedEffect == ItemEffectType.BigCash)
            {
                player.carriedConsumables.Currency = 999;
            }
            else if (m_SelectedEffect == ItemEffectType.ManyKeys)
            {
                player.carriedConsumables.KeyBullets = 999;
            }
            else if (m_SelectedEffect == ItemEffectType.BlanksRUS)
            {
                PickupObject blankPickup = PickupObjectDatabase.GetById(224);
                for (int i = 0; i < UnityEngine.Random.Range(5, 10); i++)
                {
                    if (blankPickup)
                    {
                        LootEngine.GivePrefabToPlayer(blankPickup.gameObject, player);
                    }
                }
            }
            else if (m_SelectedEffect == ItemEffectType.HealthPak)
            {
                if (player.characterIdentity != PlayableCharacters.Robot)
                {
                    StatModifier healthUp = new StatModifier()
                    {
                        statToBoost   = PlayerStats.StatType.Health,
                        amount        = UnityEngine.Random.Range(4, 6),
                        modifyType    = StatModifier.ModifyMethod.ADDITIVE,
                        isMeatBunBuff = false,
                    };
                    player.ownerlessStatModifiers.Add(healthUp);
                    player.stats.RecalculateStats(player, false, false);
                }
                else
                {
                    player.healthHaver.Armor += UnityEngine.Random.Range(4, 6);
                }
            }
            else if (m_SelectedEffect == ItemEffectType.DrStone)
            {
                PickupObject glassStone = PickupObjectDatabase.GetById(565);
                for (int i = 0; i < UnityEngine.Random.Range(8, 12); i++)
                {
                    if (glassStone)
                    {
                        LootEngine.GivePrefabToPlayer(glassStone.gameObject, player);
                    }
                }
            }
            else if (m_SelectedEffect == ItemEffectType.MuchAmmo)
            {
                StatModifier ManyBullets = new StatModifier()
                {
                    statToBoost   = PlayerStats.StatType.AmmoCapacityMultiplier,
                    amount        = UnityEngine.Random.Range(1.5f, 3),
                    modifyType    = StatModifier.ModifyMethod.MULTIPLICATIVE,
                    isMeatBunBuff = false,
                };
                player.ownerlessStatModifiers.Add(ManyBullets);
                player.stats.RecalculateStats(player, false, false);
            }
            return;
        }
Exemple #18
0
 public ItemEffect(ItemEffectType effect, ItemTargetType target, ItemUsageType usage, bool isEquipable, int value)
 {
     this.target = target;
     this.effect = effect;
     this.value = value;
     this.usage = usage;
     this.isEquipable = isEquipable;
 }