private class VendorInfo private readonly List GenericBuyInfo m_Info p

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
private class VendorInfo
{
private readonly List<GenericBuyInfo> m_Info;
public VendorInfo()
{
m_Info = new List<GenericBuyInfo>();
var DefaultInfo = new List<SBInfo>
{
new SBVarietyDealer(),
new SBVagabond(),
new SBTinker(),
new SBThief(),
new SBTavernKeeper(),
new SBTanner(),
new SBTailor(),
new SBSmithTools(),
new SBStoneCrafter(),
new SBShipwright(),
new SBSEHats(),
new SBSECook(),
new SBScribe(),
new SBRealEstateBroker(),
new SBRanger(),
new SBRancher(),
new SBProvisioner(),
new SBMiner(),
//new SBNecroMage(),
new SBMiller(),
new SBMapmaker(),
new SBMage(),
new SBLeatherWorker(),
new SBKeeperOfChivalry(),
new SBInnKeeper(),
new SBJewel(),
new SBHouseDeed(),
new SBHolyMage(),
new SBHerbalist(),
new SBHealer(),
new SBHairStylist(),
new SBGlassblower(),
new SBFurtrader(),
new SBFortuneTeller(),
new SBFisherman(),
new SBFarmer(),
new SBCook(),
new SBCobbler(),
new SBCarpenter(),
new SBButcher(),
new SBBowyer(),
new SBBlacksmith(),
new SBBeekeeper(),
new SBBarkeeper(),
new SBBard(),
new SBBanker(),
new SBBaker(),
new SBArchitect(),
new SBAnimalTrainer(),
new SBAlchemist(),
new SBSwordWeapon(),
new SBStavesWeapon(),
new SBSpearForkWeapon(),
new SBRangedWeapon(),
new SBPoleArmWeapon(),
new SBMaceWeapon(),
new SBKnifeWeapon(),
new SBAxeWeapon(),
new SBSEWeapons(),
new SBSELeatherArmor(),
new SBSEFood(),
new SBSECarpenter(),
new SBSEBowyer(),
new SBSEArmor(),
//new SBSAMystic(),
new SBWoodenShields(),
new SBStuddedArmor(),
new SBRingmailArmor(),
new SBPlateArmor(),
new SBMetalShields(),
new SBLeatherArmor(),
new SBHelmetArmor(),
new SBChainmailArmor(),
new SBVeterinarian(),
new SBWaiter(),
new SBWeaver(),
new SBWeaponSmith(),
};
for (var a = 0; a < DefaultInfo.Count; a++)
{
for (var b = 0; b < DefaultInfo[a].BuyInfo.Count; b++)
{
m_Info.Add(DefaultInfo[a].BuyInfo[b]);
}
}
}
public bool ContainsItem(Item item, out int Price)
{
var Result = false;
Price = 0;
foreach (var info in m_Info)
{
if (info.Type == item.GetType())
{
Price = info.Price;
Result = true;
break;
}
}
return Result;
}
}