Guest User

Untitled

a guest
May 3rd, 2017
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 13.16 KB | None | 0 0
  1. using HSGameEngine.GameEngine.Common;
  2. using HSGameEngine.GameEngine.Logic;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Xml.Linq;
  6.  
  7. public class GoodVO
  8. {
  9.     public int ID;
  10.  
  11.     public int Categoriy;
  12.  
  13.     public int HandType;
  14.  
  15.     public int ActionType;
  16.  
  17.     public string Title;
  18.  
  19.     public string Description;
  20.  
  21.     public string ResName;
  22.  
  23.     public string GuaJieDian;
  24.  
  25.     public string GuaJieTeXiao;
  26.  
  27.     public string ShaderID;
  28.  
  29.     public int GridNum;
  30.  
  31.     public int PriceOne;
  32.  
  33.     public int PriceTwo;
  34.  
  35.     public int CDTime;
  36.  
  37.     public int PubCDTime;
  38.  
  39.     public int ShareGroupID;
  40.  
  41.     public int SuitID;
  42.  
  43.     public int ShouShiSuitID;
  44.  
  45.     public int QualityID;
  46.  
  47.     public string IconCode;
  48.  
  49.     public string FallGoodsIcon;
  50.  
  51.     public string GoodsColor;
  52.  
  53.     public string FallGoodsColor;
  54.  
  55.     public int ToZhuanSheng;
  56.  
  57.     public int ToLevel;
  58.  
  59.     public int ToOccupation;
  60.  
  61.     public int ToSex;
  62.  
  63.     public string ToType;
  64.  
  65.     public string ToTypeProperty;
  66.  
  67.     public int UsingMode;
  68.  
  69.     public string PiLiangUse;
  70.  
  71.     public int UsingNum;
  72.  
  73.     public string ExecMagic;
  74.  
  75.     public int TuoZhan;
  76.  
  77.     public int XiLian;
  78.  
  79.     public int BaoguoID;
  80.  
  81.     public int GlUI;
  82.  
  83.     public int LieShaPrice;
  84.  
  85.     public int JinYuanPrice;
  86.  
  87.     public int JunGongPrice;
  88.  
  89.     public int JiFenPrice;
  90.  
  91.     public int ZhanHunPrice;
  92.  
  93.     public int ChangeJinYuan;
  94.  
  95.     public string Sound;
  96.  
  97.     public string DropSound;
  98.  
  99.     public string GetSound;
  100.  
  101.     public int Strength;
  102.  
  103.     public int Dexterity;
  104.  
  105.     public int Intelligence;
  106.  
  107.     public int Constitution;
  108.  
  109.     public int JinJie;
  110.  
  111.     public int ChangeZaiZao;
  112.  
  113.     public int MainOccupation;
  114.  
  115.     public int PulverizedFluorescentPowderNum;
  116.  
  117.     private double[] _EquipProps;
  118.  
  119.     private string _EquipPropsBinString;
  120.  
  121.     public int ItemQuality;
  122.  
  123.     public int NoSaleOut;
  124.  
  125.     public int Valuables;
  126.  
  127.     private static Dictionary<string, int> _PropertyIndexDict;
  128.  
  129.     public double[] EquipProps
  130.     {
  131.         get
  132.         {
  133.             if (this._EquipProps == null)
  134.             {
  135.                 this._EquipProps = VOBinOperator.UnPackArrayDouble(this._EquipPropsBinString);
  136.             }
  137.             return this._EquipProps;
  138.         }
  139.     }
  140.  
  141.     public static Dictionary<string, int> PropertyIndexDict
  142.     {
  143.         get
  144.         {
  145.             if (GoodVO._PropertyIndexDict == null)
  146.             {
  147.                 int num = -1;
  148.                 GoodVO._PropertyIndexDict = new Dictionary<string, int>();
  149.                 GoodVO._PropertyIndexDict.Add("ID", ++num);
  150.                 GoodVO._PropertyIndexDict.Add("Categoriy", ++num);
  151.                 GoodVO._PropertyIndexDict.Add("HandType", ++num);
  152.                 GoodVO._PropertyIndexDict.Add("ActionType", ++num);
  153.                 GoodVO._PropertyIndexDict.Add("Title", ++num);
  154.                 GoodVO._PropertyIndexDict.Add("Description", ++num);
  155.                 GoodVO._PropertyIndexDict.Add("ResName", ++num);
  156.                 GoodVO._PropertyIndexDict.Add("GuaJieDian", ++num);
  157.                 GoodVO._PropertyIndexDict.Add("GuaJieTeXiao", ++num);
  158.                 GoodVO._PropertyIndexDict.Add("ShaderID", ++num);
  159.                 GoodVO._PropertyIndexDict.Add("GridNum", ++num);
  160.                 GoodVO._PropertyIndexDict.Add("PriceOne", ++num);
  161.                 GoodVO._PropertyIndexDict.Add("PriceTwo", ++num);
  162.                 GoodVO._PropertyIndexDict.Add("CDTime", ++num);
  163.                 GoodVO._PropertyIndexDict.Add("PubCDTime", ++num);
  164.                 GoodVO._PropertyIndexDict.Add("ShareGroupID", ++num);
  165.                 GoodVO._PropertyIndexDict.Add("SuitID", ++num);
  166.                 GoodVO._PropertyIndexDict.Add("ShouShiSuitID", ++num);
  167.                 GoodVO._PropertyIndexDict.Add("QualityID", ++num);
  168.                 GoodVO._PropertyIndexDict.Add("IconCode", ++num);
  169.                 GoodVO._PropertyIndexDict.Add("FallGoodsIcon", ++num);
  170.                 GoodVO._PropertyIndexDict.Add("GoodsColor", ++num);
  171.                 GoodVO._PropertyIndexDict.Add("FallGoodsColor", ++num);
  172.                 GoodVO._PropertyIndexDict.Add("ToZhuanSheng", ++num);
  173.                 GoodVO._PropertyIndexDict.Add("ToLevel", ++num);
  174.                 GoodVO._PropertyIndexDict.Add("ToOccupation", ++num);
  175.                 GoodVO._PropertyIndexDict.Add("ToSex", ++num);
  176.                 GoodVO._PropertyIndexDict.Add("ToType", ++num);
  177.                 GoodVO._PropertyIndexDict.Add("ToTypeProperty", ++num);
  178.                 GoodVO._PropertyIndexDict.Add("UsingMode", ++num);
  179.                 GoodVO._PropertyIndexDict.Add("PiLiangUse", ++num);
  180.                 GoodVO._PropertyIndexDict.Add("UsingNum", ++num);
  181.                 GoodVO._PropertyIndexDict.Add("ExecMagic", ++num);
  182.                 GoodVO._PropertyIndexDict.Add("TuoZhan", ++num);
  183.                 GoodVO._PropertyIndexDict.Add("XiLian", ++num);
  184.                 GoodVO._PropertyIndexDict.Add("BaoguoID", ++num);
  185.                 GoodVO._PropertyIndexDict.Add("GlUI", ++num);
  186.                 GoodVO._PropertyIndexDict.Add("LieShaPrice", ++num);
  187.                 GoodVO._PropertyIndexDict.Add("JinYuanPrice", ++num);
  188.                 GoodVO._PropertyIndexDict.Add("JunGongPrice", ++num);
  189.                 GoodVO._PropertyIndexDict.Add("JiFenPrice", ++num);
  190.                 GoodVO._PropertyIndexDict.Add("ZhanHunPrice", ++num);
  191.                 GoodVO._PropertyIndexDict.Add("ChangeJinYuan", ++num);
  192.                 GoodVO._PropertyIndexDict.Add("Sound", ++num);
  193.                 GoodVO._PropertyIndexDict.Add("DropSound", ++num);
  194.                 GoodVO._PropertyIndexDict.Add("GetSound", ++num);
  195.                 GoodVO._PropertyIndexDict.Add("EquipProps", ++num);
  196.                 GoodVO._PropertyIndexDict.Add("Strength", ++num);
  197.                 GoodVO._PropertyIndexDict.Add("Dexterity", ++num);
  198.                 GoodVO._PropertyIndexDict.Add("Intelligence", ++num);
  199.                 GoodVO._PropertyIndexDict.Add("Constitution", ++num);
  200.                 GoodVO._PropertyIndexDict.Add("JinJie", ++num);
  201.                 GoodVO._PropertyIndexDict.Add("ChangeZaiZao", ++num);
  202.                 GoodVO._PropertyIndexDict.Add("MainOccupation", ++num);
  203.                 GoodVO._PropertyIndexDict.Add("ChangeYingGuang", ++num);
  204.                 GoodVO._PropertyIndexDict.Add("ItemQuality", ++num);
  205.                 GoodVO._PropertyIndexDict.Add("NoSaleOut", ++num);
  206.                 GoodVO._PropertyIndexDict.Add("Valuables", num + 1);
  207.             }
  208.             return GoodVO._PropertyIndexDict;
  209.         }
  210.     }
  211.  
  212.     public void CopyFrom(XElement xml)
  213.     {
  214.         this.ID = Global.GetXElementAttributeInt(xml, "ID");
  215.         this.Categoriy = Global.GetXElementAttributeInt(xml, "Categoriy");
  216.         this.HandType = Global.GetXElementAttributeInt(xml, "HandType");
  217.         this.ActionType = Global.GetXElementAttributeInt(xml, "ActionType");
  218.         this.Title = Global.GetXElementAttributeStr(xml, "Title");
  219.         this.Description = Global.GetXElementAttributeStr(xml, "Description");
  220.         this.ResName = Global.GetXElementAttributeStr(xml, "ResName");
  221.         this.GuaJieDian = Global.GetXElementAttributeStr(xml, "GuaJieDian");
  222.         this.GuaJieTeXiao = Global.GetXElementAttributeStr(xml, "GuaJieTeXiao");
  223.         this.ShaderID = Global.GetXElementAttributeStr(xml, "ShaderID");
  224.         this.GridNum = Global.GetXElementAttributeInt(xml, "GridNum");
  225.         this.PriceOne = Global.GetXElementAttributeInt(xml, "PriceOne");
  226.         this.PriceTwo = Global.GetXElementAttributeInt(xml, "PriceTwo");
  227.         this.CDTime = Global.GetXElementAttributeInt(xml, "CDTime");
  228.         this.PubCDTime = Global.GetXElementAttributeInt(xml, "PubCDTime");
  229.         this.ShareGroupID = Global.GetXElementAttributeInt(xml, "ShareGroupID");
  230.         this.SuitID = Global.GetXElementAttributeInt(xml, "SuitID");
  231.         this.ShouShiSuitID = Global.GetXElementAttributeInt(xml, "ShouShiSuitID");
  232.         this.QualityID = Global.GetXElementAttributeInt(xml, "QualityID");
  233.         this.IconCode = Global.GetXElementAttributeStr(xml, "IconCode");
  234.         this.FallGoodsIcon = Global.GetXElementAttributeStr(xml, "FallGoodsIcon");
  235.         this.GoodsColor = Global.GetXElementAttributeStr(xml, "GoodsColor");
  236.         this.FallGoodsColor = Global.GetXElementAttributeStr(xml, "FallGoodsColor");
  237.         this.ToZhuanSheng = Global.GetXElementAttributeInt(xml, "ToZhuanSheng");
  238.         this.ToLevel = Global.GetXElementAttributeInt(xml, "ToLevel");
  239.         this.ToOccupation = Global.GetXElementAttributeInt(xml, "ToOccupation");
  240.         this.ToSex = Global.GetXElementAttributeInt(xml, "ToSex");
  241.         this.ToType = Global.GetXElementAttributeStr(xml, "ToType");
  242.         this.ToTypeProperty = Global.GetXElementAttributeStr(xml, "ToTypeProperty");
  243.         this.UsingMode = Global.GetXElementAttributeInt(xml, "UsingMode");
  244.         this.PiLiangUse = Global.GetXElementAttributeStr(xml, "PiLiangUse");
  245.         this.UsingNum = Global.GetXElementAttributeInt(xml, "UsingNum");
  246.         this.ExecMagic = Global.GetXElementAttributeStr(xml, "ExecMagic");
  247.         this.TuoZhan = Global.GetXElementAttributeInt(xml, "TuoZhan");
  248.         this.XiLian = Global.GetXElementAttributeInt(xml, "XiLian");
  249.         this.BaoguoID = Global.GetXElementAttributeInt(xml, "BaoguoID");
  250.         this.GlUI = Global.GetXElementAttributeInt(xml, "GlUI");
  251.         this.LieShaPrice = Global.GetXElementAttributeInt(xml, "LieShaPrice");
  252.         this.JinYuanPrice = Global.GetXElementAttributeInt(xml, "JinYuanPrice");
  253.         this.JunGongPrice = Global.GetXElementAttributeInt(xml, "JunGongPrice");
  254.         this.JiFenPrice = Global.GetXElementAttributeInt(xml, "JiFenPrice");
  255.         this.ZhanHunPrice = Global.GetXElementAttributeInt(xml, "ZhanHunPrice");
  256.         this.ChangeJinYuan = Global.GetXElementAttributeInt(xml, "ChangeJinYuan");
  257.         this.Sound = Global.GetXElementAttributeStr(xml, "Sound");
  258.         this.DropSound = Global.GetXElementAttributeStr(xml, "DropSound");
  259.         this.GetSound = Global.GetXElementAttributeStr(xml, "GetSound");
  260.         this._EquipProps = ConvertExt.StringArray2DoubleArray(Global.GetXElementAttributeStr(xml, "EquipProps").Split(new char[]
  261.         {
  262.             ','
  263.         }));
  264.         this.Strength = Global.GetXElementAttributeInt(xml, "Strength");
  265.         this.Dexterity = Global.GetXElementAttributeInt(xml, "Dexterity");
  266.         this.Intelligence = Global.GetXElementAttributeInt(xml, "Intelligence");
  267.         this.Constitution = Global.GetXElementAttributeInt(xml, "Constitution");
  268.         this.JinJie = Global.GetXElementAttributeInt(xml, "JinJie");
  269.         this.ChangeZaiZao = Global.GetXElementAttributeInt(xml, "ChangeZaiZao");
  270.         this.MainOccupation = Global.GetXElementAttributeInt(xml, "MainOccupation");
  271.         this.PulverizedFluorescentPowderNum = Global.GetXElementAttributeInt(xml, "ChangeYingGuang");
  272.         this.ItemQuality = Global.GetXElementAttributeInt(xml, "ItemQuality");
  273.         this.NoSaleOut = Global.GetXElementAttributeInt(xml, "NoSaleOut");
  274.         this.Valuables = Global.GetXElementAttributeInt(xml, "Valuables");
  275.     }
  276.  
  277.     public void CopyFrom(TrdGoodVOPairs pairs)
  278.     {
  279.         if (TrdGoodVOPairs.IsCopySpeedUp())
  280.         {
  281.             pairs.StartGoodVOCopySpeedUp();
  282.         }
  283.         this.ID = pairs.PropertyAtOfInt("ID");
  284.         this.Categoriy = pairs.PropertyAtOfInt("Categoriy");
  285.         this.HandType = pairs.PropertyAtOfInt("HandType");
  286.         this.ActionType = pairs.PropertyAtOfInt("ActionType");
  287.         this.Title = pairs.PropertyAtOfStr("Title");
  288.         this.Description = pairs.PropertyAtOfStr("Description");
  289.         this.ResName = pairs.PropertyAtOfStr("ResName");
  290.         this.GuaJieDian = pairs.PropertyAtOfStr("GuaJieDian");
  291.         this.GuaJieTeXiao = pairs.PropertyAtOfStr("GuaJieTeXiao");
  292.         this.ShaderID = pairs.PropertyAtOfStr("ShaderID");
  293.         this.GridNum = pairs.PropertyAtOfInt("GridNum");
  294.         this.PriceOne = pairs.PropertyAtOfInt("PriceOne");
  295.         this.PriceTwo = pairs.PropertyAtOfInt("PriceTwo");
  296.         this.CDTime = pairs.PropertyAtOfInt("CDTime");
  297.         this.PubCDTime = pairs.PropertyAtOfInt("PubCDTime");
  298.         this.ShareGroupID = pairs.PropertyAtOfInt("ShareGroupID");
  299.         this.SuitID = pairs.PropertyAtOfInt("SuitID");
  300.         this.ShouShiSuitID = pairs.PropertyAtOfInt("ShouShiSuitID");
  301.         this.QualityID = pairs.PropertyAtOfInt("QualityID");
  302.         this.IconCode = pairs.PropertyAtOfStr("IconCode");
  303.         this.FallGoodsIcon = pairs.PropertyAtOfStr("FallGoodsIcon");
  304.         this.GoodsColor = pairs.PropertyAtOfStr("GoodsColor");
  305.         this.FallGoodsColor = pairs.PropertyAtOfStr("FallGoodsColor");
  306.         this.ToZhuanSheng = pairs.PropertyAtOfInt("ToZhuanSheng");
  307.         this.ToLevel = pairs.PropertyAtOfInt("ToLevel");
  308.         this.ToOccupation = pairs.PropertyAtOfInt("ToOccupation");
  309.         this.ToSex = pairs.PropertyAtOfInt("ToSex");
  310.         this.ToType = pairs.PropertyAtOfStr("ToType");
  311.         this.ToTypeProperty = pairs.PropertyAtOfStr("ToTypeProperty");
  312.         this.UsingMode = pairs.PropertyAtOfInt("UsingMode");
  313.         this.PiLiangUse = pairs.PropertyAtOfStr("PiLiangUse");
  314.         this.UsingNum = pairs.PropertyAtOfInt("UsingNum");
  315.         this.ExecMagic = pairs.PropertyAtOfStr("ExecMagic");
  316.         this.TuoZhan = pairs.PropertyAtOfInt("TuoZhan");
  317.         this.XiLian = pairs.PropertyAtOfInt("XiLian");
  318.         this.BaoguoID = pairs.PropertyAtOfInt("BaoguoID");
  319.         this.GlUI = pairs.PropertyAtOfInt("GlUI");
  320.         this.LieShaPrice = pairs.PropertyAtOfInt("LieShaPrice");
  321.         this.JinYuanPrice = pairs.PropertyAtOfInt("JinYuanPrice");
  322.         this.JunGongPrice = pairs.PropertyAtOfInt("JunGongPrice");
  323.         this.JiFenPrice = pairs.PropertyAtOfInt("JiFenPrice");
  324.         this.ZhanHunPrice = pairs.PropertyAtOfInt("ZhanHunPrice");
  325.         this.ChangeJinYuan = pairs.PropertyAtOfInt("ChangeJinYuan");
  326.         this.Sound = pairs.PropertyAtOfStr("Sound");
  327.         this.DropSound = pairs.PropertyAtOfStr("DropSound");
  328.         this.GetSound = pairs.PropertyAtOfStr("GetSound");
  329.         this._EquipPropsBinString = pairs.PropertyAtOfStr("EquipProps");
  330.         this.Strength = pairs.PropertyAtOfInt("Strength");
  331.         this.Dexterity = pairs.PropertyAtOfInt("Dexterity");
  332.         this.Intelligence = pairs.PropertyAtOfInt("Intelligence");
  333.         this.Constitution = pairs.PropertyAtOfInt("Constitution");
  334.         this.JinJie = pairs.PropertyAtOfInt("JinJie");
  335.         this.ChangeZaiZao = pairs.PropertyAtOfInt("ChangeZaiZao");
  336.         this.MainOccupation = pairs.PropertyAtOfInt("MainOccupation");
  337.         this.PulverizedFluorescentPowderNum = pairs.PropertyAtOfInt("ChangeYingGuang");
  338.         this.ItemQuality = pairs.PropertyAtOfInt("ItemQuality");
  339.         this.NoSaleOut = pairs.PropertyAtOfInt("NoSaleOut");
  340.         this.Valuables = pairs.PropertyAtOfInt("Valuables");
  341.     }
  342.  
  343.     public List<byte> ToByteLst(GoodVO preVO, GoodVO curVO)
  344.     {
  345.         return new List<byte>();
  346.     }
  347.  
  348.     public bool Equals(GoodVO obj)
  349.     {
  350.         return obj != null;
  351.     }
  352. }
Advertisement
Add Comment
Please, Sign In to add comment