GetRadius() public method

public GetRadius ( int index ) : string
index int
return string
示例#1
0
        private void AppendSpellEffectInfo(RichTextBox sb, SpellEntry spell)
        {
            sb.AppendLine("=================================================");

            for (int i = 0; i < 3; i++)
            {
                sb.SetBold();
                if ((SpellEffects)spell.Effect[i] == SpellEffects.NO_SPELL_EFFECT)
                {
                    sb.AppendFormatLine("Effect {0}:  NO EFFECT", i);
                    return;
                }

                sb.AppendFormatLine("Effect {0}: Id {1} ({2})", i, spell.Effect[i], (SpellEffects)spell.Effect[i]);
                sb.SetDefaultStyle();
                sb.AppendFormat("BasePoints = {0}", spell.EffectBasePoints[i] + 1);
                if (spell.EffectRealPointsPerLevel[i] != 0)
                {
                    sb.AppendFormat(" + Level * {0:F}", spell.EffectRealPointsPerLevel[i]);
                }

                // WTF ? 1 = spell.EffectBaseDice[i]
                if (1 < spell.EffectDieSides[i])
                {
                    if (spell.EffectRealPointsPerLevel[i] != 0)
                    {
                        sb.AppendFormat(" to {0} + lvl * {1:F}",
                                        spell.EffectBasePoints[i] + 1 + spell.EffectDieSides[i], spell.EffectRealPointsPerLevel[i]);
                    }
                    else
                    {
                        sb.AppendFormat(" to {0}", spell.EffectBasePoints[i] + 1 + spell.EffectDieSides[i]);
                    }
                }

                sb.AppendFormatIfNotNull(" + combo * {0:F}", spell.EffectPointsPerComboPoint[i]);

                if (spell.DmgMultiplier[i] != 1.0f)
                {
                    sb.AppendFormat(" x {0:F}", spell.DmgMultiplier[i]);
                }

                sb.AppendFormatIfNotNull("  Multiple = {0:F}", spell.EffectMultipleValue[i]);
                sb.AppendLine();

                sb.AppendFormatLine("Targets ({0}, {1}) ({2}, {3})",
                                    spell.EffectImplicitTargetA[i], spell.EffectImplicitTargetB[i],
                                    (Targets)spell.EffectImplicitTargetA[i], (Targets)spell.EffectImplicitTargetB[i]);

                sb.AppendText(AuraModTypeName(spell, i));

                uint[] ClassMask = new uint[3];

                switch (i)
                {
                case 0: ClassMask[0] = spell.EffectSpellClassMaskA[i]; break;

                case 1: ClassMask[1] = spell.EffectSpellClassMaskB[i]; break;

                case 2: ClassMask[2] = spell.EffectSpellClassMaskC[i]; break;
                }

                if (ClassMask[0] != 0 || ClassMask[1] != 0 || ClassMask[2] != 0)
                {
                    sb.AppendFormatLine("SpellClassMask = {0:X8} {1:X8} {2:X8}", ClassMask[2], ClassMask[1], ClassMask[0]);

                    var query = from Spell in DBC.Spell.Values
                                where Spell.SpellFamilyName == spell.SpellFamilyName &&
                                ((Spell.SpellFamilyFlags1 & ClassMask[0]) != 0 ||
                                 (Spell.SpellFamilyFlags2 & ClassMask[1]) != 0 ||
                                 (Spell.SpellFamilyFlags3 & ClassMask[2]) != 0)
                                join sk in DBC.SkillLineAbility on Spell.ID equals sk.Value.SpellId into temp
                                from Skill in temp.DefaultIfEmpty()
                                select new
                    {
                        SpellID   = Spell.ID,
                        SpellName = Spell.SpellNameRank,
                        SkillId   = Skill.Value.SkillId
                    };

                    foreach (var row in query)
                    {
                        if (row.SkillId > 0)
                        {
                            sb.SelectionColor = Color.Blue;
                            sb.AppendFormatLine("\t+ {0} - {1}", row.SpellID, row.SpellName);
                        }
                        else
                        {
                            sb.SelectionColor = Color.Red;
                            sb.AppendFormatLine("\t- {0} - {1}", row.SpellID, row.SpellName);
                        }
                        sb.SelectionColor = Color.Black;
                    }
                }

                sb.AppendFormatLineIfNotNull("{0}", spell.GetRadius(i));

                // append trigger spell
                var tsId = spell.EffectTriggerSpell[i];
                if (tsId != 0)
                {
                    if (DBC.Spell.ContainsKey(tsId))
                    {
                        SpellEntry trigger = DBC.Spell[tsId];
                        sb.SetStyle(Color.Blue, FontStyle.Bold);
                        sb.AppendFormatLine("   Trigger spell ({0}) {1}. Chance = {2}", tsId, trigger.SpellNameRank, spell.ProcChance);
                        sb.SetStyle(FontStyle.Italic);
                        sb.AppendFormatLineIfNotNull("   Description: {0}", trigger.Description);
                        sb.SetStyle(FontStyle.Italic);
                        sb.AppendFormatLineIfNotNull("   ToolTip: {0}", trigger.ToolTip);
                        sb.SetDefaultStyle();
                        if (trigger.ProcFlags != 0)
                        {
                            sb.AppendFormatLine("Charges - {0}", trigger.ProcCharges);
                            sb.AppendLine("=================================================");
                            sb.AppendLine(trigger.ProcInfo);
                            sb.AppendLine("=================================================");
                        }
                    }
                    else
                    {
                        sb.AppendFormatLine("Trigger spell ({0}) Not found, Chance = {1}", tsId, spell.ProcChance);
                    }
                }

                sb.AppendFormatLineIfNotNull("EffectChainTarget = {0}", spell.EffectChainTarget[i]);
                sb.AppendFormatLineIfNotNull("EffectItemType = {0}", spell.EffectItemType[i]);

                if ((Mechanics)spell.EffectMechanic[i] != Mechanics.MECHANIC_NONE)
                {
                    sb.AppendFormatLine("Effect Mechanic = {0} ({1})", spell.EffectMechanic[i], (Mechanics)spell.EffectMechanic[i]);
                }

                sb.AppendLine();
            }
        }
