Пример #1
0
 private void ParseEventType(string[] rawEntryValues, ref int index)
 {
     EventType = ParseHelper.ParseValue <string>(rawEntryValues[index++]);
 }
Пример #2
0
        private void ParseOthers(string[] rawEntryValues, ref int index)
        {
            switch (EventType)
            {
            case "SPELL_ABSORBED":
                AbsorbCaster     = UnitFlyweight.ParseUnit(rawEntryValues, ref index);
                AlternativeSpell = new SpellInfo(rawEntryValues, ref index);
                Amount           = ParseHelper.ParseValue <uint>(rawEntryValues[index++]);
                break;

            case "SPELL_AURA_APPLIED":
            case "SPELL_AURA_REMOVED":
            case "SPELL_AURA_REFRESH":
            case "SPELL_AURA_BROKEN":
                SpellAuraType = ParseHelper.ParseAuraType(rawEntryValues[index++]);
                if (rawEntryValues.Length > index)
                {
                    Amount = ParseHelper.ParseValue <uint>(rawEntryValues[index++]);
                }
                break;

            case "SPELL_AURA_APPLIED_DOSE":
            case "SPELL_AURA_REMOVED_DOSE":
                SpellAuraType = ParseHelper.ParseAuraType(rawEntryValues[index++]);
                Amount        = ParseHelper.ParseValue <uint>(rawEntryValues[index++]);
                break;

            case "SPELL_CAST_FAILED":
                FailReason = rawEntryValues[index++];
                break;

            case "SPELL_ENERGIZE":
                PowerType = ParseHelper.ParseValue <int>(rawEntryValues[index++]);
                Amount    = ParseHelper.ParseValue <uint>(rawEntryValues[index++]);
                break;

            case "SPELL_INTERRUPT":
                AlternativeSpell = new SpellInfo(rawEntryValues, ref index);
                break;

            case "SPELL_AURA_BROKEN_SPELL":
                AlternativeSpell = new SpellInfo(rawEntryValues, ref index);
                SpellAuraType    = ParseHelper.ParseAuraType(rawEntryValues[index++]);
                break;

            case "UNIT_DIED":
            case "UNIT_DESTORYED":
            case "UNIT_DESTROYED":
            case "SPELL_INSTAKILL":
            case "PARTY_KILL":
                if (rawEntryValues[index] == "0")
                {
                    index++;
                }
                break;
            }
            if (rawEntryValues.Length > index && false)
            {
                Console.Write(EventType);
                Console.Write(" ");
                Console.WriteLine(string.Join(",", rawEntryValues.Skip(index)));
                Console.WriteLine(string.Join(",", rawEntryValues));
            }
        }
Пример #3
0
 public SpellInfo(string[] param, ref int index)
 {
     SpellId     = ParseHelper.ParseValue <uint>(param[index++]);
     SpellName   = ParseHelper.ParseValue <string>(param[index++]);
     SpellSchool = ParseHelper.ParseHexValue(param[index++]);
 }