mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-10 23:20:25 +00:00
Rework quiver haste
This commit is contained in:
+10
-12
@@ -8356,21 +8356,19 @@ void Client::ShowNumHits()
|
||||
return;
|
||||
}
|
||||
|
||||
float Client::GetQuiverHaste()
|
||||
int Client::GetQuiverHaste(int delay)
|
||||
{
|
||||
float quiver_haste = 0;
|
||||
const ItemInst *pi = nullptr;
|
||||
for (int r = EmuConstants::GENERAL_BEGIN; r <= EmuConstants::GENERAL_END; r++) {
|
||||
const ItemInst *pi = GetInv().GetItem(r);
|
||||
if (!pi)
|
||||
continue;
|
||||
if (pi->IsType(ItemClassContainer) && pi->GetItem()->BagType == BagTypeQuiver) {
|
||||
float temp_wr = (pi->GetItem()->BagWR / RuleI(Combat, QuiverWRHasteDiv));
|
||||
quiver_haste = std::max(temp_wr, quiver_haste);
|
||||
}
|
||||
pi = GetInv().GetItem(r);
|
||||
if (pi && pi->IsType(ItemClassContainer) && pi->GetItem()->BagType == BagTypeQuiver &&
|
||||
pi->GetItem()->BagWR > 0)
|
||||
break;
|
||||
if (r == EmuConstants::GENERAL_END)
|
||||
// we will get here if we don't find a valid quiver
|
||||
return 0;
|
||||
}
|
||||
if (quiver_haste > 0)
|
||||
quiver_haste = 1.0f / (1.0f + static_cast<float>(quiver_haste) / 100.0f);
|
||||
return quiver_haste;
|
||||
return (pi->GetItem()->BagWR * 0.0025f * delay) + 1;
|
||||
}
|
||||
|
||||
void Client::SendColoredText(uint32 color, std::string message)
|
||||
|
||||
Reference in New Issue
Block a user