示例#2
0
        private void AppendSpellEffectInfo(RichTextBox sb, SpellEntry spell)
        {
            sb.AppendLine("=================================================");

            for (int i = 0; i < 3; i++)
            {
                sb.SetBold();
                if ((SpellEffects)spell.Effect[i] == SpellEffects.NO_SPELL_EFFECT)
                {
                    sb.AppendFormatLine("Effect {0}:  NO EFFECT", i);
                    return;
                }

                sb.AppendFormatLine("Effect {0}: Id {1} ({2})", i, spell.Effect[i], (SpellEffects)spell.Effect[i]);
                sb.SetDefaultStyle();
                sb.AppendFormat("BasePoints = {0}", spell.EffectBasePoints[i] + 1);
                if (spell.EffectRealPointsPerLevel[i] != 0)
                    sb.AppendFormat(" + Level * {0:F}", spell.EffectRealPointsPerLevel[i]);

                // WTF ? 1 = spell.EffectBaseDice[i]
                if (1 < spell.EffectDieSides[i])
                {
                    if (spell.EffectRealPointsPerLevel[i] != 0)
                        sb.AppendFormat(" to {0} + lvl * {1:F}",
                            spell.EffectBasePoints[i] + 1 + spell.EffectDieSides[i], spell.EffectRealPointsPerLevel[i]);
                    else
                        sb.AppendFormat(" to {0}", spell.EffectBasePoints[i] + 1 + spell.EffectDieSides[i]);
                }

                sb.AppendFormatIfNotNull(" + combo * {0:F}", spell.EffectPointsPerComboPoint[i]);

                if (spell.DmgMultiplier[i] != 1.0f)
                    sb.AppendFormat(" x {0:F}", spell.DmgMultiplier[i]);

                sb.AppendFormatIfNotNull("  Multiple = {0:F}", spell.EffectMultipleValue[i]);
                sb.AppendLine();

                sb.AppendFormatLine("Targets ({0}, {1}) ({2}, {3})",
                    spell.EffectImplicitTargetA[i], spell.EffectImplicitTargetB[i],
                    (Targets)spell.EffectImplicitTargetA[i], (Targets)spell.EffectImplicitTargetB[i]);

                sb.AppendText(AuraModTypeName(spell, i));

                uint[] ClassMask = new uint[3];

                switch (i)
                {
                    case 0: ClassMask[0] = spell.EffectSpellClassMaskA[i]; break;
                    case 1: ClassMask[1] = spell.EffectSpellClassMaskB[i]; break;
                    case 2: ClassMask[2] = spell.EffectSpellClassMaskC[i]; break;
                }

                if (ClassMask[0] != 0 || ClassMask[1] != 0 || ClassMask[2] != 0)
                {
                    sb.AppendFormatLine("SpellClassMask = {0:X8} {1:X8} {2:X8}", ClassMask[2], ClassMask[1], ClassMask[0]);

                    var query = from Spell in DBC.Spell.Values
                                where Spell.SpellFamilyName == spell.SpellFamilyName
                                && ((Spell.SpellFamilyFlags1 & ClassMask[0]) != 0
                                    || (Spell.SpellFamilyFlags2 & ClassMask[1]) != 0
                                    || (Spell.SpellFamilyFlags3 & ClassMask[2]) != 0)
                                join sk in DBC.SkillLineAbility on Spell.ID equals sk.Value.SpellId into temp
                                from Skill in temp.DefaultIfEmpty()
                                select new
                                {
                                    SpellID = Spell.ID,
                                    SpellName = Spell.SpellNameRank,
                                    SkillId = Skill.Value.SkillId
                                };

                    foreach (var row in query)
                    {
                        if (row.SkillId > 0)
                        {
                            sb.SelectionColor = Color.Blue;
                            sb.AppendFormatLine("\t+ {0} - {1}", row.SpellID, row.SpellName);
                        }
                        else
                        {
                            sb.SelectionColor = Color.Red;
                            sb.AppendFormatLine("\t- {0} - {1}", row.SpellID, row.SpellName);
                        }
                        sb.SelectionColor = Color.Black;
                    }
                }

                sb.AppendFormatLineIfNotNull("{0}", spell.GetRadius(i));

                // append trigger spell
                var tsId = spell.EffectTriggerSpell[i];
                if (tsId != 0)
                {
                    if (DBC.Spell.ContainsKey(tsId))
                    {
                        SpellEntry trigger = DBC.Spell[tsId];
                        sb.SetStyle(Color.Blue, FontStyle.Bold);
                        sb.AppendFormatLine("   Trigger spell ({0}) {1}. Chance = {2}", tsId, trigger.SpellNameRank, spell.ProcChance);
                        sb.SetStyle(FontStyle.Italic);
                        sb.AppendFormatLineIfNotNull("   Description: {0}", trigger.Description);
                        sb.SetStyle(FontStyle.Italic);
                        sb.AppendFormatLineIfNotNull("   ToolTip: {0}", trigger.ToolTip);
                        sb.SetDefaultStyle();
                        if (trigger.ProcFlags != 0)
                        {
                            sb.AppendFormatLine("Charges - {0}", trigger.ProcCharges);
                            sb.AppendLine("=================================================");
                            sb.AppendLine(trigger.ProcInfo);
                            sb.AppendLine("=================================================");
                        }
                    }
                    else
                    {
                        sb.AppendFormatLine("Trigger spell ({0}) Not found, Chance = {1}", tsId, spell.ProcChance);
                    }
                }

                sb.AppendFormatLineIfNotNull("EffectChainTarget = {0}", spell.EffectChainTarget[i]);
                sb.AppendFormatLineIfNotNull("EffectItemType = {0}", spell.EffectItemType[i]);

                if ((Mechanics)spell.EffectMechanic[i] != Mechanics.MECHANIC_NONE)
                    sb.AppendFormatLine("Effect Mechanic = {0} ({1})", spell.EffectMechanic[i], (Mechanics)spell.EffectMechanic[i]);

                sb.AppendLine();
            }
        }