mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 17:51:28 +00:00
Fix /assist to only care about range to assistee
This commit is contained in:
parent
cc02d94bdf
commit
3d47d912fd
@ -868,10 +868,12 @@ public:
|
||||
void SetKnockBackExemption(bool v);
|
||||
void SetPortExemption(bool v);
|
||||
void SetSenseExemption(bool v) { m_SenseExemption = v; }
|
||||
void SetAssistExemption(bool v) { m_AssistExemption = v; }
|
||||
const bool IsShadowStepExempted() const { return m_ShadowStepExemption; }
|
||||
const bool IsKnockBackExempted() const { return m_KnockBackExemption; }
|
||||
const bool IsPortExempted() const { return m_PortExemption; }
|
||||
const bool IsSenseExempted() const { return m_SenseExemption; }
|
||||
const bool IsAssistExempted() const { return m_AssistExemption; }
|
||||
const bool GetGMSpeed() const { return (gmspeed > 0); }
|
||||
void CheatDetected(CheatTypes CheatType, float x, float y, float z);
|
||||
const bool IsMQExemptedArea(uint32 zoneID, float x, float y, float z) const;
|
||||
@ -1449,6 +1451,7 @@ private:
|
||||
bool m_KnockBackExemption;
|
||||
bool m_PortExemption;
|
||||
bool m_SenseExemption;
|
||||
bool m_AssistExemption;
|
||||
bool alternate_currency_loaded;
|
||||
std::map<uint32, uint32> alternate_currency;
|
||||
std::queue<std::pair<uint32, int32>> alternate_currency_queued_operations;
|
||||
|
||||
@ -1554,6 +1554,12 @@ void Client::Handle_OP_TargetCommand(const EQApplicationPacket *app)
|
||||
SetSenseExemption(false);
|
||||
return;
|
||||
}
|
||||
else if(IsAssistExempted())
|
||||
{
|
||||
GetTarget()->IsTargeted(1);
|
||||
SetAssistExemption(false);
|
||||
return;
|
||||
}
|
||||
else if(GetBindSightTarget())
|
||||
{
|
||||
if(GetBindSightTarget()->DistNoRoot(*GetTarget()) > (zone->newzone_data.maxclip*zone->newzone_data.maxclip))
|
||||
@ -2747,21 +2753,15 @@ void Client::Handle_OP_Assist(const EQApplicationPacket *app)
|
||||
|
||||
EQApplicationPacket* outapp = app->Copy();
|
||||
eid = (EntityId_Struct*)outapp->pBuffer;
|
||||
if (RuleB(Combat, AssistNoTargetSelf)) eid->entity_id = GetID();
|
||||
if(entity && entity->IsMob())
|
||||
{
|
||||
if (RuleB(Combat, AssistNoTargetSelf))
|
||||
eid->entity_id = GetID();
|
||||
if (entity && entity->IsMob()) {
|
||||
Mob *assistee = entity->CastToMob();
|
||||
if(!assistee->IsInvisible(this) && assistee->GetTarget())
|
||||
{
|
||||
if (assistee->GetTarget()) {
|
||||
Mob *new_target = assistee->GetTarget();
|
||||
if
|
||||
(
|
||||
new_target &&
|
||||
!new_target->IsInvisible(this) &&
|
||||
(GetGM() || (Dist(*assistee) <= TARGETING_RANGE &&
|
||||
Dist(*new_target) <= TARGETING_RANGE))
|
||||
)
|
||||
{
|
||||
if (new_target && (GetGM() ||
|
||||
Dist(*assistee) <= TARGETING_RANGE)) {
|
||||
SetAssistExemption(true);
|
||||
eid->entity_id = new_target->GetID();
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user