private void EquipUpgradeMouseLeftButtonUp(object sender, MouseEvent e)
{
<EquipUpgradeMouseLeftButtonUp>c__AnonStoreyD4 yd = new <EquipUpgradeMouseLeftButtonUp>c__AnonStoreyD4 {
<>f__this = this
};
Super.RemoveSystemNaviBox(base.Container, Global.GetLang("装备进阶UI"), null);
if (this.equipIcon[0].Count <= 0)
{
GGameInfocs.AddGameInfoMessage(GameInfoTypeIndexes.Error, ShowGameInfoTypes.ErrAndBox, StringUtil.substitute(Global.GetLang("请将要进阶的装备放到装备位置"), new object[0]), 0, -1, -1, 0);
}
else
{
yd.goodsData = U3DUtils.AS<GIcon>(this.equipIcon[0][0]).ItemObject as GoodsData;
yd.goodsData = Global.GetGoodsDataByDbID(yd.goodsData.Id, null);
if (yd.goodsData == null)
{
GGameInfocs.AddGameInfoMessage(GameInfoTypeIndexes.Error, ShowGameInfoTypes.ErrAndBox, StringUtil.substitute(Global.GetLang("进阶的装备不在背包中,无法进阶"), new object[0]), 0, -1, -1, 0);
}
else
{
yd.goodVO = ConfigGoods.GetGoodsXmlNodeByID(yd.goodsData.GoodsID);
if (yd.goodVO == null)
{
GGameInfocs.AddGameInfoMessage(GameInfoTypeIndexes.Error, ShowGameInfoTypes.ErrAndBox, StringUtil.substitute(Global.GetLang("进阶的装备在配置表中不存在,无法进阶"), new object[0]), 0, -1, -1, 0);
}
else
{
string title = yd.goodVO.Title;
int suitID = yd.goodVO.SuitID;
if (suitID >= Global.MaxSuitID)
{
object[] args = new object[] { title };
GGameInfocs.AddGameInfoMessage(GameInfoTypeIndexes.Error, ShowGameInfoTypes.ErrAndBox, StringUtil.substitute(Global.GetLang("【{0}】已经到了最高阶数,无法进阶"), args), 0, -1, -1, 0);
}
else
{
int categoriy = yd.goodVO.Categoriy;
int toOccupation = yd.goodVO.ToOccupation;
int toSex = yd.goodVO.ToSex;
GoodVO dvo = ConfigGoods.GetGoodsXmlNodeByCatSuitID(categoriy, suitID + 1, toSex, toOccupation);
if (dvo == null)
{
GGameInfocs.AddGameInfoMessage(GameInfoTypeIndexes.Error, ShowGameInfoTypes.ErrAndBox, StringUtil.substitute(Global.GetLang("下阶装备在配置表中不存在,无法进阶"), new object[0]), 0, -1, -1, 0);
}
else
{
int toLevel = dvo.ToLevel;
if (toLevel > Global.Data.roleData.Level)
{
<EquipUpgradeMouseLeftButtonUp>c__AnonStoreyD3 yd2 = new <EquipUpgradeMouseLeftButtonUp>c__AnonStoreyD3 {
<>f__ref$212 = yd,
<>f__this = this
};
object[] objArray2 = new object[] { toLevel, Global.Data.roleData.Level };
string message = StringUtil.substitute(Global.GetLang("进阶后的装备使用要求的级别是{0}, 高于您目前的{1}级, 进阶成功后,您将暂时无法佩戴新装备到身上"), objArray2) + StringUtil.substitute(Global.GetLang(", 继续进阶吗?"), new object[0]);
yd2.messageBoxWindow = Super.ShowMessageBox(base.Container, 1, Global.GetLang("提示"), message, (((int) base.Container.Width) - 0xfd) / 2, (((int) base.Container.Height) - 0xab) / 2, (int) base.Container.Width, (int) base.Container.Height, 0.01, new Vector3(), null, null);
yd2.messageBoxWindow.ChildWindowClose = new ChildWindowCloseEventHandler(yd2.<>m__157);
}
else
{
this.TryStartEquipUpgrade(yd.goodsData, yd.goodVO);
}
}
}
}
}
}
}