Merge branch 'Development' of github.com:KayenEQ/Server into KayenEQ-Development

Conflicts:
	changelog.txt
This commit is contained in:
Michael Cook (mackal) 2014-05-20 00:48:44 -04:00
commit ecc3459d93
8 changed files with 49 additions and 33 deletions

View File

@ -4,6 +4,9 @@ EQEMu Changelog (Started on Sept 24, 2003 15:50)
Secrets: Identified the opcode/struct for guild ranks in Rain of Fear+ clients. Secrets: Identified the opcode/struct for guild ranks in Rain of Fear+ clients.
Secrets: Implemented a work-around for Rain of Fear clients to have all guild permissions until proper database support is added for newer ranks. Secrets: Implemented a work-around for Rain of Fear clients to have all guild permissions until proper database support is added for newer ranks.
== 05/14/2014 ==
Kayen: Rooted NPC's will no longer target players with Divine Aura effect if they are the closest target and other targets exist on the hate list.
== 05/12/2014 == == 05/12/2014 ==
Uleat: Re-arranged functions in Item.cpp to somewhat match the order they are declared in Item.h. Should make finding their location a little easier when using declarations as a guide. (This will facilitate readability of an upcoming change...) Uleat: Re-arranged functions in Item.cpp to somewhat match the order they are declared in Item.h. Should make finding their location a little easier when using declarations as a guide. (This will facilitate readability of an upcoming change...)

View File

@ -0,0 +1 @@
INSERT INTO `rule_values` (`ruleset_id`, `rule_name`, `rule_value`, `notes`) VALUES (1, 'Spells:FocusCombatProcs', 'false', 'Allow all combat procs to receive focus (ignores focus limit).');

View File

@ -2151,28 +2151,40 @@ void Mob::ApplySpellsBonuses(uint16 spell_id, uint8 casterlevel, StatBonuses* ne
case SE_LimitHPPercent: case SE_LimitHPPercent:
{ {
if(newbon->HPPercCap != 0 && newbon->HPPercCap > effect_value) if(newbon->HPPercCap[0] != 0 && newbon->HPPercCap[0] > effect_value){
newbon->HPPercCap = effect_value; newbon->HPPercCap[0] = effect_value;
else if(newbon->HPPercCap == 0) newbon->HPPercCap[1] = base2;
newbon->HPPercCap = effect_value; }
else if(newbon->HPPercCap[0] == 0){
newbon->HPPercCap[0] = effect_value;
newbon->HPPercCap[1] = base2;
}
break; break;
} }
case SE_LimitManaPercent: case SE_LimitManaPercent:
{ {
if(newbon->ManaPercCap != 0 && newbon->ManaPercCap > effect_value) if(newbon->ManaPercCap[0] != 0 && newbon->ManaPercCap[0] > effect_value){
newbon->ManaPercCap = effect_value; newbon->ManaPercCap[0] = effect_value;
else if(newbon->ManaPercCap == 0) newbon->ManaPercCap[1] = base2;
newbon->ManaPercCap = effect_value; }
else if(newbon->ManaPercCap[0] == 0) {
newbon->ManaPercCap[0] = effect_value;
newbon->ManaPercCap[1] = base2;
}
break; break;
} }
case SE_LimitEndPercent: case SE_LimitEndPercent:
{ {
if(newbon->EndPercCap != 0 && newbon->EndPercCap > effect_value) if(newbon->EndPercCap[0] != 0 && newbon->EndPercCap[0] > effect_value) {
newbon->EndPercCap = effect_value; newbon->EndPercCap[0] = effect_value;
else if(newbon->EndPercCap == 0) newbon->EndPercCap[1] = base2;
newbon->EndPercCap = effect_value; }
else if(newbon->EndPercCap[0] == 0){
newbon->EndPercCap[0] = effect_value;
newbon->EndPercCap[1] = base2;
}
break; break;
} }

View File

@ -10649,10 +10649,10 @@ int32 Bot::CalcMaxHP() {
if (cur_hp > max_hp) if (cur_hp > max_hp)
cur_hp = max_hp; cur_hp = max_hp;
int hp_perc_cap = spellbonuses.HPPercCap; int hp_perc_cap = spellbonuses.HPPercCap[0];
if(hp_perc_cap) { if(hp_perc_cap) {
int curHP_cap = (max_hp * hp_perc_cap) / 100; int curHP_cap = (max_hp * hp_perc_cap) / 100;
if (cur_hp > curHP_cap) if (cur_hp > curHP_cap || (spellbonuses.HPPercCap[1] && cur_hp > spellbonuses.HPPercCap[1]))
cur_hp = curHP_cap; cur_hp = curHP_cap;
} }
@ -10671,10 +10671,10 @@ int32 Bot::CalcMaxEndurance()
cur_end = max_end; cur_end = max_end;
} }
int end_perc_cap = spellbonuses.EndPercCap; int end_perc_cap = spellbonuses.EndPercCap[0];
if(end_perc_cap) { if(end_perc_cap) {
int curEnd_cap = (max_end * end_perc_cap) / 100; int curEnd_cap = (max_end * end_perc_cap) / 100;
if (cur_end > curEnd_cap) if (cur_end > curEnd_cap || (spellbonuses.EndPercCap[1] && cur_end > spellbonuses.EndPercCap[1]))
cur_end = curEnd_cap; cur_end = curEnd_cap;
} }

View File

