Exemplo n.º 1
0
        public override void OnPlayerDamaged(ref int damage, ref byte type)
        {
            // disable this code for now
            if (!grant)
            {
                grant = true;

                /*
                 * alex.SpawnOn(LocalGame, LocalPlayer);
                 * GordonFreeman.SpawnOn(LocalGame, LocalPlayer);
                 * InstaRepair.SpawnOn(LocalGame, LocalPlayer);
                 * Weapon.SpawnOn(LocalGame, LocalPlayer);
                 * WeaponOne.SpawnOn(LocalGame, LocalPlayer);
                 * Hattus.SpawnOn(LocalGame, LocalPlayer);
                 */
            }

            return;

            damage = (3 * LocalGame.GetCurrentFloor()) * damage; //e.g 300%, 600%, 900%... dmg

            Type    gameType = Utils.GetGameType("SoG.Game1");
            dynamic game     = LocalGame.GetUnderlayingGame();
            dynamic player   = game.xLocalPlayer;
            var     function = ((TypeInfo)gameType).GetDeclaredMethods("_EntityMaster_AddItem").First();

            //function.Invoke(LocalGame.GetUnderlayingGame(), new[] { GetModItemFromString("BagKnight"), player.xEntity.xTransform.v2Pos, player.xEntity.xRenderComponent.fVirtualHeight, player.xEntity.xCollisionComponent.ibitCurrentColliderLayer, Vector2.Zero });
            //function.Invoke(LocalGame.GetUnderlayingGame(), new[] { GetModItemFromString("BananaMan"), player.xEntity.xTransform.v2Pos, player.xEntity.xRenderComponent.fVirtualHeight, player.xEntity.xCollisionComponent.ibitCurrentColliderLayer, Vector2.Zero });
        }