mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 17:51:28 +00:00
Implemented SE_FactionModPct - Modifies faction gains and losses by percent.
This commit is contained in:
parent
4a49a11e73
commit
35e72692c1
@ -3,6 +3,7 @@ EQEMu Changelog (Started on Sept 24, 2003 15:50)
|
||||
== 07/2/2014 ==
|
||||
Kayen: Implemented SE_Sanctuary - Places caster at bottom hate list, effect fades if caster cast spell on targets other than self.
|
||||
Kayen: Implemented SE_ResourceTap - Coverts a percent of dmg from dmg spells(DD/DoT) to hp/mana/end.
|
||||
Kayen: Implemented SE_FactionModPct - Modifies faction gains and losses by percent.
|
||||
|
||||
== 06/25/2014 ==
|
||||
Kayen: Updated SE_Hate (Renamed from SE_Hate2) to now properly work for instant +/- hate spells.
|
||||
|
||||
@ -605,7 +605,7 @@ typedef enum {
|
||||
#define SE_AddHatePct 455 // implemented Modify total hate by %
|
||||
#define SE_AddHateOverTimePct 456 // implemented Modify total hate by % over time.
|
||||
#define SE_ResourceTap 457 // implemented Coverts a percent of dmg from dmg spells(DD/DoT) to hp/mana/end.
|
||||
//#define SE_FactionModPct 458 // not used
|
||||
#define SE_FactionModPct 458 // implemented Modifies faction gains and losses by percent.
|
||||
#define SE_DamageModifier2 459 // implemented - Modifies melee damage by skill type
|
||||
|
||||
// LAST
|
||||
|
||||
@ -1315,6 +1315,16 @@ void Client::ApplyAABonuses(uint32 aaid, uint32 slots, StatBonuses* newbon)
|
||||
newbon->PetMeleeMitigation += base1;
|
||||
break;
|
||||
|
||||
case SE_FactionModPct:
|
||||
{
|
||||
if((base1 < 0) && (newbon->FactionModPct > base1))
|
||||
newbon->FactionModPct = base1;
|
||||
|
||||
else if(newbon->FactionModPct < base1)
|
||||
newbon->FactionModPct = base1;
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -2860,6 +2870,16 @@ void Mob::ApplySpellsBonuses(uint16 spell_id, uint8 casterlevel, StatBonuses* ne
|
||||
newbon->Sanctuary = true;
|
||||
break;
|
||||
|
||||
case SE_FactionModPct:
|
||||
{
|
||||
if((effect_value < 0) && (newbon->FactionModPct > effect_value))
|
||||
newbon->FactionModPct = effect_value;
|
||||
|
||||
else if(newbon->FactionModPct < effect_value)
|
||||
newbon->FactionModPct = effect_value;
|
||||
break;
|
||||
}
|
||||
|
||||
//Special custom cases for loading effects on to NPC from 'npc_spels_effects' table
|
||||
if (IsAISpellEffect) {
|
||||
|
||||
@ -4338,6 +4358,12 @@ void Mob::NegateSpellsBonuses(uint16 spell_id)
|
||||
spellbonuses.Sanctuary = effect_value;
|
||||
break;
|
||||
|
||||
case SE_FactionModPct:
|
||||
spellbonuses.FactionModPct = effect_value;
|
||||
itembonuses.FactionModPct = effect_value;
|
||||
aabonuses.FactionModPct = effect_value;
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -7629,6 +7629,9 @@ void Client::SetFactionLevel(uint32 char_id, uint32 npc_id, uint8 char_class, ui
|
||||
if(npc_value[i] != 0) {
|
||||
tmpValue = current_value + mod + npc_value[i];
|
||||
|
||||
int16 FactionModPct = spellbonuses.FactionModPct + itembonuses.FactionModPct + aabonuses.FactionModPct;
|
||||
tmpValue += (tmpValue * FactionModPct) / 100;
|
||||
|
||||
// Make sure faction hits don't go to GMs...
|
||||
if (m_pp.gm==1 && (tmpValue < current_value)) {
|
||||
tmpValue = current_value;
|
||||
|
||||
@ -373,6 +373,7 @@ struct StatBonuses {
|
||||
bool BerserkSPA; // berserk effect
|
||||
int16 Metabolism; // Food/drink consumption rates.
|
||||
bool Sanctuary; // Sanctuary effect, lowers place on hate list until cast on others.
|
||||
int16 FactionModPct; // Modifies amount of faction gained.
|
||||
|
||||
// AAs
|
||||
int8 Packrat; //weight reduction for items, 1 point = 10%
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user