|
|
@ -1,49 +1,49 @@ |
|
|
|
#include "MultiSend.h" |
|
|
|
#include "MultiSend.h" |
|
|
|
|
|
|
|
|
|
|
|
void MultiSend::SubValues(char* Input) |
|
|
|
std::string MultiSend::SubValues(std::string Input) |
|
|
|
{ |
|
|
|
{ |
|
|
|
std::string Working(Input); |
|
|
|
std::string Working = Input; |
|
|
|
|
|
|
|
|
|
|
|
size_t find = Working.find("[me]"); |
|
|
|
size_t find = Working.find("[me]"); |
|
|
|
if (find != string::npos) |
|
|
|
if (find != string::npos) |
|
|
|
{ |
|
|
|
{ |
|
|
|
Working.replace(find, 4, std::to_string(m_AshitaCore->GetDataManager()->GetParty()->GetMemberServerId(0))); |
|
|
|
Working.replace(find, 4, std::string(m_AshitaCore->GetDataManager()->GetParty()->GetMemberName(0))); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
find = Working.find("[p0]"); |
|
|
|
find = Working.find("[p0]"); |
|
|
|
if (find != string::npos) |
|
|
|
if (find != string::npos) |
|
|
|
{ |
|
|
|
{ |
|
|
|
Working.replace(find, 4, std::to_string(m_AshitaCore->GetDataManager()->GetParty()->GetMemberServerId(0))); |
|
|
|
Working.replace(find, 4, std::string(m_AshitaCore->GetDataManager()->GetParty()->GetMemberName(0))); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
find = Working.find("[p1]"); |
|
|
|
find = Working.find("[p1]"); |
|
|
|
if (find != string::npos) |
|
|
|
if (find != string::npos) |
|
|
|
{ |
|
|
|
{ |
|
|
|
Working.replace(find, 4, std::to_string(m_AshitaCore->GetDataManager()->GetParty()->GetMemberServerId(1))); |
|
|
|
Working.replace(find, 4, std::string(m_AshitaCore->GetDataManager()->GetParty()->GetMemberName(1))); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
find = Working.find("[p2]"); |
|
|
|
find = Working.find("[p2]"); |
|
|
|
if (find != string::npos) |
|
|
|
if (find != string::npos) |
|
|
|
{ |
|
|
|
{ |
|
|
|
Working.replace(find, 4, std::to_string(m_AshitaCore->GetDataManager()->GetParty()->GetMemberServerId(2))); |
|
|
|
Working.replace(find, 4, std::string(m_AshitaCore->GetDataManager()->GetParty()->GetMemberName(2))); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
find = Working.find("[p3]"); |
|
|
|
find = Working.find("[p3]"); |
|
|
|
if (find != string::npos) |
|
|
|
if (find != string::npos) |
|
|
|
{ |
|
|
|
{ |
|
|
|
Working.replace(find, 4, std::to_string(m_AshitaCore->GetDataManager()->GetParty()->GetMemberServerId(3))); |
|
|
|
Working.replace(find, 4, std::string(m_AshitaCore->GetDataManager()->GetParty()->GetMemberName(3))); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
find = Working.find("[p4]"); |
|
|
|
find = Working.find("[p4]"); |
|
|
|
if (find != string::npos) |
|
|
|
if (find != string::npos) |
|
|
|
{ |
|
|
|
{ |
|
|
|
Working.replace(find, 4, std::to_string(m_AshitaCore->GetDataManager()->GetParty()->GetMemberServerId(4))); |
|
|
|
Working.replace(find, 4, std::string(m_AshitaCore->GetDataManager()->GetParty()->GetMemberName(4))); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
find = Working.find("[p5]"); |
|
|
|
find = Working.find("[p5]"); |
|
|
|
if (find != string::npos) |
|
|
|
if (find != string::npos) |
|
|
|
{ |
|
|
|
{ |
|
|
|
Working.replace(find, 4, std::to_string(m_AshitaCore->GetDataManager()->GetParty()->GetMemberServerId(5))); |
|
|
|
Working.replace(find, 4, std::string(m_AshitaCore->GetDataManager()->GetParty()->GetMemberName(5))); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
find = Working.find("[t]"); |
|
|
|
find = Working.find("[t]"); |
|
|
@ -56,7 +56,12 @@ void MultiSend::SubValues(char* Input) |
|
|
|
} |
|
|
|
} |
|
|
|
Working.replace(find, 3, std::to_string(m_AshitaCore->GetDataManager()->GetEntity()->GetServerId(TargetIndex))); |
|
|
|
Working.replace(find, 3, std::to_string(m_AshitaCore->GetDataManager()->GetEntity()->GetServerId(TargetIndex))); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
return Working; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void MultiSend::SubValues(char* Input) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
std::string Working = SubValues(std::string(Input)); |
|
|
|
const char* base = Working.c_str(); |
|
|
|
const char* base = Working.c_str(); |
|
|
|
memset(Input, 0, 248); |
|
|
|
memset(Input, 0, 248); |
|
|
|
memcpy(Input, base, strlen(base)); |
|
|
|
memcpy(Input, base, strlen(base)); |
|
|
|