Convention of Elements position for current player on top of char menu

User Tag List

Page 1 of 2 12 LastLast
Results 1 to 15 of 21
  1. #1
    gramoun's Avatar Member
    Reputation
    4
    Join Date
    Mar 2017
    Posts
    10
    Thanks G/R
    28/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Convention of Elements position for current player on top of char

    Hi,
    The standard CoE plugin from KJ show CoE state near of Portrait, left of screen

    It would be usefull that my CoE appears on top of my char.

    I've seen in standard ConventionOfElementsBuffListPlugin.cs in plugins\default, that position is calculated for each player of game list.

    I'm sure that i m first of this list

    In PaintTopInGame(ClipState clipState)

    position is calculated depend on portrait from current step (end of structure)

    var portraitRect = player.PortraitUiElement.Rectangle;

    var x = portraitRect.Right;
    var y = portraitRect.Top + portraitRect.Height * 0.51f;

    A easy solution would be to say sommething as
    if not first player
    var x = portraitRect.Right;
    var y = portraitRect.Top + portraitRect.Height * 0.51f;
    else
    var x = ????
    var y = .????
    endif

    I m a retired programer, and C# is not my speciality, i know assembler... (gramounausuarus) lol

    How could be this plugn modified or overided

    Thanks for help

    Convention of Elements position for current player on top of char
  2. #2
    misuny's Avatar Member
    Reputation
    2
    Join Date
    Oct 2014
    Posts
    7
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I would love to be able to see the CoE rotation but right underneath my character. This would be a wonderful plugin.

  3. #3
    SeaDragon's Avatar Contributor
    Reputation
    321
    Join Date
    Aug 2016
    Posts
    1,041
    Thanks G/R
    140/299
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
                    var portraitRect = player.PortraitUiElement.Rectangle;
    
                    var x = portraitRect.Right;
                    var y = portraitRect.Top + portraitRect.Height * 0.51f;
    				if(player.IsMe)
    				{
    					if(MeScreenPaint)
    					{
    						BuffPainter.PaintHorizontalCenter(_ruleCalculator.PaintInfoList, 0, Hud.Window.Size.Height * 0.5f - Hud.Window.Size.Height * 0.2f, Hud.Window.Size.Width, _ruleCalculator.StandardIconSize, 0);
    					}
    					if(MePortraitPaint)
    					{
    						BuffPainter.PaintHorizontal(_ruleCalculator.PaintInfoList, x, y, _ruleCalculator.StandardIconSize, 0);
    					}
    				}
    				else
    				{
    					if(OtherScreenPaint)
    					{
    						BuffPainter.PaintHorizontalCenter(_ruleCalculator.PaintInfoList, player.ScreenCoordinate.X, player.ScreenCoordinate.Y - Hud.Window.Size.Height * 0.1f, 0, _ruleCalculator.StandardIconSize, 0);
    					}
    					if(OtherPortraitPaint)
    					{
    						BuffPainter.PaintHorizontal(_ruleCalculator.PaintInfoList, x, y, _ruleCalculator.StandardIconSize, 0);
    					}
    				}

  4. #4
    odaru7788's Avatar Member
    Reputation
    3
    Join Date
    Mar 2017
    Posts
    108
    Thanks G/R
    45/2
    Trade Feedback
    0 (0%)
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    請教SeaDragon

    如何不要讓他蓋在在其他選單之上

    --------------------------------------

    using System.Collections.Generic;
    using System.Linq;
    using System;
    using Turbo.Plugins.Default;

    namespace Turbo.Plugins.User
    {

    public class COEBuffListPlugin : BasePlugin, IInGameTopPainter
    {

    public bool HideWhenUiIsHidden { get; set; }
    public BuffPainter BuffPainter { get; set; }

    private BuffRuleCalculator _ruleCalculator;

    public COEBuffListPlugin()
    {
    Enabled = true;
    }

    public override void Load(IController hud)
    {
    base.Load(hud);

    HideWhenUiIsHidden = false;
    BuffPainter = new BuffPainter(Hud, true)
    {
    Opacity = 1.0f,
    TimeLeftFont = Hud.Render.CreateFont("tahoma", 8, 255, 255, 255, 255, true, false, 255, 0, 0, 0, true),
    };

    _ruleCalculator = new BuffRuleCalculator(Hud);
    _ruleCalculator.SizeMultiplier = 0.7f;

    _ruleCalculator.Rules.Add(new BuffRule(430674) { IconIndex = 1, MinimumIconCount = 0, DisableName = true }); // Arcane
    _ruleCalculator.Rules.Add(new BuffRule(430674) { IconIndex = 2, MinimumIconCount = 0, DisableName = true }); // Cold
    _ruleCalculator.Rules.Add(new BuffRule(430674) { IconIndex = 3, MinimumIconCount = 0, DisableName = true }); // Fire
    _ruleCalculator.Rules.Add(new BuffRule(430674) { IconIndex = 4, MinimumIconCount = 0, DisableName = true }); // Holy
    _ruleCalculator.Rules.Add(new BuffRule(430674) { IconIndex = 5, MinimumIconCount = 0, DisableName = true }); // Lightning
    _ruleCalculator.Rules.Add(new BuffRule(430674) { IconIndex = 6, MinimumIconCount = 0, DisableName = true }); // Physical
    _ruleCalculator.Rules.Add(new BuffRule(430674) { IconIndex = 7, MinimumIconCount = 0, DisableName = true }); // Poison
    }

    private IEnumerable<BuffRule> GetCurrentRules(HeroClass heroClass)
    {
    for (int i = 1; i <= 7; i++)
    {
    switch (heroClass)
    {
    case HeroClass.Barbarian: if (i == 1 || i == 4 || i == 7) continue; break;
    case HeroClass.Crusader: if (i == 1 || i == 2 || i == 7) continue; break;
    case HeroClass.DemonHunter: if (i == 1 || i == 4 || i == 7) continue; break;
    case HeroClass.Monk: if (i == 1 || i == 7) continue; break;
    case HeroClass.WitchDoctor: if (i == 1 || i == 4 || i == 5) continue; break;
    case HeroClass.Wizard: if (i == 4 || i == 6 || i == 7) continue; break;
    }
    yield return _ruleCalculator.Rules[i - 1];
    }
    }

    public void PaintTopInGame(ClipState clipState)
    {
    if (clipState != ClipState.BeforeClip) return;
    if (HideWhenUiIsHidden && Hud.Render.UiHidden) return;

    foreach (var player in Hud.Game.Players)
    {
    if (player.IsMe)
    {
    var buff = player.Powers.GetBuff(430674);

    if ((buff == null) || (buff.IconCounts[0] <= 0)) break;

    var classSpecificRules = GetCurrentRules(player.HeroClassDefinition.HeroClass);

    _ruleCalculator.CalculatePaintInfo(player, classSpecificRules);

    if (_ruleCalculator.PaintInfoList.Count == 0) return;
    if (!_ruleCalculator.PaintInfoList.Any(info => info.TimeLeft > 0)) return;

    var highestElementalBonus = player.Offense.HighestElementalDamageBonus;

    for (int i = 0; i < _ruleCalculator.PaintInfoList.Count; i++)
    {
    var info = _ruleCalculator.PaintInfoList[0];

    if (info.TimeLeft <= 0)
    {
    _ruleCalculator.PaintInfoList.RemoveAt(0);
    _ruleCalculator.PaintInfoList.Add(info);
    }
    else break;
    }

    for (int orderIndex = 0; orderIndex < _ruleCalculator.PaintInfoList.Count; orderIndex++)
    {
    var info = _ruleCalculator.PaintInfoList[orderIndex];
    var best = false;

    switch (info.Rule.IconIndex)
    {
    case 1: best = player.Offense.BonusToArcane == highestElementalBonus; break;
    case 2: best = player.Offense.BonusToCold == highestElementalBonus; break;
    case 3: best = player.Offense.BonusToFire == highestElementalBonus; break;
    case 4: best = player.Offense.BonusToHoly == highestElementalBonus; break;
    case 5: best = player.Offense.BonusToLightning == highestElementalBonus; break;
    case 6: best = player.Offense.BonusToPhysical == highestElementalBonus; break;
    case 7: best = player.Offense.BonusToPoison == highestElementalBonus; break;
    }

    if (best) info.Size *= 1.35f;

    if (best && orderIndex > 0)
    {
    info.TimeLeft = (orderIndex - 1) * 4 + _ruleCalculator.PaintInfoList[0].TimeLeft;
    }
    else info.TimeLeftNumbersOverride = false;
    }

    var portraitRect = player.PortraitUiElement.Rectangle;

    var x = portraitRect.Right * 8.05f;
    var y = portraitRect.Top + portraitRect.Height * 1.56f;

    BuffPainter.PaintHorizontal(_ruleCalculator.PaintInfoList, x, y, _ruleCalculator.StandardIconSize, 0);

    break;
    }
    } // end foreach
    } // end PaintTopInGame
    } // end class
    }

  5. #5
    SeaDragon's Avatar Contributor
    Reputation
    321
    Join Date
    Aug 2016
    Posts
    1,041
    Thanks G/R
    140/299
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    不是很明白你说的什么意思

  6. #6
    odaru7788's Avatar Member
    Reputation
    3
    Join Date
    Mar 2017
    Posts
    108
    Thanks G/R
    45/2
    Trade Feedback
    0 (0%)
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    點巔峰 或技能時 元素戒的圖示都會在最上層 蓋在技能選單上

  7. #7
    SeaDragon's Avatar Contributor
    Reputation
    321
    Join Date
    Aug 2016
    Posts
    1,041
    Thanks G/R
    140/299
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    if (clipState != ClipState.BeforeClip) return;
    这行代码就是让它不覆盖游戏UI界面啊,但我看你代码里有这行

  8. #8
    odaru7788's Avatar Member
    Reputation
    3
    Join Date
    Mar 2017
    Posts
    108
    Thanks G/R
    45/2
    Trade Feedback
    0 (0%)
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    不知道 他就是會出現

  9. #9
    SeaDragon's Avatar Contributor
    Reputation
    321
    Join Date
    Aug 2016
    Posts
    1,041
    Thanks G/R
    140/299
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    我用你的代码测试了,一切正常,没有出现遮挡情况
    Last edited by SeaDragon; 06-10-2017 at 04:01 AM.

  10. #10
    odaru7788's Avatar Member
    Reputation
    3
    Join Date
    Mar 2017
    Posts
    108
    Thanks G/R
    45/2
    Trade Feedback
    0 (0%)
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    你開魔方看看 一開就檔

  11. #11
    SeaDragon's Avatar Contributor
    Reputation
    321
    Join Date
    Aug 2016
    Posts
    1,041
    Thanks G/R
    140/299
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    从截图看,问题不在代码,而是插件本身的问题哈
    只能让KJ解决
    @KillJohn
    The CanCubed can not cover the painting
    By the way, it doesn't make any difference to me
    Last edited by SeaDragon; 06-10-2017 at 11:12 AM.

  12. Thanks odaru7788 (1 members gave Thanks to SeaDragon for this useful post)
  13. #12
    misuny's Avatar Member
    Reputation
    2
    Join Date
    Oct 2014
    Posts
    7
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Is there a way to make it show just 1 Icon that is Active?

  14. #13
    gramoun's Avatar Member
    Reputation
    4
    Join Date
    Mar 2017
    Posts
    10
    Thanks G/R
    28/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No feature for that
    I m not sure it s a good idea
    Objective is to, prepare to burst, when main skill is boosted by CoE
    For that icon of element who has more % dmg is bigger
    Counter indicate when it will be op
    My advice, i m not conceptor

  15. #14
    Stormreaver's Avatar Contributor
    Reputation
    152
    Join Date
    Jul 2012
    Posts
    290
    Thanks G/R
    40/136
    Trade Feedback
    0 (0%)
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Just wondering, why not use customize() method to add CoE BuffRules to PlayerTopBuffListPlugin under BuffLists ?

  16. #15
    JarekCz's Avatar Member
    Reputation
    1
    Join Date
    Jun 2017
    Posts
    5
    Thanks G/R
    1/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Is this up to date?
    I copied both versions into

    plugins\Default\BuffLists\ConventionOfElementsBuffListPlugin.cs

    But it did't work
    Anything else that I need to do as well?

Page 1 of 2 12 LastLast

Similar Threads

  1. disabling tbc for every player?
    By blackadder9 in forum World of Warcraft Emulator Servers
    Replies: 4
    Last Post: 01-28-2008, 02:00 PM
  2. [List] Handy Docs for New Players and Others!
    By latruwski in forum World of Warcraft Guides
    Replies: 0
    Last Post: 11-10-2007, 02:50 PM
  3. [GUIDE]Nice cash for alliance players
    By shadowfox47 in forum World of Warcraft Guides
    Replies: 8
    Last Post: 10-06-2007, 01:17 PM
  4. Reputation Calculator for EU players.
    By Enfeebleness in forum World of Warcraft General
    Replies: 11
    Last Post: 08-17-2007, 07:19 PM
  5. How to World PvP on a PvE server for New players
    By Ðeception in forum World of Warcraft Guides
    Replies: 7
    Last Post: 12-20-2006, 10:00 PM
All times are GMT -5. The time now is 12:25 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search