mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 22:58:34 +00:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
@@ -2438,6 +2438,8 @@ void EntityList::Depop(bool StartSpawnTimer)
|
||||
if (pnpc->IsFindable())
|
||||
UpdateFindableNPCState(pnpc, true);
|
||||
|
||||
pnpc->WipeHateList();
|
||||
|
||||
pnpc->Depop(StartSpawnTimer);
|
||||
}
|
||||
}
|
||||
|
||||
+11
-3
@@ -1364,9 +1364,14 @@ void Mob::AI_Process() {
|
||||
*
|
||||
*/
|
||||
|
||||
Mob* tmptar = entity_list.AICheckCloseAggro(this, GetAggroRange(), GetAssistRange());
|
||||
if (tmptar)
|
||||
AddToHateList(tmptar);
|
||||
Mob* temp_target = entity_list.AICheckCloseAggro(this, GetAggroRange(), GetAssistRange());
|
||||
if (temp_target){
|
||||
AddToHateList(temp_target);
|
||||
}
|
||||
|
||||
AI_scan_area_timer->Disable();
|
||||
AI_scan_area_timer->Start(RandomTimer(RuleI(NPC, NPCToNPCAggroTimerMin), RuleI(NPC, NPCToNPCAggroTimerMax)), false);
|
||||
|
||||
}
|
||||
else if (AI_movement_timer->Check() && !IsRooted())
|
||||
{
|
||||
@@ -1867,6 +1872,9 @@ bool NPC::AI_IdleCastCheck() {
|
||||
//if we didnt cast any spells, our autocast timer just resets to the
|
||||
//last duration it was set to... try to put up a more reasonable timer...
|
||||
AIautocastspell_timer->Start(RandomTimer(AISpellVar.idle_no_sp_recast_min, AISpellVar.idle_no_sp_recast_max), false);
|
||||
|
||||
Log.Out(Logs::Moderate, Logs::Spells, "Triggering AI_IdleCastCheck :: Mob %s - Min : %u Max : %u", this->GetCleanName(), AISpellVar.idle_no_sp_recast_min, AISpellVar.idle_no_sp_recast_max);
|
||||
|
||||
} //else, spell casting finishing will reset the timer.
|
||||
} //else, spell casting finishing will reset the timer.
|
||||
return(true);
|
||||
|
||||
+20
-4
@@ -283,9 +283,13 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
|
||||
|
||||
//do any AAs apply to these spells?
|
||||
if(dmg < 0) {
|
||||
if (!PassCastRestriction(false, spells[spell_id].base2[i], true))
|
||||
break;
|
||||
dmg = -dmg;
|
||||
Damage(caster, dmg, spell_id, spell.skill, false, buffslot, false);
|
||||
} else {
|
||||
if (!PassCastRestriction(false, spells[spell_id].base2[i], false))
|
||||
break;
|
||||
HealDamage(dmg, caster);
|
||||
}
|
||||
break;
|
||||
@@ -3429,6 +3433,8 @@ void Mob::DoBuffTic(const Buffs_Struct &buff, int slot, Mob *caster)
|
||||
|
||||
switch (effect) {
|
||||
case SE_CurrentHP: {
|
||||
if (!PassCastRestriction(false, spells[buff.spellid].base2[i], true))
|
||||
break;
|
||||
effect_value = CalcSpellEffectValue(buff.spellid, i, buff.casterlevel, buff.instrument_mod,
|
||||
caster, buff.ticsremaining);
|
||||
// Handle client cast DOTs here.
|
||||
@@ -6224,16 +6230,17 @@ bool Mob::PassCastRestriction(bool UseCastRestriction, int16 value, bool IsDama
|
||||
Range 410 - 411 : UNKOWN
|
||||
Range 500 - 599 : Heal if HP less than a specified value
|
||||
Range 600 - 699 : Limit to Body Type [base2 - 600 = Body]
|
||||
Range 700 : UNKNOWN
|
||||
Range 700 : UNKNOWN -- Was added to higher HTs in Oct 21 2015 live patch
|
||||
Range 701 : NOT PET
|
||||
Range 800 : UKNOWN
|
||||
Range 818 - 819 : If Undead/If Not Undead
|
||||
Range 820 - 822 : UKNOWN
|
||||
Range 835 : Unknown *not implemented
|
||||
Range 836 - 837 : Progression Server / Live Server *not implemented
|
||||
Range 839 : Unknown *not implemented
|
||||
Range 836 - 837 : Progression Server / Live Server *not fully implemented
|
||||
Range 839 : Progression Server and GoD released -- broken until Oct 21 2015 on live *not fully implemented
|
||||
Range 842 - 844 : Humaniod lv MAX ((842 - 800) * 2)
|
||||
Range 845 - 847 : UNKNOWN
|
||||
Range 860 - 871 : Humanoid lv MAX 860 = 90, 871 = 104 *not implemented
|
||||
Range 10000 - 11000 : Limit to Race [base2 - 10000 = Race] (*Not on live: Too useful a function to not implement)
|
||||
THIS IS A WORK IN PROGRESS
|
||||
*/
|
||||
@@ -6402,6 +6409,15 @@ bool Mob::PassCastRestriction(bool UseCastRestriction, int16 value, bool IsDama
|
||||
return true;
|
||||
break;
|
||||
|
||||
case 836:
|
||||
return true; // todo implement progression flag assume not progression for now
|
||||
|
||||
case 837:
|
||||
return false; // todo implement progression flag assume not progression for now
|
||||
|
||||
case 839:
|
||||
return true; // todo implement progression flag assume not progression for now, this one is a check if GoD is live
|
||||
|
||||
case 842:
|
||||
if (GetBodyType() == BT_Humanoid && GetLevel() <= 84)
|
||||
return true;
|
||||
@@ -6789,4 +6805,4 @@ void Client::BreakFeignDeathWhenCastOn(bool IsResisted)
|
||||
SetFeigned(false);
|
||||
Message_StringID(MT_SpellFailure,FD_CAST_ON);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+3
-1
@@ -2267,7 +2267,9 @@ bool Mob::SpellFinished(uint16 spell_id, Mob *spell_target, uint16 slot, uint16
|
||||
}
|
||||
}
|
||||
// one may want to check if this is a disc or not, but we actually don't, there are non disc stuff that have end cost
|
||||
if (spells[spell_id].EndurCost) {
|
||||
// lets not consume end for custom items that have disc procs.
|
||||
// One might also want to filter out USE_ITEM_SPELL_SLOT, but DISCIPLINE_SPELL_SLOT are both #defined to the same thing ...
|
||||
if (spells[spell_id].EndurCost && !isproc) {
|
||||
auto end_cost = spells[spell_id].EndurCost;
|
||||
if (mgb)
|
||||
end_cost *= 2;
|
||||
|
||||
Reference in New Issue
Block a user