Beispiel #1
0
        /// <summary>
        /// Creates an alternative style for the HatInfo's item, which is activated while wearing the enCombo item.
        /// <para>The paths to the texture are of format "Sprites/Equipment/Hats/[resource]/[Up, Right, Down or Left].xnb"</para>
        /// </summary>
        /// <remarks>You can set resource to something like "[hatResource]/[comboResource]/" to keep the textures for default and alternate set in the same hat folder.</remarks>
        public static void AddAltSet(this HatInfo xInfo, ItemCodex.ItemTypes enCombo, string sResource, ContentManager xContent)
        {
            if (!xInfo.denxAlternateVisualSets.ContainsKey(enCombo))
            {
                xInfo.denxAlternateVisualSets[enCombo] = new HatInfo.VisualSet();
            }

            string sHatPath = "Sprites/Equipment/Hats/" + sResource + "/";

            HatInfo.VisualSet xAlt = xInfo.denxAlternateVisualSets[enCombo];

            try
            {
                xAlt.atxTextures[0] = xContent.Load <Texture2D>(sHatPath + "Up");
                xAlt.atxTextures[1] = xContent.Load <Texture2D>(sHatPath + "Right");
                xAlt.atxTextures[2] = xContent.Load <Texture2D>(sHatPath + "Down");
                xAlt.atxTextures[3] = xContent.Load <Texture2D>(sHatPath + "Left");

                xInfo.sResourceName = sResource;
            }
            catch (Exception e)
            {
                Console.WriteLine("Failed to load a texture in AddAltSet.");
                Console.WriteLine("Exception: " + e.Message);
                xAlt.atxTextures[0] = RenderMaster.txNullTex;
                xAlt.atxTextures[1] = RenderMaster.txNullTex;
                xAlt.atxTextures[2] = RenderMaster.txNullTex;
                xAlt.atxTextures[3] = RenderMaster.txNullTex;

                xInfo.sResourceName = "";
            }
        }
Beispiel #2
0
        //
        // Harmony Library Patches - For Get- methods
        //

        /// <summary> Patches GetItemInstance so that SoG can create item instances with a correct shadow texture. </summary>
        private static bool GetItemInstance_PrefixPatch(ref Item __result, ItemCodex.ItemTypes enType)
        {
            if (!enType.IsModItem())
            {
                return(true); // Executes original method
            }

            ItemDescription xDesc = ItemCodex.denxLoadedDescriptions[enType];

            __result = new Item()
            {
                enType        = enType,
                sFullName     = xDesc.sFullName,
                bGiveToServer = xDesc.lenCategory.Contains(ItemCodex.ItemCategories.GrantToServer)
            };

            __result.xRenderComponent.txTexture            = xDesc.txDisplayImage;
            __result.xCollisionComponent.xMovementCollider = new SphereCollider(10f, Vector2.Zero, __result.xTransform, 1f, __result)
            {
                bCollideWithFlat = true
            };
            __result.xRenderComponent.txShadowTexture = ModLibrary.ItemDetails[enType].txItemShadow ?? Utils.GetTheGame().xLevelMaster.contRegionContent.Load <Texture2D>("Items/DropAppearance/hartass02");

            return(false); // Skips original method
        }
 public WeaponContentManager(ContentManager Content, ItemCodex.ItemTypes p_enType)
 {
     this.enType = p_enType;
     this.contWeaponContent = new ContentManager(Content.ServiceProvider, Content.RootDirectory);
     Content = null;
     this.ditxWeaponTextures = new Dictionary<ushort, Texture2D>();
     ThreadPool.QueueUserWorkItem(new WaitCallback(this.LoadBatch), WeaponAssetLoader.GetLoaderTemplate(p_enType));
 }
 public SpecialItemGetWatcher(PlayerView xView, int iDuration, ItemCodex.ItemTypes enType, byte byType)
 {
     this.xView = xView;
     this.iDuration = iDuration;
     this.enType = enType;
     this.byVariant = byType;
     this.enWatcherType = Watcher.WatcherType.ItemGet;
 }
Beispiel #5
0
 /// <summary> Patches GetWeaponInfo so that SoG can use modded WeaponInfos. </summary>
 private static bool GetWeaponInfo_PrefixPatch(ref WeaponInfo __result, ItemCodex.ItemTypes enType)
 {
     if (enType.IsModItem())
     {
         __result = ModLibrary.ItemDetails[enType].xEquipmentData as WeaponInfo;
         return(false); // Skip original method
     }
     return(true);      // Execute original method
 }
Beispiel #6
0
 public Objective_FindItems(ItemCodex.ItemTypes p_enTypeToGet, ushort p_iAmountToGet, string p_sDescriptionTemplate, bool p_bAutoRemoveOnComplete)
 {
     this.enObjectiveType = QuestObjective.ObjectiveTypes.FindItems;
     this.xItemDescription = ItemCodex.GetItemDescription(p_enTypeToGet);
     this.liAlterableValues.Add(0);
     this.liAlterableValues.Add(p_iAmountToGet);
     this.enTypeToGet = p_enTypeToGet;
     this.sObjectiveDescriptionTemplate = p_sDescriptionTemplate;
     this.bAutoRemoveItemOnCompletion = p_bAutoRemoveOnComplete;
 }
Beispiel #7
0
 private static void OnItemUsePrefix(ItemCodex.ItemTypes enItem, PlayerView xView, ref bool bSend)
 {
     if (xView.xViewStats.bIsDead)
     {
         return;
     }
     foreach (var onItemUse in _onItemUseCallbacks)
     {
         onItemUse(enItem, xView, ref bSend);
     }
 }
Beispiel #8
0
 public StingerSpellCharge(int iStartLevel, int iMaxChargeLevel, float fChargeSpeedModifier, ItemCodex.ItemTypes enSwitchToWeapon, ItemCodex.ItemTypes enTrueWeapon)
     : base(iStartLevel, iMaxChargeLevel, fChargeSpeedModifier)
 {
     this.liSPCosts = new List<int>
     {
         15,
         20,
         30,
         40,
         50
     };
     this.enBaseSpell = SpellCodex.SpellTypes._Skill_OneHanded_Stinger;
     this.iMaxChargeLevel = iMaxChargeLevel;
     this.enSwitchToWeapon = enSwitchToWeapon;
     this.enTrueWeapon = enTrueWeapon;
 }
