public NoticeImage(Vector2 v2Origin, ItemCodex.ItemTypes enItemType, NoticeImage.ItemNoticeType enNoticeType) { this.enItemNoticeType = enNoticeType; if (enNoticeType == NoticeImage.ItemNoticeType.TreasureChest) { StaticRenderComponent asd = new StaticRenderComponent(); this.xTransform = new TransformComponent(v2Origin); asd.xTransform = this.xTransform; asd.txTexture = ItemCodex.GetItemDescription(enItemType).txDisplayImage; asd.v2Offset = Utility.PointToVector2(asd.txTexture); asd.fScale = 1f; asd.v2OffsetRenderPos = new Vector2(0f, -18f); this.iStopFrame = 40; this.iFadeFrame = 70; this.iFinishFrame = 80; this.fMoveSpeed = -0.35f; this.xRenderComponent = asd; Program.GetTheGame().xRenderMaster.RegisterSortedRenderComponent(this.xRenderComponent); return; } if (enNoticeType == NoticeImage.ItemNoticeType.Digging) { StaticRenderComponent asd2 = new StaticRenderComponent(); this.xTransform = new TransformComponent(v2Origin); asd2.xTransform = this.xTransform; asd2.txTexture = ItemCodex.GetItemDescription(enItemType).txDisplayImage; asd2.v2Offset = Utility.PointToVector2(asd2.txTexture); asd2.fScale = 1f; asd2.v2OffsetRenderPos = new Vector2(0f, -10f); this.iFadeInFrame = 40; this.iFadeInFinishFrame = 50; this.iStopFrame = 50; this.iFadeFrame = 100; this.iFinishFrame = 110; this.fMoveSpeed = -0.35f; this.xRenderComponent = asd2; Program.GetTheGame().xRenderMaster.RegisterAboveSorted(this.xRenderComponent); return; } if (enNoticeType == NoticeImage.ItemNoticeType.Immediate) { StaticRenderComponent asd3 = new StaticRenderComponent(); this.xTransform = new TransformComponent(v2Origin); asd3.xTransform = this.xTransform; asd3.txTexture = ItemCodex.GetItemDescription(enItemType).txDisplayImage; asd3.v2Offset = Utility.PointToVector2(asd3.txTexture); asd3.fScale = 1f; asd3.v2OffsetRenderPos = new Vector2(0f, -20f); this.iFrameCount = 30; this.iFadeInFrame = 40; this.iFadeInFinishFrame = 50; this.iStopFrame = 50; this.iFadeFrame = 100; this.iFinishFrame = 110; this.fMoveSpeed = -0.35f; this.xRenderComponent = asd3; Program.GetTheGame().xRenderMaster.RegisterAboveSorted(this.xRenderComponent); } }
public HatInfo.VisualSet GetCurrentSet(ItemCodex.ItemTypes enHairdo) { if (!this.denxAlternateVisualSets.ContainsKey(enHairdo)) { return this.xDefaultSet; } return this.denxAlternateVisualSets[enHairdo]; }
public int GetAmount(ItemCodex.ItemTypes enType) { if (this.denxInventory.ContainsKey(enType)) { return this.denxInventory[enType].iAmount; } return 0; }
public void EmptyItem(ItemCodex.ItemTypes enType) { if (!this.denxInventory.ContainsKey(enType)) { return; } this.denxInventory[enType].iAmount = 0; }
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; }
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 void AddItem(ItemCodex.ItemTypes enType, int iAmount) { if (this.denxInventory.ContainsKey(enType)) { this.denxInventory[enType].iAmount += iAmount; this.denxInventory[enType].iPickupNumber = Inventory.DisplayItem.PickupNumberPool++; return; } this.denxInventory[enType] = new Inventory.DisplayItem(iAmount, Inventory.DisplayItem.PickupNumberPool++, ItemCodex.GetItemDescription(enType)); }
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; }
public void BeginLure(ItemCodex.ItemTypes enItemType) { if (Program.GetTheGame().xNetworkInfo.enCurrentRole != NetworkHelperInterface.NetworkRole.Client) { Program.GetTheGame()._Enemies_CallFromFeedingPlayer(this.xView, enItemType); Program.GetTheGame()._Item_CreateItemGetWatcher(this.xView, enItemType, 180, 1, true); return; } this.ClientRequestEntering(enItemType); }
public WeaponContentManager this[ItemCodex.ItemTypes en] { get { if (this.denxWeaponContentManagers.ContainsKey(en)) { return this.denxWeaponContentManagers[en]; } return null; } }
public BowInfo(string p_sResourceName, ItemCodex.ItemTypes p_enItemType, WeaponInfo.WeaponCategory p_enWeaponCategory) : base(p_sResourceName, p_enItemType, p_enWeaponCategory, "blueish") { if (p_enItemType == ItemCodex.ItemTypes._Bow_WoodenBow) { this.sResourceName = "WoodenBow"; this.av2RenderOffsets[0] = new Vector2(4f, 3f); this.av2RenderOffsets[1] = new Vector2(4f, 3f); this.av2RenderOffsets[2] = new Vector2(6f, 4f); this.av2RenderOffsets[3] = new Vector2(8f, 5f); } }
public void ClientRequestEntering(ItemCodex.ItemTypes enItemType) { if (Program.GetTheGame().xLocalPlayer != this.xView || Program.GetTheGame().xNetworkInfo.enCurrentRole != NetworkHelperInterface.NetworkRole.Client) { return; } NetOutgoingMessage om = this.CreateMessage(); om.Write(0); om.Write((int)enItemType); this.SendMessage(om); }
public static List<CraftSystem.DisplayRecipe> FindRecipesByIngredient(ItemCodex.ItemTypes enType, PlayerView xLocalPlayer) { List<CraftSystem.DisplayRecipe> lxRet = new List<CraftSystem.DisplayRecipe>(); foreach (KeyValuePair<ItemCodex.ItemTypes, CraftSystem.CraftingRecipe> kvp in CraftSystem.RecipeCollection) { if (kvp.Value.henIngredientIndex.Contains(enType)) { lxRet.Add(CraftSystem.CraftToDisplayRecipe(kvp.Value, xLocalPlayer)); } } return lxRet; }
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; }
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 void RemoveItem(ItemCodex.ItemTypes enType, int iAmount) { if (!this.denxInventory.ContainsKey(enType)) { return; } this.denxInventory[enType].iAmount -= iAmount; if (this.denxInventory[enType].iAmount <= 0) { if (this.denxInventory[enType].iAmount < 0) { Program.GetTheGame().Log("Less than 0 items!"); } this.denxInventory[enType].iAmount = 0; } }
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; }
public static Dictionary<ushort, string> GetLoaderTemplate(ItemCodex.ItemTypes enType) { Dictionary<ushort, string> ret = new Dictionary<ushort, string>(); WeaponInfo desc = WeaponCodex.GetWeaponInfo(enType); if (desc.enWeaponCategory == WeaponInfo.WeaponCategory.OneHanded) { WeaponAssetLoader.OneHandedDictionaryFill(ret, desc.sResourceName); } else if (desc.enWeaponCategory == WeaponInfo.WeaponCategory.TwoHanded) { WeaponAssetLoader.TwoHandedDictionaryFill(ret, desc.sResourceName); } else if (desc.enWeaponCategory == WeaponInfo.WeaponCategory.Bow) { WeaponAssetLoader.BowDictionaryFill(ret, desc.sResourceName); } return ret; }
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; }
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 WeaponInfo(string p_sResourceName, ItemCodex.ItemTypes p_enItemType, WeaponInfo.WeaponCategory p_enWeaponCategory, string sPalette = "blueish") : base(p_sResourceName, p_enItemType) { PlayerPalette.PaletteData x = new PlayerPalette.PaletteData("Standard", Program.game.Content.Load<Texture2D>("Items/WeaponPalettes/" + sPalette)); this.av4WeaponPalette = x.av4Palette; this.enWeaponCategory = p_enWeaponCategory; if (this.enWeaponCategory == WeaponInfo.WeaponCategory.OneHanded) { this.sWeaponCategory = "OneHanded"; return; } if (this.enWeaponCategory == WeaponInfo.WeaponCategory.TwoHanded) { this.sWeaponCategory = "TwoHanded"; return; } if (this.enWeaponCategory == WeaponInfo.WeaponCategory.Bow) { this.sWeaponCategory = "Bow"; } }
public NoticeImage(PlayerRenderComponent xRC, ItemCodex.ItemTypes enItemType, NoticeImage.ItemNoticeType enNoticeType) { if (enNoticeType == NoticeImage.ItemNoticeType.Immediate) { this.xPRC = xRC; StaticRenderComponent asd = new StaticRenderComponent(); this.xTransform = new TransformComponent(xRC.xTransform.v2Pos); asd.xTransform = this.xTransform; asd.txTexture = ItemCodex.GetItemDescription(enItemType).txDisplayImage; asd.v2Offset = Utility.PointToVector2(asd.txTexture); asd.fScale = 1f; asd.v2OffsetRenderPos = new Vector2(0f, -23f); this.iFrameCount = 30; this.iFadeInFrame = 35; this.iFadeInFinishFrame = 50; this.iStopFrame = 50; this.iPauseFrame = 50; this.iFadeFrame = 51; this.iFinishFrame = 60; this.fMoveSpeed = -0.35f; this.xRenderComponent = asd; Program.GetTheGame().xRenderMaster.RegisterAboveSorted(this.xRenderComponent); } }
public RewardAppear(ItemCodex.ItemTypes enRewardsOnGameOver) { this.enRewardsOnGameOver = enRewardsOnGameOver; this.xReward = ItemCodex.GetItemDescription(enRewardsOnGameOver); }
public TotalScoreReward(ulong iScore, ItemCodex.ItemTypes enItem) { this.iScoreToReach = iScore; this.enReward = enItem; }
public void LoadAssets(ItemCodex.ItemTypes enTypeToLoad) { if (enTypeToLoad == ItemCodex.ItemTypes.Null || !ItemCodex.GetItemDescription(enTypeToLoad).lenCategory.Contains(ItemCodex.ItemCategories.Weapon)) { return; } if (!this.denxWeaponContentManagers.ContainsKey(enTypeToLoad)) { this.denxWeaponContentManagers.Add(enTypeToLoad, new WeaponContentManager(this.contMainContent, enTypeToLoad)); } }
public bool IsNullOrLoaded(ItemCodex.ItemTypes en) { return !ItemCodex.GetItemDescription(en).lenCategory.Contains(ItemCodex.ItemCategories.Weapon) || (this.denxWeaponContentManagers.ContainsKey(en) && this.denxWeaponContentManagers[en].bLoaded); }
public RewardListEntry(int iRequiredPoints, ItemCodex.ItemTypes enItemType, string sDialogueName) { this.iRequiredPoints = iRequiredPoints; this.enItemType = enItemType; this.sDialogueName = sDialogueName; }
public void SetPRCWeapon(PlayerRenderComponent PRC, ItemCodex.ItemTypes enType) { if (this.denxWeaponContentManagers.ContainsKey(enType) && this.denxWeaponContentManagers[enType].bLoaded) { this.denxWeaponContentManagers[enType].InsertIntoPRC(PRC); return; } WeaponAssetLoader.SetPRCWeaponToNullTex(PRC); }
public void SetAutoEquippedNotice(ItemCodex.ItemTypes enEquipment, Equipment.EquipSlot enSlot) { if (this.bNewEquipmentWasAutoEquipped && this.lenNewEquips.Count > 0) { this.lenNewEquips.RemoveAt(0); } this.lenNewEquips.Insert(0, enEquipment); this.iNewEquipmentCounter = 140; this.iNewEquipmentEquippedNotice = 1; this.iNewEquipmentEquippedNoticeWhichSlot = 0; this.bNewEquipmentWasAutoEquipped = true; if (enSlot == Equipment.EquipSlot.AccessoryB) { this.iNewEquipmentEquippedNoticeWhichSlot = 1; } }
public void AddToNewEquipQueue(ItemCodex.ItemTypes enEquipment) { this.lenNewEquips.Add(enEquipment); }