All pastes #133922 Raw Edit

Anonymous

public text v1 · immutable
#133922 ·published 2006-08-16 04:54 UTC
rendered paste body
StringBuilder sb = new StringBuilder();
                sb.Append("a");

                if (Quality != WeaponQuality.Regular)
                {
                    if (m_Quality == WeaponQuality.Exceptional)
                        sb.Append("n exceptional");

                    if (PoisonCharges > 0)
                        sb.Append(" poisoned");                       

                    sb.Append(this.ItemData.Name);

                    if (Crafter != null )
                        sb.AppendFormat(" crafted by {0}", Crafter.Name );                    
                }
                else
                {
                    if (this.Slayer == SlayerName.Silver)
                        sb.Append(" silver");

                    switch (DurabilityLevel)
                    {
                        case WeaponDurabilityLevel.Durable: sb.Append(" durable,"); break;
                        case WeaponDurabilityLevel.Fortified: sb.Append(" fortified,"); break;
                        case WeaponDurabilityLevel.Indestructible: sb.Append(" indestructible,"); 
                            sb.Insert(1, "n"); break;
                        case WeaponDurabilityLevel.Massive: sb.Append(" massive"); break;
                        case WeaponDurabilityLevel.Substantial: sb.Append(" substantial,"); break;
                        default: break;
                    }

                    switch (AccuracyLevel)
                    {
                        case WeaponAccuracyLevel.Accurate: sb.Append(" accurate");
                                sb.Insert(1, "n"); break;
                        case WeaponAccuracyLevel.Eminently: sb.Append(" eminently accurate");
                                sb.Insert(1, "n"); break;
                        case WeaponAccuracyLevel.Exceedingly: sb.Append(" exceedingly accurate");
                                sb.Insert(1, "n"); break;
                        case WeaponAccuracyLevel.Supremely: sb.Append(" supremely accurate");break;
                        case WeaponAccuracyLevel.Surpassingly: sb.Append(" surpassingly accurate"); break;
                        default: break;
                    }

                    if (PoisonCharges > 0)
                        sb.AppendFormat(" poisoned");

                    sb.Append(this.ItemData.Name);

                    switch (DamageLevel)
                    {
                        case WeaponDamageLevel.Force: sb.Append(" of force"); break;
                        case WeaponDamageLevel.Might: sb.Append(" of might"); break;
                        case WeaponDamageLevel.Power: sb.Append(" of power"); break;
                        case WeaponDamageLevel.Ruin: sb.Append(" of ruin"); break;
                        case WeaponDamageLevel.Vanq: sb.Append(" of vanquishing"); break;
                        default: break;
                    }

                    if (AffectCharges > 0)
                    {
                        switch (PreUORMagAff)
                        {
                            case PreUORMagAff.Burning: sb.Append(" and Burning "); break;
                            case PreUORMagAff.Clumsiness: sb.Append(" and Clumsiness"); break;
                            case PreUORMagAff.DaemonBreath: sb.Append(" and Daemon's Breath"); break;
                            case PreUORMagAff.Evil: sb.Append(" and Evil"); break;
                            case PreUORMagAff.Feeblemindedness: sb.Append(" and Feeblemindedness"); break;
                            case PreUORMagAff.GhoulTouch: sb.Append(" and Ghoul's Touch"); break;
                            case PreUORMagAff.MagesBane: sb.Append(" and Mages Bane"); break;
                            case PreUORMagAff.Thunder: sb.Append(" and Thunder");  break;
                            case PreUORMagAff.Weakness: sb.Append(" and Weakness"); break;
                            case PreUORMagAff.Wounding: sb.Append(" and Wounding"); break;
                            default:
                        }

                        sb.AppendFormat(" with {0} charges", AffectCharges);
                    }                    
                }

                switch (LootType)
                {
                    case LootType.Blessed: sb.Append(" (blessed)"); break;
                    case LootType.Cursed: sb.Append(" (cursed)"); break;
                    default:
                }

                if (PlayerState != null)
                    sb.Append(" (factions)");

                this.LabelTo(from, "{0}", sb.ToString().ToLower());