public override string ToString() { if (Low == 0 && High == 0) { return("Full: 0x0"); } if (HasEntry()) { StoreNameType type = Utilities.ObjectTypeToStore(GetObjectType()); // ReSharper disable once UseStringInterpolation return(string.Format("Full: 0x{0}{1} {2}/{3} R{4}/S{5} Map: {6} Entry: {7} Low: {8}", High.ToString("X16"), Low.ToString("X16"), GetHighType(), GetSubType(), GetRealmId(), GetServerId(), StoreGetters.GetName(StoreNameType.Map, GetMapId()), StoreGetters.GetName(type, (int)GetEntry()), GetLow())); } // TODO: Implement extra format for battleground, see WowGuid64.ToString() string name = StoreGetters.GetName(this); // ReSharper disable once UseStringInterpolation return(string.Format("Full: 0x{0}{1} {2}/{3} R{4}/S{5} Map: {6} Low: {7}", High.ToString("X16"), Low.ToString("X16"), GetHighType(), GetSubType(), GetRealmId(), GetServerId(), StoreGetters.GetName(StoreNameType.Map, GetMapId()), GetLow() + (String.IsNullOrEmpty(name) ? String.Empty : (" Name: " + name)))); }
public override string ToString() { return("Full: 0x" + Full.ToString("X4") + " Type: " + LfgType + " Instance: " + StoreGetters.GetName(StoreNameType.LFGDungeon, InstanceId)); }
public string ReadSpellEntry(uint spellID, string name, params object[] indexes) { AddValue(name, FormatInteger(spellID, StoreGetters.GetName(StoreNameType.Spell, (int)spellID, false)), indexes); string spellInfo = string.Empty; for (uint idx = 0; idx < 32; idx++) { var tuple = Tuple.Create(spellID, idx); if (DBC.DBC.SpellEffectStores.ContainsKey(tuple)) { spellInfo += Environment.NewLine; var effect = DBC.DBC.SpellEffectStores[tuple]; var difficulty = DBC.DBC.Difficulty.ContainsKey((int)effect.DifficultyID) ? DBC.DBC.Difficulty[(int)effect.DifficultyID].Name : "DIFFICULTY_NONE"; var aura = (AuraTypeLegion)effect.EffectAura; var misc = effect.EffectMiscValue[0]; AddValue("SpellInfo", $"Effect { effect.EffectIndex }: Id { effect.Effect } ({ (SpellEffects)effect.Effect }) { difficulty }", indexes); AddValue("SpellInfo", $"Targets ({ effect.ImplicitTarget[0] }, { effect.ImplicitTarget[1] }) ({ (Targets)effect.ImplicitTarget[0] }, { (Targets)effect.ImplicitTarget[1] })", indexes); if (effect.EffectAura == 0) { AddValue("SpellInfo", $"EffectMiscValueA = { effect.EffectMiscValue[0] }", indexes); AddValue("SpellInfo", $"EffectMiscValueB = { effect.EffectMiscValue[1] }", indexes); AddValue("SpellInfo", $"EffectAmplitude = { effect.EffectAmplitude }", indexes); continue; } string auraInfo = string.Empty; auraInfo += $"Aura Id {aura:D} ({ aura })"; auraInfo += $", value = { effect.EffectBasePoints }"; auraInfo += $", misc = { misc } ("; switch (aura) { case AuraTypeLegion.SPELL_AURA_MOD_STAT: spellInfo += $"{ (UnitMods)misc }"; break; case AuraTypeLegion.SPELL_AURA_MOD_RATING: case AuraTypeLegion.SPELL_AURA_MOD_RATING_PCT: spellInfo += $"{ (CombatRating)misc }"; break; case AuraTypeLegion.SPELL_AURA_ADD_FLAT_MODIFIER: case AuraTypeLegion.SPELL_AURA_ADD_PCT_MODIFIER: spellInfo += $"{ (SpellModOp)misc }"; break; default: spellInfo += $"{ misc }"; break; } auraInfo += $"), miscB = { effect.EffectMiscValue[1] } , amplitude = { effect.EffectAmplitude }, periodic = { effect.EffectAuraPeriod }"; AddValue("SpellInfo", auraInfo, indexes); } } return(spellInfo); }