1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-02-01 06:45:32 +00:00
openmw-tes3mp/apps/openmw-mp/processors/player/ProcessorChatMsg.hpp
Koncord 4ca5da5666 [Server] Rework Plugin API, move Lua system to external library
Use LibFFI for Public & Timer APIs
Use "PlayerId" type instead "unsigned short"
Add GetPluginDir() function
2019-02-12 05:29:57 +08:00

30 lines
656 B
C++

//
// Created by koncord on 01.04.17.
//
#ifndef OPENMW_PROCESSORPLAYERCHATMSG_HPP
#define OPENMW_PROCESSORPLAYERCHATMSG_HPP
#include "../PlayerProcessor.hpp"
#include <Script/Plugin.hpp>
namespace mwmp
{
class ProcessorChatMsg : public PlayerProcessor
{
public:
ProcessorChatMsg()
{
BPP_INIT(ID_CHAT_MESSAGE)
}
void Do(PlayerPacket &packet, Player &player) override
{
DEBUG_PRINTF(strPacketID.c_str());
Plugin::Call<CallbackIndex("OnPlayerSendMessage")>(player.getId(), player.chatMessage.c_str());
}
};
}
#endif //OPENMW_PROCESSORPLAYERCHATMSG_HPP