Example #1
0
        private void UpdateResis()
        {
            Character  member = m_party.GetMember(m_party.CurrentCharacter);
            GameConfig game   = ConfigManager.Instance.Game;
            Int32      value  = member.FightValues.Resistance[EDamageType.FIRE].Value;
            Int32      value2 = member.BaseResistance[EDamageType.FIRE].Value;

            m_resiFire.UpdateLabel(GetColoredValue(value, value2, true), LocaManager.GetText("CHARACTER_RESISTANCE_FIRE_TT", value * game.MagicEvadeFactor, value, value));
            value  = member.FightValues.Resistance[EDamageType.WATER].Value;
            value2 = member.BaseResistance[EDamageType.WATER].Value;
            m_resiWater.UpdateLabel(GetColoredValue(value, value2, true), LocaManager.GetText("CHARACTER_RESISTANCE_WATER_TT", value * game.MagicEvadeFactor, value, value));
            value  = member.FightValues.Resistance[EDamageType.EARTH].Value;
            value2 = member.BaseResistance[EDamageType.EARTH].Value;
            m_resiEarth.UpdateLabel(GetColoredValue(value, value2, true), LocaManager.GetText("CHARACTER_RESISTANCE_EARTH_TT", value * game.MagicEvadeFactor, value, value));
            value  = member.FightValues.Resistance[EDamageType.AIR].Value;
            value2 = member.BaseResistance[EDamageType.AIR].Value;
            m_resiAir.UpdateLabel(GetColoredValue(value, value2, true), LocaManager.GetText("CHARACTER_RESISTANCE_AIR_TT", value * game.MagicEvadeFactor, value, value));
            value  = member.FightValues.Resistance[EDamageType.LIGHT].Value;
            value2 = member.BaseResistance[EDamageType.LIGHT].Value;
            m_resiLight.UpdateLabel(GetColoredValue(value, value2, true), LocaManager.GetText("CHARACTER_RESISTANCE_LIGHT_TT", value * game.MagicEvadeFactor, value, value));
            value  = member.FightValues.Resistance[EDamageType.DARK].Value;
            value2 = member.BaseResistance[EDamageType.DARK].Value;
            m_resiDark.UpdateLabel(GetColoredValue(value, value2, true), LocaManager.GetText("CHARACTER_RESISTANCE_DARK_TT", value * game.MagicEvadeFactor, value, value));
            value  = member.FightValues.Resistance[EDamageType.PRIMORDIAL].Value;
            value2 = member.BaseResistance[EDamageType.PRIMORDIAL].Value;
            m_resiPrime.UpdateLabel(GetColoredValue(value, value2, true), LocaManager.GetText("CHARACTER_RESISTANCE_PRIMORDIAL_TT", value * game.MagicEvadeFactor, value, value));
        }
        public void AddToQueue(String p_messageKey, Single p_delay)
        {
            String      text = LocaManager.GetText(p_messageKey);
            GameMessage item = new GameMessage(text, p_delay);

            m_queuedMessages.Enqueue(item);
        }
        public void OnHirelingUpdated(Object p_sender, EventArgs p_args)
        {
            HirelingEventArgs hirelingEventArgs = p_args as HirelingEventArgs;

            if (hirelingEventArgs == null)
            {
                return;
            }
            String p_message = String.Empty;
            String text      = LocaManager.GetText(hirelingEventArgs.Npc.StaticData.NameKey);

            if (hirelingEventArgs.Condition == ETargetCondition.HIRE)
            {
                String id = "GAME_MESSAGE_HIRELING_JOINED_M";
                p_message = LocaManager.GetText(id, text);
            }
            else
            {
                if (hirelingEventArgs.Condition != ETargetCondition.FIRE)
                {
                    return;
                }
                String id2 = "GAME_MESSAGE_HIRELING_LEFT_M";
                p_message = LocaManager.GetText(id2, text);
            }
            GameMessage item = new GameMessage(p_message);

            m_queuedMessages.Enqueue(item);
        }
