mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-11 03:31:08 +00:00
Implemented SPA 465,477,478
Implemented SE_PC_Pet_AE_Rampage 465 Chance for pet to AE rampage with a damage modifier SE_Hatelist_To_Top_Index 477 Chance to be put on top of RAMPAGE list SE_Hatelist_To_Tail_Index 478 Chance to be put on bottom of RAMPAGE list
This commit is contained in:
@@ -3881,6 +3881,61 @@ int16 Mob::GetHealRate(uint16 spell_id, Mob* caster) {
|
||||
return heal_rate;
|
||||
}
|
||||
|
||||
void Mob::SetBottomRampageList()
|
||||
{
|
||||
auto &mob_list = entity_list.GetCloseMobList(this);
|
||||
|
||||
for (auto &e : mob_list) {
|
||||
auto mob = e.second;
|
||||
if (!mob) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!mob->GetSpecialAbility(SPECATK_RAMPAGE)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (mob->IsNPC() && mob->CheckAggro(this)) {
|
||||
for (int i = 0; i < mob->RampageArray.size(); i++) {
|
||||
// Find this mob in the rampage list
|
||||
if (this->GetID() == mob->RampageArray[i]) {
|
||||
//Move to bottom of Rampage List
|
||||
auto it = mob->RampageArray.begin() + i;
|
||||
std::rotate(it, it + 1, mob->RampageArray.end());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Mob::SetTopRampageList()
|
||||
{
|
||||
auto &mob_list = entity_list.GetCloseMobList(this);
|
||||
|
||||
for (auto &e : mob_list) {
|
||||
auto mob = e.second;
|
||||
if (!mob) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!mob->GetSpecialAbility(SPECATK_RAMPAGE)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (mob->IsNPC() && mob->CheckAggro(this)) {
|
||||
for (int i = 0; i < mob->RampageArray.size(); i++) {
|
||||
// Find this mob in the rampage list
|
||||
if (this->GetID() == mob->RampageArray[i]) {
|
||||
//Move to Top of Rampage List
|
||||
auto it = mob->RampageArray.begin() + i;
|
||||
std::rotate(it, it + 1, mob->RampageArray.end());
|
||||
std::rotate(mob->RampageArray.rbegin(), mob->RampageArray.rbegin() + 1, mob->RampageArray.rend());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool Mob::TryFadeEffect(int slot)
|
||||
{
|
||||
if (!buffs[slot].spellid)
|
||||
|
||||
Reference in New Issue
Block a user