public static void FindSpecialItemInfo(SqlDataProvider.Data.ItemInfo info, ref int gold, ref int money, ref int giftToken, ref int medal) { switch (info.TemplateID) { case -100: gold += info.Count; info = (SqlDataProvider.Data.ItemInfo)null; break; case 11408: medal += info.Count; info = (SqlDataProvider.Data.ItemInfo)null; break; case -1100: giftToken += info.Count; info = (SqlDataProvider.Data.ItemInfo)null; break; case -200: money += info.Count; info = (SqlDataProvider.Data.ItemInfo)null; break; } }
public void PropertyString(SqlDataProvider.Data.ItemInfo item, ref string Property) { if (item == null) { return; } Property = string.Format("{0},{1},{2},{3},{4},{5},{6},{7},{8}", (object)item.StrengthenLevel, (object)item.Attack, (object)item.Defence, (object)item.Agility, (object)item.Luck, (object)item.AttackCompose, (object)item.DefendCompose, (object)item.AgilityCompose, (object)item.LuckCompose); }
public void FusionItem(SqlDataProvider.Data.ItemInfo item, ref string Property) { if (item == null) { return; } Property = Property + string.Format("{0}:{1},{2}", (object)item.ItemID, (object)item.Template.Name, (object)Convert.ToInt32(item.IsBinds)) + "|"; }
public static SqlDataProvider.Data.ItemInfo CreateFromTemplate(ItemTemplateInfo goods, int count, int type) { if (goods == null) { return((SqlDataProvider.Data.ItemInfo)null); } SqlDataProvider.Data.ItemInfo itemInfo = new SqlDataProvider.Data.ItemInfo(goods); itemInfo.AgilityCompose = 0; itemInfo.AttackCompose = 0; itemInfo.BeginDate = DateTime.Now; itemInfo.Color = ""; itemInfo.Skin = ""; itemInfo.DefendCompose = 0; itemInfo.IsUsed = false; itemInfo.IsDirty = false; itemInfo.IsExist = true; itemInfo.IsJudge = true; itemInfo.LuckCompose = 0; itemInfo.StrengthenLevel = 0; itemInfo.TemplateID = goods.TemplateID; itemInfo.ValidDate = 0; itemInfo.Count = count; itemInfo.IsBinds = goods.BindType == 1; itemInfo._removeDate = DateTime.Now; itemInfo._removeType = type; itemInfo.Hole1 = -1; itemInfo.Hole2 = -1; itemInfo.Hole3 = -1; itemInfo.Hole4 = -1; itemInfo.Hole5 = -1; itemInfo.Hole6 = -1; itemInfo.Hole5Exp = 0; itemInfo.Hole5Level = 0; itemInfo.Hole6Exp = 0; itemInfo.Hole6Level = 0; itemInfo.IsGold = false; itemInfo.goldValidDate = 0; itemInfo.goldBeginTime = DateTime.Now; itemInfo.StrengthenExp = 0; itemInfo.latentEnergyCurStr = "0,0,0,0"; itemInfo.latentEnergyNewStr = "0,0,0,0"; itemInfo.latentEnergyEndTime = DateTime.Now; itemInfo.beadExp = 0; itemInfo.beadLevel = 0; itemInfo.beadIsLock = false; itemInfo.isShowBind = false; itemInfo.Damage = 0; itemInfo.Guard = 0; itemInfo.Bless = 0; itemInfo.Blood = 0; return(itemInfo); }
public SqlDataProvider.Data.ItemInfo Clone() { SqlDataProvider.Data.ItemInfo itemInfo = new SqlDataProvider.Data.ItemInfo(this._template); itemInfo._userID = this._userID; itemInfo._validDate = this._validDate; itemInfo._templateId = this._templateId; itemInfo._strengthenLevel = this._strengthenLevel; itemInfo._strengthenExp = this._strengthenExp; itemInfo._luckCompose = this._luckCompose; itemInfo._itemID = 0; itemInfo._isJudage = this._isJudage; itemInfo._isExist = this._isExist; itemInfo._isBinds = this._isBinds; itemInfo._isUsed = this._isUsed; itemInfo._defendCompose = this._defendCompose; itemInfo._count = this._count; itemInfo._color = this._color; itemInfo.Skin = this._skin; itemInfo._beginDate = this._beginDate; itemInfo._attackCompose = this._attackCompose; itemInfo._agilityCompose = this._agilityCompose; itemInfo._bagType = this._bagType; itemInfo._isDirty = true; itemInfo._removeDate = this._removeDate; itemInfo._removeType = this._removeType; itemInfo._hole1 = this._hole1; itemInfo._hole2 = this._hole2; itemInfo._hole3 = this._hole3; itemInfo._hole4 = this._hole4; itemInfo._hole5 = this._hole5; itemInfo._hole6 = this._hole6; itemInfo._hole5Exp = this._hole5Exp; itemInfo._hole5Level = this._hole5Level; itemInfo._hole6Exp = this._hole6Exp; itemInfo._hole6Level = this._hole6Level; itemInfo._isGold = this._isGold; itemInfo._goldBeginTime = this._goldBeginTime; itemInfo._goldValidDate = this._goldValidDate; itemInfo._strengthenExp = this._strengthenExp; itemInfo._latentEnergyCurStr = this._latentEnergyCurStr; itemInfo._latentEnergyNewStr = this._latentEnergyNewStr; itemInfo._latentEnergyEndTime = this._latentEnergyEndTime; itemInfo._beadExp = this._beadExp; itemInfo._beadLevel = this._beadLevel; itemInfo._beadIsLock = this._beadIsLock; itemInfo._isShowBind = this._isShowBind; itemInfo._Damage = this._Damage; itemInfo._Guard = this._Guard; itemInfo._Bless = this._Bless; itemInfo._Blood = this._Blood; return(itemInfo); }
public void Copy(SqlDataProvider.Data.ItemInfo item) { this._userID = item.UserID; this._validDate = item.ValidDate; this._templateId = item.TemplateID; this._strengthenLevel = item.StrengthenLevel; this._strengthenExp = item.StrengthenExp; this._luckCompose = item.LuckCompose; this._itemID = 0; this._isJudage = item.IsJudge; this._isExist = item.IsExist; this._isBinds = item.IsBinds; this._isUsed = item.IsUsed; this._defendCompose = item.DefendCompose; this._count = item.Count; this._color = item.Color; this._skin = item.Skin; this._beginDate = item.BeginDate; this._attackCompose = item.AttackCompose; this._agilityCompose = item.AgilityCompose; this._bagType = item.BagType; this._isDirty = item.IsDirty; this._removeDate = item.RemoveDate; this._removeType = item.RemoveType; this._hole1 = item.Hole1; this._hole2 = item.Hole2; this._hole3 = item.Hole3; this._hole4 = item.Hole4; this._hole5 = item.Hole5; this._hole6 = item.Hole6; this._hole5Exp = item.Hole5Exp; this._hole5Level = item.Hole5Level; this._hole6Exp = item.Hole6Exp; this._hole6Level = item.Hole6Level; this._isGold = item.IsGold; this._goldBeginTime = item.goldBeginTime; this._goldValidDate = item.goldValidDate; this._strengthenExp = item.StrengthenExp; this._latentEnergyCurStr = item.latentEnergyCurStr; this._latentEnergyNewStr = item._latentEnergyNewStr; this._latentEnergyEndTime = item._latentEnergyEndTime; this._beadExp = item.beadExp; this._beadLevel = item.beadLevel; this._beadIsLock = item.beadIsLock; this._isShowBind = item.isShowBind; this._Damage = item.Damage; this._Guard = item.Guard; this._Bless = item.Bless; this._Blood = item.Blood; }
public static SqlDataProvider.Data.ItemInfo CreateWeapon(ItemTemplateInfo goods, SqlDataProvider.Data.ItemInfo item, int type) { if (goods == null) { return((SqlDataProvider.Data.ItemInfo)null); } SqlDataProvider.Data.ItemInfo itemInfo = new SqlDataProvider.Data.ItemInfo(goods); itemInfo.AgilityCompose = item.AgilityCompose; itemInfo.AttackCompose = item.AttackCompose; itemInfo.BeginDate = DateTime.Now; itemInfo.Color = ""; itemInfo.Skin = ""; itemInfo.DefendCompose = item.DefendCompose; itemInfo.IsBinds = item.IsBinds; itemInfo.Place = item.Place; itemInfo.IsUsed = false; itemInfo.IsDirty = false; itemInfo.IsExist = true; itemInfo.IsJudge = true; itemInfo.LuckCompose = item.LuckCompose; itemInfo.StrengthenExp = item.StrengthenExp; itemInfo.StrengthenLevel = item.StrengthenLevel; itemInfo.TemplateID = goods.TemplateID; itemInfo.ValidDate = item.ValidDate; itemInfo._template = goods; itemInfo.Count = 1; itemInfo._removeDate = DateTime.Now; itemInfo._removeType = type; itemInfo.Hole1 = item.Hole1; itemInfo.Hole2 = item.Hole2; itemInfo.Hole3 = item.Hole3; itemInfo.Hole4 = item.Hole4; itemInfo.Hole5 = item.Hole5; itemInfo.Hole6 = item.Hole6; itemInfo.Hole5Level = item.Hole5Level; itemInfo.Hole5Exp = item.Hole5Exp; itemInfo.Hole6Level = item.Hole6Level; itemInfo.Hole6Exp = item.Hole6Exp; itemInfo.IsGold = item.IsGold; itemInfo.goldBeginTime = item.goldBeginTime; itemInfo.goldValidDate = item.goldValidDate; itemInfo.latentEnergyEndTime = item.latentEnergyEndTime; itemInfo.latentEnergyCurStr = "0,0,0,0"; itemInfo.latentEnergyNewStr = "0,0,0,0"; SqlDataProvider.Data.ItemInfo.OpenHole(ref itemInfo); return(itemInfo); }
public GSPacketIn SendAuctionRefresh(SqlDataProvider.Data.AuctionInfo info, int auctionID, bool isExist, SqlDataProvider.Data.ItemInfo item) { throw new NotImplementedException(); }
public GSPacketIn SendRefineryPreview(Game.Server.GameObjects.GamePlayer player, int templateid, bool isbind, SqlDataProvider.Data.ItemInfo item) { throw new NotImplementedException(); }
public bool CanStackedTo(SqlDataProvider.Data.ItemInfo to) { return(this._templateId == to.TemplateID && this.Template.MaxCount > 1 && (this._isBinds == to.IsBinds && this._isUsed == to._isUsed) && (this.ValidDate == 0 || this.BeginDate.Date == to.BeginDate.Date && this.ValidDate == this.ValidDate)); }
public static void OpenHole(ref SqlDataProvider.Data.ItemInfo item) { string[] strArray1 = item.Template.Hole.Split(new char[1] { '|' }); for (int index = 0; index < strArray1.Length; ++index) { string[] strArray2 = strArray1[index].Split(new char[1] { ',' }); if (item.StrengthenLevel >= Convert.ToInt32(strArray2[0]) && Convert.ToInt32(strArray2[1]) != -1) { switch (index) { case 0: if (item.Hole1 < 0) { item.Hole1 = 0; continue; } else { continue; } case 1: if (item.Hole2 < 0) { item.Hole2 = 0; continue; } else { continue; } case 2: if (item.Hole3 < 0) { item.Hole3 = 0; continue; } else { continue; } case 3: if (item.Hole4 < 0) { item.Hole4 = 0; continue; } else { continue; } case 4: if (item.Hole5 < 0) { item.Hole5 = 0; continue; } else { continue; } case 5: if (item.Hole6 < 0) { item.Hole6 = 0; continue; } else { continue; } default: continue; } } } }