mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-31 09:06:46 +00:00
Moved buff target type calculation to zone
This commit is contained in:
+3
-15
@@ -4257,22 +4257,10 @@ namespace SoD
|
||||
}
|
||||
|
||||
// 0 = self buff window, 1 = self target window, 2 = pet buff or target window, 4 = group, 5 = PC, 7 = NPC
|
||||
void BuffComponent::SetRefreshType(std::unique_ptr<EQApplicationPacket>& packet, Mob* source, Client* target) const
|
||||
void BuffComponent::SetRefreshType(std::unique_ptr<EQApplicationPacket>& packet, uint8_t refresh_type) const
|
||||
{
|
||||
if (packet) {
|
||||
unsigned char* type = &packet->pBuffer[packet->size - 1];
|
||||
|
||||
if (target->GetID() == source->GetID())
|
||||
*type = 1;
|
||||
else if (target->IsPet())
|
||||
*type = 2;
|
||||
else if (target->HasGroup() && source->GetGroup() == target->GetGroup())
|
||||
*type = 4;
|
||||
else if (target->IsClient())
|
||||
*type = 5;
|
||||
else
|
||||
*type = 7;
|
||||
}
|
||||
if (packet)
|
||||
packet->pBuffer[packet->size - 1] = refresh_type;
|
||||
}
|
||||
|
||||
} /*SoD*/
|
||||
|
||||
Reference in New Issue
Block a user