Example #4
0
 private void FillSkillName(Skill p_skill, TooltipType p_type)
 {
     if (p_type == TooltipType.CURRENT_EFFECT_NEXT || p_type == TooltipType.CURRENT_EFFECT_PREV)
     {
         m_name.Label.color = m_normalColor;
         m_name.UpdateText(LocaManager.GetText("SKILL_CURRENT_INCREASE"));
     }
     if (p_type == TooltipType.BASE || p_type == TooltipType.PARTY_CREATION)
     {
         m_name.Label.color = m_normalColor;
         m_name.UpdateText(LocaManager.GetText(p_skill.Name));
     }
     else if (p_type == TooltipType.EXPERT)
     {
         m_name.Label.color = ((p_skill.Tier < ETier.EXPERT) ? m_unlearnedColor : m_normalColor);
         m_name.UpdateText(LocaManager.GetText("SKILL_TIER_BONUS_2"));
     }
     else if (p_type == TooltipType.MASTER)
     {
         m_name.Label.color = ((p_skill.Tier < ETier.MASTER) ? m_unlearnedColor : m_normalColor);
         m_name.UpdateText(LocaManager.GetText("SKILL_TIER_BONUS_3"));
     }
     else if (p_type == TooltipType.GRAND_MASTER)
     {
         m_name.Label.color = ((p_skill.Tier < ETier.GRAND_MASTER) ? m_unlearnedColor : m_normalColor);
         m_name.UpdateText(LocaManager.GetText("SKILL_TIER_BONUS_4"));
     }
 }
Example #5
0
        private String GetTierBoni(List <SkillEffectStaticData> p_skillEffects, Boolean p_tierAvailable)
        {
            String text = String.Empty;

            for (Int32 i = 0; i < p_skillEffects.Count; i++)
            {
                SkillEffectStaticData skillEffectStaticData = p_skillEffects[i];
                if (skillEffectStaticData.ShowInTooltip)
                {
                    String text2 = (!p_tierAvailable) ? m_unlearnedEffectColorHex : m_effectColorHex;
                    String str   = String.Empty;
                    if (skillEffectStaticData.Mode == ESkillEffectMode.NONE)
                    {
                        str = LocaManager.GetText(skillEffectStaticData.GeneralDescription, text2, "[-]");
                    }
                    else
                    {
                        Single num = skillEffectStaticData.Value;
                        if (skillEffectStaticData.ContainsPercent)
                        {
                            num *= 100f;
                        }
                        String arg = text2 + num.ToString() + "[-]";
                        str = LocaManager.GetText(skillEffectStaticData.GeneralDescription, text2, "[-]", arg);
                    }
                    text += str;
                    if (i < p_skillEffects.Count - 1 && p_skillEffects[i + 1].ShowInTooltip)
                    {
                        text += "\n\n";
                    }
                }
            }
            return(text);
        }
Example #6
0
 public void Init(UnlockableContentStaticData p_data)
 {
     m_labelTitle.text = LocaManager.GetText(p_data.NameKey);
     m_data            = p_data;
     UpdateUnlockState();
     SetSelected(false);
 }
Example #7
0
 private void Start()
 {
     OnResolutionChange();
     NGUITools.SetActive(m_popUpRequest.gameObject, false);
     NGUITools.SetActive(m_tooltipManager.gameObject, false);
     if (LegacyLogic.Instance.WorldManager.SaveGameManager.GetAllSaveGames(false).Count == 0)
     {
         UIButton[] components = m_loadButton.gameObject.GetComponents <UIButton>();
         for (Int32 i = 0; i < components.Length; i++)
         {
             components[i].isEnabled = false;
             components[i].UpdateColor(false, true);
         }
         components = m_continueButton.gameObject.GetComponents <UIButton>();
         for (Int32 j = 0; j < components.Length; j++)
         {
             components[j].isEnabled = false;
             components[j].UpdateColor(false, true);
         }
     }
     else if (LegacyLogic.Instance.WorldManager.SaveGameManager.CheckForError() != ESaveGameError.NONE)
     {
         String text  = LocaManager.GetText("ERROR_POPUP_MESSAGE_CAPTION");
         String text2 = LocaManager.GetText("SAVEGAME_ERROR_COULD_NOT_RECEIVE_SAVEGAMES");
         PopupRequest.Instance.OpenRequest(PopupRequest.ERequestType.CONFIRM, text, text2, null);
     }
 }
Example #8
0
 public void UpdateDurationLabel()
 {
     if (m_partyBuff == null)
     {
         return;
     }
     if (!m_partyBuff.IsExpired())
     {
         m_label.enabled = true;
         if (m_partyBuff.DurationIsMinutes)
         {
             MMTime mmtime = m_partyBuff.ExpireTime - LegacyLogic.Instance.GameTime.Time;
             m_label.text = LocaManager.GetText("TIMESTRING", mmtime.Hours.ToString("D2"), mmtime.Minutes.ToString("D2"));
         }
         else if (m_partyBuff.Infinite)
         {
             m_label.enabled = false;
         }
         else
         {
             m_label.text = m_partyBuff.ExpireTimeTurns.ToString();
         }
     }
     else
     {
         OnTooltip(false);
     }
 }
