Пример #1
0
    /// <summary>
    /// 升级改变的属性
    /// </summary>
    /// <param name="p"></param>
    void _Packet(ScRoleLevelUp p)
    {
        PRoleAttrItem[] attrs = null;
        p.changeAttrs.CopyTo(ref attrs);

        oldPower     = attrInfo.power[0];
        oldTechnique = attrInfo.tenacious[0];
        oldEnergy    = attrInfo.energy[0];

        moduleAttribute.isRead = false;
        ChangeAttribute(attrs);

        DispatchModuleEvent(EventLevelUp, p);//升级角色属性的变化
    }
Пример #2
0
    void _Packet_999(ScRoleLevelUp p)
    {
        var oldLv = m_roleInfo.level;

        m_roleInfo.level = (byte)p.level;

        var oldPoint = m_roleInfo.attrPoint;

        m_roleInfo.attrPoint += p.attrPoint;

        var oldMaxFatigue = m_maxFatigue;

        m_maxFatigue = p.fatigue;
        var oldFatigue = m_roleInfo.fatigue;

        ChangeFatigue(true, p.addFatigue);

        isLevelUp = true;

        DispatchModuleEvent(EventLevelChanged, oldLv, oldPoint, oldFatigue, oldMaxFatigue);
        DispatchEvent(EventLevelChanged, Event_.Pop(oldLv, oldPoint, oldFatigue, oldMaxFatigue));
    }
Пример #3
0
 void _Packet(ScRoleLevelUp p)
 {
     moduleHome.UpdateIconState(HomeIcons.Skill, NeedNotice);
 }