You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
63 lines
1.9 KiB
63 lines
1.9 KiB
7 years ago
|
#include "MultiSend.h"
|
||
|
|
||
|
void MultiSend::SubValues(char* Input)
|
||
|
{
|
||
|
std::string Working(Input);
|
||
|
|
||
|
size_t find = Working.find("[me]");
|
||
|
if (find != string::npos)
|
||
|
{
|
||
|
Working.replace(find, 4, std::to_string(m_AshitaCore->GetDataManager()->GetParty()->GetMemberServerId(0)));
|
||
|
}
|
||
|
|
||
|
find = Working.find("[p0]");
|
||
|
if (find != string::npos)
|
||
|
{
|
||
|
Working.replace(find, 4, std::to_string(m_AshitaCore->GetDataManager()->GetParty()->GetMemberServerId(0)));
|
||
|
}
|
||
|
|
||
|
find = Working.find("[p1]");
|
||
|
if (find != string::npos)
|
||
|
{
|
||
|
Working.replace(find, 4, std::to_string(m_AshitaCore->GetDataManager()->GetParty()->GetMemberServerId(1)));
|
||
|
}
|
||
|
|
||
|
find = Working.find("[p2]");
|
||
|
if (find != string::npos)
|
||
|
{
|
||
|
Working.replace(find, 4, std::to_string(m_AshitaCore->GetDataManager()->GetParty()->GetMemberServerId(2)));
|
||
|
}
|
||
|
|
||
|
find = Working.find("[p3]");
|
||
|
if (find != string::npos)
|
||
|
{
|
||
|
Working.replace(find, 4, std::to_string(m_AshitaCore->GetDataManager()->GetParty()->GetMemberServerId(3)));
|
||
|
}
|
||
|
|
||
|
find = Working.find("[p4]");
|
||
|
if (find != string::npos)
|
||
|
{
|
||
|
Working.replace(find, 4, std::to_string(m_AshitaCore->GetDataManager()->GetParty()->GetMemberServerId(4)));
|
||
|
}
|
||
|
|
||
|
find = Working.find("[p5]");
|
||
|
if (find != string::npos)
|
||
|
{
|
||
|
Working.replace(find, 4, std::to_string(m_AshitaCore->GetDataManager()->GetParty()->GetMemberServerId(5)));
|
||
|
}
|
||
|
|
||
|
find = Working.find("[t]");
|
||
|
if (find != string::npos)
|
||
|
{
|
||
|
unsigned int TargetIndex = m_AshitaCore->GetDataManager()->GetTarget()->GetTargetIndex();
|
||
|
if (m_AshitaCore->GetDataManager()->GetTarget()->GetSubTargetActive())
|
||
|
{
|
||
|
TargetIndex = m_AshitaCore->GetDataManager()->GetTarget()->GetSubTargetIndex();
|
||
|
}
|
||
|
Working.replace(find, 3, std::to_string(m_AshitaCore->GetDataManager()->GetEntity()->GetServerId(TargetIndex)));
|
||
|
}
|
||
|
|
||
|
const char* base = Working.c_str();
|
||
|
memset(Input, 0, 248);
|
||
|
memcpy(Input, base, strlen(base));
|
||
|
}
|