Example #9
0
 private void OnTooltip(Boolean show)
 {
     if (OnTooltipEvent != null)
     {
         m_tempStringBuilder.Length = 0;
         EventArgs e;
         if (!show || SetDestroyTime)
         {
             e = EventArgs.Empty;
         }
         else
         {
             m_tempStringBuilder.Append(m_colorBuffNameHex);
             m_tempStringBuilder.Append(LocaManager.GetText(m_partyBuff.StaticData.Name));
             m_tempStringBuilder.Append("[-]");
             String p_caption = m_tempStringBuilder.ToString();
             m_tempStringBuilder.Length = 0;
             m_tempStringBuilder.Append(m_colorBuffInfoHex);
             m_tempStringBuilder.Append(m_partyBuff.Description);
             m_tempStringBuilder.Append("[-]");
             e = new StringEventArgs(m_tempStringBuilder.ToString(), p_caption);
         }
         OnTooltipEvent(this, e);
     }
 }
Example #10
0
 public void SetQuestStep(QuestStep p_step)
 {
     NGUITools.SetActive(m_markerNewEntry.gameObject, false);
     m_step         = p_step;
     m_selected     = false;
     m_finished     = (p_step.QuestState == EQuestState.SOLVED);
     m_title.text   = LocaManager.GetText(p_step.StaticData.Name);
     m_marker.alpha = 0f;
     m_title.color  = Color.black;
     if (m_finished)
     {
         m_questIcon.alpha = 0.5f;
         m_title.alpha     = 0.5f;
     }
     else
     {
         m_questIcon.alpha = 1f;
         m_title.alpha     = 1f;
     }
     if (m_step.StaticData.Type == EQuestType.QUEST_TYPE_MAIN)
     {
         m_questIcon.spriteName = "ICO_quest_main";
     }
     else if (m_step.StaticData.Type == EQuestType.QUEST_TYPE_ONGOING)
     {
         m_questIcon.spriteName = "ICO_quest_ongoing";
     }
     else
     {
         m_questIcon.spriteName = "ICO_quest_side";
     }
 }
Example #11
0
 private void SetNextSlide()
 {
     if (m_iterator.MoveNext())
     {
         m_currentData = (EndingSlidesStaticData)m_iterator.Current;
         if (LegacyLogic.Instance.WorldManager.IsShowingEndingSequences && m_currentData.DLC)
         {
             ContextManager.ChangeContext(EContext.CreditsScreen);
             return;
         }
         if (CheckCondition(m_currentData))
         {
             m_text.text = LocaManager.GetText(m_currentData.TextKey);
             Texture texture = Helper.ResourcesLoad <Texture>("EndingSlides/" + m_currentData.Image);
             if (m_texture.mainTexture != texture)
             {
                 Texture mainTexture = m_texture.mainTexture;
                 m_texture.mainTexture = texture;
                 if (mainTexture != null)
                 {
                     mainTexture.UnloadAsset();
                 }
             }
             m_state.ChangeState(EState.FADEIN_BACKGROUND);
         }
         else
         {
             SetNextSlide();
         }
     }
     else
     {
         ContextManager.ChangeContext(EContext.Diploma);
     }
 }
Example #12
0
        private void OnItemRepairStatusChanged(Object p_sender, EventArgs p_args)
        {
            if (p_args is InventoryItemEventArgs && ((InventoryItemEventArgs)p_args).Type != InventoryItemEventArgs.ERepairType.NONE)
            {
                AudioManager.Instance.RequestPlayAudioID("Repair", 0);
            }
            else if (p_args is ItemStatusEventArgs && (Equipment)((ItemStatusEventArgs)p_args).AffectedItem != null && ((Equipment)((ItemStatusEventArgs)p_args).AffectedItem).Broken)
            {
                AudioManager.Instance.RequestPlayAudioID("BreakItem", 0);
            }
            Inventory equipment = m_owner.Equipment.Equipment;

            if (equipment.HasBrokenItems())
            {
                m_brokenItemIcon.SetTooltip(LocaManager.GetText("ITEM_IS_BROKEN") + ":");
                foreach (Equipment equipment2 in equipment.GetBrokenItems())
                {
                    m_brokenItemIcon.AddToTooltip("- " + equipment2.Name);
                }
                m_brokenItemIcon.SetEnabled(true);
            }
            else
            {
                m_brokenItemIcon.SetEnabled(false);
            }
        }
