mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-02-26 06:09:40 +00:00
Conflicts: apps/openmw-mp/Player.cpp apps/openmw-mp/Script/Functions/Mechanics.cpp apps/openmw-mp/Script/Functions/Mechanics.hpp apps/openmw-mp/Script/Functions/Quests.cpp apps/openmw-mp/Script/Functions/Quests.hpp apps/openmw-mp/Script/ScriptFunctions.hpp apps/openmw-mp/processors/player/ProcessorRecordDynamic.hpp apps/openmw/mwmp/LocalPlayer.hpp apps/openmw/mwmp/WorldEvent.cpp apps/openmw/mwworld/worldimp.cpp components/openmw-mp/Base/BasePlayer.hpp
41 lines
1.1 KiB
C++
41 lines
1.1 KiB
C++
#ifndef OPENMW_PROCESSORPLAYERMISCELLANEOUS_HPP
|
|
#define OPENMW_PROCESSORPLAYERMISCELLANEOUS_HPP
|
|
|
|
|
|
#include "../PlayerProcessor.hpp"
|
|
|
|
namespace mwmp
|
|
{
|
|
class ProcessorPlayerMiscellaneous final: public PlayerProcessor
|
|
{
|
|
public:
|
|
ProcessorPlayerMiscellaneous()
|
|
{
|
|
BPP_INIT(ID_PLAYER_MISCELLANEOUS)
|
|
}
|
|
|
|
virtual void Do(PlayerPacket &packet, BasePlayer *player)
|
|
{
|
|
if (!isLocal()) return;
|
|
|
|
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Received ID_PLAYER_MISCELLANEOUS about LocalPlayer from server");
|
|
|
|
if (!isRequest())
|
|
{
|
|
LocalPlayer &localPlayer = static_cast<LocalPlayer&>(*player);
|
|
|
|
switch (player->miscellaneousChangeType)
|
|
{
|
|
case MiscellaneousChangeType::MarkLocation:
|
|
localPlayer.setMarkLocation();
|
|
break;
|
|
case MiscellaneousChangeType::SelectedSpell:
|
|
localPlayer.setSelectedSpell();
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
};
|
|
}
|
|
|
|
#endif //OPENMW_PROCESSORPLAYERMISCELLANEOUS_HPP
|