mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-31 13:16:39 +00:00
requested changes
This commit is contained in:
+6
-6
@@ -3559,10 +3559,10 @@ void Mob::ApplySpellsBonuses(uint16 spell_id, uint8 casterlevel, StatBonuses *ne
|
|||||||
}
|
}
|
||||||
else if (effect_value < 0 && new_bonus->ExtendedShielding > effect_value){
|
else if (effect_value < 0 && new_bonus->ExtendedShielding > effect_value){
|
||||||
new_bonus->ExtendedShielding = effect_value;
|
new_bonus->ExtendedShielding = effect_value;
|
||||||
}
|
}
|
||||||
else if (effect_value > 0 && new_bonus->ExtendedShielding < effect_value){
|
else if (effect_value > 0 && new_bonus->ExtendedShielding < effect_value){
|
||||||
new_bonus->ExtendedShielding = effect_value;
|
new_bonus->ExtendedShielding = effect_value;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3573,12 +3573,12 @@ void Mob::ApplySpellsBonuses(uint16 spell_id, uint8 casterlevel, StatBonuses *ne
|
|||||||
}
|
}
|
||||||
else if (effect_value < 0 && new_bonus->ShieldDuration > effect_value){
|
else if (effect_value < 0 && new_bonus->ShieldDuration > effect_value){
|
||||||
new_bonus->ShieldDuration = effect_value;
|
new_bonus->ShieldDuration = effect_value;
|
||||||
}
|
}
|
||||||
else if (effect_value > 0 && new_bonus->ShieldDuration < effect_value){
|
else if (effect_value > 0 && new_bonus->ShieldDuration < effect_value){
|
||||||
new_bonus->ShieldDuration = effect_value;
|
new_bonus->ShieldDuration = effect_value;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case SE_Weapon_Stance: {
|
case SE_Weapon_Stance: {
|
||||||
if (IsValidSpell(effect_value)) { //base1 is the spell_id of buff
|
if (IsValidSpell(effect_value)) { //base1 is the spell_id of buff
|
||||||
|
|||||||
@@ -12876,11 +12876,11 @@ void Client::Handle_OP_Shielding(const EQApplicationPacket *app)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//AA to increase SPA 230 extended shielding
|
//AA to increase SPA 230 extended shielding
|
||||||
int max_shlder_distance = 15;
|
int m_shielder_max_distance = 15;
|
||||||
max_shlder_distance += aabonuses.ExtendedShielding + itembonuses.ExtendedShielding + spellbonuses.ExtendedShielding;
|
m_shielder_max_distance += aabonuses.ExtendedShielding + itembonuses.ExtendedShielding + spellbonuses.ExtendedShielding;
|
||||||
max_shlder_distance = std::max(max_shlder_distance, 0);
|
m_shielder_max_distance = std::max(m_shielder_max_distance, 0);
|
||||||
|
|
||||||
if (shield_target->CalculateDistance(GetX(), GetY(), GetZ()) > static_cast<float>(max_shlder_distance)) {
|
if (shield_target->CalculateDistance(GetX(), GetY(), GetZ()) > static_cast<float>(m_shielder_max_distance)) {
|
||||||
return; //Too far away, no message is given thoughh.
|
return; //Too far away, no message is given thoughh.
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -12888,7 +12888,7 @@ void Client::Handle_OP_Shielding(const EQApplicationPacket *app)
|
|||||||
|
|
||||||
SetShieldTargetID(shield_target->GetID());
|
SetShieldTargetID(shield_target->GetID());
|
||||||
SetShielderMitigation(25);
|
SetShielderMitigation(25);
|
||||||
SetShielerMaxDistance(max_shlder_distance);
|
SetShielerMaxDistance(m_shielder_max_distance);
|
||||||
|
|
||||||
shield_target->SetShielderID(GetID());
|
shield_target->SetShielderID(GetID());
|
||||||
shield_target->SetShieldTargetMitigation(50);
|
shield_target->SetShieldTargetMitigation(50);
|
||||||
|
|||||||
+5
-5
@@ -6177,7 +6177,7 @@ float Mob::GetDefaultRaceSize() const {
|
|||||||
return GetRaceGenderDefaultHeight(race, gender);
|
return GetRaceGenderDefaultHeight(race, gender);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Mob::ShieldAbility(uint32 target_id, int max_shlder_distance, int shield_duration, int shld_target_mitigation, int shlder_mitigation)
|
void Mob::ShieldAbility(uint32 target_id, int m_max_shielder_distance, int shield_duration, int m_shield_target_mitigation, int m_shielder_mitigation)
|
||||||
{
|
{
|
||||||
|
|
||||||
Mob* shield_target = entity_list.GetMob(target_id);
|
Mob* shield_target = entity_list.GetMob(target_id);
|
||||||
@@ -6208,7 +6208,7 @@ void Mob::ShieldAbility(uint32 target_id, int max_shlder_distance, int shield_du
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (shield_target->CalculateDistance(GetX(), GetY(), GetZ()) > static_cast<float>(max_shlder_distance)) {
|
if (shield_target->CalculateDistance(GetX(), GetY(), GetZ()) > static_cast<float>(m_max_shielder_distance)) {
|
||||||
if (IsClient()) {
|
if (IsClient()) {
|
||||||
MessageString(Chat::White, TARGET_TOO_FAR); //Live doesn't give any message for failure, for the quest ability lets allow it.
|
MessageString(Chat::White, TARGET_TOO_FAR); //Live doesn't give any message for failure, for the quest ability lets allow it.
|
||||||
}
|
}
|
||||||
@@ -6218,11 +6218,11 @@ void Mob::ShieldAbility(uint32 target_id, int max_shlder_distance, int shield_du
|
|||||||
entity_list.MessageCloseString(this, false, 100, 0, START_SHIELDING, GetCleanName(), shield_target->GetCleanName());
|
entity_list.MessageCloseString(this, false, 100, 0, START_SHIELDING, GetCleanName(), shield_target->GetCleanName());
|
||||||
|
|
||||||
SetShieldTargetID(shield_target->GetID());
|
SetShieldTargetID(shield_target->GetID());
|
||||||
SetShielderMitigation(shlder_mitigation);
|
SetShielderMitigation(m_shield_target_mitigation);
|
||||||
SetShielerMaxDistance(max_shlder_distance);
|
SetShielerMaxDistance(m_max_shielder_distance);
|
||||||
|
|
||||||
shield_target->SetShielderID(GetID());
|
shield_target->SetShielderID(GetID());
|
||||||
shield_target->SetShieldTargetMitigation(shld_target_mitigation);
|
shield_target->SetShieldTargetMitigation(m_shield_target_mitigation);
|
||||||
|
|
||||||
shield_timer.Start(shield_duration);
|
shield_timer.Start(shield_duration);
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -1129,7 +1129,7 @@ public:
|
|||||||
|
|
||||||
Trade* trade;
|
Trade* trade;
|
||||||
|
|
||||||
void ShieldAbility(uint32 target_id, int max_shlder_distance = 15, int shield_duration = 12000, int shld_target_mitigation = 50, int shlder_mitigation = 75);
|
void ShieldAbility(uint32 target_id, int m_shielder_max_distance = 15, int shield_duration = 12000, int m_shielld_target_mitigation = 50, int m_shielder_mitigation = 75);
|
||||||
void DoShieldDamageOnShielder(Mob* shield_target, int hit_damage_done, EQ::skills::SkillType skillInUse);
|
void DoShieldDamageOnShielder(Mob* shield_target, int hit_damage_done, EQ::skills::SkillType skillInUse);
|
||||||
void ShieldAbilityFinish();
|
void ShieldAbilityFinish();
|
||||||
void ShieldAbilityClearVariables();
|
void ShieldAbilityClearVariables();
|
||||||
|
|||||||
+16
-24
@@ -6267,41 +6267,33 @@ XS(XS_Mob_ShieldAbility); /* prototype to pass -Wmissing-prototypes */
|
|||||||
XS(XS_Mob_ShieldAbility) {
|
XS(XS_Mob_ShieldAbility) {
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
if (items < 2 || items > 6)
|
if (items < 2 || items > 6)
|
||||||
Perl_croak(aTHX_ "Usage: Mob::ShieldAbility(THIS, uint32 target_id, [int32 max_shielder_distance = 15], [int32 shield_duration = 12000], [int32 shield_target_mitigation= 50], [int32 shielder_mitigation = 50]"); // @categories Spells and Disciplines
|
Perl_croak(aTHX_ "Usage: Mob::ShieldAbility(THIS, uint32 target_id, [int32 shielder__max_distance = 15], [int32 shield_duration = 12000], [int32 shield_target_mitigation= 50], [int32 shielder_mitigation = 50]"); // @categories Spells and Disciplines
|
||||||
{
|
{
|
||||||
Mob *THIS;
|
Mob *THIS;
|
||||||
uint32 target_id = (uint32)SvUV(ST(1));
|
uint32 target_id = (uint32)SvUV(ST(1));
|
||||||
int32 max_shlder_distance;
|
int32 shielder_max_distance = (int32)SvUV(ST(2));
|
||||||
int32 shld_duration;
|
int32 shield_duration = (int32)SvUV(ST(3));
|
||||||
int32 shld_target_mitigation;
|
int32 shield_target_mitigation = (int32)SvUV(ST(4));
|
||||||
int32 shlder_mitigation;
|
int32 shielder_mitigation = (int32)SvUV(ST(5));
|
||||||
|
|
||||||
VALIDATE_THIS_IS_MOB;
|
VALIDATE_THIS_IS_MOB;
|
||||||
if (items < 3)
|
if (items < 3) {
|
||||||
max_shlder_distance = 15;
|
shielder_max_distance = 15;
|
||||||
else {
|
|
||||||
max_shlder_distance = max_shlder_distance = (int32)SvUV(ST(2));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (items < 4)
|
if (items < 4) {
|
||||||
shld_duration = 12000;
|
shield_duration = 12000;
|
||||||
else {
|
|
||||||
shld_duration = (int32)SvUV(ST(3));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (items < 5)
|
if (items < 5) {
|
||||||
shld_target_mitigation = 50;
|
shield_target_mitigation = 50;
|
||||||
else {
|
|
||||||
shld_target_mitigation = (int32)SvUV(ST(4));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (items < 6)
|
if (items < 6) {
|
||||||
shlder_mitigation = 50;
|
shielder_mitigation = 50;
|
||||||
else {
|
|
||||||
shlder_mitigation = (int32)SvUV(ST(5));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
THIS->ShieldAbility(target_id, max_shlder_distance, shld_duration, shld_target_mitigation, shlder_mitigation);
|
THIS->ShieldAbility(target_id, shielder_max_distance, shield_duration, shield_duration, shield_duration);
|
||||||
|
|
||||||
}
|
}
|
||||||
XSRETURN_EMPTY;
|
XSRETURN_EMPTY;
|
||||||
|
|||||||
@@ -2956,9 +2956,9 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
|
|||||||
if (petowner) {
|
if (petowner) {
|
||||||
|
|
||||||
int shield_duration = spells[spell_id].base[i] * 12 * 1000;
|
int shield_duration = spells[spell_id].base[i] * 12 * 1000;
|
||||||
int shld_target_mitigation = spells[spell_id].base2[i] ? spells[spell_id].base2[i] : 50;
|
int m_shield_target_mitigation = spells[spell_id].base2[i] ? spells[spell_id].base2[i] : 50;
|
||||||
int shlder_mitigation = spells[spell_id].max[i] ? spells[spell_id].base2[i] : 50;
|
int m_shielder_mitigation = spells[spell_id].max[i] ? spells[spell_id].base2[i] : 50;
|
||||||
ShieldAbility(petowner->GetID(), 25, shield_duration, shld_target_mitigation, shlder_mitigation);
|
ShieldAbility(petowner->GetID(), 25, shield_duration, m_shield_target_mitigation, m_shielder_mitigation);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user