Example #13
0
        public void Init(QuestStep pStep, QuestState pState)
        {
            m_questStep = pStep;
            String text = "\n" + LocaManager.GetText(pStep.StaticData.Name);
            String icon;
            Color  color;

            if (pState != QuestState.ADDED)
            {
                if (pState != QuestState.UPDATED)
                {
                    text  = LocaManager.GetText("COMPLETED_QUEST_INFO", text);
                    icon  = m_completedQuestSpriteName;
                    color = Color.green;
                }
                else
                {
                    text  = LocaManager.GetText("UPDATED_QUEST_INFO", text);
                    icon  = m_updatedQuestSpriteName;
                    color = new Color(0f, 0.7529412f, 1f, 1f);
                }
            }
            else
            {
                text  = LocaManager.GetText("ADDED_QUEST_INFO", text);
                icon  = m_newQuestSpriteName;
                color = Color.white;
            }
            base.Init(text, icon, 0, color);
        }
Example #14
0
 private void OnStartIdentify(Object p_sender, EventArgs p_args)
 {
     m_repairInventory   = null;
     m_identifyInventory = (IdentifyInventoryController)p_sender;
     if (m_identifyInventory == null)
     {
         Debug.LogError("Could not find the inventory controller necessary for displaying items!");
         return;
     }
     InputManager.RegisterHotkeyEvent(EHotkeyType.INTERACT, new EventHandler <HotkeyEventArgs>(OnAllItemsButtonClickedDelegate));
     InputManager.RegisterHotkeyEvent(EHotkeyType.QUICK_ACTION_SLOT_1, new EventHandler <HotkeyEventArgs>(HotkeyNullifier));
     InputManager.RegisterHotkeyEvent(EHotkeyType.QUICK_ACTION_SLOT_2, new EventHandler <HotkeyEventArgs>(HotkeyNullifier));
     InputManager.RegisterHotkeyEvent(EHotkeyType.QUICK_ACTION_SLOT_3, new EventHandler <HotkeyEventArgs>(HotkeyNullifier));
     InputManager.RegisterHotkeyEvent(EHotkeyType.QUICK_ACTION_SLOT_4, new EventHandler <HotkeyEventArgs>(HotkeyNullifier));
     InputManager.RegisterHotkeyEvent(EHotkeyType.QUICK_ACTION_SLOT_5, new EventHandler <HotkeyEventArgs>(HotkeyNullifier));
     if (m_identifyInventory.FromScroll || m_identifyInventory.FromSpell)
     {
         InputManager.RegisterHotkeyEvent(EHotkeyType.OPEN_CLOSE_MENU, new EventHandler <HotkeyEventArgs>(CloseDelegate));
     }
     m_itemContainer.SetIdentifyInventory(m_identifyInventory);
     m_fromSpell = m_identifyInventory.FromSpell;
     m_costs     = m_identifyInventory.IdentifyPrice;
     m_allItemsButtonLabel.text   = LocaManager.GetText("IDENTIFY_SCREEN_BUTTON_IDENTIFY_ALL");
     m_singleItemButtonLabel.text = LocaManager.GetText("IDENTIFY_SCREEN_BUTTON_IDENTIFY");
     m_headlineTextLabel.text     = LocaManager.GetText("IDENTIFY_SCREEN_HEADLINE");
     m_headLineIcon.spriteName    = m_identifyIconName;
     NGUITools.SetActiveSelf(gameObject, true);
     m_active = true;
     SetScrollBarPosition(0);
     UpdateButtons();
     ScrollingHelper.InitScrollListeners(this, m_itemContainer.gameObject);
 }