Beispiel #9
0
 public OverheadSpellCharge(int iStartLevel, int iMaxChargeLevel, float fChargeSpeedModifier, ItemCodex.ItemTypes enSwitchToWeapon, ItemCodex.ItemTypes enTrueWeapon)
     : base(iStartLevel, iMaxChargeLevel, fChargeSpeedModifier)
 {
     this.liSPCosts = new List<int>
     {
         35,
         40,
         50,
         60,
         70
     };
     this.enBaseSpell = SpellCodex.SpellTypes._Skill_TwoHanded_Overhead;
     this.iMaxChargeLevel = iMaxChargeLevel;
     this.enSwitchToWeapon = enSwitchToWeapon;
     this.enTrueWeapon = enTrueWeapon;
 }
 public MillionStabsSpellCharge(int iStartLevel, int iMaxChargeLevel, float fChargeSpeedModifier, ItemCodex.ItemTypes enSwitchToWeapon, ItemCodex.ItemTypes enTrueWeapon)
     : base(iStartLevel, iMaxChargeLevel, fChargeSpeedModifier)
 {
     this.liSPCosts = new List<int>
     {
         20,
         25,
         35,
         45,
         50
     };
     this.enBaseSpell = SpellCodex.SpellTypes._Skill_OneHanded_MillionStabs;
     this.iMaxChargeLevel = iMaxChargeLevel;
     this.enSwitchToWeapon = enSwitchToWeapon;
     this.enTrueWeapon = enTrueWeapon;
 }
Beispiel #11
0
 public override void Enter(PlayerView xOwnerView)
 {
     bool bIsLocal = Program.GetTheGame().xLocalPlayer == xOwnerView;
     this.xTargetEffect = (Program.GetTheGame()._EffectMaster_AddEffect(new SortedAnimated(Vector2.Zero, SortedAnimated.SortedAnimatedEffects.ChargeTarget_Small)) as SortedAnimated);
     Program.GetTheGame().xWeaponAssetLibrary.SetPRCWeapon(xOwnerView.xEntity.xRenderComponent, xOwnerView.xEquipment.xBufferWeapon.enItemType);
     xOwnerView.xEquipment.xWeapon = xOwnerView.xEquipment.xBufferWeapon;
     this.enTrueWeapon = xOwnerView.xEquipment.xWeapon.enItemType;
     base.Enter(xOwnerView);
     xOwnerView.xEntity.xRenderComponent.SwitchAnimation((ushort)(650 + (int)xOwnerView.xEntity.byAnimationDirection), Animation.CancelOptions.IgnoreIfPlaying, 1f + (1f - this.fChargeSpeedModifier));
     this.xefPowerBalls = (Program.GetTheGame()._EffectMaster_AddEffect(new SortedAnimated(Vector2.Zero, SortedAnimated.SortedAnimatedEffects.ChargeEffect_Balls_Weapon)) as SortedAnimated);
     this.xefPowerBalls.xRenderComponent.xTransform = xOwnerView.xEntity.xTransform;
     this.xefPowerBalls.xRenderComponent.fVirtualHeight = xOwnerView.xEntity.xRenderComponent.fVirtualHeight + 1f;
     this.lxAttachedEffects.Add(this.xefPowerBalls);
     if (!bIsLocal)
     {
         Program.GetTheGame().xRenderMaster.UnregisterRenderComponenent(this.xTargetEffect.xRenderComponent);
     }
     this.xTargetEffect.xTransform = new TransformComponent(xOwnerView.xEntity.xTransform.v2Pos + Utility.AnimationDirectionToVector2((int)xOwnerView.xEntity.byAnimationDirection) * 20f);
     this.xTargetEffect.xRenderComponent.xTransform = this.xTargetEffect.xTransform;
     this.colCheckCollider = new SphereCollider(12f, new Vector2(0f, 0f), this.xTargetEffect.xTransform, 0f, this.xTargetEffect);
     this.colCheckCollider.ibitLayers = Utility.CreateIntMask(new int[]
     {
         30
     });
     Program.GetTheGame().xCollisionMaster.RegisterGhostCollider(this.colCheckCollider);
     if (Program.GetTheGame()._CollisionMaster_CheckVsStatic(this.colCheckCollider))
     {
         this.xTargetEffect.xTransform.SetBoth(xOwnerView.xEntity.xTransform.v2Pos);
     }
     TransformComponent xTransLol = new TransformComponent(this.xTargetEffect.xTransform.v2Pos);
     this.colCheckColliderAdjusted = new SphereCollider(6f, new Vector2(0f, 0f), xTransLol, 0f, new IEntity());
     this.colCheckColliderAdjusted.ibitLayers = Utility.CreateIntMask(new int[]
     {
         30,
         31
     });
     Program.GetTheGame().xCollisionMaster.RegisterGhostCollider(this.colCheckColliderAdjusted);
     this.colHeightMan = new SphereCollider(12f, new Vector2(0f, 0f), this.xTargetEffect.xTransform, 0f, this.xTargetEffect);
     this.colHeightMan.ibitLayers = xOwnerView.xEntity.xCollisionComponent.ibitCurrentColliderLayer;
     Program.GetTheGame().xCollisionMaster.RegisterHitboxCollider(this.colHeightMan, Collider.ColliderLayers.HeighDifferenceIntercept);
     this.rcTroll = new StaticRenderComponent(RenderMaster.txNullTex);
     this.rcTroll.xTransform = this.xTargetEffect.xTransform;
     this.rcTroll.fVirtualHeight = xOwnerView.xEntity.xRenderComponent.fVirtualHeight;
     this.rcTroll.bReSortHeight = true;
     Program.GetTheGame().xRenderMaster.RegisterSortedRenderComponent(this.rcTroll);
 }
Beispiel #12
0
 public ThrowSpellCharge(int iStartLevel, int iMaxChargeLevel, float fChargeSpeedModifier, ItemCodex.ItemTypes enSwitchToWeapon, ItemCodex.ItemTypes enTrueWeapon)
     : base(iStartLevel, iMaxChargeLevel, fChargeSpeedModifier)
 {
     this.liSPCosts = new List<int>
     {
         30,
         35,
         45,
         60,
         70
     };
     this.enBaseSpell = SpellCodex.SpellTypes._Skill_TwoHanded_Throw;
     this.fMaxRange = 120f;
     this.iMaxChargeLevel = iMaxChargeLevel;
     this.bIsMagicSpell = true;
     this.enSwitchToWeapon = enSwitchToWeapon;
     this.enTrueWeapon = enTrueWeapon;
 }
