871 lines
35 KiB
C#
871 lines
35 KiB
C#
|
using System;
|
|||
|
using System.Collections.Generic;
|
|||
|
using System.Text;
|
|||
|
using Games.GlobeDefine;
|
|||
|
using GCGame;
|
|||
|
using GCGame.Table;
|
|||
|
using Module.Log;
|
|||
|
using UnityEngine;
|
|||
|
using UnityEngine.UI;
|
|||
|
|
|||
|
public class RoleViewLogic : MonoBehaviour
|
|||
|
{
|
|||
|
private static RoleViewLogic m_Instance;
|
|||
|
|
|||
|
public UITagPanel _TagPanel;
|
|||
|
|
|||
|
public static RoleViewLogic Instance()
|
|||
|
{
|
|||
|
return m_Instance;
|
|||
|
}
|
|||
|
|
|||
|
private void OnEnable()
|
|||
|
{
|
|||
|
m_Instance = this;
|
|||
|
_TagPanel.ShowPage(0);
|
|||
|
OnAttrPage(0);
|
|||
|
|
|||
|
InitServerLevel();
|
|||
|
HideToggleMark(0);
|
|||
|
UpdateModel();
|
|||
|
}
|
|||
|
|
|||
|
private void OnDestroy()
|
|||
|
{
|
|||
|
m_Instance = null;
|
|||
|
}
|
|||
|
|
|||
|
public void OnTagPage(int page)
|
|||
|
{
|
|||
|
switch (page)
|
|||
|
{
|
|||
|
case 0:
|
|||
|
OnAttrPage(0);
|
|||
|
break;
|
|||
|
case 1:
|
|||
|
InitJifenPanel();
|
|||
|
break;
|
|||
|
}
|
|||
|
|
|||
|
HideToggleMark(page);
|
|||
|
}
|
|||
|
|
|||
|
public void HideToggleMark(int _Index)
|
|||
|
{
|
|||
|
for (var index = 0; index < bgList.Count; index++)
|
|||
|
{
|
|||
|
bgList[index].SetActive(index == _Index ? false : true);
|
|||
|
markList[index].SetActive(index == _Index ? true : false);
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
public void CloseWindow()
|
|||
|
{
|
|||
|
UIManager.CloseUI(UIInfo.RoleView);
|
|||
|
}
|
|||
|
|
|||
|
#region 快捷加血加蓝道具
|
|||
|
|
|||
|
public void MyAutoBtnClick()
|
|||
|
{
|
|||
|
UIManager.ShowUI(UIInfo.AutoUseMedicPanel);
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region Toggle
|
|||
|
|
|||
|
public List<GameObject> bgList;
|
|||
|
public List<GameObject> markList;
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region Attrs
|
|||
|
|
|||
|
public enum RoleViewSimple
|
|||
|
{
|
|||
|
LEVEL, //等级
|
|||
|
PROFESSION, //职业
|
|||
|
ABILITYLEVEL, //修为
|
|||
|
CURHP, //血量
|
|||
|
CURMP, //
|
|||
|
|
|||
|
MAXHP, //血上限 0
|
|||
|
MAXMP, //蓝上限
|
|||
|
MAXXP, //战意上限
|
|||
|
PYSATTACK, //物理攻击
|
|||
|
MAGATTACK, //魔法攻击
|
|||
|
PYSDEF, //物理防御
|
|||
|
MAGDEF, //魔法防御
|
|||
|
HIT, //命中
|
|||
|
DODGE, //闪避
|
|||
|
CRITICAL, //暴击
|
|||
|
DECRITICAL, //爆抗
|
|||
|
STRIKE, //穿透
|
|||
|
DUCTICAL, //韧性
|
|||
|
CRITIADD, //暴击伤害加成
|
|||
|
CRITIMIS, //暴击伤害减免
|
|||
|
INGDEF, //无视防御
|
|||
|
REDUCEDAM, //伤害减免
|
|||
|
MOVESPEED, //移动速度
|
|||
|
ATTACKSPEED, //攻击速度
|
|||
|
CUREAMOUNT, //治疗量
|
|||
|
|
|||
|
CONSTITU, //体质
|
|||
|
MORFIB, //精力
|
|||
|
STRENGTH, //力量
|
|||
|
INTELLENG, //智力
|
|||
|
AGILE //敏捷
|
|||
|
}
|
|||
|
|
|||
|
public enum RoleViewDetail
|
|||
|
{
|
|||
|
MAXHP, //血上限 0
|
|||
|
MAXMP, //蓝上限
|
|||
|
MAXXP, //战意上限
|
|||
|
PYSATTACK, //物理攻击
|
|||
|
MAGATTACK, //魔法攻击
|
|||
|
PYSDEF, //物理防御
|
|||
|
MAGDEF, //魔法防御
|
|||
|
HIT, //命中
|
|||
|
DODGE, //闪避
|
|||
|
CRITICAL, //暴击
|
|||
|
DECRITICAL, //爆抗
|
|||
|
STRIKE, //穿透
|
|||
|
DUCTICAL, //韧性
|
|||
|
CRITIADD, //暴击伤害加成
|
|||
|
CRITIMIS, //暴击伤害减免
|
|||
|
INGDEF, //无视防御
|
|||
|
REDUCEDAM, //伤害减免
|
|||
|
MOVESPEED, //移动速度
|
|||
|
ATTACKSPEED, //攻击速度
|
|||
|
CUREAMOUNT, //治疗量
|
|||
|
|
|||
|
CONSTITU, //体质
|
|||
|
MORFIB, //精力
|
|||
|
STRENGTH, //力量
|
|||
|
INTELLENG, //智力
|
|||
|
AGILE, //敏捷
|
|||
|
|
|||
|
DIZZYENHANCE, //眩晕增强
|
|||
|
DIZZYEDEF, //眩晕抗性
|
|||
|
SILENTENHANCE, //沉默增强
|
|||
|
SILENTDEF, //沉默抗性
|
|||
|
IMMOBENHANCE, //定身
|
|||
|
IMMOBDEF, //抗定身
|
|||
|
REPELENHANCE, //击退增强
|
|||
|
REPELDEF, //抗击退
|
|||
|
POLYMORPHENHANCE, //变羊增强
|
|||
|
POLYMORPHDEF, //抗变羊
|
|||
|
HMENHANCE, //昏迷增强
|
|||
|
HMDEF, //抗昏迷
|
|||
|
SMENHANCE, //失明增强
|
|||
|
SMDEF, //抗失明
|
|||
|
SHENHANCE, //石化增强
|
|||
|
SHDEF, //抗石化
|
|||
|
DGDEF, //电抗
|
|||
|
DGIGNDEF, //忽视电抗
|
|||
|
HUOGDEF, //火抗
|
|||
|
HUOGIGNDEF, //忽视火炕
|
|||
|
DUGDEF, //毒抗
|
|||
|
DUGIGNDEF, //忽视毒抗
|
|||
|
BGDEF, //冰抗
|
|||
|
BGIGNDEF, //忽视冰抗
|
|||
|
FGDEF, //风抗
|
|||
|
FGIGNDEF, //忽视风抗
|
|||
|
GGDEF, //光抗
|
|||
|
GGIGNDEF, //忽视光抗
|
|||
|
HUANGDEF, // 抗幻弓
|
|||
|
HUANGIFNDEF, //忽视幻抗
|
|||
|
HLDEF, // 抗混乱
|
|||
|
HLIGNDEF, //忽视幻抗
|
|||
|
HLENCHANCE, //混乱增强
|
|||
|
|
|||
|
PKVAL, //PK值
|
|||
|
ACTVAL, //活力值
|
|||
|
LUCKYVAL, //幸运值
|
|||
|
|
|||
|
DGATTACK, //点攻
|
|||
|
HUOATTACK, //火攻
|
|||
|
DUGATTACK, //毒攻
|
|||
|
BGATTACK, //冰攻
|
|||
|
FGATTACK, //风攻
|
|||
|
GGATTACK, //光攻
|
|||
|
HUANGATTACK, //幻攻
|
|||
|
|
|||
|
VOCDAMAGERATE_TianJi, // 对天机伤害提升比
|
|||
|
VOCDAMAGERATE_LiuShan, // 对六扇伤害提升比
|
|||
|
VOCDAMAGERATE_ShuShan, // 对蜀山伤害提升比
|
|||
|
VOCDAMAGERATE_XuanNv, // 对玄女伤害提升比
|
|||
|
|
|||
|
HEADEXP, //迎头经验
|
|||
|
LEVEL, //等级
|
|||
|
PROFESSION, //职业
|
|||
|
ABILITYLEVEL, //修为
|
|||
|
CURHP, //血量
|
|||
|
CURMP // 当前法力
|
|||
|
}
|
|||
|
|
|||
|
#endregion Attrs
|
|||
|
|
|||
|
#region Attr Panel
|
|||
|
|
|||
|
public Text m_NameLabel;
|
|||
|
public Text m_TitleLabel;
|
|||
|
public Text m_CombatValueLable;
|
|||
|
public Text m_LevelValueLable;
|
|||
|
public Text m_GUIDValueLable;
|
|||
|
public Text m_HPValueLable;
|
|||
|
public Text m_MPValueLable;
|
|||
|
public Text m_ExpValueLable;
|
|||
|
public Text m_ExExpValueLable;
|
|||
|
public Slider m_HPSprite;
|
|||
|
public Slider m_HP2Sprite;
|
|||
|
public Slider m_MPSprite;
|
|||
|
public Slider m_ExpSprite;
|
|||
|
public Slider m_OffLineExpSprite;
|
|||
|
|
|||
|
public Text _RoleLevel;
|
|||
|
public Text _CapLevel;
|
|||
|
|
|||
|
public UIContainerBase _SimpleAttrs;
|
|||
|
public AttrDescPanel _AttrDescPanel;
|
|||
|
|
|||
|
public UIContainerBase _DetailMainAttrs;
|
|||
|
public UIContainerBase _DetailBaseAttrs;
|
|||
|
public UIContainerBase _DetailSpecilAttrs;
|
|||
|
public UIContainerBase _DetailEffectAttrs;
|
|||
|
public UIContainerBase _DetailExAttrs;
|
|||
|
|
|||
|
public UICameraTexture _UICameraTexture;
|
|||
|
|
|||
|
private bool m_bIsNeedUpdateSimpleAttr = true;
|
|||
|
private bool m_bIsNeedUpdateDetailAttr = true;
|
|||
|
|
|||
|
private string m_GUIDStr;
|
|||
|
|
|||
|
public List<GameObject> _PanelList;
|
|||
|
public List<GameObject> _MarkIconList;
|
|||
|
public int curSelectPage = -1;
|
|||
|
|
|||
|
public void OnAttrPage(int page)
|
|||
|
{
|
|||
|
curSelectPage = page;
|
|||
|
for (var index = 0; index < _PanelList.Count; index++)
|
|||
|
{
|
|||
|
_MarkIconList[index].SetActive(index == page);
|
|||
|
_PanelList[index].SetActive(page == index);
|
|||
|
}
|
|||
|
|
|||
|
switch (page)
|
|||
|
{
|
|||
|
case 0:
|
|||
|
ReqSimpleAttr();
|
|||
|
break;
|
|||
|
case 1:
|
|||
|
ReqDetailAttr();
|
|||
|
break;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
public void ReqSimpleAttr()
|
|||
|
{
|
|||
|
// 发包请求数据
|
|||
|
var _mainPlayer = Singleton<ObjManager>.GetInstance().MainPlayer;
|
|||
|
//if (_mainPlayer != null && m_bIsNeedUpdateSimpleAttr) //战斗力不相同时 才去重新发包请求最新数据
|
|||
|
{
|
|||
|
var askPak = (CG_ASK_ROLE_DATA) PacketDistributed.CreatePacket(MessageID.PACKET_CG_ASK_ROLE_DATA);
|
|||
|
askPak.SetUserguid(_mainPlayer.GUID);
|
|||
|
askPak.SetDatatype(0);
|
|||
|
askPak.SendPacket();
|
|||
|
m_bIsNeedUpdateSimpleAttr = false;
|
|||
|
}
|
|||
|
|
|||
|
UpdateModel();
|
|||
|
}
|
|||
|
|
|||
|
public void ReqDetailAttr()
|
|||
|
{
|
|||
|
// 发包请求数据
|
|||
|
var _mainPlayer = Singleton<ObjManager>.GetInstance().MainPlayer;
|
|||
|
//if (_mainPlayer != null && m_bIsNeedUpdateDetailAttr) //战斗力不相同时 才去重新发包请求最新数据
|
|||
|
{
|
|||
|
var askPak = (CG_ASK_ROLE_DATA) PacketDistributed.CreatePacket(MessageID.PACKET_CG_ASK_ROLE_DATA);
|
|||
|
askPak.SetUserguid(_mainPlayer.GUID);
|
|||
|
askPak.SetDatatype(1);
|
|||
|
askPak.SendPacket();
|
|||
|
m_bIsNeedUpdateDetailAttr = false;
|
|||
|
}
|
|||
|
|
|||
|
UpdateModel();
|
|||
|
}
|
|||
|
|
|||
|
public void OnCombatChange()
|
|||
|
{
|
|||
|
m_bIsNeedUpdateDetailAttr = true;
|
|||
|
if (_TagPanel.GetShowingPage() == 0)
|
|||
|
{
|
|||
|
// 战斗力发生变化 重新发包请求最新数据
|
|||
|
var _mainPlayer = Singleton<ObjManager>.GetInstance().MainPlayer;
|
|||
|
if (_mainPlayer != null)
|
|||
|
{
|
|||
|
var askPak = (CG_ASK_ROLE_DATA) PacketDistributed.CreatePacket(MessageID.PACKET_CG_ASK_ROLE_DATA);
|
|||
|
askPak.SetUserguid(_mainPlayer.GUID);
|
|||
|
askPak.SendPacket();
|
|||
|
m_bIsNeedUpdateDetailAttr = false;
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
public void UpdateRoleDataPacket(GC_RET_ROLE_DATA packet)
|
|||
|
{
|
|||
|
var _mainPlayer = Singleton<ObjManager>.GetInstance().MainPlayer;
|
|||
|
_RoleLevel.text = _mainPlayer.BaseAttr.Level + "";
|
|||
|
var attrList = new List<RoleViewAttrPair.AttrPair>();
|
|||
|
if (packet.Datatype == 0)
|
|||
|
{
|
|||
|
// 基础属性
|
|||
|
attrList.Add(new RoleViewAttrPair.AttrPair(PropID.PropertyID.CONSTITU,
|
|||
|
packet.propList[(int) RoleViewSimple.CONSTITU]));
|
|||
|
attrList.Add(new RoleViewAttrPair.AttrPair(PropID.PropertyID.MORFIB,
|
|||
|
packet.propList[(int) RoleViewSimple.MORFIB]));
|
|||
|
attrList.Add(new RoleViewAttrPair.AttrPair(PropID.PropertyID.STRENGTH,
|
|||
|
packet.propList[(int) RoleViewSimple.STRENGTH]));
|
|||
|
attrList.Add(new RoleViewAttrPair.AttrPair(PropID.PropertyID.INTELLENG,
|
|||
|
packet.propList[(int) RoleViewSimple.INTELLENG]));
|
|||
|
attrList.Add(new RoleViewAttrPair.AttrPair(PropID.PropertyID.AGILE,
|
|||
|
packet.propList[(int) RoleViewSimple.AGILE]));
|
|||
|
attrList.Add(new RoleViewAttrPair.AttrPair(PropID.PropertyID.MAXHP,
|
|||
|
packet.propList[(int) RoleViewSimple.MAXHP]));
|
|||
|
attrList.Add(new RoleViewAttrPair.AttrPair(PropID.PropertyID.MAXMP,
|
|||
|
packet.propList[(int) RoleViewSimple.MAXMP]));
|
|||
|
attrList.Add(new RoleViewAttrPair.AttrPair(PropID.PropertyID.PYSATTACK,
|
|||
|
packet.propList[(int) RoleViewSimple.PYSATTACK]));
|
|||
|
attrList.Add(new RoleViewAttrPair.AttrPair(PropID.PropertyID.MAGATTACK,
|
|||
|
packet.propList[(int) RoleViewSimple.MAGATTACK]));
|
|||
|
attrList.Add(
|
|||
|
new RoleViewAttrPair.AttrPair(PropID.PropertyID.HIT, packet.propList[(int) RoleViewSimple.HIT]));
|
|||
|
attrList.Add(new RoleViewAttrPair.AttrPair(PropID.PropertyID.LEVEL,
|
|||
|
packet.propList[(int) RoleViewSimple.LEVEL]));
|
|||
|
//attrList.Add(new RoleViewAttrPair.AttrPair(PropID.PropertyID.CUREAMOUNT, packet.propList[(int)RoleViewSimple.CUREAMOUNT]));
|
|||
|
attrList.Add(new RoleViewAttrPair.AttrPair(PropID.PropertyID.PYSDEF,
|
|||
|
packet.propList[(int) RoleViewSimple.PYSDEF]));
|
|||
|
attrList.Add(new RoleViewAttrPair.AttrPair(PropID.PropertyID.MAGDEF,
|
|||
|
packet.propList[(int) RoleViewSimple.MAGDEF]));
|
|||
|
attrList.Add(new RoleViewAttrPair.AttrPair(PropID.PropertyID.DODGE,
|
|||
|
packet.propList[(int) RoleViewSimple.DODGE]));
|
|||
|
_SimpleAttrs.InitContentItem(attrList, null, null, OnAttrClick);
|
|||
|
}
|
|||
|
else
|
|||
|
{
|
|||
|
// 重要/主要属性
|
|||
|
attrList.Clear();
|
|||
|
//attrList.Add(new RoleViewAttrPair.AttrPair(PropID.PropertyID.PROPUSER_EXP, _mainPlayer.BaseAttr.Exp));
|
|||
|
//Tab_LevelUp curTabLevelup = TableManager.GetLevelUpByID(_mainPlayer.BaseAttr.Level, 0);
|
|||
|
//if (curTabLevelup != null)
|
|||
|
//{
|
|||
|
// var maxExp = long.Parse(curTabLevelup.ExpNeed);
|
|||
|
// attrList.Add(new RoleViewAttrPair.AttrPair(PropID.PropertyID.LEVEL_UP_EXP, maxExp));
|
|||
|
//}
|
|||
|
//attrList.Add(new RoleViewAttrPair.AttrPair(PropID.PropertyID.ACTVAL, packet.propList[(int)RoleViewDetail.ACTVAL]));
|
|||
|
attrList.Add(new RoleViewAttrPair.AttrPair(PropID.PropertyID.PKVAL,
|
|||
|
packet.propList[(int) RoleViewDetail.PKVAL]));
|
|||
|
attrList.Add(new RoleViewAttrPair.AttrPair(PropID.PropertyID.LUCKYVAL,
|
|||
|
packet.propList[(int) RoleViewDetail.LUCKYVAL]));
|
|||
|
_DetailMainAttrs.InitContentItem(attrList, null, null, OnAttrClick);
|
|||
|
|
|||
|
// 基础属性
|
|||
|
attrList.Clear();
|
|||
|
attrList.Add(new RoleViewAttrPair.AttrPair(PropID.PropertyID.MAXHP,
|
|||
|
packet.propList[(int) RoleViewDetail.MAXHP]));
|
|||
|
attrList.Add(new RoleViewAttrPair.AttrPair(PropID.PropertyID.MAXMP,
|
|||
|
packet.propList[(int) RoleViewDetail.MAXMP]));
|
|||
|
attrList.Add(new RoleViewAttrPair.AttrPair(PropID.PropertyID.PYSATTACK,
|
|||
|
packet.propList[(int) RoleViewDetail.PYSATTACK]));
|
|||
|
attrList.Add(new RoleViewAttrPair.AttrPair(PropID.PropertyID.MAGATTACK,
|
|||
|
packet.propList[(int) RoleViewDetail.MAGATTACK]));
|
|||
|
//attrList.Add(new RoleViewAttrPair.AttrPair(PropID.PropertyID.CUREAMOUNT, packet.propList[(int)RoleViewDetail.CUREAMOUNT]));
|
|||
|
attrList.Add(new RoleViewAttrPair.AttrPair(PropID.PropertyID.PYSDEF,
|
|||
|
packet.propList[(int) RoleViewDetail.PYSDEF]));
|
|||
|
attrList.Add(new RoleViewAttrPair.AttrPair(PropID.PropertyID.MAGDEF,
|
|||
|
packet.propList[(int) RoleViewDetail.MAGDEF]));
|
|||
|
attrList.Add(
|
|||
|
new RoleViewAttrPair.AttrPair(PropID.PropertyID.HIT, packet.propList[(int) RoleViewDetail.HIT]));
|
|||
|
attrList.Add(new RoleViewAttrPair.AttrPair(PropID.PropertyID.DODGE,
|
|||
|
packet.propList[(int) RoleViewDetail.DODGE]));
|
|||
|
attrList.Add(new RoleViewAttrPair.AttrPair(PropID.PropertyID.CRITICAL,
|
|||
|
packet.propList[(int) RoleViewDetail.CRITICAL]));
|
|||
|
attrList.Add(new RoleViewAttrPair.AttrPair(PropID.PropertyID.DECRITICAL,
|
|||
|
packet.propList[(int) RoleViewDetail.DECRITICAL]));
|
|||
|
_DetailBaseAttrs.InitContentItem(attrList, null, null, OnAttrClick);
|
|||
|
|
|||
|
// 特殊属性
|
|||
|
attrList.Clear();
|
|||
|
attrList.Add(new RoleViewAttrPair.AttrPair(PropID.PropertyID.STRIKE,
|
|||
|
packet.propList[(int) RoleViewDetail.STRIKE]));
|
|||
|
attrList.Add(new RoleViewAttrPair.AttrPair(PropID.PropertyID.DUCTICAL,
|
|||
|
packet.propList[(int) RoleViewDetail.DUCTICAL]));
|
|||
|
attrList.Add(new RoleViewAttrPair.AttrPair(PropID.PropertyID.CRITIADD,
|
|||
|
packet.propList[(int) RoleViewDetail.CRITIADD]));
|
|||
|
attrList.Add(new RoleViewAttrPair.AttrPair(PropID.PropertyID.CRITIMIS,
|
|||
|
packet.propList[(int) RoleViewDetail.CRITIMIS]));
|
|||
|
attrList.Add(new RoleViewAttrPair.AttrPair(PropID.PropertyID.INGDEF,
|
|||
|
packet.propList[(int) RoleViewDetail.INGDEF]));
|
|||
|
attrList.Add(new RoleViewAttrPair.AttrPair(PropID.PropertyID.REDUCEDAM,
|
|||
|
packet.propList[(int) RoleViewDetail.REDUCEDAM]));
|
|||
|
|
|||
|
attrList.Add(new RoleViewAttrPair.AttrPair(PropID.PropertyID.VOCDAMAGERATE,
|
|||
|
CharacterDefine.PROFESSION.TIANJI, packet.propList[(int) RoleViewDetail.VOCDAMAGERATE_TianJi]));
|
|||
|
attrList.Add(new RoleViewAttrPair.AttrPair(PropID.PropertyID.VOCDAMAGERATE,
|
|||
|
CharacterDefine.PROFESSION.LIUSHAN, packet.propList[(int) RoleViewDetail.VOCDAMAGERATE_LiuShan]));
|
|||
|
attrList.Add(new RoleViewAttrPair.AttrPair(PropID.PropertyID.VOCDAMAGERATE,
|
|||
|
CharacterDefine.PROFESSION.SHUSHAN, packet.propList[(int) RoleViewDetail.VOCDAMAGERATE_ShuShan]));
|
|||
|
attrList.Add(new RoleViewAttrPair.AttrPair(PropID.PropertyID.VOCDAMAGERATE,
|
|||
|
CharacterDefine.PROFESSION.XUANNV, packet.propList[(int) RoleViewDetail.VOCDAMAGERATE_XuanNv]));
|
|||
|
_DetailSpecilAttrs.InitContentItem(attrList, null, null, OnAttrClick);
|
|||
|
|
|||
|
// 效果属性
|
|||
|
attrList.Clear();
|
|||
|
attrList.Add(new RoleViewAttrPair.AttrPair(PropID.PropertyID.DIZZYENHANCE,
|
|||
|
packet.propList[(int) RoleViewDetail.DIZZYENHANCE]));
|
|||
|
attrList.Add(new RoleViewAttrPair.AttrPair(PropID.PropertyID.DIZZYEDEF,
|
|||
|
packet.propList[(int) RoleViewDetail.DIZZYEDEF]));
|
|||
|
//attrList.Add(new RoleViewAttrPair.AttrPair(PropID.PropertyID.SILENTENHANCE, packet.propList[(int)RoleViewDetail.SILENTENHANCE]));
|
|||
|
//attrList.Add(new RoleViewAttrPair.AttrPair(PropID.PropertyID.SILENTDEF, packet.propList[(int)RoleViewDetail.SILENTDEF]));
|
|||
|
attrList.Add(new RoleViewAttrPair.AttrPair(PropID.PropertyID.IMMOBENHANCE,
|
|||
|
packet.propList[(int) RoleViewDetail.IMMOBENHANCE]));
|
|||
|
attrList.Add(new RoleViewAttrPair.AttrPair(PropID.PropertyID.IMMOBDEF,
|
|||
|
packet.propList[(int) RoleViewDetail.IMMOBDEF]));
|
|||
|
//attrList.Add(new RoleViewAttrPair.AttrPair(PropID.PropertyID.REPELENHANCE, packet.propList[(int)RoleViewDetail.REPELENHANCE]));
|
|||
|
//attrList.Add(new RoleViewAttrPair.AttrPair(PropID.PropertyID.REPELDEF, packet.propList[(int)RoleViewDetail.REPELDEF]));
|
|||
|
//attrList.Add(new RoleViewAttrPair.AttrPair(PropID.PropertyID.POLYMORPHENHANCE, packet.propList[(int)RoleViewDetail.POLYMORPHENHANCE]));
|
|||
|
// attrList.Add(new RoleViewAttrPair.AttrPair(PropID.PropertyID.POLYMORPHDEF, packet.propList[(int)RoleViewDetail.POLYMORPHDEF]));
|
|||
|
//attrList.Add(new RoleViewAttrPair.AttrPair(PropID.PropertyID.HMENHANCE, packet.propList[(int)RoleViewDetail.HMENHANCE]));
|
|||
|
//attrList.Add(new RoleViewAttrPair.AttrPair(PropID.PropertyID.HMDEF, packet.propList[(int)RoleViewDetail.HMDEF]));
|
|||
|
attrList.Add(new RoleViewAttrPair.AttrPair(PropID.PropertyID.SMENHANCE,
|
|||
|
packet.propList[(int) RoleViewDetail.SMENHANCE]));
|
|||
|
attrList.Add(new RoleViewAttrPair.AttrPair(PropID.PropertyID.SMDEF,
|
|||
|
packet.propList[(int) RoleViewDetail.SMDEF]));
|
|||
|
//attrList.Add(new RoleViewAttrPair.AttrPair(PropID.PropertyID.SHENHANCE, packet.propList[(int)RoleViewDetail.SHENHANCE]));
|
|||
|
//attrList.Add(new RoleViewAttrPair.AttrPair(PropID.PropertyID.SHDEF, packet.propList[(int)RoleViewDetail.SHDEF]));
|
|||
|
attrList.Add(new RoleViewAttrPair.AttrPair(PropID.PropertyID.HLENHANCE,
|
|||
|
packet.propList[(int) RoleViewDetail.HLENCHANCE]));
|
|||
|
attrList.Add(new RoleViewAttrPair.AttrPair(PropID.PropertyID.HLDEF,
|
|||
|
packet.propList[(int) RoleViewDetail.HLDEF]));
|
|||
|
_DetailEffectAttrs.InitContentItem(attrList, null, null, OnAttrClick);
|
|||
|
|
|||
|
// 元素属性
|
|||
|
attrList.Clear();
|
|||
|
attrList.Add(new RoleViewAttrPair.AttrPair(PropID.PropertyID.DGDEF,
|
|||
|
packet.propList[(int) RoleViewDetail.DGDEF]));
|
|||
|
attrList.Add(new RoleViewAttrPair.AttrPair(PropID.PropertyID.DGIGNDEF,
|
|||
|
packet.propList[(int) RoleViewDetail.DGIGNDEF]));
|
|||
|
attrList.Add(new RoleViewAttrPair.AttrPair(PropID.PropertyID.HUOGDEF,
|
|||
|
packet.propList[(int) RoleViewDetail.HUOGDEF]));
|
|||
|
attrList.Add(new RoleViewAttrPair.AttrPair(PropID.PropertyID.HUOGIGNDEF,
|
|||
|
packet.propList[(int) RoleViewDetail.HUOGIGNDEF]));
|
|||
|
attrList.Add(new RoleViewAttrPair.AttrPair(PropID.PropertyID.DUGDEF,
|
|||
|
packet.propList[(int) RoleViewDetail.DUGDEF]));
|
|||
|
attrList.Add(new RoleViewAttrPair.AttrPair(PropID.PropertyID.DUGIGNDEF,
|
|||
|
packet.propList[(int) RoleViewDetail.DUGIGNDEF]));
|
|||
|
attrList.Add(new RoleViewAttrPair.AttrPair(PropID.PropertyID.BGDEF,
|
|||
|
packet.propList[(int) RoleViewDetail.BGDEF]));
|
|||
|
attrList.Add(new RoleViewAttrPair.AttrPair(PropID.PropertyID.BGIGNDEF,
|
|||
|
packet.propList[(int) RoleViewDetail.BGIGNDEF]));
|
|||
|
attrList.Add(new RoleViewAttrPair.AttrPair(PropID.PropertyID.FGDEF,
|
|||
|
packet.propList[(int) RoleViewDetail.FGDEF]));
|
|||
|
attrList.Add(new RoleViewAttrPair.AttrPair(PropID.PropertyID.FGIGNDEF,
|
|||
|
packet.propList[(int) RoleViewDetail.FGIGNDEF]));
|
|||
|
//attrList.Add(new RoleViewAttrPair.AttrPair(PropID.PropertyID.GGDEF, packet.propList[(int)RoleViewDetail.GGDEF]));
|
|||
|
//attrList.Add(new RoleViewAttrPair.AttrPair(PropID.PropertyID.GGIGNDEF, packet.propList[(int)RoleViewDetail.GGIGNDEF]));
|
|||
|
//attrList.Add(new RoleViewAttrPair.AttrPair(PropID.PropertyID.HUANGDEF, packet.propList[(int)RoleViewDetail.HUANGDEF]));
|
|||
|
//attrList.Add(new RoleViewAttrPair.AttrPair(PropID.PropertyID.HUANGIFNDEF, packet.propList[(int)RoleViewDetail.HUANGIFNDEF]));
|
|||
|
|
|||
|
attrList.Add(new RoleViewAttrPair.AttrPair(PropID.PropertyID.DUGATTACK,
|
|||
|
packet.propList[(int) RoleViewDetail.DUGATTACK]));
|
|||
|
attrList.Add(new RoleViewAttrPair.AttrPair(PropID.PropertyID.HUOATTACK,
|
|||
|
packet.propList[(int) RoleViewDetail.HUOATTACK]));
|
|||
|
attrList.Add(new RoleViewAttrPair.AttrPair(PropID.PropertyID.BGATTACK,
|
|||
|
packet.propList[(int) RoleViewDetail.BGATTACK]));
|
|||
|
attrList.Add(new RoleViewAttrPair.AttrPair(PropID.PropertyID.DGATTACK,
|
|||
|
packet.propList[(int) RoleViewDetail.DGATTACK]));
|
|||
|
attrList.Add(new RoleViewAttrPair.AttrPair(PropID.PropertyID.FGATTACK,
|
|||
|
packet.propList[(int) RoleViewDetail.FGATTACK]));
|
|||
|
//attrList.Add(new RoleViewAttrPair.AttrPair(PropID.PropertyID.GGATTACK, packet.propList[(int)RoleViewDetail.GGATTACK]));
|
|||
|
//attrList.Add(new RoleViewAttrPair.AttrPair(PropID.PropertyID.HUANGATTACK, packet.propList[(int)RoleViewDetail.HUANGATTACK]));
|
|||
|
//attrList.Add(new RoleViewAttrPair.AttrPair(PropID.PropertyID.HLDEF, packet.propList[(int)RoleViewDetail.HLDEF]));
|
|||
|
//attrList.Add(new RoleViewAttrPair.AttrPair(PropID.PropertyID.HUANGIFNDEF, packet.propList[(int)RoleViewDetail.HLIGNDEF]));
|
|||
|
_DetailExAttrs.InitContentItem(attrList, null, null, OnAttrClick);
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
// 属性点击回调,显示属性说明
|
|||
|
public void OnAttrClick(UIBase attrInfoItem)
|
|||
|
{
|
|||
|
if (attrInfoItem != null)
|
|||
|
{
|
|||
|
var selectAttr = attrInfoItem as RoleViewAttrPair;
|
|||
|
if (selectAttr != null)
|
|||
|
{
|
|||
|
var info = selectAttr._InitInfo as RoleViewAttrPair.AttrPair;
|
|||
|
if (info != null) _AttrDescPanel.ShowAttr((int) info._PropID, selectAttr.transform);
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
public void UpdateAttrRightView()
|
|||
|
{
|
|||
|
//战斗力
|
|||
|
//m_CombatValueLable.text = m_nCombatValue.ToString();
|
|||
|
//等级
|
|||
|
//m_LevelValueLable.text = m_nLevel.ToString();
|
|||
|
//职业名
|
|||
|
var _mainPlayer = Singleton<ObjManager>.GetInstance().MainPlayer;
|
|||
|
//name
|
|||
|
m_NameLabel.text = GameManager.gameManager.PlayerDataPool.MainPlayerBaseAttr.RoleName;
|
|||
|
//title
|
|||
|
m_TitleLabel.text = GameManager.gameManager.PlayerDataPool.TitleInvestitive.GetCurrentTitle();
|
|||
|
|
|||
|
//GUID
|
|||
|
m_GUIDStr = Utils.GetPlayerStringGuid();
|
|||
|
m_GUIDValueLable.text = StrDictionary.GetClientDictionaryString("#{6740}", m_GUIDStr);
|
|||
|
|
|||
|
//血
|
|||
|
m_HPValueLable.text = string.Format("{0}/{1}/{2}", Utils.ConvertLargeNumToString(_mainPlayer.BaseAttr.HP),
|
|||
|
Utils.ConvertLargeNumToString(_mainPlayer.BaseAttr.MaxHP),
|
|||
|
Utils.ConvertLargeNumToString(_mainPlayer.BaseAttr.CurMaxHP));
|
|||
|
m_HPSprite.value = _mainPlayer.BaseAttr.HP / (float) _mainPlayer.BaseAttr.MaxHP;
|
|||
|
m_HP2Sprite.value = _mainPlayer.BaseAttr.MaxHP / (float) _mainPlayer.BaseAttr.CurMaxHP;
|
|||
|
|
|||
|
|
|||
|
//蓝
|
|||
|
m_MPValueLable.text = string.Format("{0}/{1}", Utils.ConvertLargeNumToString(_mainPlayer.BaseAttr.MP),
|
|||
|
Utils.ConvertLargeNumToString(_mainPlayer.BaseAttr.MaxMP));
|
|||
|
m_MPSprite.value = _mainPlayer.BaseAttr.MP / (float) _mainPlayer.BaseAttr.MaxMP;
|
|||
|
|
|||
|
|
|||
|
//经验
|
|||
|
var curTabLevelup = TableManager.GetLevelUpByID(_mainPlayer.BaseAttr.Level);
|
|||
|
if (null == curTabLevelup) return;
|
|||
|
var maxExp = long.Parse(curTabLevelup.ExpNeed);
|
|||
|
m_ExpValueLable.text = string.Format("{0}/{1}", Utils.ConvertLargeNumToString(_mainPlayer.BaseAttr.Exp),
|
|||
|
Utils.ConvertLargeNumToString(maxExp));
|
|||
|
m_ExpSprite.value = _mainPlayer.BaseAttr.Exp / (float) maxExp;
|
|||
|
|
|||
|
m_ExExpValueLable.text = Utils.ConvertLargeNumToString(_mainPlayer.BaseAttr.HeadExp);
|
|||
|
|
|||
|
//UpdateLevelBtn();
|
|||
|
}
|
|||
|
|
|||
|
private string DecimalToTwentySixSB(int num)
|
|||
|
{
|
|||
|
var result = new StringBuilder();
|
|||
|
while (num > 0)
|
|||
|
{
|
|||
|
var remainder = num % 26;
|
|||
|
result.Append((char) (remainder + 97)); //A -> 65
|
|||
|
num /= 26;
|
|||
|
}
|
|||
|
|
|||
|
for (var index = 0; index < result.Length / 2; index++)
|
|||
|
{
|
|||
|
var temp = result[index];
|
|||
|
result[index] = result[result.Length - index - 1];
|
|||
|
result[result.Length - index - 1] = temp;
|
|||
|
}
|
|||
|
|
|||
|
var str = result.ToString();
|
|||
|
return str;
|
|||
|
}
|
|||
|
|
|||
|
public void UpdateCurAttr()
|
|||
|
{
|
|||
|
var _mainPlayer = Singleton<ObjManager>.GetInstance().MainPlayer;
|
|||
|
if (_mainPlayer != null)
|
|||
|
{
|
|||
|
//血
|
|||
|
m_HPValueLable.text = string.Format("{0}/{1}/{2}", Utils.ConvertLargeNumToString(_mainPlayer.BaseAttr.HP),
|
|||
|
Utils.ConvertLargeNumToString(_mainPlayer.BaseAttr.MaxHP),
|
|||
|
Utils.ConvertLargeNumToString(_mainPlayer.BaseAttr.CurMaxHP));
|
|||
|
m_HPSprite.value = _mainPlayer.BaseAttr.HP / (float) _mainPlayer.BaseAttr.MaxHP;
|
|||
|
m_HP2Sprite.value = _mainPlayer.BaseAttr.MaxHP / (float) _mainPlayer.BaseAttr.CurMaxHP;
|
|||
|
|
|||
|
|
|||
|
//蓝
|
|||
|
m_MPValueLable.text = string.Format("{0}/{1}", Utils.ConvertLargeNumToString(_mainPlayer.BaseAttr.MP),
|
|||
|
Utils.ConvertLargeNumToString(_mainPlayer.BaseAttr.MaxMP));
|
|||
|
m_MPSprite.value = _mainPlayer.BaseAttr.MP / (float) _mainPlayer.BaseAttr.MaxMP;
|
|||
|
|
|||
|
|
|||
|
//经验
|
|||
|
var curTabLevelup = TableManager.GetLevelUpByID(_mainPlayer.BaseAttr.Level);
|
|||
|
if (null == curTabLevelup) return;
|
|||
|
var maxExp = long.Parse(curTabLevelup.ExpNeed);
|
|||
|
m_ExpValueLable.text = string.Format("{0}/{1}", Utils.ConvertLargeNumToString(_mainPlayer.BaseAttr.Exp),
|
|||
|
Utils.ConvertLargeNumToString(maxExp));
|
|||
|
m_ExpSprite.value = _mainPlayer.BaseAttr.Exp / (float) maxExp;
|
|||
|
|
|||
|
m_ExExpValueLable.text = Utils.ConvertLargeNumToString(_mainPlayer.BaseAttr.HeadExp);
|
|||
|
|
|||
|
//UpdateLevelBtn();
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
public void UpdateModel()
|
|||
|
{
|
|||
|
var mainPlayer = Singleton<ObjManager>.GetInstance().MainPlayer;
|
|||
|
if (mainPlayer == null)
|
|||
|
return;
|
|||
|
_UICameraTexture.InitPlayerModel(mainPlayer);
|
|||
|
|
|||
|
//新增 禁用升级按钮
|
|||
|
//_BtnLevelUp.enabled = false;
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region title
|
|||
|
|
|||
|
public void OnTitleClick()
|
|||
|
{
|
|||
|
UIManager.ShowUI(UIInfo.TitleView);
|
|||
|
}
|
|||
|
|
|||
|
public void OnBtnCopyGuid()
|
|||
|
{
|
|||
|
CommonUtility.ToCopyClip(m_GUIDStr);
|
|||
|
}
|
|||
|
|
|||
|
public void AfterLoadTitleItem()
|
|||
|
{
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region jifen
|
|||
|
|
|||
|
public UIContainerBase _JifenShops;
|
|||
|
|
|||
|
public void InitJifenPanel()
|
|||
|
{
|
|||
|
var jifenInfos = new List<RoleViewJifenItem.JifenInfo>();
|
|||
|
//获取全部的积分信息
|
|||
|
var m_AllRoleIntegral = TableManager.GetRoleIntegral().Values;
|
|||
|
foreach (var roleIntegral in m_AllRoleIntegral)
|
|||
|
{
|
|||
|
var jifenInfo = new RoleViewJifenItem.JifenInfo();
|
|||
|
jifenInfo.name = roleIntegral.IntegralName;
|
|||
|
jifenInfo.IntegralShopId = roleIntegral.IntegralShopId;
|
|||
|
var shop = TableManager.GetSystemShopByID(roleIntegral.IntegralShopId);
|
|||
|
if (shop != null)
|
|||
|
{
|
|||
|
var curConsumeType = shop.GetMoneyTypebyIndex(0);
|
|||
|
var consumeSubType = shop.GetMoneySubTypebyIndex(0);
|
|||
|
switch (curConsumeType)
|
|||
|
{
|
|||
|
case (int) CONSUM_TYPE.MONEY:
|
|||
|
{
|
|||
|
switch (consumeSubType)
|
|||
|
{
|
|||
|
case (int) MONEYTYPE.MONEYTYPE_COIN:
|
|||
|
jifenInfo.value = GameManager.gameManager.PlayerDataPool.Money.GetMoney_Coin();
|
|||
|
break;
|
|||
|
case (int) MONEYTYPE.MONEYTYPE_YUANBAO:
|
|||
|
jifenInfo.value = GameManager.gameManager.PlayerDataPool.Money.GetMoney_YuanBao();
|
|||
|
break;
|
|||
|
case (int) MONEYTYPE.MONEYTYPE_YUANBAO_BIND:
|
|||
|
jifenInfo.value = GameManager.gameManager.PlayerDataPool.Money.GetMoney_YuanBaoBind();
|
|||
|
break;
|
|||
|
case (int) MONEYTYPE.MONEYTYPE_COIN_BIND:
|
|||
|
jifenInfo.value = GameManager.gameManager.PlayerDataPool.Money.GetMoney_CoinBind();
|
|||
|
break;
|
|||
|
case (int) MONEYTYPE.MONEYTYPE_USERCHALLENGE:
|
|||
|
jifenInfo.value =
|
|||
|
GameManager.gameManager.PlayerDataPool.Money.GetMoney_ChallengeScore();
|
|||
|
break;
|
|||
|
case (int) MONEYTYPE.MONEYTYPE_SNATCHSCORE:
|
|||
|
jifenInfo.value = GameManager.gameManager.PlayerDataPool.Money.GetMoney_SnatchScore();
|
|||
|
break;
|
|||
|
}
|
|||
|
}
|
|||
|
break;
|
|||
|
case (int) CONSUM_TYPE.PROPVAL:
|
|||
|
jifenInfo.value =
|
|||
|
GameManager.gameManager.PlayerDataPool.GetPropInt((PropID.PropertyID) consumeSubType);
|
|||
|
break;
|
|||
|
case (int) CONSUM_TYPE.SCORE:
|
|||
|
if ((int) SCORE_TYPE.GUILD_SCORE == consumeSubType)
|
|||
|
jifenInfo.value = GameManager.gameManager.PlayerDataPool.GuildInfo.GuildContribute;
|
|||
|
break;
|
|||
|
}
|
|||
|
}
|
|||
|
else
|
|||
|
{
|
|||
|
jifenInfo.value = 0;
|
|||
|
}
|
|||
|
|
|||
|
jifenInfo.shopId = roleIntegral.IntegralShopId;
|
|||
|
jifenInfo.icon = roleIntegral.IntegralIcon;
|
|||
|
//jifenInfo.dayValue = roleIntegral.Value[0].IntegralDayLimit; //需要同步已经兑换的次数
|
|||
|
//jifenInfo.dayMax = roleIntegral.Value[0].IntegralDayLimit; //每天限制兑换的次数
|
|||
|
|
|||
|
jifenInfos.Add(jifenInfo);
|
|||
|
}
|
|||
|
|
|||
|
_JifenShops.InitContentItem(jifenInfos);
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region Server level
|
|||
|
|
|||
|
public Button _BtnLevelUp;
|
|||
|
|
|||
|
private bool _IsMaxLvCap;
|
|||
|
private int _CurLvCap = 69;
|
|||
|
private int _CurLvExBuff;
|
|||
|
private DateTime _NextLvCapRemain;
|
|||
|
private int _LevelCap = 0;
|
|||
|
private int _nextlvlcapremain;
|
|||
|
|
|||
|
private void InitServerLevel()
|
|||
|
{
|
|||
|
var packet = (CG_REQ_SERVER_LVL_CAP) PacketDistributed.CreatePacket(MessageID.PACKET_CG_REQ_SERVER_LVL_CAP);
|
|||
|
packet.Noparam = 1;
|
|||
|
packet.SendPacket();
|
|||
|
|
|||
|
//UpdateLevelBtn();
|
|||
|
}
|
|||
|
|
|||
|
//public NewRanlnfoItem NewRanlnfoItem;
|
|||
|
public void UpdateServerLevel(GC_RET_SERVER_LVL_CAP packet)
|
|||
|
{
|
|||
|
_IsMaxLvCap = packet.Ismaxlvlcap > 0;
|
|||
|
_CurLvCap = packet.Curlvlcap;
|
|||
|
_CapLevel.text = _CurLvCap + "";
|
|||
|
//_LevelCap = packet.nextlvlcapremain;
|
|||
|
_nextlvlcapremain = packet.Nextlvlcapremain;
|
|||
|
|
|||
|
|
|||
|
_CurLvExBuff = packet.Myexpbuff;
|
|||
|
LogModule.DebugLog("packet.Nextlvlcapremain:" + packet.Nextlvlcapremain);
|
|||
|
LogModule.DebugLog("server time:" + GlobalData.ServerAnsiTime);
|
|||
|
_NextLvCapRemain = Utils.GetServerDateTime(packet.Nextlvlcapremain);
|
|||
|
}
|
|||
|
//public void UpdateLevelBtn()
|
|||
|
//{
|
|||
|
////隐藏升级按钮
|
|||
|
//if (_BtnLevelUp.isActiveAndEnabled)
|
|||
|
// _BtnLevelUp.gameObject.SetActive(false);
|
|||
|
|
|||
|
//Tab_LevelUp curTabLevelup = TableManager.GetLevelUpByID(GameManager.gameManager.PlayerDataPool.MainPlayerBaseAttr.Level, 0);
|
|||
|
//if (null == curTabLevelup)
|
|||
|
//{
|
|||
|
// return;
|
|||
|
//}
|
|||
|
//var maxExp = long.Parse(curTabLevelup.ExpNeed);
|
|||
|
|
|||
|
//if (GameManager.gameManager.PlayerDataPool.MainPlayerBaseAttr.Exp < maxExp)
|
|||
|
// _BtnLevelUp.gameObject.SetActive(false);
|
|||
|
//else
|
|||
|
// _BtnLevelUp.gameObject.SetActive(true);
|
|||
|
//}
|
|||
|
|
|||
|
public void OnBtnServerLvClick()
|
|||
|
{
|
|||
|
#region 废弃代码
|
|||
|
|
|||
|
//string serverTip = StrDictionary.GetClientDictionaryString("#{4800}", _CurLvExBuff, _CurLvCap, _nextlvlcapremain + "");
|
|||
|
//MessageBoxLogic.OpenOKBox(serverTip);
|
|||
|
|
|||
|
|
|||
|
//List<int> LevelCapList = new List<int>();
|
|||
|
//foreach (var serverLv in TableManager.GetServerLvlCap().Values)
|
|||
|
//{
|
|||
|
// LevelCapList.Add(serverLv.LevelCap);
|
|||
|
// Debug.LogError(GameManager.gameManager.PlayerDataPool.MainPlayerBaseAttr.Level + " 是玩家当前等级吗?");
|
|||
|
// if (GameManager.gameManager.PlayerDataPool.MainPlayerBaseAttr.Level <= LevelCapList[0])
|
|||
|
// {
|
|||
|
// Debug.LogError(LevelCapList[0] + " 是 89 吗?");
|
|||
|
// }
|
|||
|
// string serverTip = StrDictionary.GetClientDictionaryString("#{4800}", _CurLvExBuff, _CurLvCap, serverLv.LevelCap + "");
|
|||
|
// MessageBoxLogic.OpenOKBox(serverTip);
|
|||
|
//}
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
if (_nextlvlcapremain < 50)
|
|||
|
{
|
|||
|
var serverTip = StrDictionary.GetClientDictionaryString("#{4801}", _CurLvExBuff, _CurLvCap);
|
|||
|
MessageBoxLogic.OpenOKBox(serverTip);
|
|||
|
}
|
|||
|
else
|
|||
|
{
|
|||
|
//string dataTime = string.Format("{0:yyyy年MM月dd日 HH:mm}", _NextLvCapRemain);
|
|||
|
var serverTip =
|
|||
|
StrDictionary.GetClientDictionaryString("#{4800}", _CurLvExBuff, _CurLvCap, _nextlvlcapremain + 1 + "");
|
|||
|
MessageBoxLogic.OpenOKBox(serverTip);
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
#region 手动升级 废弃
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// 手动升级
|
|||
|
/// </summary>
|
|||
|
//public void OnBtnLevelUp()
|
|||
|
//{
|
|||
|
|
|||
|
// Tab_LevelUp curTabLevelup = TableManager.GetLevelUpByID(GameManager.gameManager.PlayerDataPool.MainPlayerBaseAttr.Level, 0);
|
|||
|
// if (null == curTabLevelup)
|
|||
|
// {
|
|||
|
// return;
|
|||
|
// }
|
|||
|
// var nextLevelNeedExp = long.Parse(curTabLevelup.ExpNeed);
|
|||
|
// var hasFind = false;
|
|||
|
// foreach (var serverLv in TableManager.GetServerLvlCap().Values)
|
|||
|
// {
|
|||
|
// if (GameManager.gameManager.PlayerDataPool.MainPlayerBaseAttr.Level == serverLv.LevelCap - 1)
|
|||
|
// {
|
|||
|
// hasFind = true;
|
|||
|
// if (GameManager.gameManager.PlayerDataPool.MainPlayerBaseAttr.Exp < nextLevelNeedExp)
|
|||
|
// {
|
|||
|
// GUIData.AddNotifyData(StrDictionary.GetClientDictionaryString("#{4807}"));
|
|||
|
// return;
|
|||
|
// }
|
|||
|
// MessageBoxLogic.OpenOKCancelBox(serverLv.GetLvUpStrbyIndex(0), "", OnBtnLevelUpOk);
|
|||
|
// return;
|
|||
|
// }
|
|||
|
// else if (GameManager.gameManager.PlayerDataPool.MainPlayerBaseAttr.Level == serverLv.LevelCap)
|
|||
|
// {
|
|||
|
// hasFind = true;
|
|||
|
// if (GameManager.gameManager.PlayerDataPool.MainPlayerBaseAttr.Exp < nextLevelNeedExp)
|
|||
|
// {
|
|||
|
// GUIData.AddNotifyData(StrDictionary.GetClientDictionaryString("#{4807}"));
|
|||
|
// return;
|
|||
|
// }
|
|||
|
// MessageBoxLogic.OpenOKCancelBox(serverLv.GetLvUpStrbyIndex(1), "", OnBtnLevelUpOk);
|
|||
|
// return;
|
|||
|
// }
|
|||
|
// }
|
|||
|
// //没有达到封印等级提示
|
|||
|
// if (!hasFind)
|
|||
|
// GUIData.AddNotifyData(StrDictionary.GetClientDictionaryString("#{4806}"));
|
|||
|
//}
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
public void OnBtnLevelUpOk()
|
|||
|
{
|
|||
|
var packet = (CG_REQ_LVL_UP) PacketDistributed.CreatePacket(MessageID.PACKET_CG_REQ_LVL_UP);
|
|||
|
packet.Noparam = 1;
|
|||
|
packet.SendPacket();
|
|||
|
}
|
|||
|
|
|||
|
public void OnBtnHelp(int helpMsgID)
|
|||
|
{
|
|||
|
MessageHelpLogic.ShowHelpMessage(helpMsgID);
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
}
|