Example #15
0
        private void Awake()
        {
            String text = String.Empty;
            Int32  num  = 0;

            for (Int32 i = 0; i < 4; i++)
            {
                Character member = LegacyLogic.Instance.WorldManager.Party.GetMember(i);
                String    text2  = text;
                text = String.Concat(new String[]
                {
                    text2,
                    member.Name,
                    ", ",
                    LocaManager.GetText("CHARACTER_LEVEL", member.Level),
                    " "
                });
                String text3 = member.Class.NameKey;
                if (member.Gender == EGender.MALE)
                {
                    text3 += "_M";
                }
                else
                {
                    text3 += "_F";
                }
                text = text + LocaManager.GetText(text3) + "\n";
                num += member.Exp;
            }
            m_PartyLabel.text = text;
            m_TimeLabel.text  = LocaManager.GetText("DIPLOMA_TIME", 0, 1, 2);
            m_ScoreLabel.text = LocaManager.GetText("DIPLOMA_SCORE", num);
            InputManager.RegisterHotkeyEvent(EHotkeyType.OPEN_CLOSE_MENU, new EventHandler <HotkeyEventArgs>(OnCloseKeyPressed));
            InputManager.RegisterHotkeyEvent(EHotkeyType.INTERACT, new EventHandler <HotkeyEventArgs>(OnCloseKeyPressed));
        }
Example #16
0
        public void Fill(TooltipType p_type, EPotionTarget p_attribute, Int32 p_currentIncrease, Character p_character, DummyCharacter p_dummy)
        {
            Init();
            m_atrribute = p_attribute;
            Single num = m_outerPadding + m_innerPadding;

            m_currentIncrease = p_currentIncrease;
            m_currentHeader.UpdatePositionY(-num);
            m_currentHeader.UpdateText(LocaManager.GetText("ATTRIBUTE_CURRENT"));
            num += m_currentHeader.Size.y + m_innerPadding;
            m_currentText.UpdatePositionY(-num);
            FillDescription(m_currentText, m_currentIncrease, p_character, p_dummy, false);
            num += m_currentText.Size.y + m_innerPadding;
            m_changeHeader.UpdatePositionY(-num);
            if (p_type == TooltipType.CURRENT_EFFECT_NEXT)
            {
                m_changeHeader.UpdateText(LocaManager.GetText("ATTRIBUTE_NEXT"));
            }
            else
            {
                m_changeHeader.UpdateText(LocaManager.GetText("ATTRIBUTE_PREV"));
            }
            num += m_changeHeader.Size.y + m_innerPadding;
            m_changeText.UpdatePositionY(-num);
            if (p_type == TooltipType.CURRENT_EFFECT_NEXT)
            {
                FillDescription(m_changeText, m_currentIncrease + 1, p_character, p_dummy, true);
            }
            else
            {
                FillDescription(m_changeText, m_currentIncrease - 1, p_character, p_dummy, true);
            }
            num += m_changeText.Size.y + m_innerPadding;
            m_background.Scale(m_currentHeader.Size.x + m_outerPadding * 2f, num - m_innerPadding + m_outerPadding);
        }
Example #17
0
 public void OnTooltip(Boolean p_isOver)
 {
     if (p_isOver)
     {
         String text;
         String text2;
         if (m_type == ETooltipObject.HP_BAR)
         {
             text  = LocaManager.GetText("CHARACTER_PORTRAIT_TOOLTIP_HEALTH");
             text2 = LocaManager.GetText("GUI_STATS_X_OF_Y", m_character.HealthPoints, m_character.MaximumHealthPoints);
         }
         else
         {
             text  = LocaManager.GetText("CHARACTER_PORTRAIT_TOOLTIP_MANA");
             text2 = LocaManager.GetText("GUI_STATS_X_OF_Y", m_character.ManaPoints, m_character.MaximumManaPoints);
         }
         Vector3 position = transform.position;
         Vector3 p_offset = transform.localScale * 0.5f;
         TooltipManager.Instance.Show(this, text, text2, TextTooltip.ESize.SMALL, position, p_offset);
     }
     else
     {
         TooltipManager.Instance.Hide(this);
     }
 }
Example #18
0
 private void UpdateHotkeys()
 {
     for (Int32 i = 0; i < m_actionButtons.Length; i++)
     {
         Hotkey  hotkey  = KeyConfigManager.KeyBindings[EHotkeyType.QUICK_ACTION_SLOT_1 + i];
         KeyCode keyCode = hotkey.Key1;
         if (keyCode == KeyCode.None)
         {
             keyCode = hotkey.AltKey1;
         }
         else if (keyCode != KeyCode.None)
         {
             String text = LocaManager.GetText("OPTIONS_INPUT_KEYNAME_" + keyCode.ToString().ToUpper());
             if (text.Length > 6)
             {
                 text = text.Substring(0, 4) + "..";
             }
             m_actionButtons[i].ButtonHotkey = text;
         }
         else
         {
             m_actionButtons[i].ButtonHotkey = String.Empty;
         }
     }
 }