Beispiel #13
0
        /// <summary>
        /// Patches _Animations_GetAnimationSet so that SoG can load shield textures from paths other than "Content/".
        /// <para> Also shortens the texture paths by removing the "Shields/" substring. </para>
        /// </summary>
        private static bool _Animations_GetAnimationSet_PrefixOverwrite(PlayerView xPlayerView, string sAnimation, string sDirection, bool bWithWeapon, bool bCustomHat, bool bWithShield, bool bWeaponOnTop, ref PlayerAnimationTextureSet __result)
        {
            __result = new PlayerAnimationTextureSet()
            {
                bWeaponOnTop = bWeaponOnTop
            };
            string sAttackPath = "";

            ContentManager VanillaContent = RenderMaster.contPlayerStuff;

            __result.txBase = VanillaContent.Load <Texture2D>("Sprites/Heroes/" + sAttackPath + sAnimation + "/" + sDirection);

            // Skipped code which isn't used in vanilla

            try
            {
                if (bWithShield && xPlayerView.xEquipment.DisplayShield != null && xPlayerView.xEquipment.DisplayShield.sResourceName != "")
                {
                    ItemCodex.ItemTypes enType = xPlayerView.xEquipment.DisplayShield.enItemType;

                    if (enType.IsModItem())
                    {
                        // Shortened path for mod loaders
                        __result.txShield = ModLibrary.ItemDetails[enType].xContentManager.Load <Texture2D>("Sprites/Heroes/" + sAttackPath + sAnimation + "/" + xPlayerView.xEquipment.DisplayShield.sResourceName + "/" + sDirection);
                    }
                    else
                    {
                        __result.txShield = VanillaContent.Load <Texture2D>("Sprites/Heroes/" + sAttackPath + sAnimation + "/Shields/" + xPlayerView.xEquipment.DisplayShield.sResourceName + "/" + sDirection);
                    }
                }
            }
            catch (Exception e)
            {
                Console.WriteLine("Shield texture load failed! Exception: " + e.Message);
                __result.txShield = RenderMaster.txNullTex;
            }

            if (bWithWeapon)
            {
                __result.txWeapon = RenderMaster.txNullTex;
            }

            return(false); // Never executes the original
        }
Beispiel #14
0
 public Objective_OwnItems(ItemCodex.ItemTypes p_enTypeToGet, ushort p_iAmountToGet, string p_sDescriptionTemplate)
 {
     Game1 master = Program.GetTheGame();
     this.enObjectiveType = QuestObjective.ObjectiveTypes.OwnItems;
     this.xItemDescription = ItemCodex.GetItemDescription(p_enTypeToGet);
     this.liAlterableValues.Add(0);
     this.liAlterableValues.Add(p_iAmountToGet);
     int iOwn = Program.GetTheGame().xLocalPlayer.xInventory.GetAmount(p_enTypeToGet);
     if (iOwn >= (int)p_iAmountToGet)
     {
         this.liAlterableValues[0] = p_iAmountToGet;
         this.bFinished = true;
     }
     else
     {
         this.liAlterableValues[0] = (ushort)iOwn;
     }
     this.enTypeToGet = p_enTypeToGet;
     this.sObjectiveDescriptionTemplate = p_sDescriptionTemplate;
     this.diiAmountPerView[master.xLocalPlayer.iConnectionIdentifier] = (ushort)iOwn;
 }
 public override void Init(NetIncomingMessage msg, params float[] p_afInitFloats)
 {
     long key = msg.ReadInt64();
     if (Program.game.dixPlayers.ContainsKey(key))
     {
         this.xOwner = Program.game.dixPlayers[key].xEntity;
     }
     else
     {
         this.xOwner = new EntityShell(Vector2.Zero);
     }
     this.fVelocity = p_afInitFloats[0];
     Program.GetTheGame().xSoundSystem.PlayCue("throw_skill", this, false);
     this.xRenderComponent.fVirtualHeight = p_afInitFloats[1];
     this.iChargeLevel = (int)p_afInitFloats[2];
     this.v2Target = new Vector2(p_afInitFloats[3], p_afInitFloats[4]);
     this.enWeapon = (ItemCodex.ItemTypes)p_afInitFloats[5];
     this.v2Direction = Utility.Normalize(this.v2Target - this.xTransform.v2Pos);
     if (this.iChargeLevel == 3)
     {
         this.xRenderComponent.SwitchAnimation(2, Animation.CancelOptions.IgnoreIfPlaying);
     }
 }
Beispiel #16
0
        // Utility Functions

        public static void AddItemAlias(string name, ItemCodex.ItemTypes enType)
        {
            RegisteredItems.Add(name, enType);
        }
Beispiel #17
0
 public HighScoreEntry(string sCharacterName, int iScore, int iFloorProgress, PlayerView xView)
 {
     this.sCharacterName = sCharacterName;
     this.iScore = iScore;
     this.iFloorProgress = iFloorProgress;
     this.bIsMale = xView.xViewStats.bIsMale;
     this.xClothingSet = xView.xEquipment.xClothingSet;
     this.enHairdo = xView.xEquipment.xHairdo.enItemType;
     if (xView.xEquipment.DisplayHat != null)
     {
         this.enHat = xView.xEquipment.DisplayHat.enItemType;
     }
     if (xView.xEquipment.DisplayFacegear != null)
     {
         this.enFacegear = xView.xEquipment.DisplayFacegear.enItemType;
     }
     if (xView.xEquipment.xBufferWeapon != null)
     {
         this.enWeapon = xView.xEquipment.xBufferWeapon.enItemType;
     }
     else
     {
         this.enWeapon = ItemCodex.ItemTypes.Null;
     }
     if (xView.xEquipment.xShield != null)
     {
         this.enShield = xView.xEquipment.xShield.enItemType;
         return;
     }
     this.enShield = ItemCodex.ItemTypes.Null;
 }
Beispiel #18
0
 public TotalScoreReward(ulong iScore, ItemCodex.ItemTypes enItem)
 {
     this.iScoreToReach = iScore;
     this.enReward = enItem;
 }
