mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-09-28 23:51:09 -04:00
[Server] Remove result from the OnPlayerSendMessage callback
This commit is contained in:
parent
efa362031e
commit
f1e8569291
@ -198,7 +198,7 @@ public:
|
|||||||
{"OnActorDeath", Function<void, unsigned short, const char*>()},
|
{"OnActorDeath", Function<void, unsigned short, const char*>()},
|
||||||
{"OnActorCellChange", Function<void, unsigned short, const char*>()},
|
{"OnActorCellChange", Function<void, unsigned short, const char*>()},
|
||||||
{"OnActorTest", Function<void, unsigned short, const char*>()},
|
{"OnActorTest", Function<void, unsigned short, const char*>()},
|
||||||
{"OnPlayerSendMessage", Function<bool, unsigned short, const char*>()},
|
{"OnPlayerSendMessage", Function<void, unsigned short, const char*>()},
|
||||||
{"OnPlayerEndCharGen", Function<void, unsigned short>()},
|
{"OnPlayerEndCharGen", Function<void, unsigned short>()},
|
||||||
{"OnGUIAction", Function<void, unsigned short, int, const char*>()},
|
{"OnGUIAction", Function<void, unsigned short, int, const char*>()},
|
||||||
{"OnWorldKillCount", Function<void, unsigned short>()},
|
{"OnWorldKillCount", Function<void, unsigned short>()},
|
||||||
|
@ -21,16 +21,7 @@ namespace mwmp
|
|||||||
{
|
{
|
||||||
DEBUG_PRINTF(strPacketID.c_str());
|
DEBUG_PRINTF(strPacketID.c_str());
|
||||||
|
|
||||||
Script::CallBackReturn<Script::CallbackIdentity("OnPlayerSendMessage")> result = true;
|
Script::Call<Script::CallbackIdentity("OnPlayerSendMessage")>(player.getId(), player.chatMessage.c_str());
|
||||||
Script::Call<Script::CallbackIdentity("OnPlayerSendMessage")>(result, player.getId(), player.chatMessage.c_str());
|
|
||||||
|
|
||||||
if (result)
|
|
||||||
{
|
|
||||||
player.chatMessage = player.npc.mName + " (" + std::to_string(player.getId()) + "): "
|
|
||||||
+ player.chatMessage + "\n";
|
|
||||||
packet.Send(false);
|
|
||||||
packet.Send(true);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user