Example #19
0
        private void UpdateSkillPointsText()
        {
            String arg  = (m_skillHandler.Character.SkillPoints <= 0) ? m_noSkillpointsColorHex : m_skillpointsColorHex;
            String arg2 = arg + m_skillHandler.Character.SkillPoints + "[-]";

            m_skillPointsText.text = LocaManager.GetText("GUI_SKILLS_AVAILABLE_SKILLPOINTS", arg2);
        }
Example #20
0
 private void Update()
 {
     try
     {
         if (LegacyLogic.Instance.ServiceWrapper.ForceAppExit())
         {
             if (!m_firstUpdate)
             {
                 if (LegacyLogic.Instance.ServiceWrapper.UplayNotInstalled())
                 {
                     String text  = LocaManager.GetText("ERROR_POPUP_MESSAGE_UPLAY_NOT_INSTALLED");
                     String text2 = LocaManager.GetText("ERROR_POPUP_MESSAGE_CAPTION");
                     SystemInvokes.MessageBox(Process.GetCurrentProcess().MainWindowHandle, text, text2, 0);
                 }
                 QuitGame();
             }
         }
         else
         {
             LegacyLogic.Instance.ServiceWrapper.Update();
             LegacyLogic.Instance.Update();
         }
     }
     catch (Exception exception)
     {
         UnityEngine.Debug.LogException(exception, this);
     }
     m_firstUpdate = false;
 }
Example #21
0
 public void Awake()
 {
     NGUITools.SetActiveSelf(m_saveGameController.gameObject, false);
     m_saveGameController.OnClose        += HandleOnClose;
     m_saveGameController.OnLoadSaveGame += HandleOnLoadSaveGame;
     m_modMenu.OnClose              += OnCloseModMenu;
     m_modMenu.OnLoadMod            += HandleOnLoadMod;
     m_unlockContentManager.OnClose += OnUnlockContentClose;
     LegacyLogic.Instance.EventManager.RegisterEvent(EEventType.MOD_LOADED, new EventHandler(OnModLoaded));
     m_version.text = LocaManager.GetText("VERSION_NUMBER", "1.5-16336");
     if (LegacyLogic.Instance.ModController.InModMode)
     {
         ModController.ModInfo currentMod = LegacyLogic.Instance.ModController.CurrentMod;
         if (currentMod != null)
         {
             m_version.text = currentMod.Name + " " + LocaManager.GetText("VERSION_NUMBER", currentMod.Version);
         }
     }
     InputManager.RegisterHotkeyEvent(EHotkeyType.OPEN_CLOSE_MENU, new EventHandler <HotkeyEventArgs>(OnCloseKeyPressed));
     m_tooltipManager.Init();
     m_options.CloseEvent += OnCloseOptionsMenu;
     if (PopupRequest.Instance != null)
     {
         PopupRequest.Instance.Destroy();
     }
     m_popUpRequest.Init();
 }
Example #22
0
 public static void PrintPortrait(HUDDamageText pDamageText, AttackResult pAttackResult, Boolean pIsMagical)
 {
     if (!ConfigManager.Instance.Options.ShowFloatingDamageCharacters)
     {
         return;
     }
     if (pAttackResult.Result == EResultType.BLOCK)
     {
         pDamageText.Add(LocaManager.GetText("SCROLLING_COMBAT_SHIELD"), false, Color.white, 0f);
     }
     else if (pAttackResult.Result == EResultType.EVADE)
     {
         if (pIsMagical)
         {
             pDamageText.Add(LocaManager.GetText("SCROLLING_COMBAT_RESISTED"), false, Color.white, 0f);
         }
         else
         {
             pDamageText.Add(LocaManager.GetText("SCROLLING_COMBAT_MISS"), false, Color.white, 0f);
         }
     }
     else if (pAttackResult.Result == EResultType.CRITICAL_HIT)
     {
         pDamageText.Add(pAttackResult, true, new Color32(245, 240, 135, Byte.MaxValue), 0f);
     }
     else if (pAttackResult.Result == EResultType.HEAL)
     {
         pDamageText.Add(pAttackResult, false, Color.green, 0f);
     }
     else
     {
         pDamageText.Add(pAttackResult, false, Color.white, 0f);
     }
 }
