2015-08-17 22:05:00 +00:00
|
|
|
#include "CScriptMailbox.hpp"
|
2016-04-12 08:01:24 +00:00
|
|
|
#include "CStateManager.hpp"
|
2015-08-17 22:05:00 +00:00
|
|
|
|
2016-03-04 23:04:53 +00:00
|
|
|
namespace urde
|
2015-08-17 22:05:00 +00:00
|
|
|
{
|
|
|
|
|
2016-04-12 08:01:24 +00:00
|
|
|
CScriptMailbox::CScriptMailbox(CBitStreamReader&)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void CScriptMailbox::AddMsg(TEditorId id, EScriptObjectMessage msg, bool flag)
|
|
|
|
{
|
|
|
|
/* TODO: Verify this behavior */
|
|
|
|
CMailMessage mail{id, msg, flag};
|
|
|
|
auto it = std::find(x0_messages.begin(), x0_messages.end(), mail);
|
|
|
|
|
|
|
|
if (it != x0_messages.end())
|
|
|
|
*it = mail;
|
|
|
|
else
|
|
|
|
x0_messages.push_back(mail);
|
|
|
|
}
|
|
|
|
|
|
|
|
void CScriptMailbox::RemoveMsg(TEditorId id, EScriptObjectMessage msg, bool flag)
|
|
|
|
{
|
|
|
|
CMailMessage mail{id, msg, flag};
|
|
|
|
auto it = std::find(x0_messages.begin(), x0_messages.end(), mail);
|
|
|
|
if (it != x0_messages.end())
|
|
|
|
x0_messages.erase(it);
|
|
|
|
}
|
|
|
|
|
|
|
|
void CScriptMailbox::SendMsgs(const TAreaId& areaId, CStateManager& stateMgr)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void CScriptMailbox::PutTo(CBitStreamWriter&)
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2015-08-17 22:05:00 +00:00
|
|
|
}
|