2d85773f0e
separate class to partial class
79 lines
3.5 KiB
C#
79 lines
3.5 KiB
C#
using CSNetwork;
|
|
using CSNetwork.GPDataType;
|
|
|
|
namespace BrewMonster
|
|
{
|
|
public partial class CECHostPlayer
|
|
{
|
|
void OnMsgHstExtProp(ECMSG Msg)
|
|
{
|
|
cmd_own_ext_prop pCmd = GPDataTypeHelper.FromBytes<cmd_own_ext_prop>((byte[])Msg.dwParam1);
|
|
m_ExtProps = pCmd.prop;
|
|
m_BasicProps.iStatusPt = (int)pCmd.status_point;
|
|
m_BasicProps.iAtkDegree = pCmd.attack_degree;
|
|
m_BasicProps.iDefDegree = pCmd.defend_degree;
|
|
m_BasicProps.iCritRate = pCmd.crit_rate;
|
|
m_BasicProps.iCritDamageBonus = pCmd.crit_damage_bonus;
|
|
m_BasicProps.iInvisibleDegree = pCmd.invisible_degree;
|
|
m_BasicProps.iAntiInvisibleDegree = pCmd.anti_invisible_degree;
|
|
m_BasicProps.iPenetration = pCmd.penetration;
|
|
m_BasicProps.iResilience = pCmd.resilience;
|
|
m_BasicProps.iVigour = pCmd.vigour;
|
|
}
|
|
|
|
private void OnMsgHstInfo00(in ECMSG Msg)
|
|
{
|
|
cmd_self_info_00 pCmd = GPDataTypeHelper.FromBytes<cmd_self_info_00>((byte[])Msg.dwParam1);
|
|
|
|
bool bFirstTime = m_BasicProps.iLevel == 0 ? true : false;
|
|
if (!bFirstTime)
|
|
{
|
|
int iLimit = (int)(pCmd.iMaxHP * 0.3f);
|
|
if (pCmd.iHP < m_BasicProps.iCurHP && m_BasicProps.iCurHP >= iLimit && pCmd.iHP < iLimit)
|
|
{
|
|
/*if (CECUIHelper::GetGameUIMan().IsShowLowHP()) {
|
|
// ѪÁ¿µÍÓÚÁÙ½çÖµÔò²¥·ÅÌØÐ§
|
|
const int GfxLastTime = 10000; // ³ÖÐøÊ±¼ä10Ãë
|
|
CECUIHelper::GetGameUIMan().GetScreenEffectMan().StartEffect(CECScreenEffect::EFFECT_REDSPARK, GfxLastTime);
|
|
}*/
|
|
}
|
|
|
|
/*if (pCmd.iHP >= iLimit || pCmd.iHP <= 0) {
|
|
// ѪÁ¿¸ßÓÚÁÙ½çÖµ»òËÀÍö£¬ÔòÍ£Ö¹²¥·ÅÌØÐ§
|
|
CECUIHelper::GetGameUIMan().GetScreenEffectMan().FinishEffect(CECScreenEffect::EFFECT_REDSPARK);
|
|
}*/
|
|
|
|
/*iLimit = (int)(pCmd.iMaxMP * 0.2f);
|
|
if (pCmd.iMP < m_BasicProps.iCurMP && m_BasicProps.iCurMP >= iLimit && pCmd.iMP < iLimit)
|
|
BubbleText(BUBBLE_MPWARN, 0);*/
|
|
|
|
/*if (m_ExtProps.max_ap != pCmd.iMaxAP)
|
|
g_pGame.GetGameRun().AddFixedMessage(FIXMSG_ADDMAXAP, pCmd.iMaxAP - m_ExtProps.max_ap);*/
|
|
}
|
|
|
|
m_BasicProps.iLevel = pCmd.sLevel;
|
|
SetLevel2(pCmd.Level2, bFirstTime);
|
|
m_BasicProps.iExp = pCmd.iExp;
|
|
m_BasicProps.iSP = pCmd.iSP;
|
|
m_BasicProps.iCurHP = pCmd.iHP;
|
|
m_BasicProps.iCurMP = pCmd.iMP;
|
|
m_BasicProps.iCurAP = pCmd.iAP;
|
|
m_ExtProps.bs.max_hp = pCmd.iMaxHP;
|
|
m_ExtProps.bs.max_mp = pCmd.iMaxMP;
|
|
m_ExtProps.max_ap = pCmd.iMaxAP;
|
|
|
|
EventBus.Publish(new EXPToUpLevel(GetLevelUpExp(pCmd.sLevel)));
|
|
EventBus.Publish<cmd_self_info_00>(pCmd);
|
|
EventBus.PublishChannel<cmd_self_info_00>(GetCharacterID(), pCmd);
|
|
// if (pCmd.State != 0 && m_bFight == false) PlayEnterBattleGfx();
|
|
m_bFight = pCmd.State != 0 ? true : false;
|
|
|
|
// UpdateGodEvilSprite();
|
|
|
|
/*CECGameUIMan* pGameUI = g_pGame.GetGameRun().GetUIManager().GetInGameUIMan();
|
|
CDlgAutoHelp *pDlgHelp = dynamic_cast<CDlgAutoHelp *>(pGameUI.GetDialog("Win_WikiPop"));*/
|
|
/*if(pDlgHelp && m_bFight)
|
|
pDlgHelp.SetAutoHelpState(false);*/
|
|
}
|
|
}
|
|
} |