Example #23
0
 private void FillSkillDescription(Skill p_skill, TooltipType p_type, Boolean p_isDefault)
 {
     if (p_type == TooltipType.BASE || p_type == TooltipType.PARTY_CREATION)
     {
         String text = LocaManager.GetText(p_skill.Description);
         if (p_type == TooltipType.PARTY_CREATION)
         {
             if (p_skill.MaxTier == ETier.GRAND_MASTER)
             {
                 text = text + "\n\n[00ff00]" + LocaManager.GetText("TOOLTIP_SKILL_MAX_GRANDMASTER") + "[-]";
             }
             else if (p_skill.MaxTier == ETier.MASTER)
             {
                 text = text + "\n\n[00ff00]" + LocaManager.GetText("TOOLTIP_SKILL_MAX_MASTER") + "[-]";
             }
             else if (p_skill.MaxTier == ETier.EXPERT)
             {
                 text = text + "\n\n[00ff00]" + LocaManager.GetText("TOOLTIP_SKILL_MAX_EXPERT") + "[-]";
             }
             if (p_isDefault)
             {
                 text = text + "\n\n[ff0000]" + LocaManager.GetText("TOOLTIP_SKILL_IS_DEFAULT") + "[-]";
             }
         }
         m_description.UpdateText(text);
     }
     else
     {
         String increaseDescription = GetIncreaseDescription(p_skill, p_skill.Level, true);
         m_description.UpdateText(increaseDescription);
     }
 }
Example #24
0
        private Int32 UpdateAbilities(EClass p_class)
        {
            for (Int32 i = 0; i < 2; i++)
            {
                m_abilityDesc[i].text   = String.Empty;
                m_abilityHeader[i].text = String.Empty;
                NGUITools.SetActive(m_abilityIcon[i].gameObject, false);
                NGUITools.SetActive(m_abilityBorder[i].gameObject, false);
            }
            Int32 num = 0;
            List <ParagonAbilitiesStaticData> list = new List <ParagonAbilitiesStaticData>(StaticDataHandler.GetIterator <ParagonAbilitiesStaticData>(EDataType.PARAGON_ABILITES));

            foreach (ParagonAbilitiesStaticData paragonAbilitiesStaticData in list)
            {
                if (paragonAbilitiesStaticData.Class == p_class)
                {
                    m_abilityDesc[num].text       = paragonAbilitiesStaticData.GetDescription();
                    m_abilityHeader[num].text     = LocaManager.GetText(paragonAbilitiesStaticData.NameKey);
                    m_abilityIcon[num].spriteName = paragonAbilitiesStaticData.Icon;
                    NGUITools.SetActive(m_abilityIcon[num].gameObject, true);
                    NGUITools.SetActive(m_abilityBorder[num].gameObject, true);
                    num++;
                }
            }
            return(num);
        }
Example #25
0
        private String GetIncreaseDescription(Skill p_skill, Int32 p_level, Boolean p_skillAvailable)
        {
            String text  = (!p_skillAvailable) ? m_unlearnedEffectColorHex : m_effectColorHex;
            String text2 = String.Empty;
            List <SkillEffectStaticData> list = (p_skill.Tier < ETier.NOVICE) ? p_skill.Tier1ScalingEffects : p_skill.AvailableScalingEffects;

            foreach (SkillEffectStaticData skillEffectStaticData in list)
            {
                String dynamicDescription = skillEffectStaticData.DynamicDescription;
                if (dynamicDescription != String.Empty)
                {
                    if (text2 != String.Empty)
                    {
                        text2 += "\n\n";
                    }
                    Single num = skillEffectStaticData.Value;
                    if (skillEffectStaticData.ContainsPercent)
                    {
                        num *= 100f;
                    }
                    String arg = text + (num * p_level).ToString() + "[-]";
                    text2 = text2 + LocaManager.GetText(dynamicDescription, text, "[-]", arg) + " ";
                }
            }
            if (text2 != String.Empty)
            {
                return(text2);
            }
            return(String.Empty);
        }
