Multisend is a replacement for servo. No synchronization is needed, just load and go.
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.
 
 

43 lines
1.1 KiB

#include "MultiSend.h"
bool MultiSend::Direct3DInitialize(IDirect3DDevice8* lpDevice)
{
this->m_Direct3DDevice = lpDevice;
return true;
}
/**
* @brief Direct3D prerender call to allow this plugin to prepare for rendering.
*
* @note This will only be called if you returned true in Direct3DInitialize!
*/
void MultiSend::Direct3DPreRender(void)
{
if (FollowEnabled)
{
if (Following)
{
uint16_t myindex = m_AshitaCore->GetDataManager()->GetParty()->GetMemberTargetIndex(0);
float MyX = m_AshitaCore->GetDataManager()->GetEntity()->GetLocalX(myindex);
float MyZ = m_AshitaCore->GetDataManager()->GetEntity()->GetLocalZ(myindex);
double Distance = sqrt(pow(PositionX - MyX, 2) + pow(PositionZ - MyZ, 2));
if (Distance > 0.4f)
{
StructPointer->DirX = PositionX - MyX;
StructPointer->DirY = 0;
StructPointer->DirZ = PositionZ - MyZ;
StructPointer->Autorun = 1;
}
else
{
StructPointer->Autorun = 0;
}
}
else if (StopFollow)
{
StructPointer->Autorun = 0;
StopFollow = false;
}
}
}