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:
KayenEQ
2021-07-14 15:35:37 -04:00
parent 8fedf40440
commit 140bf31309
8 changed files with 128 additions and 14 deletions
+55
View File
@@ -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)