mirror of
https://github.com/EQEmu/Server.git
synced 2026-01-06 13:33:52 +00:00
Turn on NPC charm casting
This commit is contained in:
parent
4191c195c1
commit
a1cb8d7ae7
@ -2,6 +2,7 @@ EQEMu Changelog (Started on Sept 24, 2003 15:50)
|
|||||||
-------------------------------------------------------
|
-------------------------------------------------------
|
||||||
== 01/18/2014 ==
|
== 01/18/2014 ==
|
||||||
sorvani: Implemented for Lua eq.get_characters_in_instance(uint16 instance_id), return a Lua HashTable
|
sorvani: Implemented for Lua eq.get_characters_in_instance(uint16 instance_id), return a Lua HashTable
|
||||||
|
demonstar55: NPCs will now cast their charms.
|
||||||
|
|
||||||
== 01/13/2014 ==
|
== 01/13/2014 ==
|
||||||
Kayen: Numerous minor fixes to spell effects.
|
Kayen: Numerous minor fixes to spell effects.
|
||||||
|
|||||||
@ -233,7 +233,7 @@ bool NPC::AICastSpell(Mob* tar, uint8 iChance, uint16 iSpellTypes) {
|
|||||||
|
|
||||||
case SpellType_Charm:
|
case SpellType_Charm:
|
||||||
{
|
{
|
||||||
if(MakeRandomInt(0, 99) < 20)
|
if(!IsPet() && MakeRandomInt(0, 99) < 20)
|
||||||
{
|
{
|
||||||
Mob * chrmTar = GetHateRandom();
|
Mob * chrmTar = GetHateRandom();
|
||||||
if(chrmTar && chrmTar->CanBuffStack(AIspells[i].spellid, GetLevel(), true) >= 0)
|
if(chrmTar && chrmTar->CanBuffStack(AIspells[i].spellid, GetLevel(), true) >= 0)
|
||||||
@ -1881,7 +1881,7 @@ bool NPC::AI_EngagedCastCheck() {
|
|||||||
// try casting a heal on nearby
|
// try casting a heal on nearby
|
||||||
if (!entity_list.AICheckCloseBeneficialSpells(this, 25, MobAISpellRange, SpellType_Heal)) {
|
if (!entity_list.AICheckCloseBeneficialSpells(this, 25, MobAISpellRange, SpellType_Heal)) {
|
||||||
//nobody to heal, try some detrimental spells.
|
//nobody to heal, try some detrimental spells.
|
||||||
if(!AICastSpell(GetTarget(), 20, SpellType_Nuke | SpellType_Lifetap | SpellType_DOT | SpellType_Dispel | SpellType_Mez | SpellType_Slow | SpellType_Debuff)) {
|
if(!AICastSpell(GetTarget(), 20, SpellType_Nuke | SpellType_Lifetap | SpellType_DOT | SpellType_Dispel | SpellType_Mez | SpellType_Slow | SpellType_Debuff | SpellType_Charm)) {
|
||||||
//no spell to cast, try again soon.
|
//no spell to cast, try again soon.
|
||||||
AIautocastspell_timer->Start(RandomTimer(500, 1000), false);
|
AIautocastspell_timer->Start(RandomTimer(500, 1000), false);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user