Skip to content

An OpenMW mod that lets you play the whole Elder Scrolls III: Morrowind as a top-down isometric game — with full online co-op or MMO modes.

C++
886 B
Raw Blame
#ifndef OPENMW_PROCESSORPLAYERSTATSDYNAMIC_HPP
#define OPENMW_PROCESSORPLAYERSTATSDYNAMIC_HPP


#include "../PlayerProcessor.hpp"

namespace mwmp
{
    class ProcessorPlayerStatsDynamic final: public PlayerProcessor
    {
    public:
        ProcessorPlayerStatsDynamic()
        {
            BPP_INIT(ID_PLAYER_STATS_DYNAMIC)
        }

        virtual void Do(PlayerPacket &packet, BasePlayer *player)
        {
            if (isLocal())
            {
                if (isRequest())
                    static_cast<LocalPlayer *>(player)->updateStatsDynamic(true);
                else
                    static_cast<LocalPlayer *>(player)->setDynamicStats();
            }
            else if (player != 0)
            {
                static_cast<DedicatedPlayer*>(player)->setStatsDynamic();
            }
        }
    };
}


#endif //OPENMW_PROCESSORPLAYERSTATSDYNAMIC_HPP