Beispiel #19
0
 public override void OnAdvancedNetworkMessage(NetIncomingMessage msg)
 {
     if (Program.GetTheGame().xNetworkInfo.enCurrentRole == NetworkHelperInterface.NetworkRole.Server)
     {
         byte byType = msg.ReadByte();
         if (!Program.GetTheGame().dixPlayers.ContainsKey(msg.SenderConnection.RemoteUniqueIdentifier))
         {
             return;
         }
         PlayerView xSendingPlayer = Program.GetTheGame().dixPlayers[msg.SenderConnection.RemoteUniqueIdentifier];
         NetOutgoingMessage om = base.CreateMessage();
         om.Write(byType);
         if (byType == 0 && this.recCollider.Contains(Utility.Vector2ToPoint(xSendingPlayer.xEntity.xTransform.v2Pos)) && this.byDirToLook == xSendingPlayer.xEntity.byAnimationDirection && this.xFishingPlayer == null)
         {
             this.EnterGame(xSendingPlayer);
         }
         if (this.xFishingPlayer == null)
         {
             return;
         }
         if (byType == 1)
         {
             this.xFishingPlayer.xEntity.xRenderComponent.SwitchAnimation((ushort)(2012 + (int)this.xFishingPlayer.xEntity.byAnimationDirection), Animation.CancelOptions.IgnoreIfPlaying);
             (this.xFloatEffect.xRenderComponent as AnimatedRenderComponent).SwitchAnimation(3, Animation.CancelOptions.IgnoreIfPlaying);
             this.iCounter = 0;
             this.iPhase = 4;
         }
         else if (byType == 2)
         {
             this.iPhase = 5;
             this.iCounter = 0;
             this.xFishingPlayer.xEntity.xRenderComponent.SwitchAnimation((ushort)(2020 + (int)this.xFishingPlayer.xEntity.byAnimationDirection), Animation.CancelOptions.IgnoreIfPlaying);
             this.enCurrentFish = (ItemCodex.ItemTypes)msg.ReadInt32();
             om.Write((int)this.enCurrentFish);
             this.SetDifficulty();
         }
         else if (byType == 3)
         {
             this.iPhase = 7;
             this.iCounter = 0;
             this.xFishingPlayer.xEntity.xRenderComponent.SwitchAnimation((ushort)(2036 + (int)this.xFishingPlayer.xEntity.byAnimationDirection), Animation.CancelOptions.IgnoreIfPlaying);
             this.xFloatEffect.bToBeDestroyed = true;
         }
         else if (byType == 4)
         {
             Game1 master = Program.GetTheGame();
             ItemCodex.ItemTypes enMos = (ItemCodex.ItemTypes)msg.ReadInt32();
             om.Write((int)enMos);
             NoticeImage banan = master._EffectMaster_AddEffect(new NoticeImage(this.xFishingPlayer.xEntity.xRenderComponent, enMos, NoticeImage.ItemNoticeType.Immediate)) as NoticeImage;
             banan.xRenderComponent.fVirtualHeight = this.xFishingPlayer.xEntity.xRenderComponent.fVirtualHeight;
             banan.xRenderComponent.fAlpha = 0f;
             this.xFishingPlayer.xEntity.xRenderComponent.SwitchAnimation(81, Animation.CancelOptions.IgnoreIfPlaying);
             if (master.xLevelMaster.xCurrentLevel.enZone == Level.ZoneEnum.EvergrindArena01 && master.xNetworkInfo.enCurrentRole != NetworkHelperInterface.NetworkRole.Client)
             {
                 if (this.xFishingPlayer.xEntity.iPlayerNumberOnServer == 1)
                 {
                     master._Trigger_HandleTriggerEvent(FlagCodex.FlagID._MainStory_Trials_Player02DugUp, 0);
                 }
                 else if (this.xFishingPlayer.xEntity.iPlayerNumberOnServer == 2)
                 {
                     master._Trigger_HandleTriggerEvent(FlagCodex.FlagID._MainStory_Trials_Player03DugUp, 0);
                 }
                 else if (this.xFishingPlayer.xEntity.iPlayerNumberOnServer == 3)
                 {
                     master._Trigger_HandleTriggerEvent(FlagCodex.FlagID._MainStory_Trials_Player04DugUp, 0);
                 }
             }
             this.iPhase = 8;
             this.iCounter = 0;
         }
         else if (byType == 100)
         {
             this.bInFishing = false;
             if (this.xFishingPlayer.xEntity.xRenderComponent.iActiveAnimation == 81)
             {
                 this.xFishingPlayer.xEntity.xRenderComponent.SwitchAnimation(82, Animation.CancelOptions.IgnoreIfPlaying);
                 this.xFishingPlayer.xEntity.xRenderComponent.byWantedNextDirection = this.byDirToLook;
             }
             else if (this.xFishingPlayer.xEntity.xRenderComponent.iActiveAnimation <= 82)
             {
                 this.xFishingPlayer.xEntity.xRenderComponent.SwitchAnimation((ushort)this.xFishingPlayer.xEntity.byAnimationDirection, Animation.CancelOptions.IgnoreIfPlaying);
             }
             else if (Utility.IsWithinRange((int)this.xFishingPlayer.xEntity.xRenderComponent.iActiveAnimation, 2024, 2031))
             {
                 this.xFishingPlayer.xEntity.xRenderComponent.SwitchAnimation((ushort)(2008 + (int)this.xFishingPlayer.xEntity.byAnimationDirection), Animation.CancelOptions.IgnoreIfPlaying);
             }
             else
             {
                 this.xFishingPlayer.xEntity.xRenderComponent.SwitchAnimation((ushort)(2008 + (int)this.xFishingPlayer.xEntity.byAnimationDirection), Animation.CancelOptions.IgnoreIfPlaying);
             }
             this.ExitGame();
         }
         if (byType > 0)
         {
             base.SendMessage(om);
             return;
         }
     }
     else
     {
         byte byType2 = msg.ReadByte();
         if (byType2 == 0)
         {
             long iPlayerID = msg.ReadInt64();
             if (!Program.GetTheGame().dixPlayers.ContainsKey(iPlayerID))
             {
                 return;
             }
             this.EnterGame(Program.GetTheGame().dixPlayers[iPlayerID]);
         }
         if (this.xFishingPlayer == Program.GetTheGame().xLocalPlayer)
         {
             return;
         }
         if (byType2 == 1)
         {
             if (this.xFishingPlayer == null)
             {
                 return;
             }
             this.xFishingPlayer.xEntity.xRenderComponent.SwitchAnimation((ushort)(2012 + (int)this.xFishingPlayer.xEntity.byAnimationDirection), Animation.CancelOptions.IgnoreIfPlaying);
             (this.xFloatEffect.xRenderComponent as AnimatedRenderComponent).SwitchAnimation(3, Animation.CancelOptions.IgnoreIfPlaying);
             this.iCounter = 0;
             this.iPhase = 4;
             return;
         }
         else if (byType2 == 2)
         {
             if (this.xFishingPlayer == null)
             {
                 return;
             }
             this.enCurrentFish = (ItemCodex.ItemTypes)msg.ReadInt32();
             this.SetDifficulty();
             this.iPhase = 5;
             this.iCounter = 0;
             this.xFishingPlayer.xEntity.xRenderComponent.SwitchAnimation((ushort)(2020 + (int)this.xFishingPlayer.xEntity.byAnimationDirection), Animation.CancelOptions.IgnoreIfPlaying);
             return;
         }
         else if (byType2 == 3)
         {
             if (this.xFishingPlayer == null)
             {
                 return;
             }
             this.iPhase = 7;
             this.iCounter = 0;
             this.xFishingPlayer.xEntity.xRenderComponent.SwitchAnimation((ushort)(2036 + (int)this.xFishingPlayer.xEntity.byAnimationDirection), Animation.CancelOptions.IgnoreIfPlaying);
             this.xFloatEffect.bToBeDestroyed = true;
             return;
         }
         else if (byType2 == 4)
         {
             if (this.xFishingPlayer == null)
             {
                 return;
             }
             ItemCodex.ItemTypes enMos2 = (ItemCodex.ItemTypes)msg.ReadInt32();
             NoticeImage banan2 = Program.GetTheGame()._EffectMaster_AddEffect(new NoticeImage(this.xFishingPlayer.xEntity.xRenderComponent, enMos2, NoticeImage.ItemNoticeType.Immediate)) as NoticeImage;
             banan2.xRenderComponent.fVirtualHeight = this.xFishingPlayer.xEntity.xRenderComponent.fVirtualHeight;
             banan2.xRenderComponent.fAlpha = 0f;
             return;
         }
         else if (byType2 == 100)
         {
             this.bInFishing = false;
             if (this.xFishingPlayer == null)
             {
                 return;
             }
             this.ExitGame();
         }
     }
 }
