public static void OnChangeLv(CCreature obj, int newV, int oldV) { if (newV == oldV) { return; } // 逻辑层 obj.UpdateProp(); int maxHp = obj.GetPropNum(eCreatureProp.Hp); // 主角升级才回满血 //if (obj.IsMaster()) //{ // obj.SetPropNum(eCreatureProp.CurHp, maxHp); //} // 表现层 obj.UpdateVO_ShowHeadLv(); obj.UpdateVO_ShowHeadHp(); obj.UpdateUI_Lv(); if (oldV != 0 && obj.IsMaster()) { if (obj.m_vCreature != null) { CEffectMgr.Create(21160, obj.m_vCreature.GetEnt(), "origin"); } } }
public static void OnChangeCurHp(CCreature obj, int newV, int oldV) { if (oldV == 0 && newV == 0) { return; } // 逻辑层 if (newV <= 0) { obj.OnDie(); } // 表现层 obj.UpdateVO_ShowHeadHp(); // UI obj.UpdateUI_Hp(); }
public static void OnChangeMaxHp(CCreature obj, int newV, int oldV) { // 表现层 obj.UpdateVO_ShowHeadHp(); obj.UpdateUI_Hp(); }