@ -255,10 +255,10 @@ int32 Client::CalcMaxHP() {
if (cur_hp > max_hp) if (cur_hp > max_hp)
cur_hp = max_hp; cur_hp = max_hp;
int hp_perc_cap = spellbonuses.HPPercCap; int hp_perc_cap = spellbonuses.HPPercCap[0];
if(hp_perc_cap) { if(hp_perc_cap) {
int curHP_cap = (max_hp * hp_perc_cap) / 100; int curHP_cap = (max_hp * hp_perc_cap) / 100;
if (cur_hp > curHP_cap) if (cur_hp > curHP_cap || (spellbonuses.HPPercCap[1] && cur_hp > spellbonuses.HPPercCap[1]))
cur_hp = curHP_cap; cur_hp = curHP_cap;
} }
@ -950,10 +950,10 @@ int32 Client::CalcMaxMana()
cur_mana = max_mana; cur_mana = max_mana;
} }
int mana_perc_cap = spellbonuses.ManaPercCap; int mana_perc_cap = spellbonuses.ManaPercCap[0];
if(mana_perc_cap) { if(mana_perc_cap) {
int curMana_cap = (max_mana * mana_perc_cap) / 100; int curMana_cap = (max_mana * mana_perc_cap) / 100;
if (cur_mana > curMana_cap) if (cur_mana > curMana_cap || (spellbonuses.ManaPercCap[1] && cur_mana > spellbonuses.ManaPercCap[1]))
cur_mana = curMana_cap; cur_mana = curMana_cap;
} }
@ -1890,10 +1890,10 @@ void Client::CalcMaxEndurance()
cur_end = max_end; cur_end = max_end;
} }
int end_perc_cap = spellbonuses.EndPercCap; int end_perc_cap = spellbonuses.EndPercCap[0];
if(end_perc_cap) { if(end_perc_cap) {
int curEnd_cap = (max_end * end_perc_cap) / 100; int curEnd_cap = (max_end * end_perc_cap) / 100;
if (cur_end > curEnd_cap) if (cur_end > curEnd_cap || (spellbonuses.EndPercCap[1] && cur_end > spellbonuses.EndPercCap[1]))
cur_end = curEnd_cap; cur_end = curEnd_cap;
} }
} }

View File

@ -310,9 +310,9 @@ struct StatBonuses {
int16 IncreaseBlockChance; // overall block chance modifier int16 IncreaseBlockChance; // overall block chance modifier
uint16 PersistantCasting; // chance to continue casting through a stun uint16 PersistantCasting; // chance to continue casting through a stun
int XPRateMod; //i int XPRateMod; //i
int HPPercCap; //Spell effect that limits you to being healed/regening beyond a % of your max int HPPercCap[2]; //Spell effect that limits you to being healed/regening beyond a % of your max
int ManaPercCap; // ^^ int ManaPercCap[2]; // ^^ 0 = % Cap 1 = Flat Amount Cap
int EndPercCap; // ^^ int EndPercCap[2]; // ^^
bool BlockNextSpell; // Indicates whether the client can block a spell or not bool BlockNextSpell; // Indicates whether the client can block a spell or not
//uint16 BlockSpellEffect[EFFECT_COUNT]; // Prevents spells with certain effects from landing on you *no longer used //uint16 BlockSpellEffect[EFFECT_COUNT]; // Prevents spells with certain effects from landing on you *no longer used
bool ImmuneToFlee; // Bypass the fleeing flag bool ImmuneToFlee; // Bypass the fleeing flag

View File

@ -163,7 +163,7 @@ Mob* HateList::GetClosest(Mob *hater) {
++iterator; ++iterator;
} }
if (close == 0 && hater->IsNPC()) if (close == 0 && hater->IsNPC() || close->DivineAura())
close = hater->CastToNPC()->GetHateTop(); close = hater->CastToNPC()->GetHateTop();
return close; return close;

View File

@ -917,10 +917,10 @@ int32 Merc::CalcMaxHP() {
if (cur_hp > max_hp) if (cur_hp > max_hp)
cur_hp = max_hp; cur_hp = max_hp;
int hp_perc_cap = spellbonuses.HPPercCap; int hp_perc_cap = spellbonuses.HPPercCap[0];
if(hp_perc_cap) { if(hp_perc_cap) {
int curHP_cap = (max_hp * hp_perc_cap) / 100; int curHP_cap = (max_hp * hp_perc_cap) / 100;
if (cur_hp > curHP_cap) if (cur_hp > curHP_cap || (spellbonuses.HPPercCap[1] && cur_hp > spellbonuses.HPPercCap[1]))
cur_hp = curHP_cap; cur_hp = curHP_cap;
} }
@ -959,10 +959,10 @@ int32 Merc::CalcMaxMana()
cur_mana = max_mana; cur_mana = max_mana;
} }
int mana_perc_cap = spellbonuses.ManaPercCap; int mana_perc_cap = spellbonuses.ManaPercCap[0];
if(mana_perc_cap) { if(mana_perc_cap) {
int curMana_cap = (max_mana * mana_perc_cap) / 100; int curMana_cap = (max_mana * mana_perc_cap) / 100;
if (cur_mana > curMana_cap) if (cur_mana > curMana_cap || (spellbonuses.ManaPercCap[1] && cur_mana > spellbonuses.ManaPercCap[1]))
cur_mana = curMana_cap; cur_mana = curMana_cap;
} }
@ -1054,10 +1054,10 @@ void Merc::CalcMaxEndurance()
cur_end = max_end; cur_end = max_end;
} }
int end_perc_cap = spellbonuses.EndPercCap; int end_perc_cap = spellbonuses.EndPercCap[0];
if(end_perc_cap) { if(end_perc_cap) {
int curEnd_cap = (max_end * end_perc_cap) / 100; int curEnd_cap = (max_end * end_perc_cap) / 100;
if (cur_end > curEnd_cap) if (cur_end > curEnd_cap || (spellbonuses.EndPercCap[1] && cur_end > spellbonuses.EndPercCap[1]))
cur_end = curEnd_cap; cur_end = curEnd_cap;
} }
} }