Beispiel #20
0
 public void SetItemAmount(ItemCodex.ItemTypes type, int amount)
 => _originalObject.SetItemAmount(type, amount);
Beispiel #21
0
 public void AddItem(ItemCodex.ItemTypes type, int amount)
 => _originalObject.AddItem(type, amount);
Beispiel #22
0
		public GiveItemEvent(ItemCodex.ItemTypes enItem)
		{
			this.enItem = enItem;
		}
Beispiel #23
0
 public EquipmentInfo(string p_sResourceName, ItemCodex.ItemTypes p_enItemType)
 {
     this.sResourceName = p_sResourceName;
     this.enItemType = p_enItemType;
     this.xItemDescription = ItemCodex.GetItemDescription(p_enItemType);
 }
Beispiel #24
0
 public PreSeededLoot(ushort iID, ItemCodex.ItemTypes enItem, Vector2 v2Direction)
 {
     this.iID = iID;
     this.v2Direction = v2Direction;
     this.enItem = enItem;
 }
Beispiel #25
0
		public DropChance(int p_iChance, ItemCodex.ItemTypes p_enItemToDrop)
		{
			this.iChance = p_iChance;
			this.enItemToDrop = p_enItemToDrop;
		}
Beispiel #26
0
 public TownUpgradeReward(ItemCodex.ItemTypes enUpgrade)
 {
     this.enTrueReward = enUpgrade;
 }
Beispiel #27
0
 public ModItemData(ItemCodex.ItemTypes enType)
 {
     this.enType = enType;
 }
Beispiel #28
0
		public HairdoDisplay(ItemCodex.ItemTypes enType, Texture2D txDisplayIcon, int iCost)
		{
			this.enType = enType;
			this.txDisplayImage = txDisplayIcon;
			this.iCost = iCost;
		}
		public ItemGetAnimationEvent(ItemCodex.ItemTypes enItemType, NPCCodex.NPCTypes enID)
		{
			this.enItemType = enItemType;
			this.enEntityEnum = enID;
		}
Beispiel #30
0
        // ItemTypes extensions

        public static bool IsSoGItem(this ItemCodex.ItemTypes enType)
        {
            return(Enum.IsDefined(typeof(ItemCodex.ItemTypes), enType));
        }
Beispiel #31
0
 /// <summary> Adds an item that can be dropped when the enemy is killed. </summary>
 /// <remarks> This method can be called multiple times to have multiple item drops of the same type, but with different drop chance or roll count. </remarks>
 /// <param name="fDropChance"> Chance for an item to drop. 100.0f translates to 100% chance, and 0f to 0% respectively. </param>
 /// <param name="iRolls"> Number of items to roll for. Setting this to 4 would mean up to 4 enType items can drop, each with fDropChance chance. </param>
 public static void AddLoot(this EnemyDescription xDesc, ItemCodex.ItemTypes enType, float fDropChance = 100.0f, int iRolls = 1)
 {
     xDesc.lxLootTable.Add(new DropChance((int)(fDropChance * 1000.0f), enType, iRolls));
 }
Beispiel #32
0
 public static bool IsModItem(this ItemCodex.ItemTypes enType)
 {
     return(enType >= ModLibrary.ItemTypesStart && enType < ModLibrary.ItemTypesNext);
 }
