mirror of
https://github.com/EQEmu/Server.git
synced 2026-08-30 09:37:55 +00:00
Implemented SE_PC_Pet_Rampage 464 - Base1 % chance to do rampage for base2 % of damage each melee round
This commit is contained in:
+17
-7
@@ -1139,16 +1139,12 @@ void Mob::AI_Process() {
|
||||
}
|
||||
}
|
||||
|
||||
if (IsPet() || (IsNPC() && CastToNPC()->GetSwarmOwner())) {
|
||||
if (IsPet() || IsTempPet()) {
|
||||
Mob *owner = nullptr;
|
||||
|
||||
if (IsPet())
|
||||
owner = GetOwner();
|
||||
else
|
||||
owner = entity_list.GetMobID(CastToNPC()->GetSwarmOwner());
|
||||
owner = GetOwner();
|
||||
|
||||
if (owner) {
|
||||
int16 flurry_chance = owner->aabonuses.PetFlurry +
|
||||
int16 flurry_chance = owner->aabonuses.PetFlurry +
|
||||
owner->spellbonuses.PetFlurry + owner->itembonuses.PetFlurry;
|
||||
|
||||
if (flurry_chance && zone->random.Roll(flurry_chance))
|
||||
@@ -1156,6 +1152,19 @@ void Mob::AI_Process() {
|
||||
}
|
||||
}
|
||||
|
||||
if ((IsPet() || IsTempPet()) && IsPetOwnerClient()){
|
||||
if (spellbonuses.PC_Pet_Rampage[0] || itembonuses.PC_Pet_Rampage[0] || aabonuses.PC_Pet_Rampage[0]){
|
||||
int chance = spellbonuses.PC_Pet_Rampage[0] + itembonuses.PC_Pet_Rampage[0] + aabonuses.PC_Pet_Rampage[0];
|
||||
int dmg_mod = spellbonuses.PC_Pet_Rampage[1] + itembonuses.PC_Pet_Rampage[1] + aabonuses.PC_Pet_Rampage[1];
|
||||
Shout("CHance %i", chance);
|
||||
if(zone->random.Roll(chance)) {
|
||||
ExtraAttackOptions opts;
|
||||
opts.damage_percent = dmg_mod / 100.0f;
|
||||
Rampage(&opts);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (GetSpecialAbility(SPECATK_RAMPAGE) && !specialed)
|
||||
{
|
||||
int rampage_chance = GetSpecialAbilityParam(SPECATK_RAMPAGE, 0);
|
||||
@@ -1245,6 +1254,7 @@ void Mob::AI_Process() {
|
||||
//now special attacks (kick, etc)
|
||||
if(IsNPC())
|
||||
CastToNPC()->DoClassAttacks(target);
|
||||
|
||||
}
|
||||
AI_EngagedCastCheck();
|
||||
} //end is within combat rangepet
|
||||
|
||||
Reference in New Issue
Block a user