mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-13 02:11:30 +00:00
rampage updates (#1882)
This commit is contained in:
parent
7cf66a2daa
commit
1c2e1ea228
@ -912,7 +912,7 @@ typedef enum {
|
||||
#define SE_IllusionOther 202 // implemented - Project Illusion
|
||||
#define SE_MassGroupBuff 203 // implemented
|
||||
#define SE_GroupFearImmunity 204 // implemented - (Does not use bonus)
|
||||
#define SE_Rampage 205 // implemented
|
||||
#define SE_Rampage 205 // implemented, @Combat Instant, Perform a primary slot combat rounds on all creatures within a 40 foot radius, base: number of attack rounds, limit: max entities hit per round, max: none, Note: AE range is 40 by default. Custom: Set field 'aoe_range' to override default. Adding additional attacks and hit count limit.
|
||||
#define SE_AETaunt 206 // implemented
|
||||
#define SE_FleshToBone 207 // implemented
|
||||
//#define SE_PurgePoison 208 // not used
|
||||
|
||||
@ -405,7 +405,7 @@ bool Client::Process() {
|
||||
}
|
||||
|
||||
if (CheckAATimer(aaTimerRampage)) {
|
||||
entity_list.AEAttack(this, 30);
|
||||
entity_list.AEAttack(this, 40);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1264,7 +1264,8 @@ void EntityList::AEAttack(
|
||||
float distance,
|
||||
int Hand,
|
||||
int count,
|
||||
bool is_from_spell)
|
||||
bool is_from_spell,
|
||||
int attack_rounds)
|
||||
{
|
||||
Mob *current_mob = nullptr;
|
||||
float distance_squared = distance * distance;
|
||||
@ -1276,15 +1277,18 @@ void EntityList::AEAttack(
|
||||
if (current_mob->IsNPC()
|
||||
&& current_mob != attacker //this is not needed unless NPCs can use this
|
||||
&& (attacker->IsAttackAllowed(current_mob))
|
||||
&& current_mob->GetRace() != 216 && current_mob->GetRace() != 472 /* dont attack horses */
|
||||
&& !current_mob->IsHorse() /* dont attack mounts */
|
||||
&& (DistanceSquared(current_mob->GetPosition(), attacker->GetPosition()) <= distance_squared)
|
||||
) {
|
||||
|
||||
if (!attacker->IsClient() || attacker->GetClass() == MONK || attacker->GetClass() == RANGER) {
|
||||
attacker->Attack(current_mob, Hand, false, false, is_from_spell);
|
||||
}
|
||||
else {
|
||||
attacker->CastToClient()->DoAttackRounds(current_mob, Hand, is_from_spell);
|
||||
for (int i = 0; i < attack_rounds; i++) {
|
||||
|
||||
if (!attacker->IsClient() || attacker->GetClass() == MONK || attacker->GetClass() == RANGER) {
|
||||
attacker->Attack(current_mob, Hand, false, false, is_from_spell);
|
||||
}
|
||||
else {
|
||||
attacker->CastToClient()->DoAttackRounds(current_mob, Hand, is_from_spell);
|
||||
}
|
||||
}
|
||||
|
||||
hit_count++;
|
||||
|
||||
@ -407,7 +407,8 @@ public:
|
||||
float distance,
|
||||
int Hand = EQ::invslot::slotPrimary,
|
||||
int count = 0,
|
||||
bool is_from_spell = false
|
||||
bool is_from_spell = false,
|
||||
int attack_rounds = 1
|
||||
);
|
||||
void AETaunt(Client *caster, float range = 0, int32 bonus_hate = 0);
|
||||
void AESpell(
|
||||
|
||||
@ -2209,9 +2209,16 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
|
||||
#ifdef SPELL_EFFECT_SPAM
|
||||
snprintf(effect_desc, _EDLEN, "Rampage");
|
||||
#endif
|
||||
if(caster)
|
||||
entity_list.AEAttack(caster, 30, EQ::invslot::slotPrimary, 0, true); // on live wars dont get a duration ramp, its a one shot deal
|
||||
|
||||
//defulat live range is 40, with 1 attack per round, no hit count limit
|
||||
float rampage_range = 40;
|
||||
if (spells[spell_id].aoe_range) {
|
||||
rampage_range = spells[spell_id].aoe_range; //added for expanded functionality
|
||||
}
|
||||
int attack_count = spells[spell_id].base_value[i]; //added for expanded functionality
|
||||
int hit_count = spells[spell_id].limit_value[i]; //added for expanded functionality
|
||||
if (caster) {
|
||||
entity_list.AEAttack(caster, rampage_range, EQ::invslot::slotPrimary, hit_count, true, attack_count); // on live wars dont get a duration ramp, its a one shot deal
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user