Beispiel #33
0
 public override void Update()
 {
     AnimatedRenderComponent xAsd = this.xEmote.xRenderComponent as AnimatedRenderComponent;
     if (this.xFishingPlayer != null && this.xFishingPlayer != Program.GetTheGame().xLocalPlayer)
     {
         this.WatcherUpdate();
         if (xAsd.iActiveAnimation == 1)
         {
             (this.xEmote.xRenderComponent as AnimatedRenderComponent).SwitchAnimation(2, Animation.CancelOptions.IgnoreIfPlaying);
         }
         return;
     }
     PlayerView xLocal = Program.GetTheGame().xLocalPlayer;
     if (xLocal.xInventory.GetAmount(ItemCodex.ItemTypes._KeyItem_FishingRod) == 0 && Program.GetTheGame().xLevelMaster.xCurrentLevel.enZone != Level.ZoneEnum.EvergrindArena01)
     {
         return;
     }
     if (this.recCollider.Contains(Utility.Vector2ToPoint(xLocal.xEntity.xTransform.v2Pos)) && this.byDirToLook == xLocal.xEntity.byAnimationDirection)
     {
         if (!this.bIsOnThisPlate)
         {
             if (xAsd.iActiveAnimation == 3)
             {
                 xAsd.SwitchAnimation(0, Animation.CancelOptions.IgnoreIfPlaying);
             }
             else if (xAsd.iActiveAnimation != 0)
             {
                 xAsd.SwitchAnimation(1, Animation.CancelOptions.IgnoreIfPlaying);
             }
         }
         this.bIsOnThisPlate = true;
         xLocal.xEntity.xOnFishplate = this;
     }
     else if (this.bIsOnThisPlate)
     {
         this.bIsOnThisPlate = false;
         xLocal.xEntity.xOnFishplate = null;
     }
     if (!this.bIsOnThisPlate && xAsd.iActiveAnimation == 1)
     {
         (this.xEmote.xRenderComponent as AnimatedRenderComponent).SwitchAnimation(2, Animation.CancelOptions.IgnoreIfPlaying);
     }
     if (this.bInFishing)
     {
         if (this.iPhase == 1)
         {
             this.iCounter++;
             if (this.iCounter == 24)
             {
                 (this.xFloatEffect.xRenderComponent as AnimatedRenderComponent).SwitchAnimation(0, Animation.CancelOptions.IgnoreIfPlaying);
                 this.xFloatTransform.v2Pos = this.xFishingPlayer.xEntity.xTransform.v2Pos + new Vector2(2f, -34f);
                 this.xFloatTransform.v2Pos = Utility.Vector2_ToInts(this.xFloatTransform.v2Pos);
                 this.iPhase = 2;
                 this.iCounter = 0;
                 if (this.xFishingPlayer.xEntity.byAnimationDirection == 3)
                 {
                     this.v2ThrowDir = new Vector2(-4f, -1.5f);
                 }
                 else if (this.xFishingPlayer.xEntity.byAnimationDirection == 0)
                 {
                     this.v2ThrowDir = new Vector2(0f, -4f);
                 }
                 else if (this.xFishingPlayer.xEntity.byAnimationDirection == 1)
                 {
                     this.v2ThrowDir = new Vector2(4f, -1.5f);
                 }
                 else if (this.xFishingPlayer.xEntity.byAnimationDirection == 2)
                 {
                     this.xFloatTransform.v2Pos = this.xFishingPlayer.xEntity.xTransform.v2Pos + new Vector2(5f, -33f);
                     this.xFloatTransform.v2Pos = Utility.Vector2_ToInts(this.xFloatTransform.v2Pos);
                     Program.GetTheGame().xRenderMaster.UnregisterRenderComponenent(this.xFloatEffect.xRenderComponent);
                     Program.GetTheGame().xRenderMaster.RegisterAboveSorted(this.xFloatEffect.xRenderComponent);
                     this.v2ThrowDir = new Vector2(-0.1f, 0.5f);
                 }
             }
         }
         else if (this.iPhase == 2)
         {
             this.iCounter++;
             if (this.xFishingPlayer.xEntity.byAnimationDirection == 3)
             {
                 this.v2ThrowDir.X = this.v2ThrowDir.X * 0.98f;
                 if (this.iCounter > 30)
                 {
                     this.v2ThrowDir.Y = this.v2ThrowDir.Y + 0.065f;
                 }
                 this.v2ThrowDir.Y = this.v2ThrowDir.Y + (0.035f + 0.001f * (float)this.iCounter);
                 this.xFloatTransform.v2Pos += this.v2ThrowDir;
             }
             else if (this.xFishingPlayer.xEntity.byAnimationDirection == 0)
             {
                 this.v2ThrowDir.Y = this.v2ThrowDir.Y * 0.98f;
                 if (this.iCounter > 30)
                 {
                     this.v2ThrowDir.Y = this.v2ThrowDir.Y + 0.065f;
                 }
                 this.v2ThrowDir.Y = this.v2ThrowDir.Y + (0.035f + 0.001f * (float)this.iCounter);
                 this.xFloatTransform.v2Pos += this.v2ThrowDir;
             }
             else if (this.xFishingPlayer.xEntity.byAnimationDirection == 1)
             {
                 this.v2ThrowDir.X = this.v2ThrowDir.X * 0.98f;
                 if (this.iCounter > 30)
                 {
                     this.v2ThrowDir.Y = this.v2ThrowDir.Y + 0.065f;
                 }
                 this.v2ThrowDir.Y = this.v2ThrowDir.Y + (0.035f + 0.001f * (float)this.iCounter);
                 this.xFloatTransform.v2Pos += this.v2ThrowDir;
             }
             else if (this.xFishingPlayer.xEntity.byAnimationDirection == 2)
             {
                 this.v2ThrowDir.Y = this.v2ThrowDir.Y * 0.98f;
                 if (this.iCounter == 50)
                 {
                     Program.GetTheGame().xRenderMaster.UnregisterRenderComponenent(this.xFloatEffect.xRenderComponent);
                     Program.GetTheGame().xRenderMaster.RegisterBelowSorted(this.xFloatEffect.xRenderComponent);
                 }
                 if (this.iCounter > 30)
                 {
                     this.v2ThrowDir.Y = this.v2ThrowDir.Y + 0.065f;
                 }
                 this.v2ThrowDir.Y = this.v2ThrowDir.Y + (0.035f + 0.001f * (float)this.iCounter);
                 this.xFloatTransform.v2Pos += this.v2ThrowDir;
             }
             if (this.iCounter == 60)
             {
                 this.iCounter = 0;
                 this.iPhase = 3;
                 (this.xFloatEffect.xRenderComponent as AnimatedRenderComponent).SwitchAnimation(2, Animation.CancelOptions.IgnoreIfPlaying);
                 this.iAmbientFloatCounter = Program.GetTheGame().randomInVisual.Next(200);
                 Program.game.xSoundSystem.PlayCue("Fishing_FloatHitsWater", this.xFloatTransform.v2Pos);
             }
         }
         else if (this.iPhase == 3)
         {
             this.iCounter++;
             if (this.iCounter > 50 && this.iCounter < this.iNappAt - 50 && Program.GetTheGame().randomInVisual.Next(100) == 0 && (this.xFloatEffect.xRenderComponent as AnimatedRenderComponent).iActiveAnimation == 1)
             {
                 (this.xFloatEffect.xRenderComponent as AnimatedRenderComponent).SwitchAnimation(2, Animation.CancelOptions.IgnoreIfPlaying);
                 this.xFishingPlayer.xEntity.xRenderComponent.SwitchAnimation((ushort)(2032 + (int)this.xFishingPlayer.xEntity.byAnimationDirection), Animation.CancelOptions.IgnoreIfPlaying);
             }
             if (this.iCounter == this.iNappAt)
             {
                 this.iCounter = 0;
                 this.iPhase = 4;
                 this.xFishingPlayer.xEntity.xRenderComponent.SwitchAnimation((ushort)(2012 + (int)this.xFishingPlayer.xEntity.byAnimationDirection), Animation.CancelOptions.IgnoreIfPlaying);
                 (this.xFloatEffect.xRenderComponent as AnimatedRenderComponent).SwitchAnimation(3, Animation.CancelOptions.IgnoreIfPlaying);
                 int iRoll = Program.GetTheGame().randomInLogic.Next(this.iTotalDropChance);
                 int iCount = 0;
                 for (int i = 0; i < this.axFishProbs.Length; i++)
                 {
                     iCount += this.axFishProbs[i].iChance;
                     if (iRoll < iCount)
                     {
                         this.enCurrentFish = this.axFishProbs[i].enItemToDrop;
                         this.enCurrentFish_DisplayIcon = this.axFishProbs[i].enToDisplay;
                         break;
                     }
                 }
                 this.SetDifficulty();
                 SortedAnimated ost = (SortedAnimated)Program.GetTheGame()._EffectMaster_AddEffect(new SortedAnimated(new Vector2(-1000f, -1000f), SortedAnimated.SortedAnimatedEffects._GUIEffects_Emote_Exclamation));
                 ost.xRenderComponent.xTransform = Program.GetTheGame().xLocalPlayer.xEntity.xTransform;
                 ost.xRenderComponent.v2OffsetRenderPos = new Vector2(4f, -30f);
                 if (Program.GetTheGame().xNetworkInfo.enCurrentRole != NetworkHelperInterface.NetworkRole.LocalOnly)
                 {
                     NetOutgoingMessage om = base.CreateMessage();
                     om.Write(1);
                     base.SendMessage(om);
                 }
             }
             this.iAmbientFloatCounter++;
             float fMoveMod = 0.5f;
             float fTimeMod = 1f;
             if ((float)this.iAmbientFloatCounter < 70f * fTimeMod)
             {
                 TransformComponent expr_86D_cp_0 = this.xFloatTransform;
                 expr_86D_cp_0.v2Pos.X = expr_86D_cp_0.v2Pos.X - 0.05f * fMoveMod;
             }
             else if ((float)this.iAmbientFloatCounter < 120f * fTimeMod)
             {
                 TransformComponent expr_8A2_cp_0 = this.xFloatTransform;
                 expr_8A2_cp_0.v2Pos.X = expr_8A2_cp_0.v2Pos.X - 0.02f * fMoveMod;
                 TransformComponent expr_8C1_cp_0 = this.xFloatTransform;
                 expr_8C1_cp_0.v2Pos.Y = expr_8C1_cp_0.v2Pos.Y + 0.02f * fMoveMod;
             }
             else if ((float)this.iAmbientFloatCounter < 190f * fTimeMod)
             {
                 TransformComponent expr_8F6_cp_0 = this.xFloatTransform;
                 expr_8F6_cp_0.v2Pos.X = expr_8F6_cp_0.v2Pos.X + 0.05f * fMoveMod;
             }
             else if ((float)this.iAmbientFloatCounter < 240f * fTimeMod)
             {
                 TransformComponent expr_92B_cp_0 = this.xFloatTransform;
                 expr_92B_cp_0.v2Pos.X = expr_92B_cp_0.v2Pos.X + 0.02f * fMoveMod;
                 TransformComponent expr_94A_cp_0 = this.xFloatTransform;
                 expr_94A_cp_0.v2Pos.Y = expr_94A_cp_0.v2Pos.Y - 0.02f * fMoveMod;
             }
             else
             {
                 this.iAmbientFloatCounter = 0;
             }
         }
         else if (this.iPhase == 4)
         {
             this.iCounter++;
             if (this.iCounter < 20)
             {
                 TransformComponent expr_99E_cp_0 = this.xFloatTransform;
                 expr_99E_cp_0.v2Pos.Y = expr_99E_cp_0.v2Pos.Y + 0.25f;
                 if (this.iCounter >= 8)
                 {
                     TransformComponent expr_9C3_cp_0 = this.xFloatTransform;
                     expr_9C3_cp_0.v2Pos.X = expr_9C3_cp_0.v2Pos.X + 0.25f;
                 }
             }
             if (this.iCounter == 20 + this.iDropFishAt)
             {
                 SortedAnimated ost2 = (SortedAnimated)Program.GetTheGame()._EffectMaster_AddEffect(new SortedAnimated(new Vector2(-1000f, -1000f), SortedAnimated.SortedAnimatedEffects._GUIEffects_Emote_Angry));
                 ost2.xRenderComponent.xTransform = Program.GetTheGame().xLocalPlayer.xEntity.xTransform;
                 ost2.xRenderComponent.v2OffsetRenderPos = new Vector2(0f, -30f);
                 this.EndFishing(true);
                 Program.game.xSoundSystem.PlayInterfaceCue("Character_Deleted");
             }
         }
         else if (this.iPhase == 5)
         {
             this.iCounter++;
             this.iNextMovespeedChange--;
             if (this.iNextMovespeedChange <= 0)
             {
                 this.fMoveSpeed = (float)Program.GetTheGame().randomInLogic.NextDouble() * 2f - 1f;
                 while (this.fMoveSpeed > -0.5f && this.fMoveSpeed < 0.5f)
                 {
                     this.fMoveSpeed *= 2f;
                 }
                 this.fMoveSpeed /= 2f;
                 if ((this.fFishPos > 100f && this.fMoveSpeed > 0f) || (this.fFishPos < 30f && this.fMoveSpeed < 0f))
                 {
                     this.fMoveSpeed *= -1f;
                 }
                 this.iNextMovespeedChange = Program.GetTheGame().randomInLogic.Next(40) + 40;
             }
             this.fFishPos += this.fMoveSpeed;
             if (this.fFishPos < 0f || this.fFishPos > 124f)
             {
                 this.fMoveSpeed *= -1f;
             }
             if (this.iCounter % 10 == 0)
             {
                 Program.GetTheGame()._EffectMaster_AddEffect(new SortedAnimated(this.xFloatTransform.v2Pos + new Vector2(2f, -2f), SortedAnimated.SortedAnimatedEffects.WaterLeafRings));
             }
             if (this.xFishingPlayer.xEntity.byAnimationDirection == 3)
             {
                 TransformComponent expr_BFF_cp_0 = this.xFloatTransform;
                 expr_BFF_cp_0.v2Pos.X = expr_BFF_cp_0.v2Pos.X + 0.25f;
             }
             else if (this.xFishingPlayer.xEntity.byAnimationDirection == 1)
             {
                 TransformComponent expr_C30_cp_0 = this.xFloatTransform;
                 expr_C30_cp_0.v2Pos.X = expr_C30_cp_0.v2Pos.X - 0.25f;
             }
             else if (this.xFishingPlayer.xEntity.byAnimationDirection == 0)
             {
                 TransformComponent expr_C60_cp_0 = this.xFloatTransform;
                 expr_C60_cp_0.v2Pos.Y = expr_C60_cp_0.v2Pos.Y + 0.15f;
             }
             else
             {
                 TransformComponent expr_C7E_cp_0 = this.xFloatTransform;
                 expr_C7E_cp_0.v2Pos.Y = expr_C7E_cp_0.v2Pos.Y - 0.13f;
             }
             float fDistance = 35f;
             if (this.xFishingPlayer.xEntity.byAnimationDirection == 0)
             {
                 fDistance = 20f;
             }
             if (Vector2.Distance(this.xFloatTransform.v2Pos, this.xFishingPlayer.xEntity.xTransform.v2Pos) < fDistance)
             {
                 this.iPhase = 7;
                 this.iCounter = 0;
                 this.xFloatEffect.bToBeDestroyed = true;
                 this.xFishingPlayer.xEntity.xRenderComponent.SwitchAnimation((ushort)(2036 + (int)this.xFishingPlayer.xEntity.byAnimationDirection), Animation.CancelOptions.IgnoreIfPlaying);
                 if (Program.GetTheGame().xNetworkInfo.enCurrentRole != NetworkHelperInterface.NetworkRole.LocalOnly)
                 {
                     NetOutgoingMessage om2 = base.CreateMessage();
                     om2.Write(3);
                     base.SendMessage(om2);
                 }
                 return;
             }
             if (this.fFishPos < (float)(this.iGreenZoneXPos - 15) || this.fFishPos > (float)(this.iGreenZoneXPos + this.iGreenZoneWidth + 3))
             {
                 SortedAnimated ost3 = (SortedAnimated)Program.GetTheGame()._EffectMaster_AddEffect(new SortedAnimated(new Vector2(-1000f, -1000f), SortedAnimated.SortedAnimatedEffects._GUIEffects_Emote_Angry));
                 ost3.xRenderComponent.xTransform = Program.GetTheGame().xLocalPlayer.xEntity.xTransform;
                 ost3.xRenderComponent.v2OffsetRenderPos = new Vector2(0f, -30f);
                 this.EndFishing(true);
                 Program.game.xSoundSystem.PlayInterfaceCue("Character_Deleted");
                 return;
             }
             if (this.iCounter % 300 == 0)
             {
                 this.xFishingPlayer.xEntity.xRenderComponent.SwitchAnimation((ushort)(2028 + (int)this.xFishingPlayer.xEntity.byAnimationDirection), Animation.CancelOptions.IgnoreIfPlaying);
             }
         }
         else if (this.iPhase == 6)
         {
             this.iCounter++;
             if (this.iCounter > 180)
             {
                 this.EndFishing(true);
             }
         }
         else if (this.iPhase == 7)
         {
             this.iCounter++;
             if (this.iCounter == 24)
             {
                 Program.GetTheGame()._EffectMaster_AddEffect(new SortedAnimated(this.xFloatTransform.v2Pos + new Vector2(2f, -2f), this.enSplashEffect));
             }
             if (this.xFishingPlayer.xEntity.xRenderComponent.iActiveAnimation < 4 || this.iCounter > 120)
             {
                 Game1 master = Program.GetTheGame();
                 master._Item_PickUp(this.enCurrentFish, this.xFishingPlayer);
                 if (this.FishCaughtEvent != null)
                 {
                     this.FishCaughtEvent(this, this.e);
                 }
                 this.xFishingPlayer.xJournalInfo.henUniqueFishies.Add(this.enCurrentFish);
                 master.xGameSessionData.henActiveFlags.Add(FlagCodex.FlagID._BagTips_CaughtAFish);
                 master._Trophies_CheckTrophy(Trophies.TrophyTypes.Fishing_Evergrind);
                 master._Trophies_CheckTrophy(Trophies.TrophyTypes.Fishing_Hallow);
                 master._Trophies_CheckTrophy(Trophies.TrophyTypes.Fishing_Pillars);
                 NoticeImage banan = master._EffectMaster_AddEffect(new NoticeImage(this.xFishingPlayer.xEntity.xRenderComponent, this.enCurrentFish_DisplayIcon, NoticeImage.ItemNoticeType.Immediate)) as NoticeImage;
                 banan.xRenderComponent.fVirtualHeight = this.xFishingPlayer.xEntity.xRenderComponent.fVirtualHeight;
                 banan.xRenderComponent.fAlpha = 0f;
                 this.xFishingPlayer.xEntity.xRenderComponent.SwitchAnimation(81, Animation.CancelOptions.IgnoreIfPlaying);
                 this.iPhase = 8;
                 this.iCounter = 0;
                 if (master.xNetworkInfo.enCurrentRole != NetworkHelperInterface.NetworkRole.LocalOnly)
                 {
                     NetOutgoingMessage om3 = base.CreateMessage();
                     om3.Write(4);
                     om3.Write((int)this.enCurrentFish_DisplayIcon);
                     base.SendMessage(om3);
                 }
                 if (master.xLevelMaster.xCurrentLevel.enZone == Level.ZoneEnum.EvergrindArena01 && master.xNetworkInfo.enCurrentRole != NetworkHelperInterface.NetworkRole.Client)
                 {
                     master._Trigger_HandleTriggerEvent(FlagCodex.FlagID._MainStory_Trials_Player01DugUp, 0);
                 }
             }
         }
         else if (this.iPhase == 8)
         {
             this.iCounter++;
             if (this.iCounter == 120)
             {
                 this.xFishingPlayer.xEntity.xRenderComponent.SwitchAnimation(82, Animation.CancelOptions.IgnoreIfPlaying);
                 this.xFishingPlayer.xEntity.xRenderComponent.byWantedNextDirection = this.byDirToLook;
                 this.EndFishing(false);
             }
         }
         if (this.xFishingPlayer == Program.GetTheGame().xLocalPlayer && Program.GetTheGame().xStolenInput != this)
         {
             this.ExitGame();
         }
     }
 }