Example #26
0
        public void SetObjective(QuestStep p_questStep, QuestObjective p_objective)
        {
            m_myQuestStep = p_questStep;
            if (p_objective.MaxCounter <= 1)
            {
                m_objectiveName.text = LocaManager.GetText(p_objective.StaticData.Description);
            }
            else
            {
                m_objectiveName.text = String.Format(LocaManager.GetText(p_objective.StaticData.Description), p_objective.MaxCounter) + " " + String.Format(LocaManager.GetText("OBJECTIVE_X_OF_Y"), p_objective.CurrentCounter, p_objective.MaxCounter);
            }
            if (!String.IsNullOrEmpty(p_objective.StaticData.Location))
            {
                String text = LocaManager.GetText(p_objective.StaticData.Location);
                if (text.Contains("@"))
                {
                    text = text.Replace("@", ", ");
                }
                UILabel objectiveName = m_objectiveName;
                objectiveName.text = objectiveName.text + " (" + text + ")";
            }
            Color color = (p_objective.QuestState != EQuestState.SOLVED) ? m_textColor : m_textColorSolved;

            m_objectiveName.color      = color;
            m_objectiveIcon.spriteName = ((p_objective.QuestState != EQuestState.SOLVED) ? m_bulletSpriteName : m_solvedSpriteName);
        }
Example #27
0
        private void OnPartyRestored(Object p_sender, EventArgs p_args)
        {
            String      text = LocaManager.GetText("GAME_MESSAGE_PARTY_RESTORED");
            GameMessage item = new GameMessage(text);

            m_queuedMessages.Enqueue(item);
        }
        private String GenerateHiddenEntryTT(CharacterStatEntry p_affectedEntry)
        {
            String text = "???";

            if (m_tooltipMapper.TryGetValue(p_affectedEntry, out text))
            {
                String text2 = LocaManager.GetText(text);
                if (text2.Contains("{"))
                {
                    String[] array = text2.Split("{".ToCharArray());
                    for (Int32 i = 1; i < array.Length; i++)
                    {
                        String str = array[i].Substring(2);
                        array[i] = "???" + str;
                    }
                    StringBuilder stringBuilder = new StringBuilder();
                    foreach (String value in array)
                    {
                        stringBuilder.Append(value);
                    }
                    text = stringBuilder.ToString();
                }
                else
                {
                    text = text2;
                }
            }
            return(text);
        }
Example #29
0
        public void OnTrapTriggered(Object p_sender, EventArgs p_args)
        {
            TrapEventArgs trapEventArgs = p_args as TrapEventArgs;
            GameMessage   item          = new GameMessage(LocaManager.GetText("TRAP_TRIGGERED", LocaManager.GetText(trapEventArgs.TrapEffect.Name)));

            m_queuedMessages.Enqueue(item);
        }
Example #30
0
        private void UpdateDefense()
        {
            Character member = m_party.GetMember(m_party.CurrentCharacter);
            Int32     num    = (Int32)member.FightValues.EvadeValue;
            Int32     num2   = (Int32)(member.FightValues.GeneralBlockChance * 100f + 0.5f);
            String    text   = num.ToString();

            if (member.ConditionHandler.HasCondition(ECondition.POISONED))
            {
                text = m_colorRedHex + num + "[-]";
            }
            m_defAC.UpdateLabel(member.FightValues.ArmorValue.ToString(), LocaManager.GetText("CHARACTER_DEFENSE_AC_TT", member.FightValues.ArmorValue));
            PartyBuff buff = m_party.Buffs.GetBuff(EPartyBuffs.WIND_SHIELD);

            if (buff != null)
            {
                String text2 = String.Concat(new Object[]
                {
                    text,
                    "/",
                    m_colorGreenHex,
                    num + buff.GetRangedEvadeBonus(),
                    "[-]"
                });
                m_defEvade.UpdateLabel(text2, LocaManager.GetText("CHARACTER_DEFENSE_EVADE_VALUE_TT", text2));
            }
            else
            {
                m_defEvade.UpdateLabel(text, LocaManager.GetText("CHARACTER_DEFENSE_EVADE_VALUE_TT", num));
            }
            m_defBlockChance.UpdateLabel(LocaManager.GetText("CHARACTER_ATTACK_CRIT_CHANCE_INFO", num2.ToString()), LocaManager.GetText("CHARACTER_DEFENSE_BLOCK_CHANCE_TT", num2));
            m_defBlocksGeneral.UpdateLabel(member.FightHandler.CurrentGeneralBlockAttempts.ToString(), LocaManager.GetText("CHARACTER_DEFENSE_GENERAL_BLOCK_ATTEMPTS_TT", member.FightHandler.CurrentGeneralBlockAttempts));
            m_defBlocksMelee.UpdateLabel(member.FightHandler.CurrentMeleeBlockAttempts.ToString(), LocaManager.GetText("CHARACTER_DEFENSE_MELEE_BLOCK_ATTEMPTS_TT", member.FightHandler.CurrentMeleeBlockAttempts));
        }