Beispiel #34
0
 public ItemReward(ItemCodex.ItemTypes enType)
 {
     this.enType = enType;
     this.enRewardType = Trophies.TrophyReward.RewardType.Item;
 }
Beispiel #35
0
 public int GetItemAmount(ItemCodex.ItemTypes type)
 => _originalObject.GetAmount(type);
Beispiel #36
0
 public TransferrableItemReward(ItemCodex.ItemTypes p_enType, ushort p_iAmount)
 {
     this.enItemType = p_enType;
     this.iAmount = p_iAmount;
     this.enRewardType = Trophies.TrophyReward.RewardType.Other;
 }
Beispiel #37
0
 public RewardListEntry(int iRequiredPoints, ItemCodex.ItemTypes enItemType, string sDialogueName)
 {
     this.iRequiredPoints = iRequiredPoints;
     this.enItemType = enItemType;
     this.sDialogueName = sDialogueName;
 }
		public HaddockFishItemgetDelay(PlayerView xView, ItemCodex.ItemTypes enType)
		{
			this.xView = xView;
			this.enType = enType;
		}
Beispiel #39
0
 public FishChance(int p_iChance, ItemCodex.ItemTypes p_enItemToDrop, ItemCodex.ItemTypes p_enItemToDisplay)
     : base(p_iChance, p_enItemToDrop)
 {
     this.enToDisplay = p_enItemToDisplay;
 }
Beispiel #40
0
 public virtual void OnItemUse(ItemCodex.ItemTypes enItem, PlayerView xView, ref bool bSend)
 {
     return;
 }
Beispiel #41
0
 public RewardAppear(ItemCodex.ItemTypes enRewardsOnGameOver)
 {
     this.enRewardsOnGameOver = enRewardsOnGameOver;
     this.xReward = ItemCodex.GetItemDescription(enRewardsOnGameOver);
 }
Beispiel #42
0
 public ItemSlot(ItemCodex.ItemTypes enItemType)
 {
     this.enType = Equipment.QuickSlot.Type.Item;
     this.enItemType = enItemType;
     this.xDescription = ItemCodex.GetItemDescription(enItemType);
 }